FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
FEAT::Geometry::MeshPartNode< RootMesh_ > Class Template Reference

MeshPart mesh tree node class template. More...

#include <mesh_node.hpp>

Inheritance diagram for FEAT::Geometry::MeshPartNode< RootMesh_ >:
FEAT::Geometry::MeshNode< RootMesh_, MeshPart< RootMesh_ > >

Public Types

typedef MeshNode< RootMesh_, MeshPart< RootMesh_ > > BaseClass
 base class typedef More...
 
typedef BaseClass::MeshAtlasType MeshAtlasType
 mesh atlas type More...
 
typedef BaseClass::MeshChartType MeshChartType
 mesh chart type More...
 
typedef MeshPartNode< RootMeshTypeMeshPartNodeType
 the mesh part node type More...
 
typedef BaseClass::MeshPartType MeshPartType
 mesh part type More...
 
typedef BaseClass::MeshType MeshType
 this mesh type More...
 
typedef RootMesh_ RootMeshType
 the root mesh type, has to be a Mesh More...
 

Public Member Functions

 MeshPartNode (std::unique_ptr< MeshPartType > mesh_part)
 Constructor. More...
 
virtual ~MeshPartNode ()
 virtual destructor More...
 
void adapt (bool recursive=true)
 Adapts this mesh node. More...
 
bool adapt_by_name (const String &part_name, bool recursive=false)
 Adapts this mesh node. More...
 
MeshPartNodeTypeadd_mesh_part (const String &part_name, std::unique_ptr< MeshPartType > mesh_part, const String &chart_name="", const MeshChartType *chart=nullptr)
 Adds a new mesh-part child node. More...
 
MeshPartNodeTypeadd_mesh_part_node (const String &part_name, std::unique_ptr< MeshPartNodeType > mesh_part_node, const String &chart_name="", const MeshChartType *chart=nullptr)
 Adds a new mesh-part child node. More...
 
std::size_t bytes () const
 
std::unique_ptr< MeshPartNodeclone_unique () const
 Creates an independent clone of this object and returns a unique pointer to it. More...
 
MeshPartTypefind_mesh_part (const String &part_name)
 Searches this container for a MeshPart. More...
 
const MeshPartTypefind_mesh_part (const String &part_name) const
 
const MeshChartTypefind_mesh_part_chart (const String &part_name) const
 Searches for a chart belonging to a MeshPart by name. More...
 
String find_mesh_part_chart_name (const String &part_name) const
 Searches for a chart name belonging to a MeshPart by name. More...
 
MeshPartNodeTypefind_mesh_part_node (const String &part_name)
 Searches this container for a MeshPartNode. More...
 
const MeshPartNodeTypefind_mesh_part_node (const String &part_name) const
 
MeshTypeget_mesh ()
 Returns the mesh of this node. More...
 
const MeshTypeget_mesh () const
 
std::deque< Stringget_mesh_part_names (bool no_internals=false) const
 Returns the names of all mesh parts of this node. More...
 
template<typename ParentType_ >
std::unique_ptr< MeshPartNoderefine (const ParentType_ &parent) const
 Refines this node and its sub-tree. More...
 
void remove_all_mesh_parts ()
 Removes all mesh parts from this mesh node. More...
 
bool remove_mesh_part (const String &part_name)
 Removes a mesh-part and its corresponding node. More...
 
void rename_mesh_parts (const std::map< String, String > &renames)
 Renames a set of mesh-parts. More...
 
void set_mesh (std::unique_ptr< MeshType > mesh)
 
bool set_mesh_part_chart (const String &part_name, const String &chart_name, const MeshChartType *chart)
 Sets the chart for a particular mesh part. More...
 

Static Public Member Functions

static std::unique_ptr< MeshPartNodemake_unique (std::unique_ptr< MeshPartType > mesh_part)
 Creates a new MeshPartNode on the heap and returns a unique pointer to it. More...
 
static String name ()
 Returns the name of the class. More...
 

Protected Types

typedef MeshPartNodeContainer::const_iterator MeshPartNodeConstIterator
 submesh node const-iterator type More...
 
typedef std::map< String, MeshPartNodeBin > MeshPartNodeContainer
 submesh node bin container type More...
 
typedef MeshPartNodeContainer::iterator MeshPartNodeIterator
 submesh node iterator type More...
 
typedef MeshPartNodeContainer::reverse_iterator MeshPartNodeReverseIterator
 submesh node reverse-iterator type More...
 

Protected Member Functions

void _clone (const MeshPartNode &other)
 
