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

Prototype for Integrator of Weak Form Governing Equation. More...

#include <cl_IWG.hpp>

Inheritance diagram for belfem::fem::IWG:
[legend]
Collaboration diagram for belfem::fem::IWG:
[legend]

Public Member Functions

 IWG (const IWG &)=delete
IWG & operator= (const IWG &)=delete
 IWG (IWG &&)=delete
IWG & operator= (IWG &&)=delete
 IWG (const IwgType aType, const ModelDimensionality aDimensionality, const IwgMode aMode=IwgMode::Iterative, const SymmetryMode aSymmetryMode=SymmetryMode::Unsymmetric, const DofMode aDofMode=DofMode::AllBlocksEqual, const SideSetDofLinkMode aSideSetDofLinkMode=SideSetDofLinkMode::FacetOnly)
virtual ~IWG ()
void select_blocks (const Vector< id_t > &aBlockIDs)
 the blocks are selected over the IWG object.
void select_block (const id_t aBlockID)
void select_sidesets (const Vector< id_t > &aSidesetIDs)
 the sidesets are selected over the IWG object.
const Vector< id_t > & selected_blocks () const
 returns the list of selected blocks
const Vector< id_t > & selected_sidesets () const
 returns the list of selected sidesets
virtual void compute_jacobian (Element *aElement, Matrix< real > &aJacobian)
 The caller provides aJacobian, sized number_of_dofs_per_element() squared, in the element's local dof order and in column-major order.
virtual void compute_jacobian_and_rhs (Element *aElement, Matrix< real > &aJacobian, Vector< real > &aRHS)
virtual void compute_convection (Element *aElement, Vector< real > &aConvection)
virtual void compute_alpha_boundary_condition (Element *aElement, Matrix< real > &aJacobian, Vector< real > &aRHS)
virtual void compute_rhs (Element *aElement, Vector< real > &aRHS)
virtual void compute_rhs (Element *aElement, Matrix< real > &aRHS)
virtual void link_to_group (Group *aGroup)
 The IWG borrows the group, its calculator and the pointers reachable from them.
const Cell< string > & dof_fields () const
const Cell< string > & flux_fields () const
const Cell< string > & tensor_fields () const
 special purpose if RHS is a matrix
const Cell< string > & other_fields () const
const Cell< string > & all_fields () const
const string & field (const index_t aIndex) const
index_t number_of_fields () const
uint number_of_dofs_per_node () const
 TODO(cm): retire number_of_dofs_per_node() for the block-scoped overload below.
uint number_of_dofs_per_node (const id_t aBlockID) const
uint number_of_dofs_per_node_on_sideset (const id_t aSideSetID) const
uint number_of_dofs_per_edge (const id_t aBlockID) const
uint number_of_dofs_per_face (const id_t aBlockID) const
uint number_of_dofs_per_cell (const id_t aBlockID) const
virtual uint number_of_dofs_per_element (Block *aBlock) const
uint number_of_nodes_per_element (SideSet *aSideSet) const
uint number_of_edges_per_element (SideSet *aSideSet) const
uint number_of_faces_per_element (SideSet *aSideSet) const
virtual uint number_of_dofs_per_element (SideSet *aSideSet) const
uint number_of_lambda_dofs (const id_t aSideSetID) const
const Vector< index_t > & dofs_per_node (const id_t aBlockID) const
const Vector< index_t > & dofs_per_edge (const id_t aBlockID) const
const Vector< index_t > & dofs_per_face (const id_t aBlockID) const
const Vector< index_t > & dofs_per_cell (const id_t aBlockID) const
const Vector< index_t > & lambda_dofs (const id_t aSideSetID) const
const Vector< index_t > & dofs_per_node_on_sideset (const id_t aSideSetID, const bool aSideSetOnly=false) const
const Vector< index_t > & dofs_per_edge_on_sideset (const id_t aSideSetID, const bool aSideSetOnly=false) const
const Vector< index_t > & dofs_per_face_on_sideset (const id_t aSideSetID, const bool aSideSetOnly=false) const
const Vector< index_t > & dofs_per_cell_on_sideset (const id_t, const bool aSideSetOnly=false) const
const Vector< index_t > & dof_entity_types () const
const Vector< index_t > & default_dof_types () const
index_t edge_multiplicity () const
 tells how many dofs sit on one edge
index_t face_multiplicity () const
 tells how many dofs sit on one face
index_t cell_multiplicity () const
 tells how many dofs sit on one cell
index_t edge_field_index (const index_t aDofType) const
index_t face_field_index (const index_t aDofType) const
const Vector< index_t > & dofs_per_sideset (const id_t aSidesetID) const
 intended to be used for interface dof creation
uint num_rhs_cols () const
virtual void set_field (DofManagerBase *aField)
void detach_field (const DofManagerBase *aField)
 forgets aField if it is the linked one.
IwgType type () const
ModelDimensionality model_dimensionality () const
void set_interpolation_type (const InterpolationType aType)
InterpolationType interpolation_type () const
IwgMode mode () const
real omega () const
 The Newton relaxation factor, dimensionless; 1 is an undamped step.
void set_omega (const real &aOmega)
 All ranks must call it.
void set_penalty (const real aPsi, const uint aIndex=0)
 All ranks must call it.
real penalty (const uint aIndex) const
SymmetryMode symmetry_mode () const
 flag telling if matrices are symmetric
void set_num_rhs_cols (const uint &aNumRhsCols)
 special function, must be called before init->jacobian() is called
virtual void set_wetted_sidesets (const Vector< id_t > &aSideSets)
const Vector< id_t > & wetted_sidesets () const
real & delta_time ()
uint & time_loop ()
void add_fields (const Cell< string > &aFieldLabels)
 add additional non-dof fields to mOtherFields and mAllFields; a label "alpha" also sets mHasConvection
bool has_convection () const
 tells if this field has an alpha boundary condition
virtual void compute_boundary_flux_matrix (Element *aElement, const uint aDirection, Matrix< real > &aJacobian)
 special function to compute the boundary flux in magnetics impose zero as weak BC
