Abstract WeakForm class.
More...
#include <weak_form.hpp>
|
| | WeakForm (std::string name) |
| | base constructor takes the name of the physics More...
|
| |
|
virtual | ~WeakForm () |
| | destructor
|
| |
| virtual mfem::Vector | residual (TimeInfo time_info, ConstFieldPtr shape_disp, const std::vector< ConstFieldPtr > &fields, const std::vector< ConstQuadratureFieldPtr > &quad_fields={}) const =0 |
| | Virtual interface for computing the residual vector of a weak form. More...
|
| |
| virtual std::unique_ptr< mfem::HypreParMatrix > | jacobian (TimeInfo time_info, ConstFieldPtr shape_disp, const std::vector< ConstFieldPtr > &fields, const std::vector< double > &field_argument_tangents, const std::vector< ConstQuadratureFieldPtr > &quad_fields={}) const =0 |
| | Derivative of the residual with respect to specified field arguments: sum_j d{r}/d{fields}_j * argument_tangents[j], j are input fields (columns) More...
|
| |
| virtual void | jvp (TimeInfo time_info, ConstFieldPtr shape_disp, const std::vector< ConstFieldPtr > &fields, const std::vector< ConstQuadratureFieldPtr > &quad_fields, ConstFieldPtr v_shape_disp, const std::vector< ConstFieldPtr > &v_fields, const std::vector< ConstQuadratureFieldPtr > &v_quad_fields, DualFieldPtr jvp_reaction) const =0 |
| | Jacobian-vector product, will overwrite any existing values in jvp_reactions. More...
|
| |
| virtual void | vjp (TimeInfo time_info, ConstFieldPtr shape_disp, const std::vector< ConstFieldPtr > &fields, const std::vector< ConstQuadratureFieldPtr > &quad_fields, ConstFieldPtr v_field, DualFieldPtr vjp_shape_disp_sensitivity, const std::vector< DualFieldPtr > &vjp_sensitivities, const std::vector< QuadratureFieldPtr > &vjp_quadrature_sensivities) const =0 |
| | Vector-Jacobian product, will += into existing values in vjpFields. More...
|
| |
|
std::string | name () const |
| | name
|
| |
Abstract WeakForm class.
Definition at line 36 of file weak_form.hpp.
◆ WeakForm()
| smith::WeakForm::WeakForm |
( |
std::string |
name | ) |
|
|
inline |
base constructor takes the name of the physics
- Parameters
-
| name | provide a name corresponding to the physics |
Definition at line 41 of file weak_form.hpp.
◆ jacobian()
| virtual std::unique_ptr<mfem::HypreParMatrix> smith::WeakForm::jacobian |
( |
TimeInfo |
time_info, |
|
|
ConstFieldPtr |
shape_disp, |
|
|
const std::vector< ConstFieldPtr > & |
fields, |
|
|
const std::vector< double > & |
field_argument_tangents, |
|
|
const std::vector< ConstQuadratureFieldPtr > & |
quad_fields = {} |
|
) |
| const |
|
pure virtual |
Derivative of the residual with respect to specified field arguments: sum_j d{r}/d{fields}_j * argument_tangents[j], j are input fields (columns)
- Parameters
-
| time_info | time and timestep information |
| shape_disp | smith::FiniteElementState*, change in model coordinates relative to the initially read in mesh |
| fields | vector of smith::FiniteElementState* |
| field_argument_tangents | specifies the weighting of the residual derivative with respect to each field |
| quad_fields | vector of ConstQuadratureFieldPtr |
- Returns
- std::unique_ptr<mfem::HypreParMatrix> returns sum_j d{r}/d{fields}_j * argument_tangents[j], where {fields}_j is the jth field, {r} is the residual
◆ jvp()
Jacobian-vector product, will overwrite any existing values in jvp_reactions.
- Parameters
-
| time_info | time and timestep information |
| shape_disp | smith::FiniteElementState*, change in model coordinates relative to the initially read in mesh |
| fields | vector of smith::FiniteElementState* |
| quad_fields | vector of ConstQuadratureFieldPtr |
| v_shape_disp | shape_displacement tangent |
| v_fields | field tangents, right hand side 'v' fields |
| v_quad_fields | quadrature_field_tangents |
| jvp_reaction | output jvps: d{r} / d{fields}_j * fieldsV[j] nullptr fieldsV are assumed to be all zero to avoid extra calculations |
◆ residual()
Virtual interface for computing the residual vector of a weak form.
- Parameters
-
- Returns
- mfem::Vector
◆ vjp()
Vector-Jacobian product, will += into existing values in vjpFields.
- Parameters
-
| time_info | time and timestep information |
| shape_disp | smith::FiniteElementState*, change in model coordinates relative to the initially read in mesh |
| fields | vector of smith::FiniteElementState* |
| quad_fields | vector of ConstQuadratureFieldPtr |
| v_field | left hand side 'v' field |
| vjp_shape_disp_sensitivity | vjp for shape_displacement: v_fields * d{r} / d{shape_disp} |
| vjp_sensitivities | output vjps, 1 per input field: v_fields * d{r} / d{fields}_j |
| vjp_quadrature_sensivities | output vjps, 1 per input quadrature field: v_field * d{r} / d{quadrature_field}_j |
The documentation for this class was generated from the following file: