BELFEM 0.9.3
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
belfem::Mesh Class Reference

Top-level container for all mesh entities. More...

#include <cl_Mesh.hpp>

Collaboration diagram for belfem::Mesh:
[legend]

Public Member Functions

 Mesh (const uint aNumberOfDimensions, const proc_t aMasterProc=0, const bool aComputeConnectivities=true)
 creates an empty mesh container but specifies number of dimension
 Mesh (const string &aPath, const proc_t aMasterProc=0, const bool aComputeConnectivities=true, const bool aParallelMode=true)
 Reads a mesh from a file.
 Mesh (const uint aOrder, const Vector< index_t > aNumNodes, const Vector< real > aStep, const Vector< real > aOrigin={}, const proc_t aMasterProc=0)
 creates a tensor mesh of first, second or third order ( B-splines only for order > 1 )
void scale_mesh (const real aFactor)
 Multiplies the node and control-point coordinates by aFactor, e.g.
 ~Mesh ()
const string & path () const
bool is_tensormesh () const
const TensorMeshConfig * tensorconf () const
void save (const string &aFilePath)
 Master rank only, a no-op elsewhere; the mesh must be finalized.
uint number_of_dimensions () const
void set_number_of_dimensions (const uint &aNumberOfDimensions)
index_t number_of_nodes () const
index_t number_of_elements () const
index_t number_of_facets () const
index_t number_of_edges () const
index_t number_of_faces () const
index_t number_of_control_points () const
uint number_of_blocks () const
uint number_of_fields () const
uint number_of_global_variables () const
mesh::Node * node (const id_t aID)
mesh::Node * node (const index_t i, const index_t j)
mesh::Node * node (const index_t i, const index_t j, const index_t k)
mesh::Edge * edge (const id_t aID)
mesh::Face * face (const id_t aID)
bool element_exists (const id_t aID) const
mesh::Element * element (const id_t aID)
mesh::Element * element (const index_t i, const index_t j)
mesh::Element * element (const index_t i, const index_t j, const index_t k)
mesh::ControlPoint * control_point (const id_t aID)
mesh::ControlPoint * control_point (const index_t i, const index_t j)
mesh::ControlPoint * control_point (const index_t i, const index_t j, const index_t k)
bool facet_exists (const id_t aID) const
mesh::Facet * facet (const id_t aID)
mesh::Block * block (const id_t aID)
mesh::SideSet * sideset (const id_t aID)
mesh::Element * vertex (const id_t aID)
mesh::Basis * basis_by_index (const EntityType aType, const index_t aIndex)
mesh::Basis * basis (const EntityType aType, const id_t aID)
mesh::Field * field (const string &aLabel)
 get field by label
mesh::Field * field (const index_t aIndex)
bool field_exists (const string &aLabel)
Vector< real > & field_data (const string &aLabel)
Cell< mesh::GlobalVariable * > & global_variables ()
mesh::GlobalVariable * global_variable (const id_t aID)
mesh::GlobalVariable * global_variable (const string &aLabel)
real & global_variable_data (const string &aLabel)
bool global_variable_exists (const string &aLabel)
uint number_of_sidesets () const
Cell< mesh::Node * > & hanging_nodes ()
 Returns views of entities the mesh owns through the containers below.
Cell< mesh::Edge * > & hanging_edges ()
Cell< mesh::Face * > & hanging_faces ()
Cell< mesh::Facet * > & hanging_facets ()
Cell< mesh::Element * > & hanging_elements ()
Cell< mesh::ControlPoint * > & hanging_control_points ()
index_t number_of_hanging_basis () const
void add_block (mesh::Block *aBlock)
 Takes ownership of aBlock: ~Mesh deletes the block and, through it, its elements.
void add_sideset (mesh::SideSet *aSideSet)
 Takes ownership of aSideSet: ~Mesh deletes the sideset and, through it, its facets.
Vector< real > & create_field (const string &aLabel, const EntityType aEntity=EntityType::NODE, const id_t aID=0)
real & create_global_variable (const string &aLabel, const real aValue=0.0, const id_t aID=0)
void collect_elements_from_blocks ()
void collect_facets_from_sidesets ()
void update_facet_nodes ()
void collect_elements_from_group (Cell< mesh::Element * > &aElements, const id_t aGroupId, const ElementType aType=ElementType::EMPTY)
void compute_facet_orientations ()
void finalize ()
 finalizes all aspects of the mesh; edges and faces are finalized too when connectivities are computed
bool is_finalized () const
bool edges_are_finalized () const
bool faces_are_finalized () const
void collect_hanging_basis ()
void expand_hanging_basis_sources ()
void unfinalize ()
 unfinalizes all aspects of mesh but edges
void finalize_edges ()
void finalize_edges (Cell< mesh::Element * > &aElements)
void finalize_faces ()
void unflag_everything (const uint aFlagIndex=0)
void unflag_all_nodes (const uint aFlagIndex=0)
void unflag_all_edges (const uint aFlagIndex=0)
void unflag_all_faces (const uint aFlagIndex=0)
void unflag_all_facets (const uint aFlagIndex=0)
void unflag_all_elements (const uint aFlagIndex=0)
void unflag_all_vertices (const uint aFlagIndex=0)
void unflag_all_control_points (const uint aFlagIndex=0)
Cell< mesh::Node * > & nodes ()
 The nodes.