void set_blocks (const Vector< id_t > &aBlockIDs, const Cell< DomainType > &aBlockTypes)
void set_sidesets (const Vector< id_t > &aSideSetIDs, const Cell< DomainType > &aSideSetTypes)
DomainType block_type (const id_t aID) const
DomainType sideset_type (const id_t aID) const
GroupActivationMode block_activation_mode (const DomainType aType) const
 returns the activation mode for a block based on its domain type
GroupActivationMode sideset_activation_mode (const DomainType aType) const
 returns the activation mode for a sideset based on its domain type
virtual void initialize ()
virtual void initialize (const IwgType aType)
bool is_initialized () const
bool enrich_sidesets () const
virtual int check_mesh (Mesh *aMesh, const proc_t aMasterRank=0)
 This routine makes sure that the mesh fulfills the requirements.
void hide_fields_from_exodus (Mesh *aMesh)
 hides fields that are not to be saved to exodus
virtual bool has_edge_dofs () const
 flag telling if the IWG has edge dofs
uint lambda_multiplicity () const
 if this number is > 0, we have langrande dofs such as contact
SideSetDofLinkMode sideset_dof_link_mode () const
 return the dof linking mode for sideset
void set_algorithm (const SolverAlgorithm aAlgorithm)
 sets the mode for the solver algorithm
SolverAlgorithm algorithm () const
 returns the solver algorithm
virtual void shift_fields ()
 called by main file to copy fields into last timestep eg.
virtual void reset_fields ()
 called by main file to copy fields from last timestep eg.
void collect_node_data (Element *aElement, Cell< string > &aFieldLabels, Matrix< real > &aData)
 The caller pre-sizes aData.
void collect_node_data (Element *aElement, const string &aFieldLabel)
void collect_node_data (Element *aElement, const Cell< string > &aFieldLabels)
void collect_node_data (Element *aElement, const string &aFieldLabel, Vector< real > &aData)
void collect_node_data (Element *aElement, const string &aFieldLabel, Vector< real > &aData, uint &aOffset)
void collect_edge_data (Element *aElement, const string &aEdgeFieldLabel, Vector< real > &aData)
void collect_edge_data (Element *aElement, const string &aEdgeFieldLabel, const string &aFaceFieldLabel, Vector< real > &aData)
void collect_lambda_data (Element *aElement, const string &aFieldLabel, real &aData)
uint doftype (const string &aDofLabel) const
 return the type id of a dof
void unique_and_rearrange (Cell< string > &aDofs, const bool aMakeMap=false)
 makes sure that dof list is unique and also creares dofmap must be accessible by Mawell_FieldList as well
bool compute_jacobian_on_sideset () const
bool compute_jacobian_on_block () const
virtual void compute_mkf (Element *aElement)
virtual TimestepMatrices * matrices ()
 A timestep IWG returns the work matrices it owns.
void print_dofs (Element *aElement, const bool aLocal=false)
 for debugging
const string & dof_label (const index_t aDofIndex)
 for debugging
Calculator * calc ()
 The group's calculator, borrowed and re-pointed by every link_to_group().
void set_abstract_nodes (Cell< mesh::Node * > &aNodes)
void set_orphaned_nodes (Cell< mesh::Node * > &aNodes)
Cell< mesh::Node * > & abstract_nodes ()
Cell< mesh::Node * > & orphaned_nodes ()
index_t abstract_dof_type () const
virtual void collect_abstract_node_dofs ()
virtual void create_custom_vectors_and_matrices (Calculator *aCalc)
uint get_field_index (const uint aDofType) const
virtual void custom_postprocess ()
void set_abstract_dof_type (const uint aDofType)
virtual void set_timestepping_method (const EulerMethod aMethod, const bool aHaveStiffness=true)
virtual EulerMethod method () const
virtual uint timestepping_order () const

Protected Member Functions

void delete_boundary_conditions ()
 Reserved; not defined and not called by the destructor.
void delete_block_dof_tables ()
void delete_sideset_dof_tables ()
virtual void assign_dofs_per_block (const Vector< id_t > &aBlockIDs)
 this function assumes that all blocks are treated equally.
virtual void assign_dofs_per_sideset (const Vector< id_t > &aSideSetIDs)
 this function assumes that all sidesets are treated equally.
virtual void init_activation_maps ()
 populates the activation mode maps for blocks and sidesets based on domain types.
virtual void allocate_work_matrices (Group *aGroup)
 Sizes the group's node-coordinate work matrix before its element loop.
void collect_nodes_on_wetted_sitdesets (Mesh *aMesh, const Vector< id_t > &aSideSets)
 populate the node indices for the nodes that sit on wetted sidesets
void count_dofs_per_block ()
void count_dofs_per_sideset ()
void collect_node_coords (Element *aElement, Matrix< real > &aX)
 Sizes aX to number_of_nodes x mNumberOfSpatialDimensions, the problem dimension the derived IWG's constructor sets ( 2 or 3; link_to_group() does not set it, and an IWG that leaves the sentinel trips the assert ), and fills row k with node k's coordinates.

Protected Attributes

const proc_t mCommRank
real mOmega = 0.9
Vector< real > mPenalty
bool mIsInitialized = false
 flag telling if we have been initialized
bool mEnrichSideSets = false
uint mTimeLoop = 0
 value for timeloop, needed if we don't want to write every timestep
bool mComputeJacobianOnBlock = true
bool mComputeJacobianOnSideset = false
const IwgType mType
 this enum tells which equation object is used
const ModelDimensionality mDimensionality
 this enum tells which dimensionality we have
const IwgMode mMode
 this enum tells if we have to perform a Newton-Raphson
SymmetryMode mSymmetryMode
 needed for the solver
const DofMode mDofMode
 except maxwell, most IWGs are AllBlocksEqual
const SideSetDofLinkMode mSideSetDofLinkMode
 mode how sidesets are linked
