23 template <
int spatial_dim,
typename OutputSpace,
typename inputs = Parameters<>>
32 template <
int spatial_dim,
typename OutputSpace,
typename... InputSpaces>
40 const mfem::ParFiniteElementSpace& output_mfem_space,
41 const typename WeakFormT::SpacesT& input_mfem_spaces)
42 :
WeakFormT(physics_name, mesh, output_mfem_space, input_mfem_spaces)
47 template <
int... active_parameters,
typename BodyIntegralType>
50 const double* dt = &this->dt_;
51 const size_t* cycle = &this->cycle_;
52 WeakFormT::addBodyIntegral(depends_on, body_name, [dt, cycle, integrand](
double t,
auto X,
auto... inputs) {
54 return integrand(time_info, X, inputs...);
59 template <
typename BodyForceType,
int... all_active_parameters>
61 std::integer_sequence<int, all_active_parameters...>)
67 template <
typename BodyForceType>
70 addBodyIntegralImpl(body_name, body_integral, std::make_integer_sequence<
int,
sizeof...(InputSpaces)>{});
80 std::shared_ptr<WeakForm>
86 template <
int spatial_dim,
typename OutputSpace,
typename inputs = Parameters<>>
99 template <
int spatial_dim,
typename OutputSpace,
typename TrialInputSpace,
typename... InputSpaces>
103 static constexpr
int NUM_STATE_VARS = 4;
112 const mfem::ParFiniteElementSpace& output_mfem_space,
113 const typename TimeDiscretizedWeakFormT::SpacesT& input_mfem_spaces)
114 : time_rule_(time_rule)
116 time_discretized_weak_form_ =
117 std::make_shared<TimeDiscretizedWeakFormT>(physics_name, mesh, output_mfem_space, input_mfem_spaces);
118 time_discretized_weak_form = time_discretized_weak_form_;
120 typename TimeDiscretizedWeakFormT::SpacesT input_mfem_spaces_trial_removed(std::next(input_mfem_spaces.begin()),
121 input_mfem_spaces.end());
122 final_reaction_weak_form_ =
123 std::make_shared<FinalReactionFormT>(physics_name, mesh, output_mfem_space, input_mfem_spaces_trial_removed);
124 final_reaction_weak_form = final_reaction_weak_form_;
128 template <
int... active_parameters,
typename BodyIntegralType>
130 BodyIntegralType integrand)
132 auto time_rule = time_rule_;
133 time_discretized_weak_form_->addBodyIntegral(
135 [integrand, time_rule](
const TimeInfo& t,
auto X,
auto U,
auto U_old,
auto U_dot_old,
auto U_dot_dot_old,
137 return integrand(t, X, time_rule.value(t, U, U_old, U_dot_old, U_dot_dot_old),
138 time_rule.dot(t, U, U_old, U_dot_old, U_dot_dot_old),
139 time_rule.ddot(t, U, U_old, U_dot_old, U_dot_dot_old), inputs...);
142 body_name, integrand);
146 template <
typename BodyForceType>
149 addBodyIntegral(
DependsOn<>{}, body_name, body_integral);
153 std::shared_ptr<TimeDiscretizedWeakFormT>
154 time_discretized_weak_form_;
156 std::shared_ptr<FinalReactionFormT>
157 final_reaction_weak_form_;
Smith mesh class which assists in constructing the appropriate parallel mfem meshes and registering a...
Accelerator functionality.
encodes rules for time discretizing second order odes (involving first and second time derivatives)....
a struct that is used in the physics modules to clarify which template arguments are user-controlled ...
struct storing time and timestep information
Provides templated implementations for discretizing values, velocities and accelerations from current...