Cell< mesh::Block * > & blocks ()
 The mesh owns the blocks; a block owns and deletes its elements.
bool block_exists (const id_t aID) const
bool sideset_exists (const id_t aID) const
bool node_exists (const id_t aID) const
Cell< mesh::ThinShell * > & thin_shells ()
 Owned and deleted by the mesh.
Cell< mesh::Element * > & elements ()
 A flat list of the elements of all blocks.
Cell< mesh::Facet * > & facets ()
 A flat list of the facets of all sidesets.
Cell< mesh::ControlPoint * > & control_points ()
 Owned and deleted by the mesh.
Cell< mesh::SideSet * > & sidesets ()
 The mesh owns the sidesets; a sideset owns and deletes its facets.
Cell< mesh::Curve * > & curves ()
 Owned and deleted by the mesh.
mesh::Curve * curve (const id_t aID)
 return a curve by its ID
void create_curve_map ()
Cell< mesh::Edge * > & edges ()
 Owned and deleted by the mesh.
Cell< mesh::Face * > & faces ()
 Owned and deleted by the mesh.
Cell< mesh::Element * > & vertices ()
 Owned and deleted by the mesh.
Cell< mesh::Element * > & boundary_edges ()
 The line elements of a 3D Gmsh mesh; owned and deleted by the mesh.
void partition (const uint &aNumberOfPartitions, const bool aSetProcOwners=true, const bool aForceContinuousPartitions=true, const bool aResetVertexContainers=true)
 Only the master rank partitions the mesh and sets the element and node ownerships.
void partition (const uint &aNumberOfPartitions, const Vector< id_t > &aSelectedBlocks, const bool aSetProcOwners=true, const bool aForceContinuousPartitions=false, const bool aResetVertexContainers=true)
 partition the mesh and set element and node ownerships, but also pass selected blocks
void partition (const uint &aNumberOfPartitions, const Vector< id_t > &aSelectedBlocks, const Vector< id_t > &aSelectedSideSets, const bool aSetProcOwners=true, const bool aForceContinuousPartitions=false, const bool aResetVertexContainers=true)
 partition the mesh and set element and node ownerships, but also pass selected blocks
void update_node_indices ()
void update_edge_indices ()
void update_face_indices ()
void update_facet_indices ()
void create_edges (const bool aPrint=false, const Vector< id_t > aNedelecBlocks=Vector< id_t >(), const Vector< id_t > aNedelecSideSets=Vector< id_t >(), const bool aCreateEdgesOnAllSideSets=true)
 creates the edges on the mesh
void reset_edges ()
void create_faces (const bool aPrint=false, const Vector< id_t > aNedelecBlocks=Vector< id_t >(), const Vector< id_t > aNedelecSideSets=Vector< id_t >())
 creates the faces on the mesh
void reset_faces ()
void update_element_indices ()
void update_vertex_indices ()
void update_control_point_indices ()
real & time_stamp ()
 Writable reference to the current time [s].
const uint & time_step () const
 The current timestep index.
uint & time_step ()
void set_time_step (const uint aTimeStep)
 set the index of the time step
void set_connectivity (const Connectivity aConnectivity)
void reset_connectivity (const Connectivity aConnectivity)
bool test_connectivity (const Connectivity aConnectivity)
const proc_t & master () const
 return the ID of the proc that owns this mesh
void update_ownerships ()
void set_vertex_owners ()
void set_number_of_partitions (const proc_t &aNumberOfPartitions)
 to be called by partitioner
bool edges_exist () const
 tells if Nedelec edges exist on this mesh
bool faces_exist () const
 tells if Nedelec faces exist on this mesh
void create_edge_map ()
 special function called by Kernel
void create_face_map ()
 special function called by Kernel
const uint & max_element_order () const
 return the max interpolation order on the mesh
void set_kernel_flag ()
 called by kernel
bool is_kernel_mesh () const
void flag_curved_elements ()
 flags elements that are curved
void distribute_edge_directions ()
 Collective and asymmetric: every rank must enter; rank 0 distributes the per-owner edge signs, every other rank receives.
void save_faces (const string &aPath)
id_t max_node_id ()
id_t max_element_id ()
id_t max_block_and_sideset_id ()
void set_abstract_nodes (Cell< mesh::Node * > &aNodes)
 Adopts the nodes.
Cell< mesh::Node * > & autopins ()
Cell< mesh::Node * > & abstract_nodes ()
Cell< mesh::Node * > & orphaned_nodes ()
std::size_t checksum ()
void force_checksum (const std::size_t aChecksum)
void set_config_tag (const uint64_t aTag, const string &aText)
uint64_t config_tag () const
const string & config_text () const
void update_element_map ()
void update_block_map ()
void update_sideset_map ()
id_t max_node_id () const
id_t max_element_id () const
Mesh * extract_thin_shell_mesh ()
 Returns a newly allocated mesh the caller owns and deletes.
void populate_element_neighbors ()
void set_compute_facet_orientation_flag (const bool aFlag)
size_t memory () const
 Compute the total memory used by the mesh in bytes.
bool has_periodicity () const
mesh::Periodicity * periodicity ()
void set_periodicity (mesh::Periodicity *aPeriodicity)
 The mesh takes ownership and deletes aPeriodicity.