SolverAlgorithm mSolverAlgorithm = SolverAlgorithm::UNDEFINED
Mesh * mMesh = nullptr
DofManagerBase * mField = nullptr
Group * mGroup = nullptr
Calculator * mCalc = nullptr
const Material * mMaterial = nullptr
uint mNumberOfDofsPerNode = 0
uint mNumberOfDofsPerEdge = 0
uint mNumberOfDofsPerFace = 0
uint mNumberOfRhsDofsPerEdge = 0
uint mNumberOfRhsDofsPerFace = 0
uint mNumberOfThinShellLayers = 0
uint mNumberOfSpatialDimensions = BELFEM_UINT_MAX
uint mNumberOfDerivativeDimensions = 0
uint mNumberOfNodesPerElement = BELFEM_UINT_MAX
uint mNumberOfNodesPerMaster = BELFEM_UINT_MAX
uint mNumberOfNodesPerSlave = BELFEM_UINT_MAX
uint mNumberOfEdgesPerElement = 0
uint mNumberOfFacesPerElement = 0
uint mNumberOfDofsPerElement = BELFEM_UINT_MAX
uint mNumberOfNodeDofsPerElement = 0
uint mNumberOfEdgeDofsPerElement = 0
uint mNumberOfRhsEdgeDofsPerElement = 0
Cell< string > mDofFields
Cell< string > mFluxFields
Cell< string > mTensorFields
Cell< string > mOtherFields
Cell< string > mAllFields
Cell< string > mHiddenFields
uint mNumberOfRhsCols = 1
Vector< id_t > mWettedSidesets
real mDeltaTime = 1.0
Vector< index_t > mNodesOnWettedSidesets
bool mHasConvection = false
Vector< id_t > mBlockIDs
Vector< id_t > mSideSetIDs
Map< id_t, index_t > mBlockIndices
Map< id_t, index_t > mSideSetIndices
Map< string, uint > mDofTypeMap
Map< uint, uint > mDofFieldMap
Vector< index_t > mDefaultDofTypes
Vector< index_t > mDofEntityTypes
Cell< Vector< index_t > > mDofsPerBlock
Cell< Vector< index_t > > mDofsPerSideSet
Cell< DofTable * > mBlockDofs
 contains the block dofs
Cell< DofTable * > mSideSetDofs
 contains the sideset dofs
Cell< DofTable * > mSideSetOnlyDofs
Vector< index_t > mEdgeFieldIndices
Vector< index_t > mFaceFieldIndices
index_t mEdgeDofMultiplicity = 0
index_t mFaceDofMultiplicity = 0
index_t mCellDofMultiplicity = 0
index_t mLambdaDofMultiplicity = 0
Map< string, uint > mDofMap
Cell< string > mDofLabels
 needed for debug output
Map< id_t, DomainType > mBlockTypes
Map< id_t, DomainType > mSideSetTypes
 links sideset IDs with the designated types
Map< id_t, DomainType > mSideSetSubTypes
 links sideset IDs with the designated types
Map< DomainType, GroupActivationMode > mBlockActivationModes
 maps domain types to activation modes for blocks
Map< DomainType, GroupActivationMode > mSideSetActivationModes
 maps domain types to activation modes for sidesets
Vector< real > mNormal2D = { 0., 0. }
 TODO(cm): mNormal2D and mNormal3D have no reader; delete both.
Vector< real > mNormal3D = { 0., 0., 0. }
InterpolationType mInterpolationType = InterpolationType::LAGRANGE
Cell< mesh::Node * > mAbstractNodes
 abstract nodes needed for cut BCs in MAXWELL
Cell< mesh::Node * > mOrphanedNodes
 nodes that belong to no active element but still carry a phi dof ( see Mesh::orphaned_nodes() )
Cell< Dof * > mAbstractNodeDofs
 list with special dofs that sit on abstract nodes
DofTable mAbstractNodeTable
index_t mAbstractDofType = gNoIndex

Detailed Description

Prototype for Integrator of Weak Form Governing Equation.

See also
IWG Module Usage Guide

Constructor & Destructor Documentation

◆ IWG() [1/3]

belfem::fem::IWG::IWG ( const IWG & )
delete

◆ IWG() [2/3]

belfem::fem::IWG::IWG ( IWG && )
delete

◆ IWG() [3/3]

belfem::fem::IWG::IWG ( const IwgType aType,
const ModelDimensionality aDimensionality,
const IwgMode aMode = IwgMode::Iterative,
const SymmetryMode aSymmetryMode = SymmetryMode::Unsymmetric,
const DofMode aDofMode = DofMode::AllBlocksEqual,
const SideSetDofLinkMode aSideSetDofLinkMode = SideSetDofLinkMode::FacetOnly )

◆ ~IWG()

belfem::fem::IWG::~IWG ( )
virtual

Member Function Documentation

◆ abstract_dof_type()

index_t belfem::fem::IWG::abstract_dof_type ( ) const
inline

◆ abstract_nodes()

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

◆ add_fields()

void belfem::fem::IWG::add_fields ( const Cell< string > & aFieldLabels)

add additional non-dof fields to mOtherFields and mAllFields; a label "alpha" also sets mHasConvection

Parameters
aFieldLabels

◆ algorithm()

SolverAlgorithm belfem::fem::IWG::algorithm ( ) const
inline

returns the solver algorithm

◆ all_fields()

const Cell< string > & belfem::fem::IWG::all_fields ( ) const
inline

◆ allocate_work_matrices()

void belfem::fem::IWG::allocate_work_matrices ( Group * aGroup)
protectedvirtual

Sizes the group's node-coordinate work matrix before its element loop.

The loop then allocates nothing. It also records the element geometry counts. An override must size every buffer its kernel writes into.

◆ assign_dofs_per_block()

void belfem::fem::IWG::assign_dofs_per_block ( const Vector< id_t > & aBlockIDs)
protectedvirtual

this function assumes that all blocks are treated equally.

special purpose IWGs might overload this function

◆ assign_dofs_per_sideset()

void belfem::fem::IWG::assign_dofs_per_sideset ( const Vector< id_t > & aSideSetIDs)
protectedvirtual

this function assumes that all sidesets are treated equally.

special purpose IWGs might overload this function

◆ block_activation_mode()

GroupActivationMode belfem::fem::IWG::block_activation_mode ( const DomainType aType) const

returns the activation mode for a block based on its domain type

◆ block_type()

DomainType belfem::fem::IWG::block_type ( const id_t aID) const

◆ calc()

