this class creates the DOFs based on the passed equation object. More...
#include <cl_FEM_DofManager.hpp>
Public Member Functions | |
| DofManager (Kernel *aParent, const index_t aIndex) | |
| ~DofManager () override | |
| void | set_equation (IWG *aIWG) |
| select the equation that is to be solved | |
| void | print (const proc_t aRank=0) |
| a test routine for development | |
| uint | sideset_integration_order () const override |
| uint | block_integration_order () const override |
| IntegrationScheme | integration_scheme () const override |
| bool | is_initialized () const override |
| true once initialize() has frozen the free/fixed dof split and the matrix graphs; a first fix() of a free dof after that point changes a classification the solver containers are sized for ( see SideSet::impose_dirichlet ) | |
| Dof * | dof (const id_t aID) override |
| return a specific dof | |
| bool | dof_exists (const id_t aID) const override |
| Cell< Dof * > & | dofs () |
| return the non-hanging dofs ( free and fixed; hanging dofs live in DofData::hanging_dofs() ) | |
| Bearing * | bearing (const id_t aID) |
| return a specific bearing | |
| SideSet * | sideset (const id_t aID) override |
| return a specific sideset | |
| Block * | block (const id_t aID) override |
| return a specific block | |
| void | extract_abstract_dofs_from_mesh () |
| id_t | calculate_dof_id (const mesh::Node *aNode, const uint aDofType) const override |
| id_t | calculate_dof_id (const mesh::Edge *aEdge, const uint aDofType) const override |
| id_t | calculate_dof_id (const mesh::Face *aFace, const uint aDofType) const |
| id_t | calculate_dof_id (const mesh::Facet *aFacet, const uint aDofType) const override |
| void | initialize () override |
| void | initialize (const bool aSeedFreeDofsOnly) |
| void | zero () |
| void | compute_jacobian (const bool aReset=true) |
| void | compute_rhs (const bool aReset=true) |
| void | compute_jacobian_and_rhs (const bool aReset=true) |
| void | compute_full_matrices () |
| void | set_solver (const SolverParameters &aParams) |
| set the solver type for this field | |
| dofmgr::SolverData * | solver_data () |
| Solver * | solver () |
| expose the solver | |
| void | solve () |
| void | compute_residual () |
| void | solve_from_residual () |
| real | residual (const uint aIteration) |
| real | absolute_residual () const |
| absolute residual norm of the last residual() call | |
| real | pre_update_residual () const |
| pre-update residual of the entry state under the current assembly ( Newton iterates only, QUIET_NAN otherwise ) — the honest backtracking reference for the controller's line search | |
| real | fixed_point_residual () const |
| fixed-point residual ||G(x)-x|| / ||x|| of the last Anderson update ( REAL_MAX while Anderson is off ) | |
| bool | solve_failed () |
| true if the last solve failed softly ( soft-fail contract, see solver::Wrapper ); rank-uniform | |
| void | collect_fields (const Cell< string > &aFieldLabels) override |
| collects node data from the others and send it to master | |
| void | collect_field (const string &aFieldLabel) |
| collects node data from the others and send it to master | |
| void | distribute_fields (const Cell< string > &aFieldLabels) override |
| sends field data from master to the others | |
| void | synchronize_fields (const Cell< string > &aFieldLabels) override |
| perform a collect first, then a distribute | |
| void | compute_volume_loads (const Vector< id_t > &aBlockIDs) |
| SpMatrix * | system_matrix () |
| The JEDI Block Matrix System - May the Force be with you! | |
| SpMatrix * | dirichlet () |
| SpMatrix * | enforcement () |
| SpMatrix * | imposition () |
| SpMatrix * | full_mass () |
| SpMatrix * | full_stiffness () |
| void | full_lhs (Vector< real > &aLHS) |
| Vector< real > & | rhs_vector () |
| real | rhs_norm () |
| void | load_system (const string &aPath) |
| void | save_system (const string &aPath) |
| void | init_dof_values () |
| void | seed_dof_values () |
| void | reset_convection () |
| bool | sideset_exists (const id_t &aID) const override |
| bool | block_exists (const id_t &aID) const override |
| void | create_fields (IWG *aIWG) |
| check that the fields demanded by the IWG exist on the mesh and create them otherwise | |
| Cell< Postprocessor * > & | postprocessors () |
| expose the projector arrays | |
| void | initialize_postprocessors () |
| compute the matrices for the projections | |
| void | postprocess () |
| perform the L2 projections for the secondary fields | |
| Cell< Block * > & | blocks () |
| return the blocks on this dof manager | |
| Cell< SideSet * > & | sidesets () |
| return the sidesets on this dof manager | |
| index_t | number_of_wetted_nodes () const |
| return the number of wetted nodes ( nodes on sidesets with a Neumann or Alpha BC ) | |
| void | disconnect_dofs_from_mesh () |
| dofmgr::EigenValues * | eigen_values () |
| expose the eigenvalue tool | |
| Element * | element (const id_t aID) |
| returns direct access to one element. | |
| bool | element_exists (const id_t aID) const |
| Cell< Dof * > & | abstract_dofs () |
| Public Member Functions inherited from belfem::fem::DofManagerBase | |
| DofManagerBase (const DofManagerType aType, Kernel *aParent) | |
| virtual | ~DofManagerBase ()=default |
| DofManagerType | type () const |
| proc_t | rank () const |
| return the rank of this proc ( faster than comm_rank() ) | |
| Mesh * | mesh () |
| Kernel * | parent () |
| IWG * | iwg () |
| Vector< real > & | field_data (const string &aLabel) |
| virtual uint | number_of_dofs_per_node () const |
| virtual uint | number_of_dofs_per_edge () const |
| bool | is_master () const |
| virtual void | print_worst_dof () |
| virtual void | write_residuals_to_mesh () |
Additional Inherited Members | |
| Protected Attributes inherited from belfem::fem::DofManagerBase | |
| Kernel * | mParent |
| Mesh * | mMesh |
| IWG * | mIWG = nullptr |
| const proc_t | mCommRank |
this class creates the DOFs based on the passed equation object.
Main workhorse: DOF management, assembly coordination and the solver interface.
| aParent | |
| aIndex | : corresponding index in kernel |
|
override |
| real belfem::fem::DofManager::absolute_residual | ( | ) | const |
absolute residual norm of the last residual() call
return a specific block
Reimplemented from belfem::fem::DofManagerBase.
|
inlineoverridevirtual |
Reimplemented from belfem::fem::DofManagerBase.
|
inlineoverridevirtual |
Reimplemented from belfem::fem::DofManagerBase.
return the blocks on this dof manager
|
inlineoverridevirtual |
Reimplemented from belfem::fem::DofManagerBase.
|
inline |
|
inlineoverridevirtual |
Reimplemented from belfem::fem::DofManagerBase.
|
inlineoverridevirtual |
Reimplemented from belfem::fem::DofManagerBase.
| void belfem::fem::DofManager::collect_field | ( | const string & | aFieldLabel | ) |
collects node data from the others and send it to master
collects node data from the others and send it to master
Reimplemented from belfem::fem::DofManagerBase.
| void belfem::fem::DofManager::compute_full_matrices | ( | ) |
| void belfem::fem::DofManager::compute_jacobian | ( | const bool | aReset = true | ) |
| void belfem::fem::DofManager::compute_jacobian_and_rhs | ( | const bool | aReset = true | ) |
| void belfem::fem::DofManager::compute_residual | ( | ) |
phase 1 of the two-phase iterative solve: residual of the committed state under the current assembly, no update
| void belfem::fem::DofManager::compute_rhs | ( | const bool | aReset = true | ) |
| void belfem::fem::DofManager::create_fields | ( | IWG * | aIWG | ) |
check that the fields demanded by the IWG exist on the mesh and create them otherwise
|
inline |
| void belfem::fem::DofManager::disconnect_dofs_from_mesh | ( | ) |
|
overridevirtual |
sends field data from master to the others
Reimplemented from belfem::fem::DofManagerBase.
return a specific dof
Reimplemented from belfem::fem::DofManagerBase.
|
inlineoverridevirtual |
Reimplemented from belfem::fem::DofManagerBase.
return the non-hanging dofs ( free and fixed; hanging dofs live in DofData::hanging_dofs() )
|
inline |
expose the eigenvalue tool
returns direct access to one element.
Needed for postprocessing
|
inline |
|
inline |
| void belfem::fem::DofManager::extract_abstract_dofs_from_mesh | ( | ) |
| real belfem::fem::DofManager::fixed_point_residual | ( | ) | const |
fixed-point residual ||G(x)-x|| / ||x|| of the last Anderson update ( REAL_MAX while Anderson is off )
|
inline |
|
inline |
|
inline |
| void belfem::fem::DofManager::init_dof_values | ( | ) |
|
overridevirtual |
Reimplemented from belfem::fem::DofManagerBase.
| void belfem::fem::DofManager::initialize | ( | const bool | aSeedFreeDofsOnly | ) |
seed-mode overload: aSeedFreeDofsOnly = true skips the fixed-dof dof -> field write during init_dof_values(), so fields restored before this call ( load_memdump ) survive at Dirichlet nodes. The zero-arg override above must stay: it keeps base-pointer callers on full-mode virtual dispatch
| void belfem::fem::DofManager::initialize_postprocessors | ( | ) |
compute the matrices for the projections
|
inlineoverridevirtual |
Reimplemented from belfem::fem::DofManagerBase.
|
inlineoverridevirtual |
true once initialize() has frozen the free/fixed dof split and the matrix graphs; a first fix() of a free dof after that point changes a classification the solver containers are sized for ( see SideSet::impose_dirichlet )
Reimplemented from belfem::fem::DofManagerBase.
| void belfem::fem::DofManager::load_system | ( | const string & | aPath | ) |
|
inline |
return the number of wetted nodes ( nodes on sidesets with a Neumann or Alpha BC )
| void belfem::fem::DofManager::postprocess | ( | ) |
perform the L2 projections for the secondary fields
|
inline |
expose the projector arrays
| real belfem::fem::DofManager::pre_update_residual | ( | ) | const |
pre-update residual of the entry state under the current assembly ( Newton iterates only, QUIET_NAN otherwise ) — the honest backtracking reference for the controller's line search
| void belfem::fem::DofManager::print | ( | const proc_t | aRank = 0 | ) |
a test routine for development
| void belfem::fem::DofManager::reset_convection | ( | ) |
|
inline |
| void belfem::fem::DofManager::save_system | ( | const string & | aPath | ) |
| void belfem::fem::DofManager::seed_dof_values | ( | ) |
copy field values into the FREE dofs only ( fixed dofs keep their imposed values and do not write back into the field ). Call after the fields have been populated or restored — the initialize() pass seeds the dofs from whatever the fields held at that moment, and does not run again on this path ( only reset() via set_equation() clears the flag )
| void belfem::fem::DofManager::set_equation | ( | IWG * | aIWG | ) |
select the equation that is to be solved
| void belfem::fem::DofManager::set_solver | ( | const SolverParameters & | aParams | ) |
set the solver type for this field
return a specific sideset
Reimplemented from belfem::fem::DofManagerBase.
|
inlineoverridevirtual |
Reimplemented from belfem::fem::DofManagerBase.
|
inlineoverridevirtual |
Reimplemented from belfem::fem::DofManagerBase.
return the sidesets on this dof manager
| void belfem::fem::DofManager::solve | ( | ) |
| bool belfem::fem::DofManager::solve_failed | ( | ) |
true if the last solve failed softly ( soft-fail contract, see solver::Wrapper ); rank-uniform
| void belfem::fem::DofManager::solve_from_residual | ( | ) |
phase 2: linear solve + update consuming compute_residual()'s result; must be entered on every rank
|
inline |
expose the solver
|
inline |
|
overridevirtual |
perform a collect first, then a distribute
Reimplemented from belfem::fem::DofManagerBase.
|
inline |
The JEDI Block Matrix System - May the Force be with you!
Block form: [ J D ] [ x ] [ f ] [ E I ] [ y ] = [ g ]
where x = free DOFs, y = fixed DOFs (imposed values)
Reduced system: J*x = f - D*y (solves for unknowns) Reaction forces: E*x + I*y = g (computes constraint forces!)
In structural mechanics, the JEDI system literally computes "the Force" at supports and constraints.
| void belfem::fem::DofManager::zero | ( | ) |