void save_meta (hid_t aFile, const uint aRunningTimestep=0)
uint load_meta (hid_t aFile)
void save_fields (hid_t aFile)
void load_fields (hid_t aFile)
void save_globals (hid_t aFile)
void load_globals (hid_t aFile)
void set_mesh_checker_flag ()
void reset_mesh_checker_flag ()
bool mesh_checker_flag () const

Protected Attributes

const proc_t mMasterProc
const proc_t mCommRank
const proc_t mCommSize
Hash mHash
uint64_t mConfigTag = 0
string mConfigText
string mPath
Cell< mesh::Element * > mElements
Cell< mesh::Node * > mNodes
Cell< mesh::Facet * > mFacets
Cell< mesh::Element * > mVertices
Cell< mesh::Edge * > mEdges
Cell< mesh::Face * > mFaces
Cell< mesh::ControlPoint * > mControlPoints
Cell< mesh::Element * > mBoundaryEdges
Cell< mesh::Node * > mHangingNodes
Cell< mesh::Edge * > mHangingEdges
Cell< mesh::Face * > mHangingFaces
Cell< mesh::Facet * > mHangingFacets
Cell< mesh::Element * > mHangingElements
Cell< mesh::ControlPoint * > mHangingControlPoints
Cell< mesh::Block * > mBlocks
Cell< mesh::SideSet * > mSideSets
Cell< mesh::Curve * > mCurves
Cell< mesh::ThinShell * > mThinShells
Cell< mesh::GlobalVariable * > mGlobalVariables
Cell< mesh::Field * > mFields
Map< string, mesh::GlobalVariable * > mGlobalVariableMap
Map< id_t, mesh::GlobalVariable * > mGlobalVariableIDMap
Map< string, mesh::Field * > mFieldMap
proc_t mNumberOfPartitions = 1
uint mNumberOfDimensions = 0
uint mNumberOfGlobalVariables = 0
uint mNumberOfFields = 0
real mTimeStamp = 0.0
uint mTimeStep = 1
Map< id_t, mesh::Node * > mNodeMap
Map< id_t, mesh::Element * > mElementMap
Map< id_t, mesh::Facet * > mFacetMap
Map< id_t, mesh::Block * > mBlockMap
Map< id_t, mesh::SideSet * > mSideSetMap
Map< id_t, mesh::Element * > mVertexMap
Map< id_t, mesh::Edge * > mEdgeMap
Map< id_t, mesh::Face * > mFaceMap
Map< id_t, mesh::ControlPoint * > mControlPointMap
Map< id_t, mesh::Curve * > mCurveMap
uint mMaxElementOrder = 0
bool mIsKernelMesh = false
 flag telling if this is a mesh on the kernel
bool mIsFinalized = false
 flag telling if mesh is finalized (master only)
bool mEdgesAreFinalized = false
bool mFacesAreFinalized = false
bool mNodesAreSorted = false
bool mComputeFacetOrientationsWhenFinalizing = true
Cell< mesh::Node * > mAutoPins
Cell< mesh::Node * > mAbstractNodes
Cell< mesh::Node * > mOrphanedNodes
Bitset< static_cast< size_t >(Connectivity::UNDEFINED)> mConnectivities
const TensorMeshConfig * mTensorConfig = nullptr
mesh::Periodicity * mPeriodicity = nullptr
bool mMeshCheckerFlag = false

Detailed Description

Top-level container for all mesh entities.

See also
BELFEM Mesh Module - Usage Guide

Constructor & Destructor Documentation

◆ Mesh() [1/3]

belfem::Mesh::Mesh ( const uint aNumberOfDimensions,
const proc_t aMasterProc = 0,
const bool aComputeConnectivities = true )

creates an empty mesh container but specifies number of dimension

◆ Mesh() [2/3]

belfem::Mesh::Mesh ( const string & aPath,
const proc_t aMasterProc = 0,
const bool aComputeConnectivities = true,
const bool aParallelMode = true )

Reads a mesh from a file.

Collective unless aParallelMode is false. Only the master rank reads the file; every other rank gets an empty mesh that knows the dimension count. Constructing it on a subset of ranks deadlocks.

◆ Mesh() [3/3]

belfem::Mesh::Mesh ( const uint aOrder,
const Vector< index_t > aNumNodes,
const Vector< real > aStep,
const Vector< real > aOrigin = {},
const proc_t aMasterProc = 0 )

creates a tensor mesh of first, second or third order ( B-splines only for order > 1 )

◆ ~Mesh()

belfem::Mesh::~Mesh ( )

Member Function Documentation

◆ abstract_nodes()

Cell< mesh::Node * > & belfem::Mesh::abstract_nodes ( )
inline

◆ add_block()

void belfem::Mesh::add_block ( mesh::Block * aBlock)

Takes ownership of aBlock: ~Mesh deletes the block and, through it, its elements.

◆ add_sideset()

void belfem::Mesh::add_sideset ( mesh::SideSet * aSideSet)

Takes ownership of aSideSet: ~Mesh deletes the sideset and, through it, its facets.

The facets are registered in the facet map.

◆ autopins()

Cell< mesh::Node * > & belfem::Mesh::autopins ( )
inline

◆ basis()

mesh::Basis * belfem::Mesh::basis ( const EntityType aType,
const id_t aID )
inline

◆ basis_by_index()

mesh::Basis * belfem::Mesh::basis_by_index ( const EntityType aType,
const index_t aIndex )
inline

◆ block()

mesh::Block * belfem::Mesh::block ( const id_t aID)
inline

