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 (double time, double dt, ConstFieldPtr shape_disp, const std::vector< ConstFieldPtr > &fields, const std::vector< ConstQuadratureFieldPtr > &quad_fields={}, int block_row=0) const =0 |
| | Virtual interface for computing the residual vector of a weak form. More...
|
| |
| virtual std::unique_ptr< mfem::HypreParMatrix > | jacobian (double time, double dt, ConstFieldPtr shape_disp, const std::vector< ConstFieldPtr > &fields, const std::vector< double > &field_argument_tangents, const std::vector< ConstQuadratureFieldPtr > &quad_fields={}, int block_row=0) const =0 |
| | Derivative of the residual with respect to specified field arguments: sum_j d{r}_i/d{fields}_j * argument_tangents[j], i is row, j are input fields (columns) More...
|
| |
| virtual void | jvp (double time, double dt, 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, const std::vector< DualFieldPtr > &jvp_reactions) const =0 |
| | Jacobian-vector product, will overwrite any existing values in jvp_reactions. More...
|
| |
| virtual void | vjp (double time, double dt, ConstFieldPtr shape_disp, const std::vector< ConstFieldPtr > &fields, const std::vector< ConstQuadratureFieldPtr > &quad_fields, const std::vector< ConstFieldPtr > &v_fields, 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 |
( |
double |
time, |
|
|
double |
dt, |
|
|
ConstFieldPtr |
shape_disp, |
|
|
const std::vector< ConstFieldPtr > & |
fields, |
|
|
const std::vector< double > & |
field_argument_tangents, |
|
|
const std::vector< ConstQuadratureFieldPtr > & |
quad_fields = {}, |
|
|
int |
block_row = 0 |
|
) |
| const |
|
pure virtual |
Derivative of the residual with respect to specified field arguments: sum_j d{r}_i/d{fields}_j * argument_tangents[j], i is row, j are input fields (columns)
- Parameters
-
| time | time |
| dt | time step |
| 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 |
| block_row | specifies which block row of the residual to compute the jacobian for the call will error if a non-zero argument_tangent weight is provided for two input fields with different sizes |
- Returns
- std::unique_ptr<mfem::HypreParMatrix> returns sum_j d{r}_i/d{fields}_j * argument_tangents[j], where {fields}_j is the jth field, {r}_i is the ith residual block row
◆ jvp()
Jacobian-vector product, will overwrite any existing values in jvp_reactions.
- Parameters
-
| time | time |
| dt | time step |
| 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_reactions | output jvps, 1 per row of a block system: d{r}_i / 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
-
| time | time |
| dt | time step |
| 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 |
| block_row | integer which specifies which row of a block system to get the residual for, defaults to 0 |
- Returns
- mfem::Vector
◆ vjp()
Vector-Jacobian product, will += into existing values in vjpFields.
- Parameters
-
| time | time |
| dt | time step |
| 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_fields | left hand side 'v' fields |
| vjp_shape_disp_sensitivity | vjp for shape_displacement: v_fields[i] * d{r}_i / d{shape_disp} |
| vjp_sensitivities | output vjps, 1 per input field: v_fields[i] * d{r}_i / d{fields}_j |
| vjp_quadrature_sensivities | output vjps, 1 per input quadrature field: v_fields[i] * d{r}_i / d{quadrature_field}_j |
The documentation for this class was generated from the following file: