Loading examples/hamilton-jacobi/hamiltonJacobiProblemConfig.h +3 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,9 @@ class hamiltonJacobiProblemConfig config.addEntry < tnlString > ( "scheme", "This defines scheme used for discretization.", "godunov" ); config.addEntryEnum( "godunov" ); config.addEntryEnum( "upwind" ); config.addEntry < double > ( "epsilon", "This defines epsilon for smoothening oh sign().", 0.0 ); config.addEntryEnum( "godunov2" ); config.addEntryEnum( "upwind2" ); config.addEntry < double > ( "epsilon", "This defines epsilon for smoothening of sign().", 0.0 ); config.addEntry < double > ( "-value", "Constant value of RHS.", 0.0 ); } }; Loading examples/hamilton-jacobi/hamiltonJacobiProblemSetter.h +2 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,8 @@ #include <operators/godunov-eikonal/godunovEikonal.h> #include <operators/upwind/upwind.h> #include <operators/godunov/godunov.h> #include <functions/tnlSDFSign.h> #include <functions/tnlSDFGridValue.h> template< typename RealType, typename DeviceType, Loading examples/hamilton-jacobi/hamiltonJacobiProblemSetter_impl.h +22 −3 Original line number Diff line number Diff line Loading @@ -36,7 +36,6 @@ bool hamiltonJacobiProblemSetter< RealType, DeviceType, IndexType, MeshType, Con } else { typedef tnlConstantFunction< Dimensions, RealType > RightHandSide; typedef tnlStaticVector < Dimensions, RealType > Vertex; typedef tnlNeumannReflectionBoundaryConditions< MeshType, RealType, IndexType > BoundaryConditions; Loading @@ -47,15 +46,35 @@ bool hamiltonJacobiProblemSetter< RealType, DeviceType, IndexType, MeshType, Con if( schemeName == "upwind" ) { typedef upwindEikonalScheme< MeshType, RealType, IndexType > Operator; typedef tnlConstantFunction< Dimensions, RealType > RightHandSide; typedef hamiltonJacobiProblemSolver< MeshType, Operator, BoundaryConditions, RightHandSide > Solver; return solverStarter.template run< Solver >( parameters ); } else if ( schemeName == "godunov") { typedef godunovEikonalScheme< MeshType, RealType, IndexType > Operator; typedef tnlConstantFunction< Dimensions, RealType > RightHandSide; typedef hamiltonJacobiProblemSolver< MeshType, Operator, BoundaryConditions, RightHandSide > Solver; return solverStarter.template run< Solver >( parameters ); } else if( schemeName == "upwind2" ) { typedef tnlSDFSign< MeshType, Dimensions, RealType, tnlSDFGridValue<MeshType, Dimensions, RealType>, 1 > Sign; typedef tnlSDFSign< MeshType, Dimensions, RealType, tnlSDFGridValue<MeshType, Dimensions, RealType>, 1 > RightHandSide; typedef upwindScheme< MeshType, RealType, IndexType, Sign > Operator; typedef hamiltonJacobiProblemSolver< MeshType, Operator, BoundaryConditions, RightHandSide > Solver; return solverStarter.template run< Solver >( parameters ); } else if ( schemeName == "godunov2") { typedef tnlSDFSign< MeshType, Dimensions, RealType, tnlSDFGridValue<MeshType, Dimensions, RealType>, 1 > Sign; typedef tnlSDFSign< MeshType, Dimensions, RealType, tnlSDFGridValue<MeshType, Dimensions, RealType>, 1 > RightHandSide; typedef godunovScheme< MeshType, RealType, IndexType, Sign > Operator; typedef hamiltonJacobiProblemSolver< MeshType, Operator, BoundaryConditions, RightHandSide > Solver; return solverStarter.template run< Solver >( parameters ); } else cerr << "Unknown scheme '" << schemeName << "'." << endl; Loading examples/hamilton-jacobi/hamiltonJacobiProblemSolver_impl.h +2 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ #include <core/mfilename.h> #include <matrices/tnlMatrixSetter.h> #include <exception> template< typename Mesh, typename HamiltonJacobi, Loading Loading @@ -121,6 +122,7 @@ bindDofs( const MeshType& mesh, this->solution.bind( dofVector.getData(), dofs ); } template< typename Mesh, typename HamiltonJacobi, typename BoundaryCondition, Loading src/functions/CMakeLists.txt +3 −1 Original line number Diff line number Diff line Loading @@ -10,7 +10,9 @@ SET( headers tnlFunctionDiscretizer.h tnlSDFSinWaveFunctionSDF.h tnlSDFParaboloid.h tnlSDFParaboloidSDF.h tnlSDFSchemeTest.h ) tnlSDFSchemeTest.h tnlSDFSign.h tnlSDFGridValue.h ) SET( libtnlfunctionsincludedir ${TNL_INCLUDE_DIR}/functions ) SET( libtnlfunctionsinclude_HEADERS ${headers} ) Loading Loading
examples/hamilton-jacobi/hamiltonJacobiProblemConfig.h +3 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,9 @@ class hamiltonJacobiProblemConfig config.addEntry < tnlString > ( "scheme", "This defines scheme used for discretization.", "godunov" ); config.addEntryEnum( "godunov" ); config.addEntryEnum( "upwind" ); config.addEntry < double > ( "epsilon", "This defines epsilon for smoothening oh sign().", 0.0 ); config.addEntryEnum( "godunov2" ); config.addEntryEnum( "upwind2" ); config.addEntry < double > ( "epsilon", "This defines epsilon for smoothening of sign().", 0.0 ); config.addEntry < double > ( "-value", "Constant value of RHS.", 0.0 ); } }; Loading
examples/hamilton-jacobi/hamiltonJacobiProblemSetter.h +2 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,8 @@ #include <operators/godunov-eikonal/godunovEikonal.h> #include <operators/upwind/upwind.h> #include <operators/godunov/godunov.h> #include <functions/tnlSDFSign.h> #include <functions/tnlSDFGridValue.h> template< typename RealType, typename DeviceType, Loading
examples/hamilton-jacobi/hamiltonJacobiProblemSetter_impl.h +22 −3 Original line number Diff line number Diff line Loading @@ -36,7 +36,6 @@ bool hamiltonJacobiProblemSetter< RealType, DeviceType, IndexType, MeshType, Con } else { typedef tnlConstantFunction< Dimensions, RealType > RightHandSide; typedef tnlStaticVector < Dimensions, RealType > Vertex; typedef tnlNeumannReflectionBoundaryConditions< MeshType, RealType, IndexType > BoundaryConditions; Loading @@ -47,15 +46,35 @@ bool hamiltonJacobiProblemSetter< RealType, DeviceType, IndexType, MeshType, Con if( schemeName == "upwind" ) { typedef upwindEikonalScheme< MeshType, RealType, IndexType > Operator; typedef tnlConstantFunction< Dimensions, RealType > RightHandSide; typedef hamiltonJacobiProblemSolver< MeshType, Operator, BoundaryConditions, RightHandSide > Solver; return solverStarter.template run< Solver >( parameters ); } else if ( schemeName == "godunov") { typedef godunovEikonalScheme< MeshType, RealType, IndexType > Operator; typedef tnlConstantFunction< Dimensions, RealType > RightHandSide; typedef hamiltonJacobiProblemSolver< MeshType, Operator, BoundaryConditions, RightHandSide > Solver; return solverStarter.template run< Solver >( parameters ); } else if( schemeName == "upwind2" ) { typedef tnlSDFSign< MeshType, Dimensions, RealType, tnlSDFGridValue<MeshType, Dimensions, RealType>, 1 > Sign; typedef tnlSDFSign< MeshType, Dimensions, RealType, tnlSDFGridValue<MeshType, Dimensions, RealType>, 1 > RightHandSide; typedef upwindScheme< MeshType, RealType, IndexType, Sign > Operator; typedef hamiltonJacobiProblemSolver< MeshType, Operator, BoundaryConditions, RightHandSide > Solver; return solverStarter.template run< Solver >( parameters ); } else if ( schemeName == "godunov2") { typedef tnlSDFSign< MeshType, Dimensions, RealType, tnlSDFGridValue<MeshType, Dimensions, RealType>, 1 > Sign; typedef tnlSDFSign< MeshType, Dimensions, RealType, tnlSDFGridValue<MeshType, Dimensions, RealType>, 1 > RightHandSide; typedef godunovScheme< MeshType, RealType, IndexType, Sign > Operator; typedef hamiltonJacobiProblemSolver< MeshType, Operator, BoundaryConditions, RightHandSide > Solver; return solverStarter.template run< Solver >( parameters ); } else cerr << "Unknown scheme '" << schemeName << "'." << endl; Loading
examples/hamilton-jacobi/hamiltonJacobiProblemSolver_impl.h +2 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ #include <core/mfilename.h> #include <matrices/tnlMatrixSetter.h> #include <exception> template< typename Mesh, typename HamiltonJacobi, Loading Loading @@ -121,6 +122,7 @@ bindDofs( const MeshType& mesh, this->solution.bind( dofVector.getData(), dofs ); } template< typename Mesh, typename HamiltonJacobi, typename BoundaryCondition, Loading
src/functions/CMakeLists.txt +3 −1 Original line number Diff line number Diff line Loading @@ -10,7 +10,9 @@ SET( headers tnlFunctionDiscretizer.h tnlSDFSinWaveFunctionSDF.h tnlSDFParaboloid.h tnlSDFParaboloidSDF.h tnlSDFSchemeTest.h ) tnlSDFSchemeTest.h tnlSDFSign.h tnlSDFGridValue.h ) SET( libtnlfunctionsincludedir ${TNL_INCLUDE_DIR}/functions ) SET( libtnlfunctionsinclude_HEADERS ${headers} ) Loading