11#ifndef BELFEM_CL_FEM_DOFMANAGER_HPP
12#define BELFEM_CL_FEM_DOFMANAGER_HPP
81 bool mInitializedFlag = false ;
89 bool mJacobianIsUpToDate = false ;
150 return mInitializedFlag ;
156 dof(
const id_t aID )
override;
592 init_dofs(
const bool aSeedFreeDofsOnly );
607 compute_rhs_vector();
612 compute_rhs_matrix();
617 auto_set_materials();
627 consolidate_dofs(
Element * aElement );
632 link_bearings_with_dofs();
637 create_element_map();
647 return mParams->sideset_integration_order() ;
655 return mParams->integration_scheme() ;
663 return mParams->block_integration_order() ;
672 return mDofData->
dof( aID );
680 return mDofData->dofs() ;
688 return mDofData->node_dof_id( aNode->
id(), aDofType );
696 return mDofData->lambda_dof_id( aFacet->
id(), aDofType );
704 return mDofData->edge_dof_id( aEdge->
id(), aDofType );
712 return mDofData->face_dof_id( aFace->
id(), aDofType );
720 return mBearingData->bearing( aID );
728 return mSideSetData->sideset( aID );
736 return mBlockData->
block( aID );
752 return mSolverData->solver() ;
760 return mSolverData->system_matrix() ;
768 return mSolverData->dirichlet() ;
776 return mSolverData->enforcement() ;
784 return mSolverData->imposition() ;
808 return mSolverData->rhs_vector() ;
816 return mSolverData->rhs_norm() ;
824 return mSideSetData->sideset_exists( aID );
832 return mBlockData->block_exists( aID );
840 return mDofData->dof_exists( aID );
851 return mPostprocessors ;
859 return mBlockData->blocks() ;
867 return mSideSetData->sidesets() ;
875 return mSideSetData->number_of_wetted_nodes() ;
883 return mEigenValues ;
889 return mElementMap( aID );
895 return mElementMap.key_exists( aID );
903 return mDofData->abstract_dofs() ;
A bounds-checked wrapper around std::vector.
Definition cl_Cell.hpp:45
Hierarchical data format I/O.
Definition cl_HDF5.hpp:39
Hash map (unordered key-value).
Definition cl_Map.hpp:75
Unified interface to the sparse direct solvers.
Definition cl_Solver.hpp:34
Configuration for a Solver.
Definition cl_SolverParameters.hpp:27
Sparse matrix in CSR or CSC format.
Definition cl_SpMatrix.hpp:52
Definition cl_FEM_Bearing.hpp:31
Definition cl_FEM_Block.hpp:35
mesh::Block * block()
expose block object on mesh
Definition cl_FEM_Block.hpp:93
Definition cl_FEM_Dof.hpp:28
Dof * dof(const uint aIndex)
access a dof
Definition cl_FEM_Dof.hpp:511
DofManagerBase(const DofManagerType aType, Kernel *aParent)
Definition cl_FEM_DofManagerBase.cpp:24
void initialize_postprocessors()
Collective: computes the projection matrices; every rank must enter.
Definition cl_FEM_DofManager.cpp:1176
void compute_jacobian(const bool aReset=true)
Collective: every rank assembles and the matrices are collected across ranks.
Definition cl_FEM_DofManager.cpp:391
void compute_residual()
Definition cl_FEM_DofManager.cpp:933
Cell< SideSet * > & sidesets()
The sidesets of this manager; owned here, the container is a view.
Definition cl_FEM_DofManager.hpp:865
void set_equation(IWG *aIWG)
select the equation that is to be solved
Definition cl_FEM_DofManager.cpp:85
void full_lhs(Vector< real > &aLHS)
Resizes aLHS and fills it in DOF order: free DOFs first, then fixed.
Definition cl_FEM_DofManager.cpp:1436
void solve_from_residual()
Definition cl_FEM_DofManager.cpp:948
Cell< Block * > & blocks()
The blocks of this manager; owned here, the container is a view.
Definition cl_FEM_DofManager.hpp:857
dofmgr::EigenValues * eigen_values()
Borrowed from this manager, which owns it.
Definition cl_FEM_DofManager.hpp:881
SideSet * sideset(const id_t aID) override
Definition cl_FEM_DofManager.hpp:726
void print(const proc_t aRank=0)
Prints only on rank aRank.
Definition cl_FEM_DofManager.cpp:149
void extract_abstract_dofs_from_mesh()
Definition cl_FEM_DofManager.cpp:330
Cell< Postprocessor * > & postprocessors()
Owned by this manager; the container is a view.
Definition cl_FEM_DofManager.hpp:849
Bearing * bearing(const id_t aID)
Definition cl_FEM_DofManager.hpp:718
void create_fields(IWG *aIWG)
check that the fields demanded by the IWG exist on the mesh and create them otherwise
Definition cl_FEM_DofManager.cpp:161
Cell< Dof * > & abstract_dofs()
Definition cl_FEM_DofManager.hpp:901
SpMatrix * dirichlet()
Definition cl_FEM_DofManager.hpp:766
void synchronize_fields(const Cell< string > &aFieldLabels) override
Collective: a collect, a barrier, then a distribute.
Definition cl_FEM_DofManager.cpp:1057
bool dof_exists(const id_t aID) const override
Definition cl_FEM_DofManager.hpp:838
void compute_full_matrices()
Definition cl_FEM_DofManager.cpp:725
bool sideset_exists(const id_t &aID) const override
Definition cl_FEM_DofManager.hpp:822
real pre_update_residual() const
pre-update residual of the entry state under the current assembly ( Newton iterates only,...
Definition cl_FEM_DofManager.cpp:985
void compute_volume_loads(const Vector< id_t > &aBlockIDs)
Collective: every rank assembles its loads and they are collected here; a single right-hand side only...
Definition cl_FEM_DofManager.cpp:1068
void initialize() override
Definition cl_FEM_DofManager.cpp:290
DofManager(Kernel *aParent, const index_t aIndex)
Borrows aParent, which owns this manager.
Definition cl_FEM_DofManager.cpp:31
Element * element(const id_t aID)
One element by ID, through the element cache; borrowed.
Definition cl_FEM_DofManager.hpp:887
index_t number_of_wetted_nodes() const
return the number of wetted nodes ( nodes on sidesets with a Neumann or Alpha BC )
Definition cl_FEM_DofManager.hpp:873
void save_system(const string &aPath)
Definition cl_FEM_DofManager.cpp:1128
Cell< Dof * > & dofs()
The non-hanging dofs, free and fixed ( hanging dofs live in DofData::hanging_dofs() ).
Definition cl_FEM_DofManager.hpp:678
void postprocess()
Collective: distributes the source fields, runs every projector with a barrier each,...
Definition cl_FEM_DofManager.cpp:1209
void load_system(const string &aPath)
Definition cl_FEM_DofManager.cpp:1120
uint sideset_integration_order() const override
Definition cl_FEM_DofManager.hpp:645
SpMatrix * system_matrix()
Block form of the assembled system, x = free dofs, y = fixed dofs: [ J D ] [ x ] [ f ] [ E I ] [ y ] ...
Definition cl_FEM_DofManager.hpp:758
SpMatrix * imposition()
Definition cl_FEM_DofManager.hpp:782
bool block_exists(const id_t &aID) const override
Definition cl_FEM_DofManager.hpp:830
bool solve_failed()
true if the last solve failed softly ( soft-fail contract, see solver::Wrapper ); rank-uniform
Definition cl_FEM_DofManager.cpp:1001
uint block_integration_order() const override
Definition cl_FEM_DofManager.hpp:661
void distribute_fields(const Cell< string > &aFieldLabels) override
Collective and asymmetric, the inverse of collect_fields(): the master sends, the workers receive; no...
Definition cl_FEM_DofManager.cpp:1049
void reset_convection()
Definition cl_FEM_DofManager.cpp:799
void compute_jacobian_and_rhs(const bool aReset=true)
Definition cl_FEM_DofManager.cpp:547
real rhs_norm()
Definition cl_FEM_DofManager.hpp:814
SpMatrix * enforcement()
Definition cl_FEM_DofManager.hpp:774
Dof * dof(const id_t aID) override
return a specific dof
Definition cl_FEM_DofManager.hpp:670
void solve()
Collective.
Definition cl_FEM_DofManager.cpp:913
id_t calculate_dof_id(const mesh::Node *aNode, const uint aDofType) const override
Definition cl_FEM_DofManager.hpp:686
void seed_dof_values()
Definition cl_FEM_DofManager.cpp:1160
void set_solver(const SolverParameters &aParams)
Collective: every rank constructs the solver ( whose constructor synchronizes the solver settings fro...
Definition cl_FEM_DofManager.cpp:904
void compute_rhs(const bool aReset=true)
Definition cl_FEM_DofManager.cpp:501
void collect_field(const string &aFieldLabel)
Collects one field, with barriers before and after collection.
Definition cl_FEM_DofManager.cpp:1039
SpMatrix * full_stiffness()
Definition cl_FEM_DofManager.hpp:798
SpMatrix * full_mass()
Definition cl_FEM_DofManager.hpp:790
void init_dof_values()
Definition cl_FEM_DofManager.cpp:1152
void disconnect_dofs_from_mesh()
Definition cl_FEM_DofManager.cpp:1428
Solver * solver()
The solver is borrowed; this manager's solver data owns it.
Definition cl_FEM_DofManager.hpp:750
bool element_exists(const id_t aID) const
Definition cl_FEM_DofManager.hpp:893
Vector< real > & rhs_vector()
The assembled right-hand side as the solver data holds it: rank-local entries on the workers,...
Definition cl_FEM_DofManager.hpp:806
void zero()
Definition cl_FEM_DofManager.cpp:339
dofmgr::SolverData * solver_data()
Definition cl_FEM_DofManager.hpp:742
void collect_fields(const Cell< string > &aFieldLabels) override
Collective, a gather to the master rank: the workers send their packed node data, the master receives...
Definition cl_FEM_DofManager.cpp:1031
bool is_initialized() const override
true once initialize() has frozen the free/fixed dof split and the matrix graphs; a first fix() of a ...
Definition cl_FEM_DofManager.hpp:148
real absolute_residual() const
absolute residual norm of the last residual() call
Definition cl_FEM_DofManager.cpp:977
IntegrationScheme integration_scheme() const override
Definition cl_FEM_DofManager.hpp:653
Block * block(const id_t aID) override
Definition cl_FEM_DofManager.hpp:734
real residual(const uint aIteration)
Collective ( a barrier and four broadcasts ): the convergence measure of iteration aIteration,...
Definition cl_FEM_DofManager.cpp:969
real fixed_point_residual() const
fixed-point residual ||G(x)-x|| / ||x|| of the last Anderson update ( REAL_MAX while Anderson is off ...
Definition cl_FEM_DofManager.cpp:993
Definition cl_FEM_Element.hpp:41
Prototype for Integrator of Weak Form Governing Equation.
Definition cl_IWG.hpp:81
Top-level orchestrator.
Definition cl_FEM_Kernel.hpp:56
Definition cl_FEM_Postprocessor.hpp:24
Definition cl_FEM_SideSet.hpp:64
Definition cl_FEM_DofMgr_BearingData.hpp:36
Definition cl_FEM_DofMgr_BlockData.hpp:32
The mesh must outlive the dof manager: the destructor releases the mesh dof containers that still hol...
Definition cl_FEM_DofMgr_DofData.hpp:41
Definition cl_FEM_DofMgr_EigenValues.hpp:68
Definition cl_FEM_DofMgr_FieldData.hpp:37
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_SideSetData.hpp:39
Definition cl_FEM_DofMgr_SolverData.hpp:68
id_t id() const
Definition cl_Graph_Vertex.hpp:218
Special Edge class for NEDELEC-Type elements.
Definition cl_Edge.hpp:30
Definition cl_Face.hpp:29
Definition cl_Facet.hpp:24
@ FullMass
Definition cl_FEM_DofMgr_SolverData.hpp:56
@ FullStiffness
Definition cl_FEM_DofMgr_SolverData.hpp:57
Definition cl_IFB_LINE3.hpp:21
Definition cl_SolverMUMPS.cpp:26
USER GUIDES:
Definition cl_Capacitor.cpp:16
IntegrationScheme
Definition en_IntegrationScheme.hpp:22
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
double real
Definition typedefs.hpp:36