12#ifdef MOOSE_LIBTORCH_ENABLED
69 Real
sampleProfile(
unsigned int profile_index,
const Point & point)
const;
110 std::vector<std::unique_ptr<LinearInterpolation>>
_profiles;
const InputParameters & parameters() const
Evaluates a TorchScript model on the schedule given by the execute_on parameter (default: once,...
const std::vector< PostprocessorName > _input_names
Postprocessor-based model inputs.
static InputParameters validParams()
void updateProfiles()
Evaluate the TorchScript model once and (re)build every profile interpolator in _profiles.
const TorchScriptUserObject & _torch_script_userobject
Existing MOOSE object that owns and evaluates the TorchScript module.
const MooseEnum _tensor_dtype
float32 or float64
const std::vector< Real > _profile_coordinates
Coordinates at which the model output values are defined.
const std::vector< MooseFunctorName > _profile_names
Names assigned to the output profile functors.
RealVectorValue _profile_direction
Unit direction of increasing profile coordinate.
const Point _profile_origin
Physical origin of the one-dimensional profile coordinate.
virtual void timestepSetup() override
std::vector< const PostprocessorValue * > _postprocessor_inputs
References to postprocessor values, populated when input_names is used.
virtual void initialSetup() override
const std::set< ExecFlagType > _profile_update_schedule
Execute flags on which updateProfiles() re-runs inference.
const MooseEnum _out_of_range_behavior
error, clamp, or extrapolate
Real sampleProfile(unsigned int profile_index, const Point &point) const
Evaluate a cached profile at a physical point.
const Real _coordinate_scale
Physical distance corresponding to one profile-coordinate unit.
torch::Tensor buildInputTensor() const
Construct the model input tensor.
const std::vector< Real > _input_values
Direct constant model inputs.
std::vector< std::unique_ptr< LinearInterpolation > > _profiles
Cached interpolator for each model output channel.