Reporter context for computing direct perturbation-based sensitivity coefficients. More...
#include <DirectPerturbationReporter.h>
Public Types | |
| enum | AutoOperation |
Public Member Functions | |
| DirectPerturbationReporterContext (const libMesh::ParallelObject &other, const MooseObject &producer, ReporterState< std::vector< DataType >> &state, DirectPerturbationSampler &sampler, const std::vector< DataType > &data, const bool relative_sensitivity) | |
| Constructor. More... | |
| virtual void | finalize () override |
| virtual std::string | type () const override |
| virtual void | declareClone (ReporterData &r_data, const ReporterName &r_name, const ReporterMode &mode, const MooseObject &producer) const override |
| virtual void | declareVectorClone (ReporterData &r_data, const ReporterName &r_name, const ReporterMode &mode, const MooseObject &producer) const override |
| virtual void | resize (dof_id_type local_size) final |
| virtual void | clear () final |
| virtual void | vectorSum () final |
| virtual std::string | contextType () const override |
| const ReporterName & | name () const override final |
| const ReporterState< std::vector< DataType > > & | state () const |
| virtual void | transfer (ReporterData &r_data, const ReporterName &r_name, unsigned int time_index=0) const override |
| virtual void | transferToVector (ReporterData &r_data, const ReporterName &r_name, dof_id_type index, unsigned int time_index=0) const override |
| virtual void | transferFromVector (ReporterData &r_data, const ReporterName &r_name, dof_id_type index, unsigned int time_index=0) const override |
| void | init (const ReporterMode &mode) |
| const MooseObject & | getProducer () const |
| const ReporterProducerEnum & | getProducerModeEnum () const |
| const Parallel::Communicator & | comm () const |
| processor_id_type | n_processors () const |
| processor_id_type | processor_id () const |
Protected Member Functions | |
| void | broadcast () |
| virtual void | storeInfo (nlohmann::json &json) const override |
| virtual void | store (nlohmann::json &json) const override |
| virtual void | copyValuesBack () override |
| virtual bool | restoreState () override |
| void | requiresConsumerModes (const ReporterStateBase &state, const std::set< ReporterMode > &modes) const |
Protected Attributes | |
| ReporterState< std::vector< DataType > > & | _state |
| const MooseObject & | _producer |
| ReporterProducerEnum | _producer_enum |
| const Parallel::Communicator & | _communicator |
Private Member Functions | |
| void | addSensitivityContribution (DataType &add_to, const DataType &to_add, const DataType &reference_value, const Real interval) const |
| Compute direct perturbation sensitivity, split into a separate function due to the different operators on vectors and scalars. More... | |
| DataType | initializeDataType (const DataType &example_output) const |
| Initialize the sensitivity container, split into a separate function due to the different constructors for scalars and vectors. More... | |
Private Attributes | |
| DirectPerturbationSampler & | _sampler |
| Reference to the direct perturbation sampler. More... | |
| const std::vector< DataType > & | _data |
| Data used for the statistic calculation. More... | |
| const bool | _relative_sensitivity |
| If relative sensitivities should be computed. More... | |
Reporter context for computing direct perturbation-based sensitivity coefficients.
Definition at line 58 of file DirectPerturbationReporter.h.
| DirectPerturbationReporterContext< DataType >::DirectPerturbationReporterContext | ( | const libMesh::ParallelObject & | other, |
| const MooseObject & | producer, | ||
| ReporterState< std::vector< DataType >> & | state, | ||
| DirectPerturbationSampler & | sampler, | ||
| const std::vector< DataType > & | data, | ||
| const bool | relative_sensitivity | ||
| ) |
Constructor.
| other | A parallel object, usually the MooseApp |
| producer | The producer object for the reporter |
| state | A reporter state (a vector of some types in this case) |
| sampler | The sampler holding information on the direct perturbation paraemters |
| data | The data coming back from the executed models |
Definition at line 95 of file DirectPerturbationReporter.C.
|
private |
Compute direct perturbation sensitivity, split into a separate function due to the different operators on vectors and scalars.
| add_to | The data structure which will be extended |
| to_add | The data structure which will be added to the other one |
| reference_value | The reference values in case we are computing relative sensitivities |
| interval | The interval scaling coefficient vector |
Definition at line 178 of file DirectPerturbationReporter.C.
|
overridevirtual |
Reimplemented from ReporterGeneralContext< std::vector< DataType > >.
Definition at line 112 of file DirectPerturbationReporter.C.
|
private |
Initialize the sensitivity container, split into a separate function due to the different constructors for scalars and vectors.
| example_output | A structure which supplies the dimensions for the allocation |
Definition at line 241 of file DirectPerturbationReporter.C.
|
inlineoverridevirtual |
Reimplemented from ReporterGeneralContext< std::vector< DataType > >.
Definition at line 77 of file DirectPerturbationReporter.h.
|
private |
Data used for the statistic calculation.
Definition at line 103 of file DirectPerturbationReporter.h.
|
private |
If relative sensitivities should be computed.
Definition at line 106 of file DirectPerturbationReporter.h.
|
private |
Reference to the direct perturbation sampler.
Definition at line 100 of file DirectPerturbationReporter.h.
Referenced by DirectPerturbationReporterContext< DataType >::DirectPerturbationReporterContext().
1.8.14