Commit fcfcea32 authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Fixing mean curvature test.

parent 4b958da9
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ template< typename Operator,
          typename MeshFunction,
          typename BoundaryConditions >
class tnlOperatorFunction< Operator, MeshFunction, BoundaryConditions, true >
 : public tnlDomain< Operator::getDimensions(), MeshDomain >
 : public tnlDomain< Operator::getMeshDimensions(), MeshDomain >
{   
};

@@ -74,6 +74,7 @@ class tnlOperatorFunction< Operator, MeshFunction, void, true >
      typedef typename OperatorType::RealType RealType;
      typedef typename OperatorType::DeviceType DeviceType;
      typedef typename OperatorType::IndexType IndexType;
      typedef typename OperatorType::ExactOperatorType ExactOperatorType;
      
      static constexpr int getEntitiesDimensions() { return OperatorType::getImageEntitiesDimensions(); };     
      
@@ -144,6 +145,7 @@ class tnlOperatorFunction< Operator, PreimageFunction, void, false >
      typedef typename OperatorType::IndexType IndexType;
      typedef tnlMeshFunction< MeshType, Operator::getImageEntitiesDimensions() > ImageFunctionType;
      typedef tnlOperatorFunction< Operator, PreimageFunction, void, true > OperatorFunction;
      typedef typename OperatorType::ExactOperatorType ExactOperatorType;
      
      static constexpr int getEntitiesDimensions() { return OperatorType::getImageEntitiesDimensions(); };     
      
@@ -226,7 +228,7 @@ template< typename Operator,
          typename PreimageFunction,
          typename BoundaryConditions >
class tnlOperatorFunction< Operator, PreimageFunction, BoundaryConditions, false >
  : public tnlDomain< Operator::getDimensions(), MeshDomain >
  : public tnlDomain< Operator::getMeshDimensions(), MeshDomain >
{   
   public:
      
@@ -248,6 +250,7 @@ class tnlOperatorFunction< Operator, PreimageFunction, BoundaryConditions, false
      typedef tnlMeshFunction< MeshType, Operator::getImageEntitiesDimensions() > ImageFunctionType;
      typedef BoundaryConditions BoundaryConditionsType;
      typedef tnlOperatorFunction< Operator, PreimageFunction, void, true > OperatorFunction;
      typedef typename OperatorType::ExactOperatorType ExactOperatorType;
      
      static constexpr int getEntitiesDimensions() { return OperatorType::getImageEntitiesDimensions(); };     
      
+4 −4
Original line number Diff line number Diff line
/***************************************************************************
                          tnlOneSidedTotalVariationMinimization.h  -  description
                          tnlOneSidedMeanCurvature.h  -  description
                             -------------------
    begin                : Feb 17, 2016
    copyright            : (C) 2016 by oberhuber
@@ -30,7 +30,7 @@ template< typename Mesh,
          typename Real = typename Mesh::RealType,
          typename Index = typename Mesh::IndexType,
          bool EvaluateNonlinearityOnFly = false >
class tnlOneSidedTotalVariationMinimization
class tnlOneSidedMeanCurvature
   : public tnlOperator< Mesh, MeshInteriorDomain, Mesh::getMeshDimensions(), Mesh::getMeshDimensions(), Real, Index >
{
   public:
@@ -46,13 +46,13 @@ class tnlOneSidedTotalVariationMinimization
      typedef tnlOperatorFunction< NonlinearityOperator, NonlinearityMeshFunction, NonlinearityBoundaryConditions, EvaluateNonlinearityOnFly > Nonlinearity;
      typedef tnlOneSidedNonlinearDiffusion< Mesh, Nonlinearity, RealType, IndexType > NonlinearDiffusion;
      
      tnlOneSidedTotalVariationMinimization()
      tnlOneSidedMeanCurvature()
      : nonlinearity( gradientNorm, nonlinearityBoundaryConditions ),
        nonlinearDiffusion( nonlinearity ){}
      
      static tnlString getType()
      {
         return tnlString( "tnlOneSidedTotalVariationMinimization< " ) +
         return tnlString( "tnlOneSidedMeanCurvature< " ) +
            MeshType::getType() + ", " +
            ::getType< Real >() + ", " +
            ::getType< Index >() + " >";         
+10 −0
Original line number Diff line number Diff line
@@ -18,8 +18,18 @@
#ifndef TNLFUNCTIONINVERSEOPERATOR_H
#define	TNLFUNCTIONINVERSEOPERATOR_H

#include <core/tnlString.h>
#include <core/tnlCuda.h>
#include <operators/tnlOperator.h>

template< typename Operator >
class tnlFunctionInverseOperator
: public tnlOperator< typename Operator::MeshType,
                      Operator::getDomainType(),
                      Operator::getPreimageEntitiesDimensions(),
                      Operator::getImageEntitiesDimensions(),
                      typename Operator::RealType,
                      typename Operator::IndexType >
{
   public:
      
+2 −0
Original line number Diff line number Diff line
#ifndef TNLNEUMANNBOUNDARYCONDITIONS_IMPL_H
#define	TNLNEUMANNBOUNDARYCONDITIONS_IMPL_H

#include <functions/tnlFunctionAdapter.h>

template< typename Function >
void
tnlNeumannBoundaryConditionsBase< Function >::
+5 −2
Original line number Diff line number Diff line
@@ -19,9 +19,11 @@
#ifndef TNLOPERATOR_H
#define	TNLOPERATOR_H

#include <functions/tnlDomain.h>

template< typename Mesh,
          tnlDomainType DomainType = MeshInteriorDomain,
          int DomainEntitiesDimensions = Mesh::getMeshDimensions(),
          int PreimageEntitiesDimensions = Mesh::getMeshDimensions(),
          int ImageEntitiesDimensions = Mesh::getMeshDimensions(),
          typename Real = typename Mesh::RealType,
          typename Index = typename Mesh::IndexType >
@@ -36,7 +38,8 @@ class tnlOperator : public tnlDomain< Mesh::getMeshDimensions(), DomainType >
      typedef Real RealType;
      typedef Index IndexType;
      
      constexpr static int getPreimageEntitiesDimensions() { return DomainEntitiesDimensions; }
      constexpr static int getMeshDimensions() { return MeshType::getMeshDimensions(); }
      constexpr static int getPreimageEntitiesDimensions() { return PreimageEntitiesDimensions; }
      constexpr static int getImageEntitiesDimensions() { return ImageEntitiesDimensions; }
      
      bool refresh( const RealType& time = 0.0 ) { return true; }
Loading