Calculator * belfem::fem::IWG::calc ( )
inline

The group's calculator, borrowed and re-pointed by every link_to_group().

A reference into one of its scratch vectors stays valid, but the next collect into the same slot overwrites the contents.

◆ cell_multiplicity()

index_t belfem::fem::IWG::cell_multiplicity ( ) const
inline

tells how many dofs sit on one cell

◆ check_mesh()

int belfem::fem::IWG::check_mesh ( Mesh * aMesh,
const proc_t aMasterRank = 0 )
inlinevirtual

This routine makes sure that the mesh fulfills the requirements.

Unless those are not explicitly specified by the IWG, this routine only checks if the mesh is not a nullpointer.

◆ collect_abstract_node_dofs()

void belfem::fem::IWG::collect_abstract_node_dofs ( )
virtual

Reimplemented in belfem::fem::IWG_Maxwell.

◆ collect_edge_data() [1/2]

void belfem::fem::IWG::collect_edge_data ( Element * aElement,
const string & aEdgeFieldLabel,
const string & aFaceFieldLabel,
Vector< real > & aData )

◆ collect_edge_data() [2/2]

void belfem::fem::IWG::collect_edge_data ( Element * aElement,
const string & aEdgeFieldLabel,
Vector< real > & aData )

◆ collect_lambda_data()

void belfem::fem::IWG::collect_lambda_data ( Element * aElement,
const string & aFieldLabel,
real & aData )

◆ collect_node_coords()

void belfem::fem::IWG::collect_node_coords ( Element * aElement,
Matrix< real > & aX )
protected

Sizes aX to number_of_nodes x mNumberOfSpatialDimensions, the problem dimension the derived IWG's constructor sets ( 2 or 3; link_to_group() does not set it, and an IWG that leaves the sentinel trips the assert ), and fills row k with node k's coordinates.

◆ collect_node_data() [1/5]

void belfem::fem::IWG::collect_node_data ( Element * aElement,
Cell< string > & aFieldLabels,
Matrix< real > & aData )

The caller pre-sizes aData.

Row i holds element node i. Column j holds aFieldLabels( j ). BELFEM_ASSERT checks this in debug builds only.

◆ collect_node_data() [2/5]

void belfem::fem::IWG::collect_node_data ( Element * aElement,
const Cell< string > & aFieldLabels )

◆ collect_node_data() [3/5]

void belfem::fem::IWG::collect_node_data ( Element * aElement,
const string & aFieldLabel )

◆ collect_node_data() [4/5]

void belfem::fem::IWG::collect_node_data ( Element * aElement,
const string & aFieldLabel,
Vector< real > & aData )

◆ collect_node_data() [5/5]

void belfem::fem::IWG::collect_node_data ( Element * aElement,
const string & aFieldLabel,
Vector< real > & aData,
uint & aOffset )

◆ collect_nodes_on_wetted_sitdesets()

void belfem::fem::IWG::collect_nodes_on_wetted_sitdesets ( Mesh * aMesh,
const Vector< id_t > & aSideSets )
protected

populate the node indices for the nodes that sit on wetted sidesets

◆ compute_alpha_boundary_condition()

void belfem::fem::IWG::compute_alpha_boundary_condition ( Element * aElement,
Matrix< real > & aJacobian,
Vector< real > & aRHS )
virtual

◆ compute_boundary_flux_matrix()

void belfem::fem::IWG::compute_boundary_flux_matrix ( Element * aElement,
const uint aDirection,
Matrix< real > & aJacobian )
virtual

special function to compute the boundary flux in magnetics impose zero as weak BC

◆ compute_convection()

void belfem::fem::IWG::compute_convection ( Element * aElement,
Vector< real > & aConvection )
virtual

◆ compute_jacobian()

void belfem::fem::IWG::compute_jacobian ( Element * aElement,
Matrix< real > & aJacobian )
virtual

The caller provides aJacobian, sized number_of_dofs_per_element() squared, in the element's local dof order and in column-major order.

The implementation fills it. The compute_* overloads below share this contract for their matrix and vector arguments.

Reimplemented in belfem::fem::IWG_Poisson.

◆ compute_jacobian_and_rhs()

void belfem::fem::IWG::compute_jacobian_and_rhs ( Element * aElement,
Matrix< real > & aJacobian,
Vector< real > & aRHS )
virtual

◆ compute_jacobian_on_block()

bool belfem::fem::IWG::compute_jacobian_on_block ( ) const
inline

◆ compute_jacobian_on_sideset()

bool belfem::fem::IWG::compute_jacobian_on_sideset ( ) const
inline

◆ compute_mkf()

void belfem::fem::IWG::compute_mkf ( Element * aElement)
virtual

◆ compute_rhs() [1/2]

void belfem::fem::IWG::compute_rhs ( Element * aElement,
Matrix< real > & aRHS )
virtual

◆ compute_rhs() [2/2]

void belfem::fem::IWG::compute_rhs ( Element * aElement,
Vector< real > & aRHS )
virtual

◆ count_dofs_per_block()

void belfem::fem::IWG::count_dofs_per_block ( )
protected

◆ count_dofs_per_sideset()

void belfem::fem::IWG::count_dofs_per_sideset ( )
protected

◆ create_custom_vectors_and_matrices()

void belfem::fem::IWG::create_custom_vectors_and_matrices ( Calculator * aCalc)
virtual

◆ custom_postprocess()

void belfem::fem::IWG::custom_postprocess ( )
virtual

Reimplemented in belfem::fem::IWG_Maxwell.

◆ default_dof_types()

const Vector< index_t > & belfem::fem::IWG::default_dof_types ( ) const
inline

◆ delete_block_dof_tables()

void belfem::fem::IWG::delete_block_dof_tables ( )
protected

◆ delete_boundary_conditions()

void belfem::fem::IWG::delete_boundary_conditions ( )
protected

Reserved; not defined and not called by the destructor.

◆ delete_sideset_dof_tables()

void belfem::fem::IWG::delete_sideset_dof_tables ( )
protected

◆ delta_time()

real & belfem::fem::IWG::delta_time ( )

◆ detach_field()