◆ block_exists()

bool belfem::Mesh::block_exists ( const id_t aID) const
inline

◆ blocks()

Cell< mesh::Block * > & belfem::Mesh::blocks ( )
inline

The mesh owns the blocks; a block owns and deletes its elements.

◆ boundary_edges()

Cell< mesh::Element * > & belfem::Mesh::boundary_edges ( )
inline

The line elements of a 3D Gmsh mesh; owned and deleted by the mesh.

◆ checksum()

std::size_t belfem::Mesh::checksum ( )

◆ collect_elements_from_blocks()

void belfem::Mesh::collect_elements_from_blocks ( )

◆ collect_elements_from_group()

void belfem::Mesh::collect_elements_from_group ( Cell< mesh::Element * > & aElements,
const id_t aGroupId,
const ElementType aType = ElementType::EMPTY )

◆ collect_facets_from_sidesets()

void belfem::Mesh::collect_facets_from_sidesets ( )

◆ collect_hanging_basis()

void belfem::Mesh::collect_hanging_basis ( )

◆ compute_facet_orientations()

void belfem::Mesh::compute_facet_orientations ( )

◆ config_tag()

uint64_t belfem::Mesh::config_tag ( ) const

◆ config_text()

const string & belfem::Mesh::config_text ( ) const

◆ control_point() [1/3]

mesh::ControlPoint * belfem::Mesh::control_point ( const id_t aID)
inline

◆ control_point() [2/3]

mesh::ControlPoint * belfem::Mesh::control_point ( const index_t i,
const index_t j )
inline

◆ control_point() [3/3]

mesh::ControlPoint * belfem::Mesh::control_point ( const index_t i,
const index_t j,
const index_t k )
inline

◆ control_points()

Cell< mesh::ControlPoint * > & belfem::Mesh::control_points ( )
inline

Owned and deleted by the mesh.

◆ create_curve_map()

void belfem::Mesh::create_curve_map ( )

◆ create_edge_map()

void belfem::Mesh::create_edge_map ( )

special function called by Kernel

◆ create_edges()

void belfem::Mesh::create_edges ( const bool aPrint = false,
const Vector< id_t > aNedelecBlocks = Vector< id_t >(),
const Vector< id_t > aNedelecSideSets = Vector< id_t >(),
const bool aCreateEdgesOnAllSideSets = true )

creates the edges on the mesh

Parameters
aPrint: prints the result if flag is set
aNedelecBlocks: blocks that carry edge dofs
aNedelecSideSets: sidesets that carry edge dofs
aCreateEdgesOnAllSideSets: also create edges on sidesets that are not listed in aNedelecSideSets

◆ create_face_map()

void belfem::Mesh::create_face_map ( )

special function called by Kernel

◆ create_faces()

void belfem::Mesh::create_faces ( const bool aPrint = false,
const Vector< id_t > aNedelecBlocks = Vector< id_t >(),
const Vector< id_t > aNedelecSideSets = Vector< id_t >() )

creates the faces on the mesh

Parameters
aPrint: prints the result if flag is set
aNedelecBlocks: blocks that carry face dofs
aNedelecSideSets: sidesets that carry face dofs

◆ create_field()

Vector< real > & belfem::Mesh::create_field ( const string & aLabel,
const EntityType aEntity = EntityType::NODE,
const id_t aID = 0 )

◆ create_global_variable()

real & belfem::Mesh::create_global_variable ( const string & aLabel,
const real aValue = 0.0,
const id_t aID = 0 )

◆ curve()

mesh::Curve * belfem::Mesh::curve ( const id_t aID)
inline

return a curve by its ID

◆ curves()

Cell< mesh::Curve * > & belfem::Mesh::curves ( )
inline

Owned and deleted by the mesh.

◆ distribute_edge_directions()

void belfem::Mesh::distribute_edge_directions ( )

Collective and asymmetric: every rank must enter; rank 0 distributes the per-owner edge signs, every other rank receives.

◆ edge()

mesh::Edge * belfem::Mesh::edge ( const id_t aID)
inline

◆ edges()

Cell< mesh::Edge * > & belfem::Mesh::edges ( )
inline

Owned and deleted by the mesh.

◆ edges_are_finalized()

bool belfem::Mesh::edges_are_finalized ( ) const
inline

◆ edges_exist()

bool belfem::Mesh::edges_exist ( ) const
inline

tells if Nedelec edges exist on this mesh

Returns

◆ element() [1/3]

mesh::Element * belfem::Mesh::element ( const id_t aID)
inline

◆ element() [2/3]

mesh::Element * belfem::Mesh::element ( const index_t i,
const index_t j )
inline

◆ element() [3/3]

mesh::Element * belfem::Mesh::element ( const index_t i,
const index_t j,
const index_t k )
inline

◆ element_exists()

bool belfem::Mesh::element_exists ( const id_t aID) const
inline

◆ elements()

Cell< mesh::Element * > & belfem::Mesh::elements ( )
inline

A flat list of the elements of all blocks.

The blocks own and delete the elements; this container does not.

◆ expand_hanging_basis_sources()

void belfem::Mesh::expand_hanging_basis_sources ( )

◆ extract_thin_shell_mesh()

Mesh * belfem::Mesh::extract_thin_shell_mesh ( )

Returns a newly allocated mesh the caller owns and deletes.

◆ face()

