|
| std::string | NEML2Utils::stringify (MOOSEIOType type) |
| |
| std::pair< std::string, int > | NEML2Utils::parseLag (const std::string &name) |
| | Parse NEML2 v3 lag notation: "var~N" is the N-th old value of a variable (var~1 == old var, var~2 == older, ...).
|
| |
| std::string | NEML2Utils::lagName (const std::string &base, int lag) |
| | Inverse of parseLag: build the variable name for a base name + lag.
|
| |
| bool | NEML2Utils::contains (const std::vector< std::string > &v, const std::string &s) |
| | Whether a vector of strings contains a given string.
|
| |
| template<typename T > |
| at::Tensor | NEML2Utils::fromBlob (const std::vector< T > &data) |
| | Map from std::vector<T> to an at::Tensor without copying the data.
|
| |
| template<typename T > |
| void | NEML2Utils::copyTensorToMOOSEData (const at::Tensor &src, T &dest) |
| | Directly copy a contiguous chunk of memory of a at::Tensor to a MOOSE data of type T.
|
| |
| template<typename T > |
| void | NEML2Utils::copyBlobToMOOSEData (const Real *src, T &dest) |
| | Copy one element's worth of doubles from a contiguous host buffer into a MOOSE datum of type T.
|
| |
| void | NEML2Utils::redirectLogsToConsole (const ConsoleStream &console) |
| | Route NEML2's log output into MOOSE's console.
|
| |
| void | NEML2Utils::dumpInputsToTorchScript (const std::map< std::string, at::Tensor > &inputs, const std::string &filename) |
| | Serialize a set of named NEML2 input tensors to a TorchScript archive at filename (a torch::jit::Module whose buffers are the input tensors), loadable offline in Python via torch.jit.load.
|
| |
| std::string | NEML2Utils::docstring (const std::string &desc) |
| | Augment docstring if NEML2 is not enabled.
|
| |
| void | NEML2Utils::assertNEML2Enabled () |
| | Assert that NEML2 is enabled.
|
| |