|
Smith
0.1
Smith is an implicit thermal structural mechanics simulation code.
|
Coupling pack types and helpers for injecting explicit coupled-physics fields into weak form parameter packs. More...
#include <tuple>#include <type_traits>#include <utility>#include "smith/differentiable_numerics/field_store.hpp"#include "smith/differentiable_numerics/system_base.hpp"

Go to the source code of this file.
Namespaces | |
| smith | |
| Accelerator functionality. | |
| smith::detail | |
| Internal solid mechanics builder after coupling fields are assembled. | |
Typedefs | |
| template<typename Tuple > | |
| using | smith::detail::tuple_to_parameters_t = typename TupleToParameters< std::decay_t< Tuple > >::type |
Typedef for converting a tuple of spaces into Parameters<...>. | |
| template<typename Pack > | |
| using | smith::detail::pack_tuple_t = typename pack_tuple< std::decay_t< Pack > >::type |
| Typedef for extracting a tuple of spaces from a coupling pack. | |
| template<typename... Tuples> | |
| using | smith::detail::tuple_cat_t = decltype(std::tuple_cat(std::declval< Tuples >()...)) |
Typedef for concatenating space tuples with std::tuple_cat. | |
| template<typename PacksTuple > | |
| using | smith::detail::flatten_coupling_t = typename FlattenCoupling< std::decay_t< PacksTuple > >::parameters |
| Typedef for flattened coupling parameter spaces. | |
| template<typename Rule , typename Space , typename PacksTuple > | |
| using | smith::detail::TimeRuleParams = typename TimeRuleParamsImpl< Rule, Space, flatten_coupling_t< PacksTuple > >::type |
| Typedef for TimeRuleParams. | |
Functions | |
| template<typename... Spaces> | |
| smith::ParamFields (FieldType< Spaces >...) -> ParamFields< Spaces... > | |
| Deduction guide for ParamFields. | |
| template<typename... PFs> | |
| auto | smith::couplingFields (const PFs &... pfs) |
| Helper to construct a CouplingFields bundle. | |
| template<typename... ParamSpaces> | |
| auto | smith::registerParameterFields (const std::shared_ptr< FieldStore > &field_store, FieldType< ParamSpaces >... param_types) |
| Register parameter fields as type-level tokens. | |
| template<typename PacksTuple > | |
| auto | smith::detail::flattenCouplingFields (const PacksTuple &packs) |
Concatenate each pack's .fields tuple — used to derive trailing weak-form parameter spaces. | |
| auto | smith::detail::collectCouplingFields () |
| Collect no coupling or parameter packs. | |
| template<typename... PFs> | |
| auto | smith::detail::collectCouplingFields (const CouplingFields< PFs... > &coupled) |
| Collect only coupled physics packs. | |
| template<typename... Spaces> | |
| auto | smith::detail::collectCouplingFields (const ParamFields< Spaces... > ¶ms) |
| Collect only registered parameter fields. | |
| template<typename... PFs, typename... Spaces> | |
| auto | smith::detail::collectCouplingFields (const CouplingFields< PFs... > &coupled, const ParamFields< Spaces... > ¶ms) |
| Collect coupled physics packs followed by registered parameter fields. | |
| template<typename Rule , typename TimeInfoT , typename ArgsTuple , typename Callback , std::size_t... StateIs, std::size_t... TailIs> | |
| decltype(auto) | smith::detail::applyTimeRuleToPrefixImpl (const Rule &rule, const TimeInfoT &t_info, const ArgsTuple &raw_args, Callback &&callback, std::index_sequence< StateIs... >, std::index_sequence< TailIs... >) |
| Implementation of time rule prefix application. | |
| template<typename Rule , typename TimeInfoT , typename Callback , typename... RawArgs> | |
| decltype(auto) | smith::detail::applyTimeRuleToPrefix (const Rule &rule, const TimeInfoT &t_info, Callback &&callback, const RawArgs &... raw_args) |
| Apply time rule interpolation to the leading prefix of raw arguments. | |
| template<std::size_t Offset, typename Pack , typename TimeInfoT , typename RawTuple , std::size_t... Is> | |
| auto | smith::detail::evaluateCouplingPack (const Pack &, const TimeInfoT &t_info, const RawTuple &raw_args, std::index_sequence< Is... >) |
| Evaluate a single coupling pack's time rule. | |
| template<std::size_t I, std::size_t Offset, typename PacksTuple , typename TimeInfoT , typename RawTuple > | |
| auto | smith::detail::evaluateCouplingPacks (const PacksTuple &packs, const TimeInfoT &t_info, const RawTuple &raw_args) |
| Evaluate all coupling packs over their corresponding raw arguments. | |
| template<typename PacksTuple , typename TimeInfoT , typename Callback , typename... RawArgs> | |
| decltype(auto) | smith::detail::applyCouplingTimeRules (const PacksTuple &packs, const TimeInfoT &t_info, Callback &&callback, const RawArgs &... raw_args) |
| Interpolate coupling packs and invoke the callback. | |
| template<typename Rule , typename Coupling , typename TimeInfoT , typename Callback , typename... RawArgs> | |
| decltype(auto) | smith::detail::applyTimeRuleAndCoupling (const Rule &rule, const Coupling &coupling, const TimeInfoT &t_info, Callback &&callback, const RawArgs &... raw_args) |
| Interpolate self time-rule states then coupling segments, then invoke callback. More... | |
Variables | |
| template<typename T > | |
| constexpr bool | smith::detail::is_physics_fields_v = is_physics_fields_impl<std::decay_t<T>>::value |
| True when T is a PhysicsFields pack. | |
| template<typename T > | |
| constexpr bool | smith::detail::is_parameter_pack_v = is_parameter_pack_impl<std::decay_t<T>>::value |
| True if T is a ParamFields type. | |
| template<typename T > | |
| constexpr bool | smith::detail::is_coupling_fields_v = is_coupling_fields_impl<std::decay_t<T>>::value |
| True if T is a CouplingFields type. | |
| template<typename T > | |
| constexpr bool | smith::detail::is_coupling_packs_v = is_coupling_packs_impl<std::decay_t<T>>::value |
| True if T is a tuple of coupling packs. | |
| template<typename T , typename = void> | |
| constexpr bool | smith::detail::has_time_rule_v = false |
| Base case: T does not have a time rule. | |
Coupling pack types and helpers for injecting explicit coupled-physics fields into weak form parameter packs.
Builders accept at most two optional trailing arguments after self_fields:
couplingFields(coupled_physics_fields...) — coupled physics contributionsparam_fields (a ParamFields<...>) — registered user parameter fields (must be last)Tail of each material/source closure: (coupling_fields..., parameter_fields...).
Definition in file coupling_params.hpp.