12#ifndef BELFEM_CL_FEM_DOFMGR_DOFDATA_HPP
13#define BELFEM_CL_FEM_DOFMGR_DOFDATA_HPP
79 index_t mNumberOfFixedDofs = 0 ;
80 index_t mNumberOfHangingDofs = 0 ;
81 index_t mMyNumberOfFreeDofs = 0 ;
82 index_t mMyNumberOfFixedDofs = 0 ;
83 index_t mMyNumberOfHangingDofs = 0 ;
147 const uint aDofType )
const ;
154 const uint aDofType )
const ;
161 const uint aDofType )
const ;
168 const uint aDofType )
const ;
175 const uint aDofType )
const ;
212 Graph & aFixedDofs );
315 count_node_dofs(
IWG * aIWG,
323 count_edge_dofs(
IWG * aIWG,
331 count_face_dofs(
IWG * aIWG,
339 count_cell_dofs(
IWG * aIWG,
347 count_lambda_dofs(
IWG * aIWG,
372 compute_dof_offsets(
IWG * aIWG );
377 remove_hanging_dofs_from_container();
406 return mHangingDOFs ;
414 return mDofMap( aID );
422 return mDofMap.key_exists( aID );
430 return mDofTypeToField( aDofType );
438 const uint aDofType )
const
440 return aNodeID * mNumDofTypes + aDofType ;
448 const uint aDofType )
const
450 return mEdgeDofOffset + aEdgeID * mNumDofTypes + aDofType ;
458 const uint aDofType )
const
460 return mFaceDofOffset + aFaceID * mNumDofTypes + aDofType ;
468 const uint aDofType )
const
470 return mCellDofOffset + aCellID * mNumDofTypes + aDofType ;
478 const uint aDofType )
const
480 return mLambdaDofOffset + aFacetID * mNumDofTypes + aDofType ;
488 return mNumberOfFreeDofs ;
496 return mNumberOfFixedDofs ;
504 return mNumberOfHangingDofs ;
512 "DofTables have not been allocated yet");
514 return mDofIndexTables( aProc );
519 template<
typename T >
523 for ( T * tBasis : aBasis )
525 tBasis->allocate_dof_container();
533 BELFEM_ASSERT( mCommRank == 0,
"Abstract dofs can only be accessed by master");
534 return mAbstractDOFs;
542 return mMyNumberOfFreeDofs;
550 return mMyNumberOfFixedDofs;
558 return mMyNumberOfHangingDofs;
#define BELFEM_ASSERT(aCheck,...)
Definition assert.hpp:244
Compile-time fixed-size bitset.
Definition cl_Bitset.hpp:32
Cell is a wrapper around the standard vector.
Definition cl_Cell.hpp:42
Hash map (unordered key-value).
Definition cl_Map.hpp:75
Top-level container for all mesh entities.
Definition cl_Mesh.hpp:60
Definition cl_FEM_Dof.hpp:28
this class creates the DOFs based on the passed equation object.
Definition cl_FEM_DofManager.hpp:55
Prototype for Integrator of Weak Form Governing Equation.
Definition cl_IWG.hpp:81
Top-level orchestrator; owns the mesh, materials, boundary conditions and DOF managers.
Definition cl_FEM_Kernel.hpp:50
id_t lambda_dof_id(const id_t aFacetID, const uint aDofType) const
Definition cl_FEM_DofMgr_DofData.hpp:476
void collect_hanging_dofs()
Definition cl_FEM_DofMgr_DofData.cpp:2324
const index_t & my_number_of_hanging_dofs() const
Definition cl_FEM_DofMgr_DofData.hpp:556
uint num_dofs_per_element(const id_t aBlockID) const
computes the number of dofs per element on block
Definition cl_FEM_DofMgr_DofData.cpp:3439
id_t edge_dof_id(const id_t aEdgeID, const uint aDofType) const
Definition cl_FEM_DofMgr_DofData.hpp:446
void split_dof_container(Cell< graph::Vertex * > &aFreeDofs, Cell< graph::Vertex * > &aFixedDofs)
Temporarily splits the unified DOF container (mDOFs) into separate free and fixed DOF graphs for inde...
Definition cl_FEM_DofMgr_DofData.cpp:2933
const index_t & number_of_fixed_dofs() const
Definition cl_FEM_DofMgr_DofData.hpp:494
Cell< Dof * > & hanging_dofs()
expose the hanging dof container
Definition cl_FEM_DofMgr_DofData.hpp:404
const index_t & my_number_of_free_dofs() const
Definition cl_FEM_DofMgr_DofData.hpp:540
index_t doftype_to_field_index(const index_t aDofType)
Definition cl_FEM_DofMgr_DofData.hpp:428
uint num_dofs_per_facet(const id_t aSideSetID) const
computes the number of dofs per element on sideset
Definition cl_FEM_DofMgr_DofData.cpp:3460
void create_dofwise_t_matrices_master()
Definition cl_FEM_DofMgr_DofData.cpp:3470
id_t face_dof_id(const id_t aFaceID, const uint aDofType) const
Definition cl_FEM_DofMgr_DofData.hpp:456
Cell< Dof * > & dofs()
expose the dof container
Definition cl_FEM_DofMgr_DofData.hpp:396
void create_dofs(IWG *aIWG)
Definition cl_FEM_DofMgr_DofData.cpp:108
void reset()
Definition cl_FEM_DofMgr_DofData.cpp:72
DofData(DofManager *aParent, Parameters *aParams)
Definition cl_FEM_DofMgr_DofData.cpp:49
bool dof_exists(const id_t aID) const
check if a dof exists, needed for bearing creation
Definition cl_FEM_DofMgr_DofData.hpp:420
void extract_abstract_dofs_from_mesh()
Definition cl_FEM_DofMgr_DofData.cpp:4136
void init_dof_values(const bool aFreeDofsOnly=false)
Definition cl_FEM_DofMgr_DofData.cpp:2841
void disconnect_dofs_from_mesh()
Definition cl_FEM_DofMgr_DofData.cpp:770
void create_field_map(IWG *aIwg)
Definition cl_FEM_DofMgr_DofData.cpp:648
const index_t & my_number_of_fixed_dofs() const
Definition cl_FEM_DofMgr_DofData.hpp:548
Dof * dof(const id_t aID)
Definition cl_FEM_DofMgr_DofData.hpp:412
void reorder_dofs(const Vector< id_t > &aGraphData, Graph &aFreeDofs, Graph &aFixedDofs)
Reorders DOFs to optimize matrix bandwidth for efficient solving.
Definition cl_FEM_DofMgr_DofData.cpp:3266
void connect_dofs_to_mesh()
Definition cl_FEM_DofMgr_DofData.cpp:746
void synchronize_dirichlet_bcs()
Definition cl_FEM_DofMgr_DofData.cpp:3055
id_t node_dof_id(const id_t aNodeID, const uint aDofType) const
Definition cl_FEM_DofMgr_DofData.hpp:436
id_t cell_dof_id(const id_t aCellID, const uint aDofType) const
Definition cl_FEM_DofMgr_DofData.hpp:466
void restore_dof_container(Cell< graph::Vertex * > &aFreeDofs, Cell< graph::Vertex * > &aFixedDofs)
Restores the unified DOF container (mDOFs) from separate free and fixed DOF graphs after reordering i...
Definition cl_FEM_DofMgr_DofData.cpp:3020
Cell< Dof * > & abstract_dofs()
Definition cl_FEM_DofMgr_DofData.hpp:531
const index_t & number_of_free_dofs() const
Definition cl_FEM_DofMgr_DofData.hpp:486
const Vector< index_t > & dof_indices(const uint aProc) const
Definition cl_FEM_DofMgr_DofData.hpp:509
const index_t & number_of_hanging_dofs() const
Definition cl_FEM_DofMgr_DofData.hpp:502
this is a parameter object that contains the relevant information for managing the DOFs
Definition cl_FEM_DofMgr_Parameters.hpp:34
Definition cl_FEM_DofMgr_BearingData.cpp:23
void allocate_dof_containers(Cell< T * > aBasis)
Definition cl_FEM_DofMgr_DofData.hpp:521
Definition cl_IFB_LINE3.hpp:21
USER GUIDES:
Definition cl_Capacitor.cpp:16
Cell< graph::Vertex * > Graph
Definition cl_Graph_Vertex.hpp:329
constexpr id_t gNoID
Definition typedefs.hpp:58
unsigned int uint
Definition typedefs.hpp:30
unsigned int id_t
Definition typedefs.hpp:41
int proc_t
Definition commtypes.hpp:29
uint32_t index_t
Definition typedefs.hpp:52
#define BELFEM_UINT_MAX
Definition typedefs.hpp:80