Loading examples/CMakeLists.txt +1 −1 Original line number Diff line number Diff line add_subdirectory( heat-equation ) add_subdirectory( navier-stokes ) #add_subdirectory( mean-curvature-flow ) add_subdirectory( mean-curvature-flow ) src/operators/diffusion/tnlExactNonlinearDiffusion.h +13 −13 Original line number Diff line number Diff line Loading @@ -18,14 +18,14 @@ #ifndef TNLEXACTNONLINEARDIFFUSION_H_ #define TNLEXACTNONLINEARDIFFUSION_H_ #include <functions/tnlFunction.h> #include <functions/tnlDomain.h> template< typename OperatorQ, int Dimensions > class tnlExactNonlinearDiffusion {}; template< typename OperatorQ > class tnlExactNonlinearDiffusion< OperatorQ, 1 > : public tnlFunction< 1, SpaceDomain > class tnlExactNonlinearDiffusion< OperatorQ, 1 > : public tnlDomain< 1, SpaceDomain > { public: Loading @@ -40,13 +40,13 @@ class tnlExactNonlinearDiffusion< OperatorQ, 1 > : public tnlFunction< 1, SpaceD #endif __cuda_callable__ static Real operator()( const Function& function, Real operator()( const Function& function, const Vertex& v, const Real& time = 0.0 ); const Real& time = 0.0 ) const; }; template< typename OperatorQ > class tnlExactNonlinearDiffusion< OperatorQ, 2 > : public tnlFunction< 2, SpaceDomain > class tnlExactNonlinearDiffusion< OperatorQ, 2 > : public tnlDomain< 2, SpaceDomain > { public: Loading @@ -61,13 +61,13 @@ class tnlExactNonlinearDiffusion< OperatorQ, 2 > : public tnlFunction< 2, SpaceD #endif __cuda_callable__ static Real operator()( const Function& function, Real operator()( const Function& function, const Vertex& v, const Real& time = 0.0 ); const Real& time = 0.0 ) const; }; template< typename OperatorQ > class tnlExactNonlinearDiffusion< OperatorQ, 3 > : public tnlFunction< 3, SpaceDomain > class tnlExactNonlinearDiffusion< OperatorQ, 3 > : public tnlDomain< 3, SpaceDomain > { public: Loading @@ -82,9 +82,9 @@ class tnlExactNonlinearDiffusion< OperatorQ, 3 > : public tnlFunction< 3, SpaceD #endif __cuda_callable__ static Real operator()( const Function& function, Real operator()( const Function& function, const Vertex& v, const Real& time = 0.0 ); const Real& time = 0.0 ) const; }; #include "tnlExactNonlinearDiffusion_impl.h" Loading src/operators/diffusion/tnlExactNonlinearDiffusion_impl.h +3 −3 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ Real tnlExactNonlinearDiffusion< OperatorQ, 1 >:: operator()( const Function& function, const Vertex& v, const Real& time ) const Real& time ) const { return function.template getPartialDerivative< 2, 0, 0 >( v, time ) - function.template getPartialDerivative< 1, 0, 0 >( v, time ) * OperatorQ::template getPartialDerivative<1, 0, 0>(function, v, time ) / OperatorQ::template getPartialDerivative<0, 0, 0>(function, v, time ); Loading @@ -54,7 +54,7 @@ Real tnlExactNonlinearDiffusion< OperatorQ, 2 >:: operator()( const Function& function, const Vertex& v, const Real& time ) const Real& time ) const { return function.template getPartialDerivative< 2, 0, 0 >( v, time ) + function.template getPartialDerivative< 0, 2, 0 >( v, time ) -( OperatorQ::template getPartialDerivative<1, 0, 0> (function, v, time) * function.template getPartialDerivative< 1, 0, 0 >( v, time ) Loading @@ -77,7 +77,7 @@ Real tnlExactNonlinearDiffusion< OperatorQ, 3 >:: operator()( const Function& function, const Vertex& v, const Real& time ) const Real& time ) const { return function.template getPartialDerivative< 2, 0, 0 >( v, time ) + function.template getPartialDerivative< 0, 2, 0 >( v, time ) + function.template getPartialDerivative< 0, 0, 2 >( v, time ) Loading src/operators/diffusion/tnlNonlinearDiffusion_impl.h +3 −3 Original line number Diff line number Diff line Loading @@ -38,7 +38,7 @@ getValue( const MeshEntity& entity, const Vector& u, const Real& time ) const { return nonlinearDiffusionOperator.getValue( entity, u, time ); return nonlinearDiffusionOperator.getValue( u, entity, time ); } template< typename MeshReal, Loading Loading @@ -115,7 +115,7 @@ getValue( const MeshEntity& entity, const Vector& u, const Real& time ) const { return nonlinearDiffusionOperator.getValue( entity, u, time ); return nonlinearDiffusionOperator.getValue( u, entity, time ); } template< typename MeshReal, Loading Loading @@ -192,7 +192,7 @@ getValue( const MeshEntity& entity, const Vector& u, const Real& time ) const { return nonlinearDiffusionOperator.getValue( entity, u, time ); return nonlinearDiffusionOperator.getValue( u, entity, time ); } template< typename MeshReal, Loading src/operators/operator-Q/tnlExactOperatorQ.h +19 −20 Original line number Diff line number Diff line Loading @@ -4,14 +4,14 @@ #include <core/vectors/tnlVector.h> #include <core/vectors/tnlSharedVector.h> #include <mesh/tnlGrid.h> #include <functions/tnlFunction.h> #include <functions/tnlDomain.h> template< int Dimensions > class tnlExactOperatorQ {}; template<> class tnlExactOperatorQ< 1 > class tnlExactOperatorQ< 1 > : public tnlDomain< 1, SpaceDomain > { public: Loading @@ -24,12 +24,11 @@ class tnlExactOperatorQ< 1 > #else template< int XDiffOrder = 0, int YDiffOrder = 0, int ZDiffOrder = 0, typename Function, typename Vertex, typename Real = typename Vertex::RealType > #endif #ifdef HAVE_CUDA __device__ __host__ #endif static Real getValue( const Function& function, __cuda_callable__ static Real getPartialDerivative( const Function& function, const Vertex& v, const Real& time = 0.0, const Real& eps = 1.0 ); const Real& time = 0.0, const Real& eps = 1.0 ); }; Loading @@ -47,12 +46,12 @@ class tnlExactOperatorQ< 2 > #else template< int XDiffOrder = 0, int YDiffOrder = 0, int ZDiffOrder = 0, typename Function, typename Vertex, typename Real = typename Vertex::RealType > #endif #ifdef HAVE_CUDA __device__ __host__ #endif static Real getValue( const Function& function, __cuda_callable__ static Real getPartialDerivative( const Function& function, const Vertex& v, const Real& time = 0.0, const Real& eps = 1.0 ); const Real& time = 0.0, const Real& eps = 1.0 ); }; template<> Loading @@ -69,12 +68,12 @@ class tnlExactOperatorQ< 3 > #else template< int XDiffOrder = 0, int YDiffOrder = 0, int ZDiffOrder = 0, typename Function, typename Vertex, typename Real = typename Vertex::RealType > #endif #ifdef HAVE_CUDA __device__ __host__ #endif static Real getValue( const Function& function, __cuda_callable__ static Real getPartialDerivative( const Function& function, const Vertex& v, const Real& time = 0.0, const Real& eps = 1.0 ); const Real& time = 0.0, const Real& eps = 1.0 ); }; #include <operators/operator-Q/tnlExactOperatorQ_impl.h> Loading Loading
examples/CMakeLists.txt +1 −1 Original line number Diff line number Diff line add_subdirectory( heat-equation ) add_subdirectory( navier-stokes ) #add_subdirectory( mean-curvature-flow ) add_subdirectory( mean-curvature-flow )
src/operators/diffusion/tnlExactNonlinearDiffusion.h +13 −13 Original line number Diff line number Diff line Loading @@ -18,14 +18,14 @@ #ifndef TNLEXACTNONLINEARDIFFUSION_H_ #define TNLEXACTNONLINEARDIFFUSION_H_ #include <functions/tnlFunction.h> #include <functions/tnlDomain.h> template< typename OperatorQ, int Dimensions > class tnlExactNonlinearDiffusion {}; template< typename OperatorQ > class tnlExactNonlinearDiffusion< OperatorQ, 1 > : public tnlFunction< 1, SpaceDomain > class tnlExactNonlinearDiffusion< OperatorQ, 1 > : public tnlDomain< 1, SpaceDomain > { public: Loading @@ -40,13 +40,13 @@ class tnlExactNonlinearDiffusion< OperatorQ, 1 > : public tnlFunction< 1, SpaceD #endif __cuda_callable__ static Real operator()( const Function& function, Real operator()( const Function& function, const Vertex& v, const Real& time = 0.0 ); const Real& time = 0.0 ) const; }; template< typename OperatorQ > class tnlExactNonlinearDiffusion< OperatorQ, 2 > : public tnlFunction< 2, SpaceDomain > class tnlExactNonlinearDiffusion< OperatorQ, 2 > : public tnlDomain< 2, SpaceDomain > { public: Loading @@ -61,13 +61,13 @@ class tnlExactNonlinearDiffusion< OperatorQ, 2 > : public tnlFunction< 2, SpaceD #endif __cuda_callable__ static Real operator()( const Function& function, Real operator()( const Function& function, const Vertex& v, const Real& time = 0.0 ); const Real& time = 0.0 ) const; }; template< typename OperatorQ > class tnlExactNonlinearDiffusion< OperatorQ, 3 > : public tnlFunction< 3, SpaceDomain > class tnlExactNonlinearDiffusion< OperatorQ, 3 > : public tnlDomain< 3, SpaceDomain > { public: Loading @@ -82,9 +82,9 @@ class tnlExactNonlinearDiffusion< OperatorQ, 3 > : public tnlFunction< 3, SpaceD #endif __cuda_callable__ static Real operator()( const Function& function, Real operator()( const Function& function, const Vertex& v, const Real& time = 0.0 ); const Real& time = 0.0 ) const; }; #include "tnlExactNonlinearDiffusion_impl.h" Loading
src/operators/diffusion/tnlExactNonlinearDiffusion_impl.h +3 −3 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ Real tnlExactNonlinearDiffusion< OperatorQ, 1 >:: operator()( const Function& function, const Vertex& v, const Real& time ) const Real& time ) const { return function.template getPartialDerivative< 2, 0, 0 >( v, time ) - function.template getPartialDerivative< 1, 0, 0 >( v, time ) * OperatorQ::template getPartialDerivative<1, 0, 0>(function, v, time ) / OperatorQ::template getPartialDerivative<0, 0, 0>(function, v, time ); Loading @@ -54,7 +54,7 @@ Real tnlExactNonlinearDiffusion< OperatorQ, 2 >:: operator()( const Function& function, const Vertex& v, const Real& time ) const Real& time ) const { return function.template getPartialDerivative< 2, 0, 0 >( v, time ) + function.template getPartialDerivative< 0, 2, 0 >( v, time ) -( OperatorQ::template getPartialDerivative<1, 0, 0> (function, v, time) * function.template getPartialDerivative< 1, 0, 0 >( v, time ) Loading @@ -77,7 +77,7 @@ Real tnlExactNonlinearDiffusion< OperatorQ, 3 >:: operator()( const Function& function, const Vertex& v, const Real& time ) const Real& time ) const { return function.template getPartialDerivative< 2, 0, 0 >( v, time ) + function.template getPartialDerivative< 0, 2, 0 >( v, time ) + function.template getPartialDerivative< 0, 0, 2 >( v, time ) Loading
src/operators/diffusion/tnlNonlinearDiffusion_impl.h +3 −3 Original line number Diff line number Diff line Loading @@ -38,7 +38,7 @@ getValue( const MeshEntity& entity, const Vector& u, const Real& time ) const { return nonlinearDiffusionOperator.getValue( entity, u, time ); return nonlinearDiffusionOperator.getValue( u, entity, time ); } template< typename MeshReal, Loading Loading @@ -115,7 +115,7 @@ getValue( const MeshEntity& entity, const Vector& u, const Real& time ) const { return nonlinearDiffusionOperator.getValue( entity, u, time ); return nonlinearDiffusionOperator.getValue( u, entity, time ); } template< typename MeshReal, Loading Loading @@ -192,7 +192,7 @@ getValue( const MeshEntity& entity, const Vector& u, const Real& time ) const { return nonlinearDiffusionOperator.getValue( entity, u, time ); return nonlinearDiffusionOperator.getValue( u, entity, time ); } template< typename MeshReal, Loading
src/operators/operator-Q/tnlExactOperatorQ.h +19 −20 Original line number Diff line number Diff line Loading @@ -4,14 +4,14 @@ #include <core/vectors/tnlVector.h> #include <core/vectors/tnlSharedVector.h> #include <mesh/tnlGrid.h> #include <functions/tnlFunction.h> #include <functions/tnlDomain.h> template< int Dimensions > class tnlExactOperatorQ {}; template<> class tnlExactOperatorQ< 1 > class tnlExactOperatorQ< 1 > : public tnlDomain< 1, SpaceDomain > { public: Loading @@ -24,12 +24,11 @@ class tnlExactOperatorQ< 1 > #else template< int XDiffOrder = 0, int YDiffOrder = 0, int ZDiffOrder = 0, typename Function, typename Vertex, typename Real = typename Vertex::RealType > #endif #ifdef HAVE_CUDA __device__ __host__ #endif static Real getValue( const Function& function, __cuda_callable__ static Real getPartialDerivative( const Function& function, const Vertex& v, const Real& time = 0.0, const Real& eps = 1.0 ); const Real& time = 0.0, const Real& eps = 1.0 ); }; Loading @@ -47,12 +46,12 @@ class tnlExactOperatorQ< 2 > #else template< int XDiffOrder = 0, int YDiffOrder = 0, int ZDiffOrder = 0, typename Function, typename Vertex, typename Real = typename Vertex::RealType > #endif #ifdef HAVE_CUDA __device__ __host__ #endif static Real getValue( const Function& function, __cuda_callable__ static Real getPartialDerivative( const Function& function, const Vertex& v, const Real& time = 0.0, const Real& eps = 1.0 ); const Real& time = 0.0, const Real& eps = 1.0 ); }; template<> Loading @@ -69,12 +68,12 @@ class tnlExactOperatorQ< 3 > #else template< int XDiffOrder = 0, int YDiffOrder = 0, int ZDiffOrder = 0, typename Function, typename Vertex, typename Real = typename Vertex::RealType > #endif #ifdef HAVE_CUDA __device__ __host__ #endif static Real getValue( const Function& function, __cuda_callable__ static Real getPartialDerivative( const Function& function, const Vertex& v, const Real& time = 0.0, const Real& eps = 1.0 ); const Real& time = 0.0, const Real& eps = 1.0 ); }; #include <operators/operator-Q/tnlExactOperatorQ_impl.h> Loading