void belfem::fem::IWG::detach_field ( const DofManagerBase * aField)

forgets aField if it is the linked one.

The kernel calls this when a field refused to link and is about to be freed, so the equation does not keep pointing at that dof manager

◆ dof_entity_types()

const Vector< index_t > & belfem::fem::IWG::dof_entity_types ( ) const
inline

◆ dof_fields()

const Cell< string > & belfem::fem::IWG::dof_fields ( ) const
inline

◆ dof_label()

const string & belfem::fem::IWG::dof_label ( const index_t aDofIndex)
inline

for debugging

◆ dofs_per_cell()

const Vector< index_t > & belfem::fem::IWG::dofs_per_cell ( const id_t aBlockID) const
inline

◆ dofs_per_cell_on_sideset()

const Vector< index_t > & belfem::fem::IWG::dofs_per_cell_on_sideset ( const id_t aSideSetID,
const bool aSideSetOnly = false ) const
inline

◆ dofs_per_edge()

const Vector< index_t > & belfem::fem::IWG::dofs_per_edge ( const id_t aBlockID) const
inline

◆ dofs_per_edge_on_sideset()

const Vector< index_t > & belfem::fem::IWG::dofs_per_edge_on_sideset ( const id_t aSideSetID,
const bool aSideSetOnly = false ) const
inline

◆ dofs_per_face()

const Vector< index_t > & belfem::fem::IWG::dofs_per_face ( const id_t aBlockID) const
inline

◆ dofs_per_face_on_sideset()

const Vector< index_t > & belfem::fem::IWG::dofs_per_face_on_sideset ( const id_t aSideSetID,
const bool aSideSetOnly = false ) const
inline

◆ dofs_per_node()

const Vector< index_t > & belfem::fem::IWG::dofs_per_node ( const id_t aBlockID) const
inline

◆ dofs_per_node_on_sideset()

const Vector< index_t > & belfem::fem::IWG::dofs_per_node_on_sideset ( const id_t aSideSetID,
const bool aSideSetOnly = false ) const
inline

◆ dofs_per_sideset()

const Vector< index_t > & belfem::fem::IWG::dofs_per_sideset ( const id_t aSidesetID) const
inline

intended to be used for interface dof creation

Parameters
aSidesetID
Returns

◆ doftype()

uint belfem::fem::IWG::doftype ( const string & aDofLabel) const
inline

return the type id of a dof

◆ edge_field_index()

index_t belfem::fem::IWG::edge_field_index ( const index_t aDofType) const
inline

◆ edge_multiplicity()

index_t belfem::fem::IWG::edge_multiplicity ( ) const
inline

tells how many dofs sit on one edge

◆ enrich_sidesets()

bool belfem::fem::IWG::enrich_sidesets ( ) const
inline

◆ face_field_index()

index_t belfem::fem::IWG::face_field_index ( const index_t aDofType) const
inline

◆ face_multiplicity()

index_t belfem::fem::IWG::face_multiplicity ( ) const
inline

tells how many dofs sit on one face

◆ field()

const string & belfem::fem::IWG::field ( const index_t aIndex) const
inline

◆ flux_fields()

const Cell< string > & belfem::fem::IWG::flux_fields ( ) const
inline

◆ get_field_index()

uint belfem::fem::IWG::get_field_index ( const uint aDofType) const
inline

◆ has_convection()

bool belfem::fem::IWG::has_convection ( ) const
inline

tells if this field has an alpha boundary condition

◆ has_edge_dofs()

bool belfem::fem::IWG::has_edge_dofs ( ) const
inlinevirtual

flag telling if the IWG has edge dofs

Reimplemented in belfem::fem::IWG_Maxwell.

◆ hide_fields_from_exodus()

void belfem::fem::IWG::hide_fields_from_exodus ( Mesh * aMesh)

hides fields that are not to be saved to exodus

◆ init_activation_maps()

void belfem::fem::IWG::init_activation_maps ( )
protectedvirtual

populates the activation mode maps for blocks and sidesets based on domain types.

Called during initialization. Default implementation maps DomainType::Inactive to GroupActivationMode::Inactive and DomainType::GeometryOnly to GroupActivationMode::GeometryOnly; every other domain type falls back to GeometryAndDofs in block_activation_mode() / sideset_activation_mode(). Override in derived classes to add entries.

Reimplemented in belfem::fem::IWG_Maxwell.

◆ initialize() [1/2]

void belfem::fem::IWG::initialize ( )
virtual

Reimplemented in belfem::fem::IWG_Maxwell.

◆ initialize() [2/2]

void belfem::fem::IWG::initialize ( const IwgType aType)
virtual

◆ interpolation_type()

InterpolationType belfem::fem::IWG::interpolation_type ( ) const
inline

◆ is_initialized()

bool belfem::fem::IWG::is_initialized ( ) const
inline

◆ lambda_dofs()

const Vector< index_t > & belfem::fem::IWG::lambda_dofs ( const id_t aSideSetID) const
inline

◆ lambda_multiplicity()

uint belfem::fem::IWG::lambda_multiplicity ( ) const
inline

if this number is > 0, we have langrande dofs such as contact

◆ link_to_group()

void belfem::fem::IWG::link_to_group ( Group * aGroup)
virtual

The IWG borrows the group, its calculator and the pointers reachable from them.

It owns and deletes nothing linked here.

Reimplemented in belfem::fem::IWG_Maxwell, belfem::fem::IWG_MaxwellThermal, and belfem::fem::IWG_StaticHeatConduction.

◆ matrices()

TimestepMatrices * belfem::fem::IWG::matrices ( )
virtual

A timestep IWG returns the work matrices it owns.

The base implementation aborts with BELFEM_ERROR.

Reimplemented in belfem::fem::IWG_Timestep.

◆ method()

EulerMethod belfem::fem::IWG::method ( ) const
virtual

Reimplemented in belfem::fem::IWG_Timestep.

◆ mode()

IwgMode belfem::fem::IWG::mode ( ) const

◆ model_dimensionality()

ModelDimensionality belfem::fem::IWG::model_dimensionality ( ) const

◆ num_rhs_cols()

uint belfem::fem::IWG::num_rhs_cols ( ) const