mesh::Face * belfem::Mesh::face ( const id_t aID)
inline

◆ faces()

Cell< mesh::Face * > & belfem::Mesh::faces ( )
inline

Owned and deleted by the mesh.

◆ faces_are_finalized()

bool belfem::Mesh::faces_are_finalized ( ) const
inline

◆ faces_exist()

bool belfem::Mesh::faces_exist ( ) const
inline

tells if Nedelec faces exist on this mesh

◆ facet()

mesh::Facet * belfem::Mesh::facet ( const id_t aID)
inline

◆ facet_exists()

bool belfem::Mesh::facet_exists ( const id_t aID) const
inline

◆ facets()

Cell< mesh::Facet * > & belfem::Mesh::facets ( )
inline

A flat list of the facets of all sidesets.

The sidesets own and delete the facets; this container does not.

◆ field() [1/2]

mesh::Field * belfem::Mesh::field ( const index_t aIndex)
inline

◆ field() [2/2]

mesh::Field * belfem::Mesh::field ( const string & aLabel)
inline

get field by label

◆ field_data()

Vector< real > & belfem::Mesh::field_data ( const string & aLabel)
inline

◆ field_exists()

bool belfem::Mesh::field_exists ( const string & aLabel)
inline

◆ finalize()

void belfem::Mesh::finalize ( )

finalizes all aspects of the mesh; edges and faces are finalized too when connectivities are computed

◆ finalize_edges() [1/2]

void belfem::Mesh::finalize_edges ( )

◆ finalize_edges() [2/2]

void belfem::Mesh::finalize_edges ( Cell< mesh::Element * > & aElements)

◆ finalize_faces()

void belfem::Mesh::finalize_faces ( )

◆ flag_curved_elements()

void belfem::Mesh::flag_curved_elements ( )

flags elements that are curved

◆ force_checksum()

void belfem::Mesh::force_checksum ( const std::size_t aChecksum)

◆ global_variable() [1/2]

mesh::GlobalVariable * belfem::Mesh::global_variable ( const id_t aID)
inline

◆ global_variable() [2/2]

mesh::GlobalVariable * belfem::Mesh::global_variable ( const string & aLabel)
inline

◆ global_variable_data()

real & belfem::Mesh::global_variable_data ( const string & aLabel)
inline

◆ global_variable_exists()

bool belfem::Mesh::global_variable_exists ( const string & aLabel)
inline

◆ global_variables()

Cell< mesh::GlobalVariable * > & belfem::Mesh::global_variables ( )
inline

◆ hanging_control_points()

Cell< mesh::ControlPoint * > & belfem::Mesh::hanging_control_points ( )
inline

◆ hanging_edges()

Cell< mesh::Edge * > & belfem::Mesh::hanging_edges ( )
inline

◆ hanging_elements()

Cell< mesh::Element * > & belfem::Mesh::hanging_elements ( )
inline

◆ hanging_faces()

Cell< mesh::Face * > & belfem::Mesh::hanging_faces ( )
inline

◆ hanging_facets()

Cell< mesh::Facet * > & belfem::Mesh::hanging_facets ( )
inline

◆ hanging_nodes()

Cell< mesh::Node * > & belfem::Mesh::hanging_nodes ( )
inline

Returns views of entities the mesh owns through the containers below.

These lists delete nothing.

◆ has_periodicity()

bool belfem::Mesh::has_periodicity ( ) const
inline

◆ is_finalized()

bool belfem::Mesh::is_finalized ( ) const
inline

◆ is_kernel_mesh()

bool belfem::Mesh::is_kernel_mesh ( ) const
inline

◆ is_tensormesh()

bool belfem::Mesh::is_tensormesh ( ) const
inline

◆ load_fields()

void belfem::Mesh::load_fields ( hid_t aFile)

◆ load_globals()

void belfem::Mesh::load_globals ( hid_t aFile)

◆ load_meta()

uint belfem::Mesh::load_meta ( hid_t aFile)

◆ master()

const proc_t & belfem::Mesh::master ( ) const
inline

return the ID of the proc that owns this mesh

◆ max_block_and_sideset_id()

id_t belfem::Mesh::max_block_and_sideset_id ( )

◆ max_element_id() [1/2]

id_t belfem::Mesh::max_element_id ( )

◆ max_element_id() [2/2]

id_t belfem::Mesh::max_element_id ( ) const

◆ max_element_order()

const uint & belfem::Mesh::max_element_order ( ) const
inline

return the max interpolation order on the mesh

◆ max_node_id() [1/2]

id_t belfem::Mesh::max_node_id ( )

◆ max_node_id() [2/2]

id_t belfem::Mesh::max_node_id ( ) const

◆ memory()

size_t belfem::Mesh::memory ( ) const

Compute the total memory used by the mesh in bytes.

◆ mesh_checker_flag()

bool belfem::Mesh::mesh_checker_flag ( ) const
inline

◆ node() [1/3]

mesh::Node * belfem::Mesh::node ( const id_t aID)
inline

◆ node() [2/3]

mesh::Node * belfem::Mesh::node ( const index_t i,
const index_t j )
inline

◆ node() [3/3]

mesh::Node * belfem::Mesh::node ( const index_t i,
const index_t j,
const index_t k )
inline

◆ node_exists()

bool belfem::Mesh::node_exists ( const id_t aID) const
inline

◆ nodes()

Cell< mesh::Node * > & belfem::Mesh::nodes ( )
inline

