27#include "neml2/base/NEML2Object.h"
28#include "neml2/models/BufferStore.h"
29#include "neml2/base/Factory.h"
34#include "neml2/base/TensorName.h"
35#include "neml2/tensors/TensorValue.h"
58 template <
typename T,
typename =
typename std::enable_if_t<std::is_base_of_v<Data, T>>>
65 "' does not have a factory set.");
66 auto data =
host()->factory()->get_object<T>(
"Data",
name, extra_opts,
false);
Interface for object which can store buffers.
Definition BufferStore.h:49
T & register_data(const std::string &name)
Definition Data.h:59
std::vector< std::shared_ptr< Data > > _registered_data
Registered Data objects.
Definition Data.h:76
const std::vector< std::shared_ptr< Data > > & registered_data() const
All the registered data objects.
Definition Data.h:52
Data(const OptionSet &options)
Construct a new Data object.
Definition Data.cxx:38
static OptionSet expected_options()
Definition Data.cxx:31
The base class of all "manufacturable" objects in the NEML2 library.
Definition NEML2Object.h:51
const std::string & name() const
A readonly reference to the object's name.
Definition NEML2Object.h:83
const T * host() const
Get a readonly pointer to the host.
Definition NEML2Object.h:150
Factory * factory() const
Get the factory that created this object.
Definition NEML2Object.h:92
A custom map-like data structure. The keys are strings, and the values can be nonhomogeneously typed.
Definition OptionSet.h:51
T & set(const std::string &)
Definition OptionSet.h:254
Definition DiagnosticsInterface.cxx:30