◆ number_of_dofs_per_cell()

uint belfem::fem::IWG::number_of_dofs_per_cell ( const id_t aBlockID) const
inline

◆ number_of_dofs_per_edge()

uint belfem::fem::IWG::number_of_dofs_per_edge ( const id_t aBlockID) const
inline

◆ number_of_dofs_per_element() [1/2]

uint belfem::fem::IWG::number_of_dofs_per_element ( Block * aBlock) const
virtual

◆ number_of_dofs_per_element() [2/2]

uint belfem::fem::IWG::number_of_dofs_per_element ( SideSet * aSideSet) const
virtual

◆ number_of_dofs_per_face()

uint belfem::fem::IWG::number_of_dofs_per_face ( const id_t aBlockID) const
inline

◆ number_of_dofs_per_node() [1/2]

uint belfem::fem::IWG::number_of_dofs_per_node ( ) const

TODO(cm): retire number_of_dofs_per_node() for the block-scoped overload below.

Exit criterion: the call in cl_FEM_DofMgr_SolverData.cpp has moved to that overload.

◆ number_of_dofs_per_node() [2/2]

uint belfem::fem::IWG::number_of_dofs_per_node ( const id_t aBlockID) const
inline

◆ number_of_dofs_per_node_on_sideset()

uint belfem::fem::IWG::number_of_dofs_per_node_on_sideset ( const id_t aSideSetID) const
inline

◆ number_of_edges_per_element()

uint belfem::fem::IWG::number_of_edges_per_element ( SideSet * aSideSet) const

◆ number_of_faces_per_element()

uint belfem::fem::IWG::number_of_faces_per_element ( SideSet * aSideSet) const

◆ number_of_fields()

index_t belfem::fem::IWG::number_of_fields ( ) const
inline

◆ number_of_lambda_dofs()

uint belfem::fem::IWG::number_of_lambda_dofs ( const id_t aSideSetID) const

◆ number_of_nodes_per_element()

uint belfem::fem::IWG::number_of_nodes_per_element ( SideSet * aSideSet) const

◆ omega()

real belfem::fem::IWG::omega ( ) const
inline

The Newton relaxation factor, dimensionless; 1 is an undamped step.

The setter does not clamp it.

◆ operator=() [1/2]

IWG & belfem::fem::IWG::operator= ( const IWG & )
delete

◆ operator=() [2/2]

IWG & belfem::fem::IWG::operator= ( IWG && )
delete

◆ orphaned_nodes()

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

◆ other_fields()

const Cell< string > & belfem::fem::IWG::other_fields ( ) const
inline

◆ penalty()

real belfem::fem::IWG::penalty ( const uint aIndex) const
inline

◆ print_dofs()

void belfem::fem::IWG::print_dofs ( Element * aElement,
const bool aLocal = false )

for debugging

◆ reset_fields()

void belfem::fem::IWG::reset_fields ( )
virtual

called by main file to copy fields from last timestep eg.

T = T0

Reimplemented in belfem::fem::IWG_Timestep.

◆ select_block()

void belfem::fem::IWG::select_block ( const id_t aBlockID)

◆ select_blocks()

void belfem::fem::IWG::select_blocks ( const Vector< id_t > & aBlockIDs)

the blocks are selected over the IWG object.

the equation object knows how many DOFs sit on each entity per block

◆ select_sidesets()

void belfem::fem::IWG::select_sidesets ( const Vector< id_t > & aSidesetIDs)

the sidesets are selected over the IWG object.

the equation object knows how many DOFs sit on each entity per sideset

◆ selected_blocks()

const Vector< id_t > & belfem::fem::IWG::selected_blocks ( ) const
inline

returns the list of selected blocks

◆ selected_sidesets()

const Vector< id_t > & belfem::fem::IWG::selected_sidesets ( ) const
inline

returns the list of selected sidesets

◆ set_abstract_dof_type()

void belfem::fem::IWG::set_abstract_dof_type ( const uint aDofType)

◆ set_abstract_nodes()

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

◆ set_algorithm()

void belfem::fem::IWG::set_algorithm ( const SolverAlgorithm aAlgorithm)

sets the mode for the solver algorithm

◆ set_blocks()

void belfem::fem::IWG::set_blocks ( const Vector< id_t > & aBlockIDs,
const Cell< DomainType > & aBlockTypes )

◆ set_field()

void belfem::fem::IWG::set_field ( DofManagerBase * aField)
virtual

Reimplemented in belfem::fem::IWG_Timestep.

◆ set_interpolation_type()

void belfem::fem::IWG::set_interpolation_type ( const InterpolationType aType)
inline

◆ set_num_rhs_cols()

void belfem::fem::IWG::set_num_rhs_cols ( const uint & aNumRhsCols)

special function, must be called before init->jacobian() is called

◆ set_omega()

void belfem::fem::IWG::set_omega ( const real & aOmega)

All ranks must call it.

The value from rank 0 is broadcast to all ranks.

◆ set_orphaned_nodes()

void belfem::fem::IWG::set_orphaned_nodes ( Cell< mesh::Node * > & aNodes)

◆ set_penalty()

void belfem::fem::IWG::set_penalty ( const real aPsi,
const uint aIndex = 0 )

All ranks must call it.

The penalty factor of the weak boundary condition at slot aIndex is taken from rank 0 and broadcast.

◆ set_sidesets()

void belfem::fem::IWG::set_sidesets ( const Vector< id_t > & aSideSetIDs,
const Cell< DomainType > & aSideSetTypes )

◆ set_timestepping_method()

void belfem::fem::IWG::set_timestepping_method ( const EulerMethod aMethod,
const bool aHaveStiffness = true )
virtual

Reimplemented in belfem::fem::IWG_Timestep.

◆ set_wetted_sidesets()

void belfem::fem::IWG::set_wetted_sidesets ( const Vector< id_t > & aSideSets)
virtual

◆ shift_fields()

void belfem::fem::IWG::shift_fields ( )
virtual

called by main file to copy fields into last timestep eg.

T0 = T

Reimplemented in belfem::fem::IWG_Timestep.

◆ sideset_activation_mode()

