12#ifdef MOOSE_LIBTORCH_ENABLED
14#include <torch/torch.h>
const InputParameters & parameters() const
Get the parameters of the object.
This user object caches assembly information (JxWxT) from MOOSE as a batched at::Tensor for the Torch...
void threadJoin(const UserObject &) override
Must override.
int64_t _nelem
number of elements on this rank
void invalidate()
Invalidate the cached assembly information.
void meshChanged() override
Called on this object when the mesh changes.
int64_t numQP() const
Number of quadrature points per element.
bool _up_to_date
Whether the current assembly cache is up to date.
void initialize() override
Called before execute() is ever called so that data can be cleared.
void execute() override
Execute method.
const at::Tensor & JxWxT() const
Get the cached JxWxT for each element, each quadrature point.
int64_t _nqp
number of quadrature points per element
bool upToDate() const
Whether the current assembly cache is up to date.
int64_t numElem() const
Number of active elements on this rank.
std::vector< Real > _moose_JxWxT
JxWxT (product of Jacobian determinant, quadrature weight, and coordinate transformation factor) for ...
void finalize() override
Finalize.
static InputParameters validParams()
Base class for user-specific data.