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

Refactoring the system of subdomains overlaps setting.

parent 84fce19a
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -22,10 +22,11 @@ namespace TNL {
template< typename Mesh,
          typename BoundaryCondition,
          typename RightHandSide,
          typename CommType,
          typename Communicator,
          typename InviscidOperators >
class eulerProblem:
   public PDEProblem< Mesh,
                      Communicator,
                      typename InviscidOperators::RealType,
                      typename Mesh::DeviceType,
                      typename InviscidOperators::IndexType >
@@ -35,9 +36,9 @@ class eulerProblem:
      typedef typename InviscidOperators::RealType RealType;
      typedef typename Mesh::DeviceType DeviceType;
      typedef typename InviscidOperators::IndexType IndexType;
      typedef PDEProblem< Mesh, RealType, DeviceType, IndexType > BaseType;
      typedef PDEProblem< Mesh, Communicator, RealType, DeviceType, IndexType > BaseType;

      typedef CommType CommunicatorType;
      typedef Communicator CommunicatorType;
      
      using typename BaseType::MeshType;
      using typename BaseType::MeshPointer;
+4 −3
Original line number Diff line number Diff line
@@ -21,10 +21,11 @@ namespace TNL {
template< typename Mesh,
          typename BoundaryCondition,
          typename RightHandSide,
          typename CommType,
          typename Communicator,
          typename DifferentialOperator >
class transportEquationProblem:
public PDEProblem< Mesh,
                   Communicator,
                   typename DifferentialOperator::RealType,
                   typename Mesh::DeviceType,
                   typename DifferentialOperator::IndexType >
@@ -35,7 +36,7 @@ public PDEProblem< Mesh,
      typedef typename Mesh::DeviceType DeviceType;
      typedef typename DifferentialOperator::IndexType IndexType;
      typedef Functions::MeshFunction< Mesh > MeshFunctionType;
      typedef PDEProblem< Mesh, RealType, DeviceType, IndexType > BaseType;
      typedef PDEProblem< Mesh, Communicator, RealType, DeviceType, IndexType > BaseType;
      typedef SharedPointer< MeshFunctionType, DeviceType > MeshFunctionPointer;
      typedef SharedPointer< DifferentialOperator > DifferentialOperatorPointer;
      typedef SharedPointer< BoundaryCondition > BoundaryConditionPointer;
@@ -43,7 +44,7 @@ public PDEProblem< Mesh,
      typedef typename DifferentialOperator::VelocityFieldType VelocityFieldType;
      typedef SharedPointer< VelocityFieldType, DeviceType > VelocityFieldPointer;

      typedef CommType CommunicatorType;
      typedef Communicator CommunicatorType;

      using typename BaseType::MeshType;
      using typename BaseType::MeshPointer;
+10 −9
Original line number Diff line number Diff line
@@ -83,6 +83,9 @@ class ArrayOperations< Devices::Cuda >
      static void allocateMemory( Element*& data,
                                  const Index size );
      
      template< typename Element >
      static void freeMemory( Element* data );

      template< typename Element >
      __cuda_callable__
      static void setMemoryElement( Element* data,
@@ -92,10 +95,8 @@ class ArrayOperations< Devices::Cuda >
      __cuda_callable__
      static Element getMemoryElement( const Element* data );

      template< typename Element >
      static Element getMemoryElement( const Element* data );

      // TODO: does not make sense for CUDA - remove?
      // TODO: does not make sense for CUDA - remove? <- could make sense with CUDA Unified Memory
      template< typename Element, typename Index >
      static Element& getArrayElementReference( Element* data, const Index i );

+2 −0
Original line number Diff line number Diff line
@@ -11,8 +11,10 @@
#include <problems/tnlPDEProblem.h>

template< typename Mesh,
          typename Communicator,
          typename Anisotropy = tnlConstanstFunction< Mesh > >
class tnlFastSweepingSolver  : public tnlPDEProblem< Mesh,
                                                     Communicator,
                                                     typename Mesh::RealType,
                                                     typename Mesh::DeviceType,
                                                     typename Mesh::IndexType  >
+2 −2
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ class tnlDirectEikonalSolverSetter
   {
      static const int Dimension = MeshType::getMeshDimension();
      typedef Functions::Analytic::Constant< Dimension, Real > Anisotropy;
      typedef tnlDirectEikonalProblem< MeshType, Anisotropy > Problem;
      typedef tnlDirectEikonalProblem< MeshType, CommunicatorType, Anisotropy > Problem;
      SolverStarter solverStarter;
      return solverStarter.template run< Problem >( parameters );
   };
Loading