10 #ifdef MOOSE_LIBTORCH_ENABLED 24 "The name of the LibtorchNeuralNetControl object.");
25 params.
addParam<
unsigned int>(
"signal_index",
27 "The index of the signal from the LibtorchNeuralNetControl object. " 28 "This assumes indexing between [0,num_signals).");
49 "The supplied control object is not derived from LibtorchNeuralNetControl!");
53 "The given control object only has ",
unsigned int numberOfControlSignals() const
Get the number of controls this object is computing.
A time-dependent, neural network-based control of multiple input parameters.
LibtorchControlValuePostprocessor(const InputParameters ¶meters)
Class constructor.
void paramError(const std::string ¶m, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
Real getSignal(const unsigned int signal_index) const
Get the (signal_index)-th signal of the control neural net.
This class is here to combine the Postprocessor interface and the base class Postprocessor object alo...
static InputParameters validParams()
FEProblemBase & _fe_problem
Reference to the FEProblemBase for this user object.
std::shared_ptr< T > getActiveObject(const std::string &name, THREAD_ID tid=0) const
const LibtorchNeuralNetControl * _libtorch_nn_control
static InputParameters validParams()
unsigned int _signal_index
registerMooseObject("MooseApp", LibtorchControlValuePostprocessor)
A class for querying output signals from LibtorchNeuralNetControl and derived objects.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void initialSetup() override
We override this to setup the linking withthe control object.
virtual Real getValue() const override
Returns the value of the latest response of a neural-network-based controller.
ExecuteMooseObjectWarehouse< Control > & getControlWarehouse()
Reference to the control logic warehouse.
virtual void initialSetup()
Gets called at the beginning of the simulation before this object is asked to do its job...
void ErrorVector unsigned int