Smith  0.1
Smith is an implicit thermal structural mechanics simulation code.
Public Types | Public Member Functions | Public Attributes | List of all members
smith::InternalVariableSystem< dim, StateSpace, InternalVarTimeRule, Coupling > Struct Template Reference

System for a single internal variable using a two-state first-order rule. More...

#include <state_variable_system.hpp>

Collaboration diagram for smith::InternalVariableSystem< dim, StateSpace, InternalVarTimeRule, Coupling >:
Collaboration graph
[legend]

Public Types

using InternalVariableWeakFormType = FunctionalWeakForm< dim, StateSpace, detail::TimeRuleParams< InternalVarTimeRule, StateSpace, Coupling > >
 State weak form: (alpha, alpha_old, coupling_fields..., params...)
 

Public Member Functions

template<typename EvolutionType >
void addEvolution (const std::string &domain_name, EvolutionType evolution_law)
 Register an ODE evolution law for the internal variable. More...
 
 SystemBase ()=default
 Construct an empty system shell.
 
 SystemBase (std::shared_ptr< FieldStore > fs, std::shared_ptr< SystemSolver > sol=nullptr, std::vector< std::shared_ptr< WeakForm >> wfs={})
 Construct a system from a field store, solver, and weak forms. More...
 
- Public Member Functions inherited from smith::SystemBase
 SystemBase ()=default
 Construct an empty system shell.
 
 SystemBase (std::shared_ptr< FieldStore > fs, std::shared_ptr< SystemSolver > sol=nullptr, std::vector< std::shared_ptr< WeakForm >> wfs={})
 Construct a system from a field store, solver, and weak forms. More...
 
virtual std::vector< FieldStatesolve (const TimeInfo &time_info) const
 Solve the system using the internal weak_forms and solver. More...
 
virtual std::vector< ReactionStatecomputeReactions (const TimeInfo &time_info, const std::vector< FieldState > &states_for_reactions) const
 Compute reactions after solving the main state. More...
 

Public Attributes

std::shared_ptr< InternalVariableWeakFormTypeinternal_variable_weak_form
 Internal variable weak form.
 
std::shared_ptr< DirichletBoundaryConditionsinternal_variable_bc
 Internal variable BCs.
 
std::shared_ptr< InternalVarTimeRule > internal_variable_time_rule
 Time integration rule.
 
std::shared_ptr< const Coupling > coupling
 Coupling metadata.
 
- Public Attributes inherited from smith::SystemBase
std::vector< std::shared_ptr< WeakForm > > weak_forms
 Weak forms solved together by this system.
 
std::shared_ptr< FieldStorefield_store
 Field store managing the system's fields.
 
std::shared_ptr< SystemSolversolver
 The solver for the system.
 
std::vector< std::shared_ptr< SystemBase > > cycle_zero_systems
 
std::vector< std::shared_ptr< SystemBase > > post_solve_systems
 Optional systems solved after main state update.
 
std::vector< std::string > solve_result_field_names
 Optional per-weak-form fields to solve/update instead of reaction fields.
 
std::vector< std::vector< std::string > > solve_input_field_names
 Optional per-weak-form input field ordering used during solve.
 

Detailed Description

template<int dim, typename StateSpace, typename InternalVarTimeRule = BackwardEulerFirstOrderTimeIntegrationRule, typename Coupling = std::tuple<>>
struct smith::InternalVariableSystem< dim, StateSpace, InternalVarTimeRule, Coupling >

System for a single internal variable using a two-state first-order rule.

Field layout: (state_solve_state, state) - 2 fields. With a non-empty Coupling, coupling fields appear after the two state fields, before user parameter fields.

Template Parameters
dimSpatial dimension (needed for the weak form and zero-flux tensor).
StateSpaceFE space for the internal variable (e.g., L2<0>).
InternalVarTimeRuleTime integration rule (must have num_states == 2).
CouplingTuple of coupling and parameter packs (default: none).

Definition at line 59 of file state_variable_system.hpp.

Member Function Documentation

◆ addEvolution()

template<int dim, typename StateSpace , typename InternalVarTimeRule = BackwardEulerFirstOrderTimeIntegrationRule, typename Coupling = std::tuple<>>
template<typename EvolutionType >
void smith::InternalVariableSystem< dim, StateSpace, InternalVarTimeRule, Coupling >::addEvolution ( const std::string &  domain_name,
EvolutionType  evolution_law 
)
inline

Register an ODE evolution law for the internal variable.

The evolution_law is called as: evolution_law(t_info, alpha_val, alpha_dot, coupling_fields..., params...) and must return a scalar residual (zero when the ODE is satisfied).

Parameters
domain_nameDomain to apply the evolution on.
evolution_lawCallable returning the ODE residual.

Definition at line 85 of file state_variable_system.hpp.

◆ SystemBase()

template<int dim, typename StateSpace , typename InternalVarTimeRule = BackwardEulerFirstOrderTimeIntegrationRule, typename Coupling = std::tuple<>>
smith::SystemBase::SystemBase
inlineexplicit

Construct a system from a field store, solver, and weak forms.

Parameters
fsField store shared by all weak forms.
solSolver used for solve.
wfsWeak forms owned by this system.

Definition at line 76 of file system_base.hpp.


The documentation for this struct was generated from the following file: