Skip to content
Snippets Groups Projects
Commit 2961ae41 authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Renamed MeshConfigValidator to ConfigValidator

parent 7d963f8e
No related branches found
No related tags found
No related merge requests found
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include <TNL/Meshes/MeshEntity.h> #include <TNL/Meshes/MeshEntity.h>
#include <TNL/Meshes/MeshDetails/traits/MeshTraits.h> #include <TNL/Meshes/MeshDetails/traits/MeshTraits.h>
#include <TNL/Meshes/MeshDetails/layers/MeshStorageLayer.h> #include <TNL/Meshes/MeshDetails/layers/MeshStorageLayer.h>
#include <TNL/Meshes/MeshDetails/config/MeshConfigValidator.h> #include <TNL/Meshes/MeshDetails/ConfigValidator.h>
namespace TNL { namespace TNL {
namespace Meshes { namespace Meshes {
...@@ -56,6 +56,7 @@ template< typename MeshConfig, ...@@ -56,6 +56,7 @@ template< typename MeshConfig,
typename Device = Devices::Host > typename Device = Devices::Host >
class Mesh class Mesh
: public Object, : public Object,
public ConfigValidator< MeshConfig >,
protected MeshStorageLayers< MeshConfig, Device >, protected MeshStorageLayers< MeshConfig, Device >,
public MeshInitializableBase< MeshConfig, Device, Mesh< MeshConfig, Device > > public MeshInitializableBase< MeshConfig, Device, Mesh< MeshConfig, Device > >
{ {
...@@ -178,8 +179,6 @@ class Mesh ...@@ -178,8 +179,6 @@ class Mesh
using StorageBaseType::getSubentityStorageNetwork; using StorageBaseType::getSubentityStorageNetwork;
using StorageBaseType::getSuperentityStorageNetwork; using StorageBaseType::getSuperentityStorageNetwork;
MeshConfigValidator< MeshConfig > configValidator;
friend MeshInitializer< MeshConfig >; friend MeshInitializer< MeshConfig >;
friend BoundaryTagsInitializer< Mesh >; friend BoundaryTagsInitializer< Mesh >;
......
...@@ -115,7 +115,7 @@ struct MeshConfigBase ...@@ -115,7 +115,7 @@ struct MeshConfigBase
* - faces must store the cell indices in the superentity layer * - faces must store the cell indices in the superentity layer
* - if dim(entity) < dim(face), the entities on which the tags are stored * - if dim(entity) < dim(face), the entities on which the tags are stored
* must be stored as subentities of faces * must be stored as subentities of faces
* TODO: check this in the MeshConfigValidator * TODO: check this in the ConfigValidator
*/ */
template< typename EntityTopology > template< typename EntityTopology >
static constexpr bool boundaryTagsStorage( EntityTopology ) static constexpr bool boundaryTagsStorage( EntityTopology )
......
ADD_SUBDIRECTORY( config )
ADD_SUBDIRECTORY( initializer ) ADD_SUBDIRECTORY( initializer )
ADD_SUBDIRECTORY( layers ) ADD_SUBDIRECTORY( layers )
ADD_SUBDIRECTORY( traits ) ADD_SUBDIRECTORY( traits )
SET( headers IndexPermutationApplier.h SET( headers ConfigValidator.h
IndexPermutationApplier.h
MeshEntityIndex.h MeshEntityIndex.h
MeshEntityIntegrityChecker.h MeshEntityIntegrityChecker.h
MeshEntityOrientation.h MeshEntityOrientation.h
......
/*************************************************************************** /***************************************************************************
MeshConfigValidator.h - description ConfigValidator.h - description
------------------- -------------------
begin : Aug 14, 2015 begin : Aug 14, 2015
copyright : (C) 2015 by Tomas Oberhuber et al. copyright : (C) 2015 by Tomas Oberhuber et al.
...@@ -25,8 +25,8 @@ namespace Meshes { ...@@ -25,8 +25,8 @@ namespace Meshes {
template< typename MeshConfig, template< typename MeshConfig,
typename EntityTopology, typename EntityTopology,
typename DimensionTag > typename DimensionTag >
class MeshConfigValidatorSubtopologyLayer class ConfigValidatorSubtopologyLayer
: public MeshConfigValidatorSubtopologyLayer< MeshConfig, EntityTopology, typename DimensionTag::Decrement > : public ConfigValidatorSubtopologyLayer< MeshConfig, EntityTopology, typename DimensionTag::Decrement >
{ {
static_assert( ! MeshConfig::subentityStorage( EntityTopology(), DimensionTag::value ) || static_assert( ! MeshConfig::subentityStorage( EntityTopology(), DimensionTag::value ) ||
MeshConfig::entityStorage( EntityTopology::dimension ), MeshConfig::entityStorage( EntityTopology::dimension ),
...@@ -41,7 +41,7 @@ class MeshConfigValidatorSubtopologyLayer ...@@ -41,7 +41,7 @@ class MeshConfigValidatorSubtopologyLayer
template< typename MeshConfig, template< typename MeshConfig,
typename EntityTopology > typename EntityTopology >
class MeshConfigValidatorSubtopologyLayer< MeshConfig, EntityTopology, DimensionTag< 0 > > class ConfigValidatorSubtopologyLayer< MeshConfig, EntityTopology, DimensionTag< 0 > >
{ {
static_assert( ! MeshConfig::subentityStorage( EntityTopology(), 0 ) || static_assert( ! MeshConfig::subentityStorage( EntityTopology(), 0 ) ||
MeshConfig::entityStorage( EntityTopology::dimension ), MeshConfig::entityStorage( EntityTopology::dimension ),
...@@ -54,8 +54,8 @@ class MeshConfigValidatorSubtopologyLayer< MeshConfig, EntityTopology, Dimension ...@@ -54,8 +54,8 @@ class MeshConfigValidatorSubtopologyLayer< MeshConfig, EntityTopology, Dimension
template< typename MeshConfig, template< typename MeshConfig,
typename EntityTopology, typename EntityTopology,
typename DimensionTag > typename DimensionTag >
class MeshConfigValidatorSupertopologyLayer class ConfigValidatorSupertopologyLayer
: public MeshConfigValidatorSupertopologyLayer< MeshConfig, EntityTopology, typename DimensionTag::Decrement > : public ConfigValidatorSupertopologyLayer< MeshConfig, EntityTopology, typename DimensionTag::Decrement >
{ {
static_assert( ! MeshConfig::superentityStorage( EntityTopology(), DimensionTag::value ) || static_assert( ! MeshConfig::superentityStorage( EntityTopology(), DimensionTag::value ) ||
MeshConfig::entityStorage( EntityTopology::dimension ), MeshConfig::entityStorage( EntityTopology::dimension ),
...@@ -67,14 +67,14 @@ class MeshConfigValidatorSupertopologyLayer ...@@ -67,14 +67,14 @@ class MeshConfigValidatorSupertopologyLayer
template< typename MeshConfig, template< typename MeshConfig,
typename EntityTopology > typename EntityTopology >
class MeshConfigValidatorSupertopologyLayer< MeshConfig, EntityTopology, DimensionTag< EntityTopology::dimension > > class ConfigValidatorSupertopologyLayer< MeshConfig, EntityTopology, DimensionTag< EntityTopology::dimension > >
{}; {};
template< typename MeshConfig, template< typename MeshConfig,
typename EntityTopology, typename EntityTopology,
bool BoundaryTagsStorage = MeshConfig::boundaryTagsStorage( EntityTopology() ) > bool BoundaryTagsStorage = MeshConfig::boundaryTagsStorage( EntityTopology() ) >
class MeshConfigValidatorBoundaryTagsLayer class ConfigValidatorBoundaryTagsLayer
{ {
using FaceTopology = typename Topologies::Subtopology< typename MeshConfig::CellTopology, MeshConfig::meshDimension - 1 >::Topology; using FaceTopology = typename Topologies::Subtopology< typename MeshConfig::CellTopology, MeshConfig::meshDimension - 1 >::Topology;
...@@ -88,21 +88,21 @@ class MeshConfigValidatorBoundaryTagsLayer ...@@ -88,21 +88,21 @@ class MeshConfigValidatorBoundaryTagsLayer
template< typename MeshConfig, template< typename MeshConfig,
typename EntityTopology > typename EntityTopology >
class MeshConfigValidatorBoundaryTagsLayer< MeshConfig, EntityTopology, false > class ConfigValidatorBoundaryTagsLayer< MeshConfig, EntityTopology, false >
{ {
}; };
template< typename MeshConfig, int dimension > template< typename MeshConfig, int dimension >
class MeshConfigValidatorLayer class ConfigValidatorLayer
: public MeshConfigValidatorLayer< MeshConfig, dimension - 1 >, : public ConfigValidatorLayer< MeshConfig, dimension - 1 >,
public MeshConfigValidatorSubtopologyLayer< MeshConfig, public ConfigValidatorSubtopologyLayer< MeshConfig,
typename Topologies::Subtopology< typename MeshConfig::CellTopology, dimension >::Topology, typename Topologies::Subtopology< typename MeshConfig::CellTopology, dimension >::Topology,
DimensionTag< dimension - 1 > >, DimensionTag< dimension - 1 > >,
public MeshConfigValidatorSupertopologyLayer< MeshConfig, public ConfigValidatorSupertopologyLayer< MeshConfig,
typename Topologies::Subtopology< typename MeshConfig::CellTopology, dimension >::Topology, typename Topologies::Subtopology< typename MeshConfig::CellTopology, dimension >::Topology,
DimensionTag< MeshConfig::CellTopology::dimension > >, DimensionTag< MeshConfig::CellTopology::dimension > >,
public MeshConfigValidatorBoundaryTagsLayer< MeshConfig, public ConfigValidatorBoundaryTagsLayer< MeshConfig,
typename Topologies::Subtopology< typename MeshConfig::CellTopology, dimension >::Topology > typename Topologies::Subtopology< typename MeshConfig::CellTopology, dimension >::Topology >
{ {
using Topology = typename Topologies::Subtopology< typename MeshConfig::CellTopology, dimension >::Topology; using Topology = typename Topologies::Subtopology< typename MeshConfig::CellTopology, dimension >::Topology;
...@@ -113,14 +113,14 @@ class MeshConfigValidatorLayer ...@@ -113,14 +113,14 @@ class MeshConfigValidatorLayer
}; };
template< typename MeshConfig > template< typename MeshConfig >
class MeshConfigValidatorLayer< MeshConfig, 0 > class ConfigValidatorLayer< MeshConfig, 0 >
{ {
}; };
template< typename MeshConfig > template< typename MeshConfig >
class MeshConfigValidatorLayerCell class ConfigValidatorLayerCell
: public MeshConfigValidatorLayer< MeshConfig, MeshConfig::CellTopology::dimension - 1 >, : public ConfigValidatorLayer< MeshConfig, MeshConfig::CellTopology::dimension - 1 >,
public MeshConfigValidatorSubtopologyLayer< MeshConfig, public ConfigValidatorSubtopologyLayer< MeshConfig,
typename MeshConfig::CellTopology, typename MeshConfig::CellTopology,
DimensionTag< MeshConfig::CellTopology::dimension - 1 > > DimensionTag< MeshConfig::CellTopology::dimension - 1 > >
{ {
...@@ -133,8 +133,8 @@ class MeshConfigValidatorLayerCell ...@@ -133,8 +133,8 @@ class MeshConfigValidatorLayerCell
}; };
template< typename MeshConfig > template< typename MeshConfig >
class MeshConfigValidator class ConfigValidator
: public MeshConfigValidatorLayerCell< MeshConfig > : public ConfigValidatorLayerCell< MeshConfig >
{ {
static constexpr int meshDimension = MeshConfig::CellTopology::dimension; static constexpr int meshDimension = MeshConfig::CellTopology::dimension;
......
SET( headers MeshConfigValidator.h )
INSTALL( FILES ${headers} DESTINATION ${TNL_TARGET_INCLUDE_DIRECTORY}/Meshes/MeshDetails/config )
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment