|
| enum class | MatrixFlag : index_t {
M = 0
, D = 1
, K = 2
, F = 3
,
dMdX_times_x = 4
, dMdX_times_h = 5
, dKdX_times_x = 6
, dFdX = 7
} |
| | Flags indicating which matrices/vectors have been set by the IWG. More...
|
| enum class | SideSetDofLinkMode {
FacetOnly = 0
, FacetAndMaster = 1
, FacetAndSlave = 2
, MasterAndSlave = 3
,
Cut = 4
, Inactive = 5
, UNDEFINED = 6
} |
| | how the dofs of a sideset element are linked to its facet, master and slave elements ( six modes plus UNDEFINED ) More...
|
| enum class | BoundaryConditionImposing {
Free = 0
, Dirichlet = 1
, Neumann = 2
, Alpha = 3
,
Lambda = 4
, Weak = 5
, UNDEFINED = 6
} |
| enum class | BoundaryConditionType {
Neumann
, Dirichlet
, Bearing
, Gauge
,
Current
, Voltage
, CircuitCurrent
, CircuitVoltage
,
Background
, BackgroundDirichlet
, UNDEFINED
} |
| enum class | GroupActivationMode { GeometryAndDofs = 0
, GeometryOnly = 1
, Inactive = 2
} |
| | Defines how a fem::Block or fem::SideSet is activated based on its DomainType. More...
|
| enum class | SolverAlgorithm { Direct = 0
, NewtonRaphson = 1
, Picard = 2
, UNDEFINED = 3
} |
| enum class | MaxwellPostprocessorType {
Air
, Ferro
, Conductor
, SuperConductor
,
ThinShellConductor
, ThinShellSuperConductor
, SideConnector
, UNDEFINED
} |
|
| void | initialize_integration_points (const ElementType &aElementType, Vector< real > &aWeights, Matrix< real > &aPoints, const uint aIntegrationOrder, const IntegrationScheme aIntegrationScheme) |
| void | initialize_integration_points (const GeometryType &aGeometryType, Vector< real > &aWeights, Matrix< real > &aPoints, const uint aIntegrationOrder, const IntegrationScheme aIntegrationScheme) |
| void | initialize_integration_points_on_facet (const ElementType aElementType, const uint aSideIndex, Vector< real > &aWeights, Matrix< real > &aPoints, const uint aIntegrationOrder, const IntegrationScheme aIntegrationScheme) |
| void | initialize_integration_points_on_facet (const ElementType aElementType, const uint aSideIndex, const uint aOrientation, Vector< real > &aWeights, Matrix< real > &aPoints, const uint aIntegrationOrder, const IntegrationScheme aIntegrationScheme) |
| InterpolationFunction * | initialize_shape_function (const ElementType &aElementType, const Matrix< real > &aXi, Cell< Matrix< real > > &aN, Cell< Matrix< real > > &adNdXi, Cell< Matrix< real > > &ad2NdXi2) |
| uint | num_nedelec_dofs (const ElementType aElementType) |
| void | compute_h_trace (Calculator *aNormalCalc, const bool aMaster, const bool aIsConductor, const Vector< real > &aPhi, Vector< real > &aScratch, Vector< real > &aH) |
| | Full field trace of one volume side of a thin-shell facet, for linear elements ( the k = 0 contract of compute_hn ):
|
| const Vector< real > & | compute_hn (Calculator *aCalc, const uint k) |
| | Computes the purely-normal magnetic field hn at the thin-shell facet: the average of the master and slave volume traces ( compute_h_trace, per-side dispatch phi-region / h-conductor ), projected onto the facet normal.
|
| bool | pin_dirichlet_dof (const DofManagerBase *aParent, Dof *aDof, const real aValue, const id_t aGroupID, const id_t aNodeID, index_t &aNumFirstFlips) |
| | shared Dirichlet pin for a single node dof, used by SideSet::impose_dirichlet and the Maxwell factory pre-fix loop so both sites apply ONE shape test.
|
| string | to_string (const BoundaryConditionType aBoundaryConditiontype) |
| BoundaryConditionType | boundary_condition_type (const string &aString) |
| bool | has_block_global (const BoundaryConditionType aBoundaryConditionType) |
| | true if a condition of this type publishes its imposed value as a mesh global named after its deck block.
|
| uint | anderson_mixing_step (const Vector< real > &aX, const Vector< real > &aR, const ShiftRegister< Vector< real > > &aXHistory, const ShiftRegister< Vector< real > > &aRHistory, const real aBeta, Matrix< real > &aDeltaR, Vector< real > &aRhs, Vector< real > &aWork, Vector< real > &aGamma, Vector< real > &aColNorm, Vector< real > &aXNew) |
| | one type-II Anderson mixing step (Walker & Ni 2011) for the fixed-point iteration x <- G( x ) with residual r = G( x ) - x :
|
| const input::Section * | winning_nonlinear_section (const input::Section *aSolver) |
| | The nonlinear section the penalty blocks are read from: the same alias rule Controller::set_params applies to every key in it – nonlinear magnetic wins over nonlinear, and a block under the losing section is silently ignored.
|
| real | read_ghost_eta (const input::Section *aSolver) |
| | The Nitsche ghost switch as the deck states it, read from the solver section:
|
| bool | ghost_facets_requested (const input::Section *aSolver) |
| | true if the deck asks for duplicate interface dofs and ghost facets
|
| bool | ghost_facets_requested (const InputFile &aInputFile) |
| void | mises_planestress (DofManagerBase *aField) |
| void | T_h_picard (Calculator *aCalc, TimestepMatrices *aMatrices) |
| | Collapsed thermal Picard kernel: all per-point material math is delegated to aCalc->maxwell() ( thermal-side instance; the Maxwell peer element is linked automatically by Calculator::link ), whose constructor-time dispatch covers the bulk/thin-shell, metal/alloy/ HTS, defect, and piecewise axes.
|
| void | T_h_newton (Calculator *aCalc, TimestepMatrices *aMatrices) |
| void | T_phi (Calculator *aCalc, TimestepMatrices *aMatrices) |
| uint belfem::fem::anderson_mixing_step |
( |
const Vector< real > & | aX, |
|
|
const Vector< real > & | aR, |
|
|
const ShiftRegister< Vector< real > > & | aXHistory, |
|
|
const ShiftRegister< Vector< real > > & | aRHistory, |
|
|
const real | aBeta, |
|
|
Matrix< real > & | aDeltaR, |
|
|
Vector< real > & | aRhs, |
|
|
Vector< real > & | aWork, |
|
|
Vector< real > & | aGamma, |
|
|
Vector< real > & | aColNorm, |
|
|
Vector< real > & | aXNew ) |
|
inline |
one type-II Anderson mixing step (Walker & Ni 2011) for the fixed-point iteration x <- G( x ) with residual r = G( x ) - x :
gamma = argmin || r_k - DR * gamma ||_2 x_{k+1} = x_k + beta r_k - ( DX + beta DR ) gamma
where the difference columns DR / DX are formed from the committed history (newest aXHistory.size() snapshots) chained with the current pair ( aX, aR ). The least-squares solve runs on column-normalized DR via QR ( gels ); gamma is un-scaled afterwards.
Failure policy: a rank-deficient solve ( info > 0 ), a non-finite or oversized gamma ( gAndersonGammaMax ), or a vanishing difference column drops the OLDEST column and retries once; if the retry fails too, the plain relaxed Picard step x + beta r is written instead. An illegal-argument error ( info < 0 ) is a programming error and always aborts.
With an empty history ( or on fallback ) the result is exactly the relaxed Picard step: x_{k+1} = ( 1 - beta ) x + beta G( x ).
All scratch is caller-owned and must be presized: aDeltaR to n x depth, aRhs to n, aGamma and aColNorm to depth. aWork is grown to the optimal gels size on first use and reused thereafter.
- Returns
- number of history columns used ( 0 = plain step )
shared Dirichlet pin for a single node dof, used by SideSet::impose_dirichlet and the Maxwell factory pre-fix loop so both sites apply ONE shape test.
If the dof is condensed onto a single source with unit weight, the SOURCE is fixed to aValue / weight and the function returns true ( incrementing aNumFirstFlips when the source was still free ); every other shape returns false and the CALLER keeps its historical behaviour. BELFEM_ERRORs on a non-unit single-source weight, a broken source, or a first free-to-fixed flip after aParent->is_initialized(). Call only for non-duplicate nodes: duplicate-pair condensations ( cuts, thin shells ) can carry an inhomogeneous relation that a plain source pin would violate.
The Nitsche ghost switch as the deck states it, read from the solver section:
-1 no nitsche ghost penalty block -> ghost OFF ( opt-in ) 0 eta : 0 -> ghost OFF >0 eta : <value> -> ghost ON with that eta
A present block without eta is a setup error: k_reg alone cannot say whether the ghost is wanted, and an empty block that silently meant "off" would be indistinguishable from a typo.
ONE reader for three consumers – the thin-shell factory ( which decides whether duplicate interface dofs and ghost facets are created at all ), the controller ( which writes eta into the IWG ) and the mesh cache tag ( which must miss the cache when the switch flips ) – so the three cannot disagree about what "off" means. Setup-path code, called a handful of times per run
Collapsed thermal Picard kernel: all per-point material math is delegated to aCalc->maxwell() ( thermal-side instance; the Maxwell peer element is linked automatically by Calculator::link ), whose constructor-time dispatch covers the bulk/thin-shell, metal/alloy/ HTS, defect, and piecewise axes.
Dispatch in IWG_MaxwellThermal::link_to_group() is by domain type only.
The Newton companion T_h_newton adds the consistent tangent blocks ( dcp/dT with qhist contraction, the dlambda/dT mixed-operator outer product, and the drho/dT quench feedback — B and beta are frozen per thermal solve, not thermal dofs ); derivation in thermal_matrices_cleanup_and_newton_plan.md §3.