Commit b7feb60f authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Renamed Dimensions to Dimension.

parent cbbfc847
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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;
@@ -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;
@@ -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;
+9 −9
Original line number Diff line number Diff line
@@ -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 >(); 
@@ -75,7 +75,7 @@ getLinearSystemRowLength( const MeshType& mesh,
    * by the Finite difference method.
    */

   return 2*Dimensions + 1;
   return 2*Dimension + 1;
}

template< typename MeshReal,
@@ -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 >(); 
@@ -191,7 +191,7 @@ getLinearSystemRowLength( const MeshType& mesh,
    * by the Finite difference method.
    */

   return 2*Dimensions + 1;
   return 2*Dimension + 1;
}

template< typename MeshReal,
@@ -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 >(); 
@@ -308,7 +308,7 @@ getLinearSystemRowLength( const MeshType& mesh,
    * by the Finite difference method.
    */

   //return 2*Dimensions + 1;
   //return 2*Dimension + 1;
}

template< typename MeshReal,
+5 −5
Original line number Diff line number Diff line
@@ -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.
@@ -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 );
@@ -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 );
+3 −3
Original line number Diff line number Diff line
@@ -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 }; };
+1 −1
Original line number Diff line number Diff line
@@ -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