The nodes.

This group of accessors returns entities the mesh owns and deletes. Elements and facets are the exception: their block or sideset owns them. Callers never delete them.

◆ number_of_blocks()

uint belfem::Mesh::number_of_blocks ( ) const
inline

◆ number_of_control_points()

index_t belfem::Mesh::number_of_control_points ( ) const
inline

◆ number_of_dimensions()

uint belfem::Mesh::number_of_dimensions ( ) const
inline

◆ number_of_edges()

index_t belfem::Mesh::number_of_edges ( ) const
inline

◆ number_of_elements()

index_t belfem::Mesh::number_of_elements ( ) const
inline

◆ number_of_faces()

index_t belfem::Mesh::number_of_faces ( ) const
inline

◆ number_of_facets()

index_t belfem::Mesh::number_of_facets ( ) const
inline

◆ number_of_fields()

uint belfem::Mesh::number_of_fields ( ) const
inline

◆ number_of_global_variables()

uint belfem::Mesh::number_of_global_variables ( ) const
inline

◆ number_of_hanging_basis()

index_t belfem::Mesh::number_of_hanging_basis ( ) const
inline

◆ number_of_nodes()

index_t belfem::Mesh::number_of_nodes ( ) const
inline

◆ number_of_sidesets()

uint belfem::Mesh::number_of_sidesets ( ) const
inline

◆ orphaned_nodes()

Cell< mesh::Node * > & belfem::Mesh::orphaned_nodes ( )
inline

◆ partition() [1/3]

void belfem::Mesh::partition ( const uint & aNumberOfPartitions,
const bool aSetProcOwners = true,
const bool aForceContinuousPartitions = true,
const bool aResetVertexContainers = true )

Only the master rank partitions the mesh and sets the element and node ownerships.

Every other rank does nothing. This function is not collective.

◆ partition() [2/3]

void belfem::Mesh::partition ( const uint & aNumberOfPartitions,
const Vector< id_t > & aSelectedBlocks,
const bool aSetProcOwners = true,
const bool aForceContinuousPartitions = false,
const bool aResetVertexContainers = true )

partition the mesh and set element and node ownerships, but also pass selected blocks

◆ partition() [3/3]

void belfem::Mesh::partition ( const uint & aNumberOfPartitions,
const Vector< id_t > & aSelectedBlocks,
const Vector< id_t > & aSelectedSideSets,
const bool aSetProcOwners = true,
const bool aForceContinuousPartitions = false,
const bool aResetVertexContainers = true )

partition the mesh and set element and node ownerships, but also pass selected blocks

◆ path()

const string & belfem::Mesh::path ( ) const
inline

◆ periodicity()

mesh::Periodicity * belfem::Mesh::periodicity ( )
inline

◆ populate_element_neighbors()

void belfem::Mesh::populate_element_neighbors ( )

◆ reset_connectivity()

void belfem::Mesh::reset_connectivity ( const Connectivity aConnectivity)
inline

◆ reset_edges()

void belfem::Mesh::reset_edges ( )

◆ reset_faces()

void belfem::Mesh::reset_faces ( )

◆ reset_mesh_checker_flag()

void belfem::Mesh::reset_mesh_checker_flag ( )
inline

◆ save()

void belfem::Mesh::save ( const string & aFilePath)

Master rank only, a no-op elsewhere; the mesh must be finalized.

◆ save_faces()

void belfem::Mesh::save_faces ( const string & aPath)

◆ save_fields()

void belfem::Mesh::save_fields ( hid_t aFile)

◆ save_globals()

void belfem::Mesh::save_globals ( hid_t aFile)

◆ save_meta()

void belfem::Mesh::save_meta ( hid_t aFile,
const uint aRunningTimestep = 0 )

◆ scale_mesh()

void belfem::Mesh::scale_mesh ( const real aFactor)

Multiplies the node and control-point coordinates by aFactor, e.g.

to convert from mm to m; a 2D mesh's stored third coordinate is reset to zero. BELFEM assumes SI units downstream.

◆ set_abstract_nodes()

void belfem::Mesh::set_abstract_nodes ( Cell< mesh::Node * > & aNodes)

Adopts the nodes.

Those not already on the mesh are pushed into the owned node container and given indices. Every node field is resized. The mesh deletes them. Asserted to run only while the abstract-node list is empty.

◆ set_compute_facet_orientation_flag()

void belfem::Mesh::set_compute_facet_orientation_flag ( const bool aFlag)
inline

◆ set_config_tag()

void belfem::Mesh::set_config_tag ( const uint64_t aTag,
const string & aText )

◆ set_connectivity()

void belfem::Mesh::set_connectivity ( const Connectivity aConnectivity)
inline

◆ set_kernel_flag()

void belfem::Mesh::set_kernel_flag ( )
inline

called by kernel

◆ set_mesh_checker_flag()

void belfem::Mesh::set_mesh_checker_flag ( )
inline

◆ set_number_of_dimensions()

void belfem::Mesh::set_number_of_dimensions ( const uint & aNumberOfDimensions)
inline

◆ set_number_of_partitions()

void belfem::Mesh::set_number_of_partitions ( const proc_t & aNumberOfPartitions)
inline

to be called by partitioner

◆ set_periodicity()

void belfem::Mesh::set_periodicity ( mesh::Periodicity * aPeriodicity)
inline

