https://mooseframework.inl.gov
LibtorchControlValuePostprocessor.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #ifdef LIBTORCH_ENABLED
11 
12 #pragma once
13 
15 #include "GeneralPostprocessor.h"
17 
23 {
24 public:
26 
32 
34 
37  void initialize() override {}
38  void execute() override {}
40 
43  void initialSetup() override;
44 
49  virtual Real getValue() const override;
50 
51 private:
52  unsigned int _signal_index;
53 
54  // This can't be const beause PPs are constructed before Controls
56 };
57 
58 #endif
A time-dependent, neural network-based control of multiple input parameters.
LibtorchControlValuePostprocessor(const InputParameters &parameters)
Class constructor.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
This class is here to combine the Postprocessor interface and the base class Postprocessor object alo...
const LibtorchNeuralNetControl * _libtorch_nn_control
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.
const InputParameters & parameters() const
Get the parameters of the object.