Loading examples/advection/LaxFridrichs.h +3 −3 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ class LaxFridrichs< Meshes::Grid< 1,MeshReal, Device, MeshIndex >, Real, Index > typedef Device DeviceType; typedef Index IndexType; typedef Functions::MeshFunction< MeshType > MeshFunctionType; enum { Dimensions = MeshType::getMeshDimensions() }; enum { Dimension = MeshType::getDimension() }; Real tau; Real artificalViscosity; Real advectionSpeedX; Loading Loading @@ -94,7 +94,7 @@ class LaxFridrichs< Meshes::Grid< 2,MeshReal, Device, MeshIndex >, Real, Index > typedef Device DeviceType; typedef Index IndexType; typedef Functions::MeshFunction< MeshType > MeshFunctionType; enum { Dimensions = MeshType::getMeshDimensions() }; enum { Dimension = MeshType::getDimension() }; Real tau; Real artificalViscosity; Real advectionSpeedX; Loading Loading @@ -161,7 +161,7 @@ class LaxFridrichs< Meshes::Grid< 3,MeshReal, Device, MeshIndex >, Real, Index > typedef Device DeviceType; typedef Index IndexType; typedef Functions::MeshFunction< MeshType > MeshFunctionType; enum { Dimensions = MeshType::getMeshDimensions() }; enum { Dimension = MeshType::getDimension() }; Real tau; Real artificalViscosity; Real advectionSpeedX; Loading examples/advection/LaxFridrichs_impl.h +9 −9 Original line number Diff line number Diff line Loading @@ -39,8 +39,8 @@ operator()( const MeshFunction& u, * The following example is the Laplace operator approximated * by the Finite difference method. */ static_assert( MeshEntity::entityDimensions == 1, "Wrong mesh entity dimensions." ); static_assert( MeshFunction::getEntitiesDimensions() == 1, "Wrong preimage function" ); static_assert( MeshEntity::entityDimension == 1, "Wrong mesh entity dimension." ); static_assert( MeshFunction::getEntitiesDimension() == 1, "Wrong preimage function" ); const typename MeshEntity::template NeighbourEntities< 1 >& neighbourEntities = entity.getNeighbourEntities(); const RealType& hxInverse = entity.getMesh().template getSpaceStepsProducts< -1 >(); Loading Loading @@ -75,7 +75,7 @@ getLinearSystemRowLength( const MeshType& mesh, * by the Finite difference method. */ return 2*Dimensions + 1; return 2*Dimension + 1; } template< typename MeshReal, Loading Loading @@ -148,8 +148,8 @@ operator()( const MeshFunction& u, * The following example is the Laplace operator approximated * by the Finite difference method. */ static_assert( MeshEntity::entityDimensions == 2, "Wrong mesh entity dimensions." ); static_assert( MeshFunction::getEntitiesDimensions() == 2, "Wrong preimage function" ); static_assert( MeshEntity::entityDimension == 2, "Wrong mesh entity dimension." ); static_assert( MeshFunction::getEntitiesDimension() == 2, "Wrong preimage function" ); const typename MeshEntity::template NeighbourEntities< 2 >& neighbourEntities = entity.getNeighbourEntities(); const RealType& hxInverse = entity.getMesh().template getSpaceStepsProducts< -1, 0 >(); Loading Loading @@ -191,7 +191,7 @@ getLinearSystemRowLength( const MeshType& mesh, * by the Finite difference method. */ return 2*Dimensions + 1; return 2*Dimension + 1; } template< typename MeshReal, Loading Loading @@ -269,8 +269,8 @@ operator()( const MeshFunction& u, * The following example is the Laplace operator approximated * by the Finite difference method. */ static_assert( MeshEntity::entityDimensions == 3, "Wrong mesh entity dimensions." ); static_assert( MeshFunction::getEntitiesDimensions() == 3, "Wrong preimage function" ); static_assert( MeshEntity::entityDimension == 3, "Wrong mesh entity dimension." ); static_assert( MeshFunction::getEntitiesDimension() == 3, "Wrong preimage function" ); const typename MeshEntity::template NeighbourEntities< 3 >& neighbourEntities = entity.getNeighbourEntities(); const RealType& hxSquareInverse = entity.getMesh().template getSpaceStepsProducts< -2, 0, 0 >(); Loading Loading @@ -308,7 +308,7 @@ getLinearSystemRowLength( const MeshType& mesh, * by the Finite difference method. */ //return 2*Dimensions + 1; //return 2*Dimension + 1; } template< typename MeshReal, Loading examples/advection/advection.h +5 −5 Original line number Diff line number Diff line Loading @@ -70,10 +70,10 @@ class advectionSetter static bool run( const Config::ParameterContainer & parameters ) { enum { Dimensions = MeshType::getMeshDimensions() }; enum { Dimension = MeshType::getDimension() }; typedef LaxFridrichs< MeshType, Real, Index > ApproximateOperator; typedef advectionRhs< MeshType, Real > RightHandSide; typedef Containers::StaticVector < MeshType::getMeshDimensions(), Real > Vertex; typedef Containers::StaticVector < MeshType::getDimension(), Real > Vertex; /**** * Resolve the template arguments of your solver here. Loading @@ -83,10 +83,10 @@ class advectionSetter String boundaryConditionsType = parameters.getParameter< String >( "boundary-conditions-type" ); if( parameters.checkParameter( "boundary-conditions-constant" ) ) { typedef Functions::Analytic::Constant< Dimensions, Real > Constant; typedef Functions::Analytic::Constant< Dimension, Real > Constant; if( boundaryConditionsType == "dirichlet" ) { typedef Operators::DirichletBoundaryConditions< MeshType, Constant, MeshType::getMeshDimensions(), Real, Index > BoundaryConditions; typedef Operators::DirichletBoundaryConditions< MeshType, Constant, MeshType::getDimension(), Real, Index > BoundaryConditions; typedef advectionProblem< MeshType, BoundaryConditions, RightHandSide, ApproximateOperator > Problem; SolverStarter solverStarter; return solverStarter.template run< Problem >( parameters ); Loading @@ -99,7 +99,7 @@ class advectionSetter typedef Functions::MeshFunction< MeshType > MeshFunction; if( boundaryConditionsType == "dirichlet" ) { typedef Operators::DirichletBoundaryConditions< MeshType, MeshFunction, MeshType::getMeshDimensions(), Real, Index > BoundaryConditions; typedef Operators::DirichletBoundaryConditions< MeshType, MeshFunction, MeshType::getDimension(), Real, Index > BoundaryConditions; typedef advectionProblem< MeshType, BoundaryConditions, RightHandSide, ApproximateOperator > Problem; SolverStarter solverStarter; return solverStarter.template run< Problem >( parameters ); Loading examples/advection/advectionBuildConfigTag.h +3 −3 Original line number Diff line number Diff line Loading @@ -25,9 +25,9 @@ template<> struct ConfigTagIndex< advectionBuildConfigTag, long int >{ enum { en * Use of Grid is enabled for allowed dimensions and Real, Device and Index types. */ template< int Dimensions, typename Real, typename Device, typename Index > struct ConfigTagMesh< advectionBuildConfigTag, Meshes::Grid< Dimensions, Real, Device, Index > > { enum { enabled = ConfigTagDimensions< advectionBuildConfigTag, Dimensions >::enabled && template< int Dimension, typename Real, typename Device, typename Index > struct ConfigTagMesh< advectionBuildConfigTag, Meshes::Grid< Dimension, Real, Device, Index > > { enum { enabled = ConfigTagDimension< advectionBuildConfigTag, Dimension >::enabled && ConfigTagReal< advectionBuildConfigTag, Real >::enabled && ConfigTagDevice< advectionBuildConfigTag, Device >::enabled && ConfigTagIndex< advectionBuildConfigTag, Index >::enabled }; }; Loading examples/advection/advectionRhs.h +1 −1 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ namespace TNL { template< typename Mesh, typename Real >class advectionRhs : public Functions::Domain< Mesh::meshDimensions, Functions::MeshDomain > : public Functions::Domain< Mesh::meshDimension, Functions::MeshDomain > { public: Loading Loading
examples/advection/LaxFridrichs.h +3 −3 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ class LaxFridrichs< Meshes::Grid< 1,MeshReal, Device, MeshIndex >, Real, Index > typedef Device DeviceType; typedef Index IndexType; typedef Functions::MeshFunction< MeshType > MeshFunctionType; enum { Dimensions = MeshType::getMeshDimensions() }; enum { Dimension = MeshType::getDimension() }; Real tau; Real artificalViscosity; Real advectionSpeedX; Loading Loading @@ -94,7 +94,7 @@ class LaxFridrichs< Meshes::Grid< 2,MeshReal, Device, MeshIndex >, Real, Index > typedef Device DeviceType; typedef Index IndexType; typedef Functions::MeshFunction< MeshType > MeshFunctionType; enum { Dimensions = MeshType::getMeshDimensions() }; enum { Dimension = MeshType::getDimension() }; Real tau; Real artificalViscosity; Real advectionSpeedX; Loading Loading @@ -161,7 +161,7 @@ class LaxFridrichs< Meshes::Grid< 3,MeshReal, Device, MeshIndex >, Real, Index > typedef Device DeviceType; typedef Index IndexType; typedef Functions::MeshFunction< MeshType > MeshFunctionType; enum { Dimensions = MeshType::getMeshDimensions() }; enum { Dimension = MeshType::getDimension() }; Real tau; Real artificalViscosity; Real advectionSpeedX; Loading
examples/advection/LaxFridrichs_impl.h +9 −9 Original line number Diff line number Diff line Loading @@ -39,8 +39,8 @@ operator()( const MeshFunction& u, * The following example is the Laplace operator approximated * by the Finite difference method. */ static_assert( MeshEntity::entityDimensions == 1, "Wrong mesh entity dimensions." ); static_assert( MeshFunction::getEntitiesDimensions() == 1, "Wrong preimage function" ); static_assert( MeshEntity::entityDimension == 1, "Wrong mesh entity dimension." ); static_assert( MeshFunction::getEntitiesDimension() == 1, "Wrong preimage function" ); const typename MeshEntity::template NeighbourEntities< 1 >& neighbourEntities = entity.getNeighbourEntities(); const RealType& hxInverse = entity.getMesh().template getSpaceStepsProducts< -1 >(); Loading Loading @@ -75,7 +75,7 @@ getLinearSystemRowLength( const MeshType& mesh, * by the Finite difference method. */ return 2*Dimensions + 1; return 2*Dimension + 1; } template< typename MeshReal, Loading Loading @@ -148,8 +148,8 @@ operator()( const MeshFunction& u, * The following example is the Laplace operator approximated * by the Finite difference method. */ static_assert( MeshEntity::entityDimensions == 2, "Wrong mesh entity dimensions." ); static_assert( MeshFunction::getEntitiesDimensions() == 2, "Wrong preimage function" ); static_assert( MeshEntity::entityDimension == 2, "Wrong mesh entity dimension." ); static_assert( MeshFunction::getEntitiesDimension() == 2, "Wrong preimage function" ); const typename MeshEntity::template NeighbourEntities< 2 >& neighbourEntities = entity.getNeighbourEntities(); const RealType& hxInverse = entity.getMesh().template getSpaceStepsProducts< -1, 0 >(); Loading Loading @@ -191,7 +191,7 @@ getLinearSystemRowLength( const MeshType& mesh, * by the Finite difference method. */ return 2*Dimensions + 1; return 2*Dimension + 1; } template< typename MeshReal, Loading Loading @@ -269,8 +269,8 @@ operator()( const MeshFunction& u, * The following example is the Laplace operator approximated * by the Finite difference method. */ static_assert( MeshEntity::entityDimensions == 3, "Wrong mesh entity dimensions." ); static_assert( MeshFunction::getEntitiesDimensions() == 3, "Wrong preimage function" ); static_assert( MeshEntity::entityDimension == 3, "Wrong mesh entity dimension." ); static_assert( MeshFunction::getEntitiesDimension() == 3, "Wrong preimage function" ); const typename MeshEntity::template NeighbourEntities< 3 >& neighbourEntities = entity.getNeighbourEntities(); const RealType& hxSquareInverse = entity.getMesh().template getSpaceStepsProducts< -2, 0, 0 >(); Loading Loading @@ -308,7 +308,7 @@ getLinearSystemRowLength( const MeshType& mesh, * by the Finite difference method. */ //return 2*Dimensions + 1; //return 2*Dimension + 1; } template< typename MeshReal, Loading
examples/advection/advection.h +5 −5 Original line number Diff line number Diff line Loading @@ -70,10 +70,10 @@ class advectionSetter static bool run( const Config::ParameterContainer & parameters ) { enum { Dimensions = MeshType::getMeshDimensions() }; enum { Dimension = MeshType::getDimension() }; typedef LaxFridrichs< MeshType, Real, Index > ApproximateOperator; typedef advectionRhs< MeshType, Real > RightHandSide; typedef Containers::StaticVector < MeshType::getMeshDimensions(), Real > Vertex; typedef Containers::StaticVector < MeshType::getDimension(), Real > Vertex; /**** * Resolve the template arguments of your solver here. Loading @@ -83,10 +83,10 @@ class advectionSetter String boundaryConditionsType = parameters.getParameter< String >( "boundary-conditions-type" ); if( parameters.checkParameter( "boundary-conditions-constant" ) ) { typedef Functions::Analytic::Constant< Dimensions, Real > Constant; typedef Functions::Analytic::Constant< Dimension, Real > Constant; if( boundaryConditionsType == "dirichlet" ) { typedef Operators::DirichletBoundaryConditions< MeshType, Constant, MeshType::getMeshDimensions(), Real, Index > BoundaryConditions; typedef Operators::DirichletBoundaryConditions< MeshType, Constant, MeshType::getDimension(), Real, Index > BoundaryConditions; typedef advectionProblem< MeshType, BoundaryConditions, RightHandSide, ApproximateOperator > Problem; SolverStarter solverStarter; return solverStarter.template run< Problem >( parameters ); Loading @@ -99,7 +99,7 @@ class advectionSetter typedef Functions::MeshFunction< MeshType > MeshFunction; if( boundaryConditionsType == "dirichlet" ) { typedef Operators::DirichletBoundaryConditions< MeshType, MeshFunction, MeshType::getMeshDimensions(), Real, Index > BoundaryConditions; typedef Operators::DirichletBoundaryConditions< MeshType, MeshFunction, MeshType::getDimension(), Real, Index > BoundaryConditions; typedef advectionProblem< MeshType, BoundaryConditions, RightHandSide, ApproximateOperator > Problem; SolverStarter solverStarter; return solverStarter.template run< Problem >( parameters ); Loading
examples/advection/advectionBuildConfigTag.h +3 −3 Original line number Diff line number Diff line Loading @@ -25,9 +25,9 @@ template<> struct ConfigTagIndex< advectionBuildConfigTag, long int >{ enum { en * Use of Grid is enabled for allowed dimensions and Real, Device and Index types. */ template< int Dimensions, typename Real, typename Device, typename Index > struct ConfigTagMesh< advectionBuildConfigTag, Meshes::Grid< Dimensions, Real, Device, Index > > { enum { enabled = ConfigTagDimensions< advectionBuildConfigTag, Dimensions >::enabled && template< int Dimension, typename Real, typename Device, typename Index > struct ConfigTagMesh< advectionBuildConfigTag, Meshes::Grid< Dimension, Real, Device, Index > > { enum { enabled = ConfigTagDimension< advectionBuildConfigTag, Dimension >::enabled && ConfigTagReal< advectionBuildConfigTag, Real >::enabled && ConfigTagDevice< advectionBuildConfigTag, Device >::enabled && ConfigTagIndex< advectionBuildConfigTag, Index >::enabled }; }; Loading
examples/advection/advectionRhs.h +1 −1 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ namespace TNL { template< typename Mesh, typename Real >class advectionRhs : public Functions::Domain< Mesh::meshDimensions, Functions::MeshDomain > : public Functions::Domain< Mesh::meshDimension, Functions::MeshDomain > { public: Loading