Loading src/TNL/Meshes/Mesh.h +3 −2 Original line number Diff line number Diff line Loading @@ -89,8 +89,9 @@ class Mesh bool operator==( const Mesh& mesh ) const; bool init( const typename MeshTraitsType::PointArrayType& points, const typename MeshTraitsType::CellSeedArrayType& cellSeeds ); // The points and cellSeeds arrays will be reset when not needed to save memory. bool init( typename MeshTraitsType::PointArrayType& points, typename MeshTraitsType::CellSeedArrayType& cellSeeds ); protected: // Methods for the mesh initializer Loading src/TNL/Meshes/MeshBuilder.h +1 −1 Original line number Diff line number Diff line Loading @@ -71,7 +71,7 @@ class MeshBuilder return this->cellSeeds[ index ]; } bool build( MeshType& mesh ) const bool build( MeshType& mesh ) { if( ! this->validate() ) return false; Loading src/TNL/Meshes/MeshDetails/Mesh_impl.h +2 −2 Original line number Diff line number Diff line Loading @@ -154,8 +154,8 @@ operator==( const Mesh& mesh ) const template< typename MeshConfig > bool Mesh< MeshConfig >:: init( const typename MeshTraitsType::PointArrayType& points, const typename MeshTraitsType::CellSeedArrayType& cellSeeds ) init( typename MeshTraitsType::PointArrayType& points, typename MeshTraitsType::CellSeedArrayType& cellSeeds ) { MeshInitializer< MeshConfig> meshInitializer; if( ! meshInitializer.createMesh( points, cellSeeds, *this ) ) Loading src/TNL/Meshes/MeshDetails/initializer/MeshEntityInitializer.h +252 −278 File changed.Preview size limit exceeded, changes collapsed. Show changes src/TNL/Meshes/MeshDetails/initializer/MeshEntitySeed.h +39 −0 Original line number Diff line number Diff line Loading @@ -62,6 +62,45 @@ class MeshEntitySeed IdArrayType cornerIds; }; template< typename MeshConfig > class MeshEntitySeed< MeshConfig, MeshVertexTopology > { using MeshConfigTraits = MeshTraits< MeshConfig >; public: using GlobalIndexType = typename MeshTraits< MeshConfig >::GlobalIndexType; using LocalIndexType = typename MeshTraits< MeshConfig >::LocalIndexType; using IdArrayType = Containers::StaticArray< 1, GlobalIndexType >; static String getType() { return String( "MeshEntitySeed<>" ); } static constexpr LocalIndexType getCornersCount() { return 1; } void setCornerId( const LocalIndexType& cornerIndex, const GlobalIndexType& pointIndex ) { Assert( cornerIndex == 0, std::cerr << "cornerIndex = " << cornerIndex ); Assert( 0 <= pointIndex, std::cerr << "pointIndex = " << pointIndex ); this->cornerIds[ cornerIndex ] = pointIndex; } IdArrayType& getCornerIds() { return cornerIds; } const IdArrayType& getCornerIds() const { return cornerIds; } private: IdArrayType cornerIds; }; template< typename MeshConfig, typename EntityTopology > std::ostream& operator<<( std::ostream& str, const MeshEntitySeed< MeshConfig, EntityTopology >& e ) { Loading Loading
src/TNL/Meshes/Mesh.h +3 −2 Original line number Diff line number Diff line Loading @@ -89,8 +89,9 @@ class Mesh bool operator==( const Mesh& mesh ) const; bool init( const typename MeshTraitsType::PointArrayType& points, const typename MeshTraitsType::CellSeedArrayType& cellSeeds ); // The points and cellSeeds arrays will be reset when not needed to save memory. bool init( typename MeshTraitsType::PointArrayType& points, typename MeshTraitsType::CellSeedArrayType& cellSeeds ); protected: // Methods for the mesh initializer Loading
src/TNL/Meshes/MeshBuilder.h +1 −1 Original line number Diff line number Diff line Loading @@ -71,7 +71,7 @@ class MeshBuilder return this->cellSeeds[ index ]; } bool build( MeshType& mesh ) const bool build( MeshType& mesh ) { if( ! this->validate() ) return false; Loading
src/TNL/Meshes/MeshDetails/Mesh_impl.h +2 −2 Original line number Diff line number Diff line Loading @@ -154,8 +154,8 @@ operator==( const Mesh& mesh ) const template< typename MeshConfig > bool Mesh< MeshConfig >:: init( const typename MeshTraitsType::PointArrayType& points, const typename MeshTraitsType::CellSeedArrayType& cellSeeds ) init( typename MeshTraitsType::PointArrayType& points, typename MeshTraitsType::CellSeedArrayType& cellSeeds ) { MeshInitializer< MeshConfig> meshInitializer; if( ! meshInitializer.createMesh( points, cellSeeds, *this ) ) Loading
src/TNL/Meshes/MeshDetails/initializer/MeshEntityInitializer.h +252 −278 File changed.Preview size limit exceeded, changes collapsed. Show changes
src/TNL/Meshes/MeshDetails/initializer/MeshEntitySeed.h +39 −0 Original line number Diff line number Diff line Loading @@ -62,6 +62,45 @@ class MeshEntitySeed IdArrayType cornerIds; }; template< typename MeshConfig > class MeshEntitySeed< MeshConfig, MeshVertexTopology > { using MeshConfigTraits = MeshTraits< MeshConfig >; public: using GlobalIndexType = typename MeshTraits< MeshConfig >::GlobalIndexType; using LocalIndexType = typename MeshTraits< MeshConfig >::LocalIndexType; using IdArrayType = Containers::StaticArray< 1, GlobalIndexType >; static String getType() { return String( "MeshEntitySeed<>" ); } static constexpr LocalIndexType getCornersCount() { return 1; } void setCornerId( const LocalIndexType& cornerIndex, const GlobalIndexType& pointIndex ) { Assert( cornerIndex == 0, std::cerr << "cornerIndex = " << cornerIndex ); Assert( 0 <= pointIndex, std::cerr << "pointIndex = " << pointIndex ); this->cornerIds[ cornerIndex ] = pointIndex; } IdArrayType& getCornerIds() { return cornerIds; } const IdArrayType& getCornerIds() const { return cornerIds; } private: IdArrayType cornerIds; }; template< typename MeshConfig, typename EntityTopology > std::ostream& operator<<( std::ostream& str, const MeshEntitySeed< MeshConfig, EntityTopology >& e ) { Loading