Skip to content
Snippets Groups Projects
Commit 6047d9bc authored by Vít Hanousek's avatar Vít Hanousek
Browse files

Merge branch 'develop' into mpi-explosive

parents dac69968 4bdcbb0d
No related branches found
No related tags found
No related merge requests found
...@@ -10,6 +10,10 @@ ...@@ -10,6 +10,10 @@
#pragma once #pragma once
#include <TNL/Devices/CudaCallable.h>
#include <TNL/Config/ParameterContainer.h>
#include <TNL/Functions/Domain.h>
namespace TNL { namespace TNL {
namespace Functions { namespace Functions {
......
...@@ -82,17 +82,16 @@ public: ...@@ -82,17 +82,16 @@ public:
TNL_ASSERT_EQ( this->verticesInEntities.at( this->meshDimension ), subvertices, "numbers of cell subvertices do not match" ); TNL_ASSERT_EQ( this->verticesInEntities.at( this->meshDimension ), subvertices, "numbers of cell subvertices do not match" );
using MeshBuilder = MeshBuilder< MeshType >; using MeshBuilder = MeshBuilder< MeshType >;
using VertexIndexType = typename MeshType::MeshTraitsType::template EntityTraits< 0 >::GlobalIndexType; using GlobalIndexType = typename MeshType::GlobalIndexType;
using CellIndexType = typename MeshType::MeshTraitsType::template EntityTraits< MeshType::Config::meshDimension >::GlobalIndexType;
const VertexIndexType numberOfPoints = this->pointsData.size(); const GlobalIndexType numberOfPoints = this->pointsData.size();
const CellIndexType numberOfCells = this->entityIdMappings.at( this->meshDimension ).size(); const GlobalIndexType numberOfCells = this->entityIdMappings.at( this->meshDimension ).size();
MeshBuilder meshBuilder; MeshBuilder meshBuilder;
meshBuilder.setPointsCount( numberOfPoints ); meshBuilder.setPointsCount( numberOfPoints );
meshBuilder.setCellsCount( numberOfCells ); meshBuilder.setCellsCount( numberOfCells );
for( VertexIndexType i = 0; i < numberOfPoints; i++ ) { for( GlobalIndexType i = 0; i < numberOfPoints; i++ ) {
typename MeshType::PointType p; typename MeshType::PointType p;
for( int j = 0; j < p.size; j++ ) for( int j = 0; j < p.size; j++ )
p[ j ] = this->pointsData.at( i )[ j ]; p[ j ] = this->pointsData.at( i )[ j ];
...@@ -100,7 +99,7 @@ public: ...@@ -100,7 +99,7 @@ public:
} }
const auto& cellIdMap = this->entityIdMappings.at( this->meshDimension ); const auto& cellIdMap = this->entityIdMappings.at( this->meshDimension );
for( CellIndexType i = 0; i < numberOfCells; i++ ) { for( GlobalIndexType i = 0; i < numberOfCells; i++ ) {
const VTKIndexType vtkCellIndex = cellIdMap.at( i ); const VTKIndexType vtkCellIndex = cellIdMap.at( i );
const auto& vtkCellSeeds = this->entitySeeds.at( vtkCellIndex ); const auto& vtkCellSeeds = this->entitySeeds.at( vtkCellIndex );
using CellSeedType = typename MeshBuilder::CellSeedType; using CellSeedType = typename MeshBuilder::CellSeedType;
...@@ -129,19 +128,19 @@ public: ...@@ -129,19 +128,19 @@ public:
{ {
return this->worldDimension; return this->worldDimension;
} }
int int
getMeshDimension() const getMeshDimension() const
{ {
return this->meshDimension; return this->meshDimension;
} }
EntityShape EntityShape
getCellShape() const getCellShape() const
{ {
return this->entityTypes.at( this->meshDimension ); return this->entityTypes.at( this->meshDimension );
} }
// int // int
// getVerticesInCell() const // getVerticesInCell() const
// { // {
...@@ -168,21 +167,21 @@ public: ...@@ -168,21 +167,21 @@ public:
// not stored in the VTK file // not stored in the VTK file
return "int"; return "int";
} }
String String
getLocalIndexType() const getLocalIndexType() const
{ {
// not stored in the VTK file // not stored in the VTK file
return "short int"; return "short int";
} }
String String
getIdType() const getIdType() const
{ {
// not stored in the VTK file // not stored in the VTK file
return "int"; return "int";
} }
protected: protected:
int worldDimension = 0; int worldDimension = 0;
int meshDimension = 0; int meshDimension = 0;
......
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