void refine_children (MeshNode &refined_node) const
 Refines all child nodes of this node. More...
 
void refine_mesh_parts (MeshNode &refined_node) const
 Refines all child MeshPart nodes of this node. More...
 
void refine_mesh_parts (MeshPartNode &refined_node) const
 Refines this node's child nodes. More...
 

Protected Attributes

std::unique_ptr< MeshType_mesh
 a pointer to the mesh of this node More...
 
MeshPartNodeContainer _mesh_part_nodes
 child submesh nodes More...
 

Detailed Description

template<typename RootMesh_>
class FEAT::Geometry::MeshPartNode< RootMesh_ >

MeshPart mesh tree node class template.

This class template implements a mesh tree node containing a MeshPart.

Author
Peter Zajac

Definition at line 599 of file mesh_node.hpp.

Member Typedef Documentation

◆ BaseClass

template<typename RootMesh_ >
typedef MeshNode<RootMesh_, MeshPart<RootMesh_> > FEAT::Geometry::MeshPartNode< RootMesh_ >::BaseClass

base class typedef

Definition at line 604 of file mesh_node.hpp.

◆ MeshAtlasType

template<typename RootMesh_ >
typedef BaseClass::MeshAtlasType FEAT::Geometry::MeshPartNode< RootMesh_ >::MeshAtlasType

mesh atlas type

Definition at line 611 of file mesh_node.hpp.

◆ MeshChartType

template<typename RootMesh_ >
typedef BaseClass::MeshChartType FEAT::Geometry::MeshPartNode< RootMesh_ >::MeshChartType

mesh chart type

Definition at line 613 of file mesh_node.hpp.

◆ MeshPartNodeConstIterator

typedef MeshPartNodeContainer::const_iterator FEAT::Geometry::MeshNode< RootMesh_, MeshPart< RootMesh_ > >::MeshPartNodeConstIterator
protectedinherited

submesh node const-iterator type

Definition at line 176 of file mesh_node.hpp.

◆ MeshPartNodeContainer

typedef std::map<String, MeshPartNodeBin> FEAT::Geometry::MeshNode< RootMesh_, MeshPart< RootMesh_ > >::MeshPartNodeContainer
protectedinherited

submesh node bin container type

Definition at line 172 of file mesh_node.hpp.

◆ MeshPartNodeIterator

typedef MeshPartNodeContainer::iterator FEAT::Geometry::MeshNode< RootMesh_, MeshPart< RootMesh_ > >::MeshPartNodeIterator
protectedinherited

submesh node iterator type

Definition at line 174 of file mesh_node.hpp.

◆ MeshPartNodeReverseIterator

typedef MeshPartNodeContainer::reverse_iterator FEAT::Geometry::MeshNode< RootMesh_, MeshPart< RootMesh_ > >::MeshPartNodeReverseIterator
protectedinherited

submesh node reverse-iterator type

Definition at line 178 of file mesh_node.hpp.

◆ MeshPartNodeType

typedef MeshPartNode<RootMeshType> FEAT::Geometry::MeshNode< RootMesh_, MeshPart< RootMesh_ > >::MeshPartNodeType
inherited

the mesh part node type

Definition at line 127 of file mesh_node.hpp.

◆ MeshPartType

template<typename RootMesh_ >
typedef BaseClass::MeshPartType FEAT::Geometry::MeshPartNode< RootMesh_ >::MeshPartType

mesh part type

Definition at line 609 of file mesh_node.hpp.

◆ MeshType

template<typename RootMesh_ >
typedef BaseClass::MeshType FEAT::Geometry::MeshPartNode< RootMesh_ >::MeshType

this mesh type

Definition at line 607 of file mesh_node.hpp.

◆ RootMeshType

typedef RootMesh_ FEAT::Geometry::MeshNode< RootMesh_, MeshPart< RootMesh_ > >::RootMeshType
inherited

the root mesh type, has to be a Mesh

Definition at line 121 of file mesh_node.hpp.

Constructor & Destructor Documentation

◆ MeshPartNode()

template<typename RootMesh_ >
FEAT::Geometry::MeshPartNode< RootMesh_ >::MeshPartNode ( std::unique_ptr< MeshPartType mesh_part)
inlineexplicit

Constructor.

Parameters
[in]mesh_partA resident pointer to the MeshPart for this node.

Definition at line 637 of file mesh_node.hpp.

◆ ~MeshPartNode()

template<typename RootMesh_ >
virtual FEAT::Geometry::MeshPartNode< RootMesh_ >::~MeshPartNode ( )
inlinevirtual

virtual destructor

Definition at line 643 of file mesh_node.hpp.