The mesh takes ownership and deletes aPeriodicity.

◆ set_time_step()

void belfem::Mesh::set_time_step ( const uint aTimeStep)
inline

set the index of the time step

◆ set_vertex_owners()

void belfem::Mesh::set_vertex_owners ( )

◆ sideset()

mesh::SideSet * belfem::Mesh::sideset ( const id_t aID)
inline

◆ sideset_exists()

bool belfem::Mesh::sideset_exists ( const id_t aID) const
inline

◆ sidesets()

Cell< mesh::SideSet * > & belfem::Mesh::sidesets ( )
inline

The mesh owns the sidesets; a sideset owns and deletes its facets.

◆ tensorconf()

const TensorMeshConfig * belfem::Mesh::tensorconf ( ) const
inline

◆ test_connectivity()

bool belfem::Mesh::test_connectivity ( const Connectivity aConnectivity)
inline

◆ thin_shells()

Cell< mesh::ThinShell * > & belfem::Mesh::thin_shells ( )
inline

Owned and deleted by the mesh.

◆ time_stamp()

real & belfem::Mesh::time_stamp ( )
inline

Writable reference to the current time [s].

This is the value written to the output files.

◆ time_step() [1/2]

uint & belfem::Mesh::time_step ( )
inline

◆ time_step() [2/2]

const uint & belfem::Mesh::time_step ( ) const
inline

The current timestep index.

◆ unfinalize()

void belfem::Mesh::unfinalize ( )

unfinalizes all aspects of mesh but edges

◆ unflag_all_control_points()

void belfem::Mesh::unflag_all_control_points ( const uint aFlagIndex = 0)

◆ unflag_all_edges()

void belfem::Mesh::unflag_all_edges ( const uint aFlagIndex = 0)

◆ unflag_all_elements()

void belfem::Mesh::unflag_all_elements ( const uint aFlagIndex = 0)

◆ unflag_all_faces()

void belfem::Mesh::unflag_all_faces ( const uint aFlagIndex = 0)

◆ unflag_all_facets()

void belfem::Mesh::unflag_all_facets ( const uint aFlagIndex = 0)

◆ unflag_all_nodes()

void belfem::Mesh::unflag_all_nodes ( const uint aFlagIndex = 0)

◆ unflag_all_vertices()

void belfem::Mesh::unflag_all_vertices ( const uint aFlagIndex = 0)

◆ unflag_everything()

void belfem::Mesh::unflag_everything ( const uint aFlagIndex = 0)

◆ update_block_map()

void belfem::Mesh::update_block_map ( )

◆ update_control_point_indices()

void belfem::Mesh::update_control_point_indices ( )

◆ update_edge_indices()

void belfem::Mesh::update_edge_indices ( )

◆ update_element_indices()

void belfem::Mesh::update_element_indices ( )

◆ update_element_map()

void belfem::Mesh::update_element_map ( )

◆ update_face_indices()

void belfem::Mesh::update_face_indices ( )

◆ update_facet_indices()

void belfem::Mesh::update_facet_indices ( )

◆ update_facet_nodes()

void belfem::Mesh::update_facet_nodes ( )

◆ update_node_indices()

void belfem::Mesh::update_node_indices ( )

◆ update_ownerships()

void belfem::Mesh::update_ownerships ( )

◆ update_sideset_map()

void belfem::Mesh::update_sideset_map ( )

◆ update_vertex_indices()

void belfem::Mesh::update_vertex_indices ( )

◆ vertex()

mesh::Element * belfem::Mesh::vertex ( const id_t aID)
inline

◆ vertices()

Cell< mesh::Element * > & belfem::Mesh::vertices ( )
inline

Owned and deleted by the mesh.

Member Data Documentation

◆ mAbstractNodes

Cell< mesh::Node * > belfem::Mesh::mAbstractNodes
protected

◆ mAutoPins

Cell< mesh::Node * > belfem::Mesh::mAutoPins
protected

Non-owning views onto nodes that mNodes owns and ~Mesh deletes. The abstract nodes of a cut are adopted into mNodes by the cut processor ( CutProcessor::collect_duplicates ) before the cut factory fills this list; set_abstract_nodes() is an alternate adopter that nothing in the tree calls.

◆ mBlockMap

Map< id_t, mesh::Block * > belfem::Mesh::mBlockMap
protected

◆ mBlocks

Cell< mesh::Block * > belfem::Mesh::mBlocks
protected

◆ mBoundaryEdges

Cell< mesh::Element * > belfem::Mesh::mBoundaryEdges
protected

the line elements of a 3D Gmsh mesh, owned and deleted by the mesh; empty in 2D, where the facets own them

◆ mCommRank

const proc_t belfem::Mesh::mCommRank
protected

◆ mCommSize

const proc_t belfem::Mesh::mCommSize
protected

◆ mComputeFacetOrientationsWhenFinalizing

bool belfem::Mesh::mComputeFacetOrientationsWhenFinalizing = true
protected

◆ mConfigTag

uint64_t belfem::Mesh::mConfigTag = 0
protected

fingerprint of the SETTINGS this mesh was enriched with ( cuts, thin shell layers, coating walls ). Opaque here on purpose: the mesh only carries it into and out of its file, the meaning belongs to whoever built the mesh. Zero means "not set", which is what every mesh that was never enriched from an input deck reports

◆ mConfigText

string belfem::Mesh::mConfigText
protected

