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

Refactoring meshes.

parent 1eff71bb
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
#define LaxFridrichs_H

#include <TNL/Vectors/Vector.h>
#include <TNL/mesh/tnlGrid.h>
#include <TNL/Meshes/Grid.h>

namespace TNL {

@@ -18,10 +18,10 @@ template< typename MeshReal,
          typename MeshIndex,
          typename Real,
          typename Index >
class LaxFridrichs< tnlGrid< 1,MeshReal, Device, MeshIndex >, Real, Index >
class LaxFridrichs< Meshes::Grid< 1,MeshReal, Device, MeshIndex >, Real, Index >
{
   public:
      typedef tnlGrid< 1, MeshReal, Device, MeshIndex > MeshType;
      typedef Meshes::Grid< 1, MeshReal, Device, MeshIndex > MeshType;
      typedef typename MeshType::CoordinatesType CoordinatesType;
      typedef Real RealType;
      typedef Device DeviceType;
@@ -85,10 +85,10 @@ template< typename MeshReal,
          typename MeshIndex,
          typename Real,
          typename Index >
class LaxFridrichs< tnlGrid< 2,MeshReal, Device, MeshIndex >, Real, Index >
class LaxFridrichs< Meshes::Grid< 2,MeshReal, Device, MeshIndex >, Real, Index >
{
   public:
      typedef tnlGrid< 2, MeshReal, Device, MeshIndex > MeshType;
      typedef Meshes::Grid< 2, MeshReal, Device, MeshIndex > MeshType;
      typedef typename MeshType::CoordinatesType CoordinatesType;
      typedef Real RealType;
      typedef Device DeviceType;
@@ -152,10 +152,10 @@ template< typename MeshReal,
          typename MeshIndex,
          typename Real,
          typename Index >
class LaxFridrichs< tnlGrid< 3,MeshReal, Device, MeshIndex >, Real, Index >
class LaxFridrichs< Meshes::Grid< 3,MeshReal, Device, MeshIndex >, Real, Index >
{
   public:
      typedef tnlGrid< 3, MeshReal, Device, MeshIndex > MeshType;
      typedef Meshes::Grid< 3, MeshReal, Device, MeshIndex > MeshType;
      typedef typename MeshType::CoordinatesType CoordinatesType;
      typedef Real RealType;
      typedef Device DeviceType;
+12 −12
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ template< typename MeshReal,
          typename Real,
          typename Index >
String
LaxFridrichs< tnlGrid< 1, MeshReal, Device, MeshIndex >, Real, Index >::
LaxFridrichs< Meshes::Grid< 1, MeshReal, Device, MeshIndex >, Real, Index >::
getType()
{
   return String( "LaxFridrichs< " ) +
@@ -29,7 +29,7 @@ template< typename MeshReal,
template< typename MeshFunction, typename MeshEntity >
__cuda_callable__
Real
LaxFridrichs< tnlGrid< 1, MeshReal, Device, MeshIndex >, Real, Index >::
LaxFridrichs< Meshes::Grid< 1, MeshReal, Device, MeshIndex >, Real, Index >::
operator()( const MeshFunction& u,
            const MeshEntity& entity,
            const Real& time ) const
@@ -63,7 +63,7 @@ template< typename MeshReal,
template< typename MeshEntity >
__cuda_callable__
Index
LaxFridrichs< tnlGrid< 1, MeshReal, Device, MeshIndex >, Real, Index >::
LaxFridrichs< Meshes::Grid< 1, MeshReal, Device, MeshIndex >, Real, Index >::
getLinearSystemRowLength( const MeshType& mesh,
                          const IndexType& index,
                          const MeshEntity& entity ) const
@@ -86,7 +86,7 @@ template< typename MeshReal,
   template< typename MeshEntity, typename Vector, typename MatrixRow >
__cuda_callable__
void
LaxFridrichs< tnlGrid< 1, MeshReal, Device, MeshIndex >, Real, Index >::
LaxFridrichs< Meshes::Grid< 1, MeshReal, Device, MeshIndex >, Real, Index >::
updateLinearSystem( const RealType& time,
                    const RealType& tau,
                    const MeshType& mesh,
@@ -121,7 +121,7 @@ template< typename MeshReal,
          typename Real,
          typename Index >
String
LaxFridrichs< tnlGrid< 2, MeshReal, Device, MeshIndex >, Real, Index >::
LaxFridrichs< Meshes::Grid< 2, MeshReal, Device, MeshIndex >, Real, Index >::
getType()
{
   return String( "LaxFridrichs< " ) +
@@ -138,7 +138,7 @@ template< typename MeshReal,
template< typename MeshFunction, typename MeshEntity >
__cuda_callable__
Real
LaxFridrichs< tnlGrid< 2, MeshReal, Device, MeshIndex >, Real, Index >::
LaxFridrichs< Meshes::Grid< 2, MeshReal, Device, MeshIndex >, Real, Index >::
operator()( const MeshFunction& u,
            const MeshEntity& entity,
            const Real& time ) const
@@ -179,7 +179,7 @@ template< typename MeshReal,
template< typename MeshEntity >
__cuda_callable__
Index
LaxFridrichs< tnlGrid< 2, MeshReal, Device, MeshIndex >, Real, Index >::
LaxFridrichs< Meshes::Grid< 2, MeshReal, Device, MeshIndex >, Real, Index >::
getLinearSystemRowLength( const MeshType& mesh,
                          const IndexType& index,
                          const MeshEntity& entity ) const
@@ -202,7 +202,7 @@ template< typename MeshReal,
   template< typename MeshEntity, typename Vector, typename MatrixRow >
__cuda_callable__
void
LaxFridrichs< tnlGrid< 2, MeshReal, Device, MeshIndex >, Real, Index >::
LaxFridrichs< Meshes::Grid< 2, MeshReal, Device, MeshIndex >, Real, Index >::
updateLinearSystem( const RealType& time,
                    const RealType& tau,
                    const MeshType& mesh,
@@ -242,7 +242,7 @@ template< typename MeshReal,
          typename Real,
          typename Index >
String
LaxFridrichs< tnlGrid< 3, MeshReal, Device, MeshIndex >, Real, Index >::
LaxFridrichs< Meshes::Grid< 3, MeshReal, Device, MeshIndex >, Real, Index >::
getType()
{
   return String( "LaxFridrichs< " ) +
@@ -259,7 +259,7 @@ template< typename MeshReal,
template< typename MeshFunction, typename MeshEntity >
__cuda_callable__
Real
LaxFridrichs< tnlGrid< 3, MeshReal, Device, MeshIndex >, Real, Index >::
LaxFridrichs< Meshes::Grid< 3, MeshReal, Device, MeshIndex >, Real, Index >::
operator()( const MeshFunction& u,
            const MeshEntity& entity,
            const Real& time ) const
@@ -296,7 +296,7 @@ template< typename MeshReal,
template< typename MeshEntity >
__cuda_callable__
Index
LaxFridrichs< tnlGrid< 3, MeshReal, Device, MeshIndex >, Real, Index >::
LaxFridrichs< Meshes::Grid< 3, MeshReal, Device, MeshIndex >, Real, Index >::
getLinearSystemRowLength( const MeshType& mesh,
                          const IndexType& index,
                          const MeshEntity& entity ) const
@@ -319,7 +319,7 @@ template< typename MeshReal,
   template< typename MeshEntity, typename Vector, typename MatrixRow >
__cuda_callable__
void
LaxFridrichs< tnlGrid< 3, MeshReal, Device, MeshIndex >, Real, Index >::
LaxFridrichs< Meshes::Grid< 3, MeshReal, Device, MeshIndex >, Real, Index >::
updateLinearSystem( const RealType& time,
                    const RealType& tau,
                    const MeshType& mesh,
+2 −2
Original line number Diff line number Diff line
@@ -22,11 +22,11 @@ template<> struct ConfigTagIndex< advectionBuildConfigTag, short int >{ enum { e
template<> struct ConfigTagIndex< advectionBuildConfigTag, long int >{ enum { enabled = false }; };

/****
 * Use of tnlGrid is enabled for allowed dimensions and Real, Device and Index types.
 * 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, tnlGrid< Dimensions, Real, Device, Index > >
   struct ConfigTagMesh< advectionBuildConfigTag, Meshes::Grid< Dimensions, Real, Device, Index > >
      { enum { enabled = ConfigTagDimensions< advectionBuildConfigTag, Dimensions >::enabled  &&
                         ConfigTagReal< advectionBuildConfigTag, Real >::enabled &&
                         ConfigTagDevice< advectionBuildConfigTag, Device >::enabled &&
+2 −2
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@
#include <TNL/Functions/Analytic/ConstantFunction.h>
#include <TNL/Functions/MeshFunction.h>
#include <TNL/Problems/HeatEquationProblem.h>
#include <TNL/mesh/tnlGrid.h>
#include <TNL/Meshes/Grid.h>

using namespace TNL;
using namespace TNL::Problems;
@@ -39,7 +39,7 @@ class heatEquationConfig
            config.addEntryEnum< String >( "dirichlet" );
            config.addEntryEnum< String >( "neumann" );

         typedef tnlGrid< 1, double, Devices::Host, int > Mesh;
         typedef Meshes::Grid< 1, double, Devices::Host, int > Mesh;
         typedef Functions::MeshFunction< Mesh > MeshFunction;
         Operators::DirichletBoundaryConditions< Mesh, MeshFunction >::configSetup( config );
         Operators::DirichletBoundaryConditions< Mesh, Functions::Analytic::ConstantFunction< 1 > >::configSetup( config );
+1 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
#define EulerPressureGetter_H

#include <TNL/Vectors/Vector.h>
#include <TNL/mesh/tnlGrid.h>
#include <TNL/Meshes/Grid.h>
#include <TNL/Functions/Domain.h>

namespace TNL {
Loading