Smith  0.1
Smith is an implicit thermal structural mechanics simulation code.
Public Member Functions | Public Attributes | List of all members
smith::SystemBase Struct Reference

Base struct for physics systems containing common members and helper functions. More...

#include <system_base.hpp>

Public Member Functions

 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::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

Base struct for physics systems containing common members and helper functions.

Definition at line 52 of file system_base.hpp.

Constructor & Destructor Documentation

◆ SystemBase()

smith::SystemBase::SystemBase ( std::shared_ptr< FieldStore fs,
std::shared_ptr< SystemSolver sol = nullptr,
std::vector< std::shared_ptr< WeakForm >>  wfs = {} 
)
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.

Member Function Documentation

◆ computeReactions()

std::vector< ReactionState > smith::SystemBase::computeReactions ( const TimeInfo time_info,
const std::vector< FieldState > &  states_for_reactions 
) const
virtual

Compute reactions after solving the main state.

Parameters
time_infoCurrent time information.
states_for_reactionsThe fields configured for reaction computation.
Returns
std::vector<ReactionState> Computed reactions across all weak_forms.

Definition at line 74 of file system_base.cpp.

◆ solve()

std::vector< FieldState > smith::SystemBase::solve ( const TimeInfo time_info) const
virtual

Solve the system using the internal weak_forms and solver.

Parameters
time_infoCurrent time information.
Returns
std::vector<FieldState> The updated state fields from the solver.

Definition at line 13 of file system_base.cpp.

Member Data Documentation

◆ cycle_zero_systems

std::vector<std::shared_ptr<SystemBase> > smith::SystemBase::cycle_zero_systems

Optional startup solves executed before first timestep. Each entry is solved independently; cycle-zero solves do not couple across subsystems.

Definition at line 60 of file system_base.hpp.


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