GroupActivationMode belfem::fem::IWG::sideset_activation_mode ( const DomainType aType) const

returns the activation mode for a sideset based on its domain type

◆ sideset_dof_link_mode()

SideSetDofLinkMode belfem::fem::IWG::sideset_dof_link_mode ( ) const
inline

return the dof linking mode for sideset

◆ sideset_type()

DomainType belfem::fem::IWG::sideset_type ( const id_t aID) const

◆ symmetry_mode()

SymmetryMode belfem::fem::IWG::symmetry_mode ( ) const

flag telling if matrices are symmetric

◆ tensor_fields()

const Cell< string > & belfem::fem::IWG::tensor_fields ( ) const
inline

special purpose if RHS is a matrix

◆ time_loop()

uint & belfem::fem::IWG::time_loop ( )
inline

◆ timestepping_order()

uint belfem::fem::IWG::timestepping_order ( ) const
virtual

◆ type()

IwgType belfem::fem::IWG::type ( ) const

◆ unique_and_rearrange()

void belfem::fem::IWG::unique_and_rearrange ( Cell< string > & aDofs,
const bool aMakeMap = false )

makes sure that dof list is unique and also creares dofmap must be accessible by Mawell_FieldList as well

◆ wetted_sidesets()

const Vector< id_t > & belfem::fem::IWG::wetted_sidesets ( ) const

Member Data Documentation

◆ mAbstractDofType

index_t belfem::fem::IWG::mAbstractDofType = gNoIndex
protected

◆ mAbstractNodeDofs

Cell< Dof * > belfem::fem::IWG::mAbstractNodeDofs
protected

list with special dofs that sit on abstract nodes

◆ mAbstractNodes

Cell< mesh::Node * > belfem::fem::IWG::mAbstractNodes
protected

abstract nodes needed for cut BCs in MAXWELL

◆ mAbstractNodeTable

DofTable belfem::fem::IWG::mAbstractNodeTable
protected

◆ mAllFields

Cell< string > belfem::fem::IWG::mAllFields
protected

◆ mBlockActivationModes

Map< DomainType, GroupActivationMode > belfem::fem::IWG::mBlockActivationModes
protected

maps domain types to activation modes for blocks

◆ mBlockDofs

Cell< DofTable * > belfem::fem::IWG::mBlockDofs
protected

contains the block dofs

◆ mBlockIDs

Vector< id_t > belfem::fem::IWG::mBlockIDs
protected

◆ mBlockIndices

Map< id_t, index_t > belfem::fem::IWG::mBlockIndices
protected

◆ mBlockTypes

Map< id_t, DomainType > belfem::fem::IWG::mBlockTypes
protected

this list contains the sidesets that are shells. needed by dof manager. Must be populated by set_sidesets of child class

links block IDs with the designated types must be populated by child class

◆ mCalc

Calculator* belfem::fem::IWG::mCalc = nullptr
protected

◆ mCellDofMultiplicity

index_t belfem::fem::IWG::mCellDofMultiplicity = 0
protected

◆ mCommRank

const proc_t belfem::fem::IWG::mCommRank
protected

◆ mComputeJacobianOnBlock

bool belfem::fem::IWG::mComputeJacobianOnBlock = true
protected

◆ mComputeJacobianOnSideset

bool belfem::fem::IWG::mComputeJacobianOnSideset = false
protected

no writer anywhere in the tree, by design: the sideset branch of DofManager::compute_jacobian is dormant capability for a future problem where surface matrices matter — not needed for the maxwell-thermal problem. Any future writer must also give that loop the is_active() guard it alone lacks

◆ mDefaultDofTypes

Vector< index_t > belfem::fem::IWG::mDefaultDofTypes
protected

◆ mDeltaTime

real belfem::fem::IWG::mDeltaTime = 1.0
protected

◆ mDimensionality

const ModelDimensionality belfem::fem::IWG::mDimensionality
protected

this enum tells which dimensionality we have

◆ mDofEntityTypes

Vector< index_t > belfem::fem::IWG::mDofEntityTypes
protected

◆ mDofFieldMap

Map< uint, uint > belfem::fem::IWG::mDofFieldMap
protected

◆ mDofFields

Cell< string > belfem::fem::IWG::mDofFields
protected

◆ mDofLabels

Cell< string > belfem::fem::IWG::mDofLabels
protected

needed for debug output

◆ mDofMap

Map< string, uint > belfem::fem::IWG::mDofMap
protected

◆ mDofMode

const DofMode belfem::fem::IWG::mDofMode
protected

except maxwell, most IWGs are AllBlocksEqual

◆ mDofsPerBlock

Cell< Vector < index_t > > belfem::fem::IWG::mDofsPerBlock
protected

◆ mDofsPerSideSet

Cell< Vector < index_t > > belfem::fem::IWG::mDofsPerSideSet
protected

◆ mDofTypeMap

Map< string, uint > belfem::fem::IWG::mDofTypeMap
protected

◆ mEdgeDofMultiplicity

index_t belfem::fem::IWG::mEdgeDofMultiplicity = 0
protected

◆ mEdgeFieldIndices

Vector< index_t > belfem::fem::IWG::mEdgeFieldIndices
protected

◆ mEnrichSideSets

bool belfem::fem::IWG::mEnrichSideSets = false
protected

flag telling if we want to use bubbles on sidesets this works only if air elements are master

◆ mFaceDofMultiplicity

index_t belfem::fem::IWG::mFaceDofMultiplicity = 0
protected

◆ mFaceFieldIndices

Vector< index_t > belfem::fem::IWG::mFaceFieldIndices
protected

◆ mField

DofManagerBase* belfem::fem::IWG::mField = nullptr
protected

◆ mFluxFields

Cell< string > belfem::fem::IWG::mFluxFields
protected

◆ mGroup

Group* belfem::fem::IWG::mGroup = nullptr
protected

◆ mHasConvection

bool belfem::fem::IWG::mHasConvection = false
protected

◆ mHiddenFields

Cell< string > belfem::fem::IWG::mHiddenFields
protected

◆ mInterpolationType

InterpolationType belfem::fem::IWG::mInterpolationType = InterpolationType::LAGRANGE
protected

