Loading examples/advection/advectionProblem.h +2 −1 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ template< typename Mesh, typename DifferentialOperator > class advectionProblem: public tnlPDEProblem< Mesh, TimeDependentProblem, typename DifferentialOperator::RealType, typename Mesh::DeviceType, typename DifferentialOperator::IndexType > Loading @@ -20,7 +21,7 @@ class advectionProblem: typedef typename Mesh::DeviceType DeviceType; typedef typename DifferentialOperator::IndexType IndexType; typedef tnlMeshFunction< Mesh > MeshFunctionType; typedef tnlPDEProblem< Mesh, RealType, DeviceType, IndexType > BaseType; typedef tnlPDEProblem< Mesh, TimeDependentProblem, RealType, DeviceType, IndexType > BaseType; using typename BaseType::MeshType; using typename BaseType::DofVectorType; Loading examples/fast-sweeping/tnlFastSweepingSolver.h 0 → 100644 +34 −0 Original line number Diff line number Diff line /* * File: tnlFastSweepingSolver.h * Author: oberhuber * * Created on July 12, 2016, 6:04 PM */ #pragma once #include <functions/tnlConstantFunction.h> #include <problems/tnlPDEProblem.h> template< typename Mesh, typename Anisotropy = tnlConstanstFunction< Mesh > > class tnlFastSweepingSolver : public tnlPDEProblem< Mesh, typename Mesh::RealType, typename Mesh::DeviceType, typename Mesh::IndexType > { public: typedef typename DifferentialOperator::RealType RealType; typedef typename Mesh::DeviceType DeviceType; typedef typename DifferentialOperator::IndexType IndexType; typedef tnlMeshFunction< Mesh > MeshFunctionType; typedef tnlPDEProblem< Mesh, TimeDependentProblem, RealType, DeviceType, IndexType > BaseType; using typename BaseType::MeshType; using typename BaseType::DofVectorType; using typename BaseType::MeshDependentDataType; }; examples/hamilton-jacobi/HamiltonJacobiProblem.h +39 −42 Original line number Diff line number Diff line Loading @@ -30,11 +30,11 @@ template< typename Mesh, typename BoundaryCondition, typename RightHandSide> class HamiltonJacobiProblem : public tnlPDEProblem< Mesh, TimeDependentProblem, typename DifferentialOperator::RealType, typename Mesh::DeviceType, typename DifferentialOperator::IndexType > { public: typedef typename DifferentialOperator::RealType RealType; Loading @@ -42,7 +42,7 @@ class HamiltonJacobiProblem : public tnlPDEProblem< Mesh, typedef typename DifferentialOperator::IndexType IndexType; typedef tnlMeshFunction< Mesh > MeshFunctionType; typedef tnlPDEProblem< Mesh, RealType, DeviceType, IndexType > BaseType; typedef tnlPDEProblem< Mesh, TimeDependentProblem, RealType, DeviceType, IndexType > BaseType; using typename BaseType::MeshType; using typename BaseType::DofVectorType; Loading Loading @@ -91,9 +91,6 @@ class HamiltonJacobiProblem : public tnlPDEProblem< Mesh, BoundaryCondition boundaryCondition; RightHandSide rightHandSide; //bool schemeTest; //bool tested; }; #include "HamiltonJacobiProblem_impl.h" Loading examples/hamilton-jacobi/HamiltonJacobiProblemConfig.h +1 −3 Original line number Diff line number Diff line Loading @@ -27,11 +27,9 @@ class HamiltonJacobiProblemConfig { config.addDelimiter( "Hamilton-Jacobi solver settings:" ); config.addEntry < tnlString > ( "problem-name", "This defines particular problem.", "hamilton-jacobi" ); config.addEntry < tnlString > ( "scheme", "This defines scheme used for discretization.", "upwind" ); config.addEntry < tnlString > ( "scheme", "This defines scheme used for discretization.", "godunov" ); config.addEntryEnum( "godunov" ); config.addEntryEnum( "upwind" ); config.addEntryEnum( "godunov2" ); config.addEntryEnum( "upwind2" ); config.addEntry < double > ( "epsilon", "This defines epsilon for smoothening of sign().", 3.0 ); config.addEntry < double > ( "-value", "Constant value of RHS.", 0.0 ); } Loading examples/hamilton-jacobi/HamiltonJacobiProblemSetter_impl.h +7 −28 Original line number Diff line number Diff line Loading @@ -20,12 +20,8 @@ #include <functions/tnlConstantFunction.h> #include <operators/tnlNeumannBoundaryConditions.h> #include <operators/tnlDirichletBoundaryConditions.h> #include <operators/hamilton-jacobi/upwind-eikonal/upwindEikonal.h> //#include <operators/hamilton-jacobi/godunov-eikonal/godunovEikonal.h> //#include <operators/hamilton-jacobi/upwind/upwind.h> //#include <operators/hamilton-jacobi/godunov/godunov.h> //#include <functions/tnlSDFSign.h> //#include <functions/tnlSDFGridValue.h> #include <operators/hamilton-jacobi/upwindEikonal.h> #include <operators/hamilton-jacobi/godunovEikonal.h> #include <operators/hamilton-jacobi/tnlEikonalOperator.h> Loading Loading @@ -62,31 +58,14 @@ bool HamiltonJacobiProblemSetter< RealType, DeviceType, IndexType, MeshType, Con typedef HamiltonJacobiProblem< MeshType, Operator, BoundaryConditions, RightHandSide > Solver; return solverStarter.template run< Solver >( parameters ); } /*else if ( schemeName == "godunov") if( schemeName == "godunov" ) { typedef godunovEikonalScheme< MeshType, RealType, IndexType > Operator; typedef godunovEikonalScheme< MeshType, RealType, IndexType > GradientNormOperator; typedef tnlConstantFunction< Dimensions, RealType > RightHandSide; typedef tnlEikonalOperator< GradientNormOperator, RightHandSide > Operator; typedef HamiltonJacobiProblem< 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 HamiltonJacobiProblem< 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 HamiltonJacobiProblem< MeshType, Operator, BoundaryConditions, RightHandSide > Solver; return solverStarter.template run< Solver >( parameters ); }*/ else cerr << "Unknown scheme '" << schemeName << "'." << endl; Loading Loading
examples/advection/advectionProblem.h +2 −1 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ template< typename Mesh, typename DifferentialOperator > class advectionProblem: public tnlPDEProblem< Mesh, TimeDependentProblem, typename DifferentialOperator::RealType, typename Mesh::DeviceType, typename DifferentialOperator::IndexType > Loading @@ -20,7 +21,7 @@ class advectionProblem: typedef typename Mesh::DeviceType DeviceType; typedef typename DifferentialOperator::IndexType IndexType; typedef tnlMeshFunction< Mesh > MeshFunctionType; typedef tnlPDEProblem< Mesh, RealType, DeviceType, IndexType > BaseType; typedef tnlPDEProblem< Mesh, TimeDependentProblem, RealType, DeviceType, IndexType > BaseType; using typename BaseType::MeshType; using typename BaseType::DofVectorType; Loading
examples/fast-sweeping/tnlFastSweepingSolver.h 0 → 100644 +34 −0 Original line number Diff line number Diff line /* * File: tnlFastSweepingSolver.h * Author: oberhuber * * Created on July 12, 2016, 6:04 PM */ #pragma once #include <functions/tnlConstantFunction.h> #include <problems/tnlPDEProblem.h> template< typename Mesh, typename Anisotropy = tnlConstanstFunction< Mesh > > class tnlFastSweepingSolver : public tnlPDEProblem< Mesh, typename Mesh::RealType, typename Mesh::DeviceType, typename Mesh::IndexType > { public: typedef typename DifferentialOperator::RealType RealType; typedef typename Mesh::DeviceType DeviceType; typedef typename DifferentialOperator::IndexType IndexType; typedef tnlMeshFunction< Mesh > MeshFunctionType; typedef tnlPDEProblem< Mesh, TimeDependentProblem, RealType, DeviceType, IndexType > BaseType; using typename BaseType::MeshType; using typename BaseType::DofVectorType; using typename BaseType::MeshDependentDataType; };
examples/hamilton-jacobi/HamiltonJacobiProblem.h +39 −42 Original line number Diff line number Diff line Loading @@ -30,11 +30,11 @@ template< typename Mesh, typename BoundaryCondition, typename RightHandSide> class HamiltonJacobiProblem : public tnlPDEProblem< Mesh, TimeDependentProblem, typename DifferentialOperator::RealType, typename Mesh::DeviceType, typename DifferentialOperator::IndexType > { public: typedef typename DifferentialOperator::RealType RealType; Loading @@ -42,7 +42,7 @@ class HamiltonJacobiProblem : public tnlPDEProblem< Mesh, typedef typename DifferentialOperator::IndexType IndexType; typedef tnlMeshFunction< Mesh > MeshFunctionType; typedef tnlPDEProblem< Mesh, RealType, DeviceType, IndexType > BaseType; typedef tnlPDEProblem< Mesh, TimeDependentProblem, RealType, DeviceType, IndexType > BaseType; using typename BaseType::MeshType; using typename BaseType::DofVectorType; Loading Loading @@ -91,9 +91,6 @@ class HamiltonJacobiProblem : public tnlPDEProblem< Mesh, BoundaryCondition boundaryCondition; RightHandSide rightHandSide; //bool schemeTest; //bool tested; }; #include "HamiltonJacobiProblem_impl.h" Loading
examples/hamilton-jacobi/HamiltonJacobiProblemConfig.h +1 −3 Original line number Diff line number Diff line Loading @@ -27,11 +27,9 @@ class HamiltonJacobiProblemConfig { config.addDelimiter( "Hamilton-Jacobi solver settings:" ); config.addEntry < tnlString > ( "problem-name", "This defines particular problem.", "hamilton-jacobi" ); config.addEntry < tnlString > ( "scheme", "This defines scheme used for discretization.", "upwind" ); config.addEntry < tnlString > ( "scheme", "This defines scheme used for discretization.", "godunov" ); config.addEntryEnum( "godunov" ); config.addEntryEnum( "upwind" ); config.addEntryEnum( "godunov2" ); config.addEntryEnum( "upwind2" ); config.addEntry < double > ( "epsilon", "This defines epsilon for smoothening of sign().", 3.0 ); config.addEntry < double > ( "-value", "Constant value of RHS.", 0.0 ); } Loading
examples/hamilton-jacobi/HamiltonJacobiProblemSetter_impl.h +7 −28 Original line number Diff line number Diff line Loading @@ -20,12 +20,8 @@ #include <functions/tnlConstantFunction.h> #include <operators/tnlNeumannBoundaryConditions.h> #include <operators/tnlDirichletBoundaryConditions.h> #include <operators/hamilton-jacobi/upwind-eikonal/upwindEikonal.h> //#include <operators/hamilton-jacobi/godunov-eikonal/godunovEikonal.h> //#include <operators/hamilton-jacobi/upwind/upwind.h> //#include <operators/hamilton-jacobi/godunov/godunov.h> //#include <functions/tnlSDFSign.h> //#include <functions/tnlSDFGridValue.h> #include <operators/hamilton-jacobi/upwindEikonal.h> #include <operators/hamilton-jacobi/godunovEikonal.h> #include <operators/hamilton-jacobi/tnlEikonalOperator.h> Loading Loading @@ -62,31 +58,14 @@ bool HamiltonJacobiProblemSetter< RealType, DeviceType, IndexType, MeshType, Con typedef HamiltonJacobiProblem< MeshType, Operator, BoundaryConditions, RightHandSide > Solver; return solverStarter.template run< Solver >( parameters ); } /*else if ( schemeName == "godunov") if( schemeName == "godunov" ) { typedef godunovEikonalScheme< MeshType, RealType, IndexType > Operator; typedef godunovEikonalScheme< MeshType, RealType, IndexType > GradientNormOperator; typedef tnlConstantFunction< Dimensions, RealType > RightHandSide; typedef tnlEikonalOperator< GradientNormOperator, RightHandSide > Operator; typedef HamiltonJacobiProblem< 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 HamiltonJacobiProblem< 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 HamiltonJacobiProblem< MeshType, Operator, BoundaryConditions, RightHandSide > Solver; return solverStarter.template run< Solver >( parameters ); }*/ else cerr << "Unknown scheme '" << schemeName << "'." << endl; Loading