◆ mConnectivities

Bitset< static_cast< size_t>( Connectivity::UNDEFINED )> belfem::Mesh::mConnectivities
protected

◆ mControlPointMap

Map< id_t, mesh::ControlPoint * > belfem::Mesh::mControlPointMap
protected

◆ mControlPoints

Cell< mesh::ControlPoint * > belfem::Mesh::mControlPoints
protected

◆ mCurveMap

Map< id_t, mesh::Curve * > belfem::Mesh::mCurveMap
protected

◆ mCurves

Cell< mesh::Curve * > belfem::Mesh::mCurves
protected

◆ mEdgeMap

Map< id_t, mesh::Edge * > belfem::Mesh::mEdgeMap
protected

◆ mEdges

Cell< mesh::Edge * > belfem::Mesh::mEdges
protected

◆ mEdgesAreFinalized

bool belfem::Mesh::mEdgesAreFinalized = false
protected

◆ mElementMap

Map< id_t, mesh::Element * > belfem::Mesh::mElementMap
protected

◆ mElements

Cell< mesh::Element * > belfem::Mesh::mElements
protected

◆ mFaceMap

Map< id_t, mesh::Face * > belfem::Mesh::mFaceMap
protected

◆ mFaces

Cell< mesh::Face * > belfem::Mesh::mFaces
protected

◆ mFacesAreFinalized

bool belfem::Mesh::mFacesAreFinalized = false
protected

◆ mFacetMap

Map< id_t, mesh::Facet * > belfem::Mesh::mFacetMap
protected

◆ mFacets

Cell< mesh::Facet * > belfem::Mesh::mFacets
protected

◆ mFieldMap

Map< string, mesh::Field * > belfem::Mesh::mFieldMap
protected

◆ mFields

Cell< mesh::Field * > belfem::Mesh::mFields
protected

◆ mGlobalVariableIDMap

Map< id_t, mesh::GlobalVariable * > belfem::Mesh::mGlobalVariableIDMap
protected

◆ mGlobalVariableMap

Map< string, mesh::GlobalVariable * > belfem::Mesh::mGlobalVariableMap
protected

◆ mGlobalVariables

Cell< mesh::GlobalVariable * > belfem::Mesh::mGlobalVariables
protected

◆ mHangingControlPoints

Cell< mesh::ControlPoint * > belfem::Mesh::mHangingControlPoints
protected

◆ mHangingEdges

Cell< mesh::Edge * > belfem::Mesh::mHangingEdges
protected

◆ mHangingElements

Cell< mesh::Element * > belfem::Mesh::mHangingElements
protected

◆ mHangingFaces

Cell< mesh::Face * > belfem::Mesh::mHangingFaces
protected

◆ mHangingFacets

Cell< mesh::Facet * > belfem::Mesh::mHangingFacets
protected

◆ mHangingNodes

Cell< mesh::Node * > belfem::Mesh::mHangingNodes
protected

◆ mHash

Hash belfem::Mesh::mHash
protected

◆ mIsFinalized

bool belfem::Mesh::mIsFinalized = false
protected

flag telling if mesh is finalized (master only)

◆ mIsKernelMesh

bool belfem::Mesh::mIsKernelMesh = false
protected

flag telling if this is a mesh on the kernel

◆ mMasterProc

const proc_t belfem::Mesh::mMasterProc
protected

◆ mMaxElementOrder

uint belfem::Mesh::mMaxElementOrder = 0
protected

◆ mMeshCheckerFlag

bool belfem::Mesh::mMeshCheckerFlag = false
protected

◆ mNodeMap

Map< id_t, mesh::Node * > belfem::Mesh::mNodeMap
protected

◆ mNodes

Cell< mesh::Node * > belfem::Mesh::mNodes
protected

◆ mNodesAreSorted

bool belfem::Mesh::mNodesAreSorted = false
protected

◆ mNumberOfDimensions

uint belfem::Mesh::mNumberOfDimensions = 0
protected

◆ mNumberOfFields

uint belfem::Mesh::mNumberOfFields = 0
protected

◆ mNumberOfGlobalVariables

uint belfem::Mesh::mNumberOfGlobalVariables = 0
protected

◆ mNumberOfPartitions

proc_t belfem::Mesh::mNumberOfPartitions = 1
protected

◆ mOrphanedNodes

Cell< mesh::Node * > belfem::Mesh::mOrphanedNodes
protected

◆ mPath

string belfem::Mesh::mPath
protected

◆ mPeriodicity

mesh::Periodicity* belfem::Mesh::mPeriodicity = nullptr
protected

◆ mSideSetMap

Map< id_t, mesh::SideSet * > belfem::Mesh::mSideSetMap
protected

◆ mSideSets

Cell< mesh::SideSet * > belfem::Mesh::mSideSets
protected

◆ mTensorConfig

const TensorMeshConfig* belfem::Mesh::mTensorConfig = nullptr
protected

◆ mThinShells

Cell< mesh::ThinShell * > belfem::Mesh::mThinShells
protected

◆ mTimeStamp

real belfem::Mesh::mTimeStamp = 0.0
protected

◆ mTimeStep

uint belfem::Mesh::mTimeStep = 1
protected

◆ mVertexMap

Map< id_t, mesh::Element * > belfem::Mesh::mVertexMap
protected

◆ mVertices

Cell< mesh::Element * > belfem::Mesh::mVertices
protected

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