◆ mIsInitialized

bool belfem::fem::IWG::mIsInitialized = false
protected

flag telling if we have been initialized

◆ mLambdaDofMultiplicity

index_t belfem::fem::IWG::mLambdaDofMultiplicity = 0
protected

◆ mMaterial

const Material* belfem::fem::IWG::mMaterial = nullptr
protected

◆ mMesh

Mesh* belfem::fem::IWG::mMesh = nullptr
protected

◆ mMode

const IwgMode belfem::fem::IWG::mMode
protected

this enum tells if we have to perform a Newton-Raphson

◆ mNodesOnWettedSidesets

Vector< index_t > belfem::fem::IWG::mNodesOnWettedSidesets
protected

◆ mNormal2D

Vector< real > belfem::fem::IWG::mNormal2D = { 0., 0. }
protected

TODO(cm): mNormal2D and mNormal3D have no reader; delete both.

◆ mNormal3D

Vector< real > belfem::fem::IWG::mNormal3D = { 0., 0., 0. }
protected

◆ mNumberOfDerivativeDimensions

uint belfem::fem::IWG::mNumberOfDerivativeDimensions = 0
protected

◆ mNumberOfDofsPerEdge

uint belfem::fem::IWG::mNumberOfDofsPerEdge = 0
protected

◆ mNumberOfDofsPerElement

uint belfem::fem::IWG::mNumberOfDofsPerElement = BELFEM_UINT_MAX
protected

set by link_to_group(), not by the constructor – the sentinel makes a premature read deterministic instead of undefined

◆ mNumberOfDofsPerFace

uint belfem::fem::IWG::mNumberOfDofsPerFace = 0
protected

◆ mNumberOfDofsPerNode

uint belfem::fem::IWG::mNumberOfDofsPerNode = 0
protected

◆ mNumberOfEdgeDofsPerElement

uint belfem::fem::IWG::mNumberOfEdgeDofsPerElement = 0
protected

◆ mNumberOfEdgesPerElement

uint belfem::fem::IWG::mNumberOfEdgesPerElement = 0
protected

◆ mNumberOfFacesPerElement

uint belfem::fem::IWG::mNumberOfFacesPerElement = 0
protected

◆ mNumberOfNodeDofsPerElement

uint belfem::fem::IWG::mNumberOfNodeDofsPerElement = 0
protected

◆ mNumberOfNodesPerElement

uint belfem::fem::IWG::mNumberOfNodesPerElement = BELFEM_UINT_MAX
protected

◆ mNumberOfNodesPerMaster

uint belfem::fem::IWG::mNumberOfNodesPerMaster = BELFEM_UINT_MAX
protected

◆ mNumberOfNodesPerSlave

uint belfem::fem::IWG::mNumberOfNodesPerSlave = BELFEM_UINT_MAX
protected

◆ mNumberOfRhsCols

uint belfem::fem::IWG::mNumberOfRhsCols = 1
protected

◆ mNumberOfRhsDofsPerEdge

uint belfem::fem::IWG::mNumberOfRhsDofsPerEdge = 0
protected

◆ mNumberOfRhsDofsPerFace

uint belfem::fem::IWG::mNumberOfRhsDofsPerFace = 0
protected

◆ mNumberOfRhsEdgeDofsPerElement

uint belfem::fem::IWG::mNumberOfRhsEdgeDofsPerElement = 0
protected

◆ mNumberOfSpatialDimensions

uint belfem::fem::IWG::mNumberOfSpatialDimensions = BELFEM_UINT_MAX
protected

◆ mNumberOfThinShellLayers

uint belfem::fem::IWG::mNumberOfThinShellLayers = 0
protected

◆ mOmega

real belfem::fem::IWG::mOmega = 0.9
protected

◆ mOrphanedNodes

Cell< mesh::Node * > belfem::fem::IWG::mOrphanedNodes
protected

nodes that belong to no active element but still carry a phi dof ( see Mesh::orphaned_nodes() )

◆ mOtherFields

Cell< string > belfem::fem::IWG::mOtherFields
protected

◆ mPenalty

Vector< real > belfem::fem::IWG::mPenalty
protected

◆ mSideSetActivationModes

Map< DomainType, GroupActivationMode > belfem::fem::IWG::mSideSetActivationModes
protected

maps domain types to activation modes for sidesets

◆ mSideSetDofLinkMode

const SideSetDofLinkMode belfem::fem::IWG::mSideSetDofLinkMode
protected

mode how sidesets are linked

◆ mSideSetDofs

Cell< DofTable * > belfem::fem::IWG::mSideSetDofs
protected

contains the sideset dofs

◆ mSideSetIDs

Vector< id_t > belfem::fem::IWG::mSideSetIDs
protected

◆ mSideSetIndices

Map< id_t, index_t > belfem::fem::IWG::mSideSetIndices
protected

◆ mSideSetOnlyDofs

Cell< DofTable * > belfem::fem::IWG::mSideSetOnlyDofs
protected

contains the sideset dofs that sit only on the sideset, but not on master or slave

◆ mSideSetSubTypes

Map< id_t, DomainType > belfem::fem::IWG::mSideSetSubTypes
protected

links sideset IDs with the designated types

◆ mSideSetTypes

Map< id_t, DomainType > belfem::fem::IWG::mSideSetTypes
protected

links sideset IDs with the designated types

◆ mSolverAlgorithm

SolverAlgorithm belfem::fem::IWG::mSolverAlgorithm = SolverAlgorithm::UNDEFINED
protected

tells which solver algorithm is to be used per default, the IWG sets Newton Raphson

◆ mSymmetryMode

SymmetryMode belfem::fem::IWG::mSymmetryMode
protected

needed for the solver

◆ mTensorFields

Cell< string > belfem::fem::IWG::mTensorFields
protected

◆ mTimeLoop

uint belfem::fem::IWG::mTimeLoop = 0
protected

value for timeloop, needed if we don't want to write every timestep

◆ mType

const IwgType belfem::fem::IWG::mType
protected

this enum tells which equation object is used

◆ mWettedSidesets

Vector< id_t > belfem::fem::IWG::mWettedSidesets
protected

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