Member Function Documentation

◆ _clone()

template<typename RootMesh_ >
void FEAT::Geometry::MeshPartNode< RootMesh_ >::_clone ( const MeshPartNode< RootMesh_ > &  other)
inlineprotected

Definition at line 616 of file mesh_node.hpp.

◆ adapt()

void FEAT::Geometry::MeshNode< RootMesh_, MeshPart< RootMesh_ > >::adapt ( bool  recursive = true)
inlineinherited

Adapts this mesh node.

This function loops over all MeshPart nodes and uses their associated charts (if given) to adapt the mesh in this node.

Parameters
[in]recursiveIf set to true, all mesh_part nodes are adapted prior to adapting this node.

Definition at line 481 of file mesh_node.hpp.

◆ adapt_by_name()

bool FEAT::Geometry::MeshNode< RootMesh_, MeshPart< RootMesh_ > >::adapt_by_name ( const String part_name,
bool  recursive = false 
)
inlineinherited

Adapts this mesh node.

This function adapts this node by a specific chart whose name is given.

Parameters
[in]part_nameThe name of the mesh_part node that is to be used for adaption.
[in]recursiveIf set to true, the mesh_part node associated with part_name will be adapted prior to adapting this node.
Returns
true if this node was adapted successfully or false if no node is associated with part_name or if the node did not contain any chart.

Definition at line 523 of file mesh_node.hpp.

◆ add_mesh_part()

MeshPartNodeType * FEAT::Geometry::MeshNode< RootMesh_, MeshPart< RootMesh_ > >::add_mesh_part ( const String part_name,
std::unique_ptr< MeshPartType mesh_part,
const String chart_name = "",
const MeshChartType chart = nullptr 
)
inlineinherited

Adds a new mesh-part child node.

Parameters
[in]part_nameThe name of the child node.
[in]mesh_partA resident unique pointer to the mesh_part to be added.
[in]chart_nameThe name of the chart that the mesh-part is to be linked to.
[in]chartA resident pointer to the chart that the subnode is to be associated with. May be nullptr.
Returns
A pointer to the newly created mesh-part node if the insertion was successful, otherwise nullptr.

Definition at line 316 of file mesh_node.hpp.

◆ add_mesh_part_node()

MeshPartNodeType * FEAT::Geometry::MeshNode< RootMesh_, MeshPart< RootMesh_ > >::add_mesh_part_node ( const String part_name,
std::unique_ptr< MeshPartNodeType mesh_part_node,
const String chart_name = "",
const MeshChartType chart = nullptr 
)
inlineinherited

Adds a new mesh-part child node.

Parameters
[in]part_nameThe name of the child node.
[in]mesh_part_nodeA resident unique pointer to the mesh_part node to be added.
[in]chart_nameThe name of the chart that the mesh-part is to be linked to.
[in]chartA resident pointer to the chart that the subnode is to be associated with. May be nullptr.
Returns
mesh_part_node.get() if the insertion was successful, otherwise nullptr.

Definition at line 281 of file mesh_node.hpp.

◆ bytes()

std::size_t FEAT::Geometry::MeshNode< RootMesh_, MeshPart< RootMesh_ > >::bytes ( ) const
inlineinherited
Returns
The size of dynamically allocated memory in bytes.

Definition at line 209 of file mesh_node.hpp.

◆ clone_unique()

template<typename RootMesh_ >
std::unique_ptr< MeshPartNode > FEAT::Geometry::MeshPartNode< RootMesh_ >::clone_unique ( ) const
inline

Creates an independent clone of this object and returns a unique pointer to it.

Returns
A unique pointer to the newly created clone object.

Definition at line 666 of file mesh_node.hpp.

◆ find_mesh_part() [1/2]

MeshPartType * FEAT::Geometry::MeshNode< RootMesh_, MeshPart< RootMesh_ > >::find_mesh_part ( const String part_name)
inlineinherited

Searches this container for a MeshPart.

Parameters
[in]part_nameThe name of the node associated with the mesh_part to be found.
Returns
A pointer to the mesh_part associated with part_name or nullptr if no such node was found.

Definition at line 398 of file mesh_node.hpp.

◆ find_mesh_part() [2/2]

const MeshPartType * FEAT::Geometry::MeshNode< RootMesh_, MeshPart< RootMesh_ > >::find_mesh_part ( const String part_name) const
inlineinherited

Searches this container for a MeshPart.

Parameters
[in]part_nameThe name of the node associated with the mesh_part to be found.
Returns
A pointer to the mesh_part associated with part_name or nullptr if no such node was found.

