27#include "neml2/equation_systems/EquationSystem.h"
28#include "neml2/equation_systems/NonlinearSystem.h"
29#include "neml2/equation_systems/SparseTensorList.h"
30#include "neml2/models/ParameterStore.h"
31#include "neml2/models/BufferStore.h"
48 const std::shared_ptr<Model> &
model_ptr()
const {
return _model; }
80 std::shared_ptr<Model> _model;
BufferStore(NEML2Object *object)
EquationSystem(const OptionSet &options)
SparseTensorList A()
Assemble and return the operator, A.
SparseTensorList b()
Assemble and return the right-hand side, b.
const Model & model() const
Definition ModelNonlinearSystem.h:49
void post_assemble(bool A, bool B, bool b) override
Callback after assembly to perform.
std::vector< TensorShape > setup_intmd_blayout() override
Setup the RHS intermediate layout.
std::vector< LabeledAxisAccessor > setup_umap() override
Setup the unknown map.
SparseTensorList u() const override
Get the unknown u.
void set_u(const SparseTensorList &) override
Set the unknown u.
std::vector< LabeledAxisAccessor > setup_bmap() override
Setup the RHS map.
std::vector< TensorShape > setup_intmd_glayout() override
Setup the given variable intermediate layout.
std::vector< TensorShape > setup_blayout() override
Setup the RHS layout.
void set_g(const SparseTensorList &) override
Set the given variables g from the current step.
SparseTensorList g() const override
Get the given variables g from the current step.
void to(const TensorOptions &) override
Change the device and dtype of the equation system's internal data.
std::vector< TensorShape > setup_glayout() override
Setup the given variable base layout.
std::vector< TensorShape > setup_ulayout() override
Setup the unknown layout.
std::vector< LabeledAxisAccessor > setup_gmap() override
Setup the given variable map.
void assemble(SparseTensorList *A, SparseTensorList *B, SparseTensorList *b) override
Compute the operator and right-hand side.
void setup() override
Setup this object.
std::vector< TensorShape > setup_intmd_ulayout() override
Setup the unknown intermediate layout.
static OptionSet expected_options()
ModelNonlinearSystem(const OptionSet &options)
void pre_assemble(bool A, bool B, bool b) override
Callback before assembly to perform.
Model & model()
Definition ModelNonlinearSystem.h:50
const std::shared_ptr< Model > & model_ptr() const
Definition ModelNonlinearSystem.h:48
The base class for all constitutive models.
Definition Model.h:83
Definition of a nonlinear system of equations, r(u) = 0.
Definition NonlinearSystem.h:44
A custom map-like data structure. The keys are strings, and the values can be nonhomogeneously typed.
Definition OptionSet.h:52
ParameterStore(NEML2Object *object)
Definition DiagnosticsInterface.h:31
c10::TensorOptions TensorOptions
Definition types.h:66
Alias for a list of Tensors.
Definition SparseTensorList.h:42