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

A non-templated system wrapper that combines multiple sub-systems sharing one FieldStore. More...

#include <combined_system.hpp>

Collaboration diagram for smith::CombinedSystem:
Collaboration graph
[legend]

Public Member Functions

template<typename SubSystemType , typename MaterialType >
void setMaterialOn (std::shared_ptr< SubSystemType > sub, const MaterialType &material, const std::string &domain_name)
 Set a coupled material on all sub-systems. More...
 
 SystemBase ()=default
 Construct a CombinedSystem. weak_forms is populated by combineSystems.
 
 SystemBase (std::shared_ptr< FieldStore > fs, std::shared_ptr< SystemSolver > sol=nullptr, std::vector< std::shared_ptr< WeakForm >> wfs={})
 Construct a CombinedSystem. weak_forms is populated by combineSystems.
 
- 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::vector< std::shared_ptr< SystemBase > > subsystems
 Ordered sub-systems solved during each staggered sweep.
 
- 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

A non-templated system wrapper that combines multiple sub-systems sharing one FieldStore.

The combined solve does staggered iterations: in each sweep every sub-system is solved in order, writing its updated unknowns back to the shared FieldStore so subsequent sub-systems see the updated fields. The base class weak_forms member is the concatenation of sub-system weak forms, which allows makeAdvancer / MultiphysicsTimeIntegrator to integrate the combined system transparently.

For tight coupling (setMaterial on the combined system), sub-classes or concrete callers can down-cast subsystems[i] to the typed sub-system and call its own addBodyIntegral. This is done via the template setMaterial below.

Definition at line 59 of file combined_system.hpp.

Member Function Documentation

◆ setMaterialOn()

template<typename SubSystemType , typename MaterialType >
void smith::CombinedSystem::setMaterialOn ( std::shared_ptr< SubSystemType >  sub,
const MaterialType &  material,
const std::string &  domain_name 
)
inline

Set a coupled material on all sub-systems.

Calls setMaterial on each sub-system if that sub-system is of the given typed pointer (down-cast via dynamic_pointer_cast). Intended for tight-coupling materials that register integrands on both sub-systems' weak forms.

Template Parameters
SubSystemTypeThe concrete type that exposes setMaterial.
MaterialTypeThe material type.

Definition at line 76 of file combined_system.hpp.


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