Definition at line 405 of file mesh_node.hpp.

◆ find_mesh_part_chart()

const MeshChartType * FEAT::Geometry::MeshNode< RootMesh_, MeshPart< RootMesh_ > >::find_mesh_part_chart ( const String part_name) const
inlineinherited

Searches for a chart belonging to a MeshPart by name.

Parameters
[in]part_nameThe name of the node associated with the chart to be found.
Returns
A pointer to the chart associated with part_name of nullptr if no such node was found or if the corresponding node did not have a chart.

Definition at line 421 of file mesh_node.hpp.

◆ find_mesh_part_chart_name()

String FEAT::Geometry::MeshNode< RootMesh_, MeshPart< RootMesh_ > >::find_mesh_part_chart_name ( const String part_name) const
inlineinherited

Searches for a chart name belonging to a MeshPart by name.

Parameters
[in]part_nameThe name of the node associated with the chart to be found.
Returns
The name of the chart associated with part_name or an empty string is no such node was found.

Definition at line 437 of file mesh_node.hpp.

◆ find_mesh_part_node() [1/2]

MeshPartNodeType * FEAT::Geometry::MeshNode< RootMesh_, MeshPart< RootMesh_ > >::find_mesh_part_node ( const String part_name)
inlineinherited

Searches this container for a MeshPartNode.

Parameters
[in]part_nameThe name of the node to be found.
Returns
A pointer to the mesh_part node associated with part_name or nullptr if no such node was found.

Definition at line 376 of file mesh_node.hpp.

◆ find_mesh_part_node() [2/2]

const MeshPartNodeType * FEAT::Geometry::MeshNode< RootMesh_, MeshPart< RootMesh_ > >::find_mesh_part_node ( const String part_name) const
inlineinherited

Searches this container for a MeshPartNode.

Parameters
[in]part_nameThe name of the node to be found.
Returns
A pointer to the mesh_part node associated with part_name or nullptr if no such node was found.

Definition at line 383 of file mesh_node.hpp.

◆ get_mesh() [1/2]

MeshType * FEAT::Geometry::MeshNode< RootMesh_, MeshPart< RootMesh_ > >::get_mesh ( )
inlineinherited

Returns the mesh of this node.

Returns
A pointer to the mesh contained in this node.

Definition at line 225 of file mesh_node.hpp.

◆ get_mesh() [2/2]

const MeshType * FEAT::Geometry::MeshNode< RootMesh_, MeshPart< RootMesh_ > >::get_mesh ( ) const
inlineinherited

Returns the mesh of this node.

Returns
A pointer to the mesh contained in this node.

Definition at line 231 of file mesh_node.hpp.

◆ get_mesh_part_names()

std::deque< String > FEAT::Geometry::MeshNode< RootMesh_, MeshPart< RootMesh_ > >::get_mesh_part_names ( bool  no_internals = false) const
inlineinherited

Returns the names of all mesh parts of this node.

Parameters
[in]no_internalsSpecifies whether to skip all internal mesh-parts whose names begin with an underscore.
Returns
A deque of all mesh-part names in this node.

Definition at line 251 of file mesh_node.hpp.

◆ make_unique()

template<typename RootMesh_ >
static std::unique_ptr< MeshPartNode > FEAT::Geometry::MeshPartNode< RootMesh_ >::make_unique ( std::unique_ptr< MeshPartType mesh_part)
inlinestatic

Creates a new MeshPartNode on the heap and returns a unique pointer to it.

Parameters
[in]mesh_partA resident pointer to the MeshPart for the newly created node.
Returns
A unique pointer to the new MeshPartNode object.

Definition at line 656 of file mesh_node.hpp.

Referenced by FEAT::Geometry::MeshNode< RootMesh_, ThisMesh_ >::add_mesh_part(), and FEAT::Geometry::MeshPartNode< RootMesh_ >::refine().

◆ name()

template<typename RootMesh_ >
static String FEAT::Geometry::MeshPartNode< RootMesh_ >::name ( )
inlinestatic

Returns the name of the class.

Returns
The name of the class as a String.

Definition at line 709 of file mesh_node.hpp.

◆ refine()

template<typename RootMesh_ >
template<typename ParentType_ >
std::unique_ptr< MeshPartNode > FEAT::Geometry::MeshPartNode< RootMesh_ >::refine ( const ParentType_ &  parent) const
inline

Refines this node and its sub-tree.

Parameters
[in]parentA transient reference to the parent mesh/cell subset of this node's cell subset.
Returns
A unique pointer to a MeshPartNode containing the refined cell subset tree.

