Commit 265e5202 authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Fixed getType methods in MeshConfigBase and MeshEntity

parent 54f69642
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
#pragma once

#include <TNL/String.h>
#include <TNL/param-types.h>

namespace TNL {
namespace Meshes {
@@ -49,7 +50,13 @@ struct MeshConfigBase

   static String getType()
   {
      return String( "MeshConfigBase< >");
      return String( "Meshes::MeshConfigBase< " ) +
             Cell::getType() + ", " +
             String( WorldDimensions ) + ", " +
             TNL::getType< Real >() + ", " +
             TNL::getType< GlobalIndex >() + ", " +
             TNL::getType< LocalIndex >() + ", " +
             TNL::getType< Id >() + " >";
   };
 
   /****
+5 −5
Original line number Diff line number Diff line
@@ -27,7 +27,9 @@ String
MeshEntity< MeshConfig, EntityTopology >::
getType()
{
   return String( "MeshEntity< ... >" );
   return String( "MeshEntity< " ) +
          MeshConfig::getType() + ", " +
          EntityTopology::getType() + " >";
}

template< typename MeshConfig,
@@ -45,8 +47,7 @@ bool
MeshEntity< MeshConfig, EntityTopology >::
save( File& file ) const
{
   if( ! MeshSubentityAccess< MeshConfig, EntityTopology >::save( file ) /*||
       ! MeshSuperentityStorageLayers< MeshConfig, EntityTopology >::save( file )*/ )
   if( ! MeshSubentityAccess< MeshConfig, EntityTopology >::save( file ) )
      return false;
   return true;
}
@@ -57,8 +58,7 @@ bool
MeshEntity< MeshConfig, EntityTopology >::
load( File& file )
{
   if( ! MeshSubentityAccess< MeshConfig, EntityTopology >::load( file ) /*||
       ! MeshSuperentityStorageLayers< MeshConfig, EntityTopology >::load( file ) */ )
   if( ! MeshSubentityAccess< MeshConfig, EntityTopology >::load( file ) )
      return false;
   return true;
}
+7 −2
Original line number Diff line number Diff line
@@ -24,7 +24,12 @@ namespace Meshes {
   
struct MeshEdgeTopology
{
   static const int dimensions = 1;
   static constexpr int dimensions = 1;

   static String getType()
   {
      return "MeshEdgeTopology";
   }
};


@@ -33,7 +38,7 @@ struct MeshSubtopology< MeshEdgeTopology, 0 >
{
   typedef MeshVertexTopology Topology;

   static const int count = 2;
   static constexpr int count = 2;
};

} // namespace Meshes
+9 −4
Original line number Diff line number Diff line
@@ -23,7 +23,12 @@ namespace Meshes {

struct MeshHexahedronTopology
{
   static const int dimensions = 3;
   static constexpr int dimensions = 3;

   static String getType()
   {
      return "MeshHexahedronTopology";
   }
};

template<>
@@ -31,7 +36,7 @@ struct MeshSubtopology< MeshHexahedronTopology, 0 >
{
   typedef MeshVertexTopology Topology;

   static const int count = 8;
   static constexpr int count = 8;
};

template<>
@@ -39,7 +44,7 @@ struct MeshSubtopology< MeshHexahedronTopology, 1 >
{
   typedef MeshEdgeTopology Topology;

   static const int count = 12;
   static constexpr int count = 12;
};

template<>
@@ -47,7 +52,7 @@ struct MeshSubtopology< MeshHexahedronTopology, 2 >
{
   typedef MeshQuadrilateralTopology Topology;

   static const int count = 6;
   static constexpr int count = 6;
};

/****
+8 −3
Original line number Diff line number Diff line
@@ -23,7 +23,12 @@ namespace Meshes {

struct MeshQuadrilateralTopology
{
   static const int dimensions = 2;
   static constexpr int dimensions = 2;

   static String getType()
   {
      return "MeshQuadrilateralTopology";
   }
};


@@ -32,7 +37,7 @@ struct MeshSubtopology< MeshQuadrilateralTopology, 0 >
{
   typedef MeshVertexTopology Topology;

   static const int count = 4;
   static constexpr int count = 4;
};

template<>
@@ -40,7 +45,7 @@ struct MeshSubtopology< MeshQuadrilateralTopology, 1 >
{
   typedef MeshEdgeTopology Topology;

   static const int count = 4;
   static constexpr int count = 4;
};


Loading