Loading src/operators/geometric/tnlExactGradientNorm.h +3 −3 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ class tnlExactGradientNorm< 1, Real > } tnlExactGradientNorm() : epsilonSquare( 1.0 ){}; : epsilonSquare( 0.0 ){}; void setRegularization( const Real& epsilon ) { Loading Loading @@ -111,7 +111,7 @@ class tnlExactGradientNorm< 2, Real > } tnlExactGradientNorm() : epsilonSquare( 1.0 ){}; : epsilonSquare( 0.0 ){}; void setRegularization( const Real& epsilon ) { Loading Loading @@ -185,7 +185,7 @@ class tnlExactGradientNorm< 3, Real > } tnlExactGradientNorm() : epsilonSquare( 1.0 ){}; : epsilonSquare( 0.0 ){}; void setRegularization( const Real& epsilon ) { Loading src/operators/geometric/tnlFDMGradientNorm.h +10 −4 Original line number Diff line number Diff line Loading @@ -45,6 +45,9 @@ class tnlFDMGradientNorm< tnlGrid< 1,MeshReal, Device, MeshIndex >, DifferenceOp typedef Device DeviceType; typedef Index IndexType; tnlFDMGradientNorm() : epsSquare( 0.0 ){} static tnlString getType() { return tnlString( "tnlFDMGradientNorm< " ) + Loading Loading @@ -95,6 +98,10 @@ class tnlFDMGradientNorm< tnlGrid< 2,MeshReal, Device, MeshIndex >, DifferenceOp typedef Device DeviceType; typedef Index IndexType; tnlFDMGradientNorm() : epsSquare( 0.0 ){} static tnlString getType() { return tnlString( "tnlFDMGradientNorm< " ) + Loading Loading @@ -151,6 +158,9 @@ class tnlFDMGradientNorm< tnlGrid< 3, MeshReal, Device, MeshIndex >, DifferenceO typedef Device DeviceType; typedef Index IndexType; tnlFDMGradientNorm() : epsSquare( 0.0 ){} static tnlString getType() { return tnlString( "tnlFDMGradientNorm< " ) + Loading @@ -168,10 +178,6 @@ class tnlFDMGradientNorm< tnlGrid< 3, MeshReal, Device, MeshIndex >, DifferenceO DifferenceOperatorTemplate< typename MeshEntity::MeshType, 1, 0, 0, Real, Index > XDifferenceOperator; DifferenceOperatorTemplate< typename MeshEntity::MeshType, 0, 1, 0, Real, Index > YDifferenceOperator; DifferenceOperatorTemplate< typename MeshEntity::MeshType, 0, 0, 1, Real, Index > ZDifferenceOperator; //const IndexType& cellIndex = entity.getIndex(); //const typename MeshEntity::template NeighbourEntities< 2 >& neighbourEntities = entity.getNeighbourEntities(); //const typename MeshEntity::MeshType& mesh = entity.getMesh(); //const RealType& u_c = u[ cellIndex ]; const RealType u_x = XDifferenceOperator( u, entity ); const RealType u_y = YDifferenceOperator( u, entity ); const RealType u_z = ZDifferenceOperator( u, entity ); Loading tests/unit-tests/operators/geometric/tnlFDMGradientNormTest.h +2 −2 Original line number Diff line number Diff line Loading @@ -94,7 +94,7 @@ class tnlPDEOperatorEocTestResult< static Real getL2Tolerance() { return ( Real ) 0.05; }; static Real getMaxEoc() { return ( Real ) 2.0; }; static Real getMaxTolerance() { return ( Real ) 0.05; }; static Real getMaxTolerance() { return ( Real ) 0.1; }; }; Loading Loading @@ -160,7 +160,7 @@ bool setGrid() int main( int argc, char* argv[] ) { const int meshSize( 32 ); const bool verbose( false ); const bool verbose( true ); #ifdef HAVE_CPPUNIT return setGrid< tnlHost, meshSize, verbose >(); #else Loading Loading
src/operators/geometric/tnlExactGradientNorm.h +3 −3 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ class tnlExactGradientNorm< 1, Real > } tnlExactGradientNorm() : epsilonSquare( 1.0 ){}; : epsilonSquare( 0.0 ){}; void setRegularization( const Real& epsilon ) { Loading Loading @@ -111,7 +111,7 @@ class tnlExactGradientNorm< 2, Real > } tnlExactGradientNorm() : epsilonSquare( 1.0 ){}; : epsilonSquare( 0.0 ){}; void setRegularization( const Real& epsilon ) { Loading Loading @@ -185,7 +185,7 @@ class tnlExactGradientNorm< 3, Real > } tnlExactGradientNorm() : epsilonSquare( 1.0 ){}; : epsilonSquare( 0.0 ){}; void setRegularization( const Real& epsilon ) { Loading
src/operators/geometric/tnlFDMGradientNorm.h +10 −4 Original line number Diff line number Diff line Loading @@ -45,6 +45,9 @@ class tnlFDMGradientNorm< tnlGrid< 1,MeshReal, Device, MeshIndex >, DifferenceOp typedef Device DeviceType; typedef Index IndexType; tnlFDMGradientNorm() : epsSquare( 0.0 ){} static tnlString getType() { return tnlString( "tnlFDMGradientNorm< " ) + Loading Loading @@ -95,6 +98,10 @@ class tnlFDMGradientNorm< tnlGrid< 2,MeshReal, Device, MeshIndex >, DifferenceOp typedef Device DeviceType; typedef Index IndexType; tnlFDMGradientNorm() : epsSquare( 0.0 ){} static tnlString getType() { return tnlString( "tnlFDMGradientNorm< " ) + Loading Loading @@ -151,6 +158,9 @@ class tnlFDMGradientNorm< tnlGrid< 3, MeshReal, Device, MeshIndex >, DifferenceO typedef Device DeviceType; typedef Index IndexType; tnlFDMGradientNorm() : epsSquare( 0.0 ){} static tnlString getType() { return tnlString( "tnlFDMGradientNorm< " ) + Loading @@ -168,10 +178,6 @@ class tnlFDMGradientNorm< tnlGrid< 3, MeshReal, Device, MeshIndex >, DifferenceO DifferenceOperatorTemplate< typename MeshEntity::MeshType, 1, 0, 0, Real, Index > XDifferenceOperator; DifferenceOperatorTemplate< typename MeshEntity::MeshType, 0, 1, 0, Real, Index > YDifferenceOperator; DifferenceOperatorTemplate< typename MeshEntity::MeshType, 0, 0, 1, Real, Index > ZDifferenceOperator; //const IndexType& cellIndex = entity.getIndex(); //const typename MeshEntity::template NeighbourEntities< 2 >& neighbourEntities = entity.getNeighbourEntities(); //const typename MeshEntity::MeshType& mesh = entity.getMesh(); //const RealType& u_c = u[ cellIndex ]; const RealType u_x = XDifferenceOperator( u, entity ); const RealType u_y = YDifferenceOperator( u, entity ); const RealType u_z = ZDifferenceOperator( u, entity ); Loading
tests/unit-tests/operators/geometric/tnlFDMGradientNormTest.h +2 −2 Original line number Diff line number Diff line Loading @@ -94,7 +94,7 @@ class tnlPDEOperatorEocTestResult< static Real getL2Tolerance() { return ( Real ) 0.05; }; static Real getMaxEoc() { return ( Real ) 2.0; }; static Real getMaxTolerance() { return ( Real ) 0.05; }; static Real getMaxTolerance() { return ( Real ) 0.1; }; }; Loading Loading @@ -160,7 +160,7 @@ bool setGrid() int main( int argc, char* argv[] ) { const int meshSize( 32 ); const bool verbose( false ); const bool verbose( true ); #ifdef HAVE_CPPUNIT return setGrid< tnlHost, meshSize, verbose >(); #else Loading