Definition at line 683 of file mesh_node.hpp.

References FEAT::Geometry::MeshNode< RootMesh_, MeshPart< RootMesh_ > >::_mesh, FEAT::Geometry::MeshPartNode< RootMesh_ >::make_unique(), and FEAT::Geometry::MeshPartNode< RootMesh_ >::refine_mesh_parts().

◆ refine_children()

void FEAT::Geometry::MeshNode< RootMesh_, MeshPart< RootMesh_ > >::refine_children ( MeshNode< RootMesh_, MeshPart< RootMesh_ > > &  refined_node) const
inlineprotectedinherited

Refines all child nodes of this node.

Parameters
[in,out]refined_nodeA reference to the node generated by refining this node.

Definition at line 565 of file mesh_node.hpp.

◆ refine_mesh_parts() [1/2]

void FEAT::Geometry::MeshNode< RootMesh_, MeshPart< RootMesh_ > >::refine_mesh_parts ( MeshNode< RootMesh_, MeshPart< RootMesh_ > > &  refined_node) const
inlineprotectedinherited

Refines all child MeshPart nodes of this node.

Parameters
[in,out]refined_nodeA reference to the node generated by refining this node.

Definition at line 577 of file mesh_node.hpp.

◆ refine_mesh_parts() [2/2]

template<typename RootMesh_ >
void FEAT::Geometry::MeshPartNode< RootMesh_ >::refine_mesh_parts ( MeshPartNode< RootMesh_ > &  refined_node) const
inlineprotected

Refines this node's child nodes.

Note
This function is called by this node's refine() function, therefore there is no need for the user to call this function.
Parameters
[in,out]refined_nodeA transient reference to the node generated from refinement of this node.

Definition at line 724 of file mesh_node.hpp.

References FEAT::Geometry::MeshNode< RootMesh_, MeshPart< RootMesh_ > >::_mesh_part_nodes.

Referenced by FEAT::Geometry::MeshPartNode< RootMesh_ >::refine().

◆ remove_all_mesh_parts()

void FEAT::Geometry::MeshNode< RootMesh_, MeshPart< RootMesh_ > >::remove_all_mesh_parts ( )
inlineinherited

Removes all mesh parts from this mesh node.

Definition at line 339 of file mesh_node.hpp.

◆ remove_mesh_part()

bool FEAT::Geometry::MeshNode< RootMesh_, MeshPart< RootMesh_ > >::remove_mesh_part ( const String part_name)
inlineinherited

Removes a mesh-part and its corresponding node.

Parameters
[in]part_nameThe name of the child node to be removed
Returns
true, if a mesh-part with the corresponding name was removed, otherwise false.

Definition at line 333 of file mesh_node.hpp.

◆ rename_mesh_parts()

void FEAT::Geometry::MeshNode< RootMesh_, MeshPart< RootMesh_ > >::rename_mesh_parts ( const std::map< String, String > &  renames)
inlineinherited

Renames a set of mesh-parts.

Parameters
[in]renamesA transient map of oldname-newname pairs.

Definition at line 449 of file mesh_node.hpp.

◆ set_mesh()

void FEAT::Geometry::MeshNode< RootMesh_, MeshPart< RootMesh_ > >::set_mesh ( std::unique_ptr< MeshType mesh)
inlineinherited

Definition at line 236 of file mesh_node.hpp.

◆ set_mesh_part_chart()

bool FEAT::Geometry::MeshNode< RootMesh_, MeshPart< RootMesh_ > >::set_mesh_part_chart ( const String part_name,
const String chart_name,
const MeshChartType chart 
)
inlineinherited

Sets the chart for a particular mesh part.

Parameters
[in]part_nameThe name of the mesh part that the chart is to be assigned to.
[in]chartA resident pointer to the chart that is to be assigned. May also be nullptr.
Returns
true if the chart was assigned successfully or false if no mesh part with the specified name was found.

Definition at line 357 of file mesh_node.hpp.

Member Data Documentation

◆ _mesh

std::unique_ptr<MeshType> FEAT::Geometry::MeshNode< RootMesh_, MeshPart< RootMesh_ > >::_mesh
protectedinherited

a pointer to the mesh of this node

Definition at line 182 of file mesh_node.hpp.

◆ _mesh_part_nodes

MeshPartNodeContainer FEAT::Geometry::MeshNode< RootMesh_, MeshPart< RootMesh_ > >::_mesh_part_nodes
protectedinherited

child submesh nodes

Definition at line 184 of file mesh_node.hpp.


The documentation for this class was generated from the following file: