queso-0.53.0
|
This templated class represents a Statistical Forward Problem. More...
#include <StatisticalForwardProblem.h>
Public Member Functions | |
Constructor/Destructor methods | |
StatisticalForwardProblem (const char *prefix, const SfpOptionsValues *alternativeOptionsValues, const BaseVectorRV< P_V, P_M > ¶mRv, const BaseVectorFunction< P_V, P_M, Q_V, Q_M > &qoiFunction, GenericVectorRV< Q_V, Q_M > &qoiRv) | |
Constructor. More... | |
~StatisticalForwardProblem () | |
Destructor. More... | |
Statistical methods | |
bool | computeSolutionFlag () const |
Whether or not compute the solution. More... | |
void | solveWithMonteCarlo (const McOptionsValues *alternativeOptionsValues) |
Solves the problem through Monte Carlo algorithm. More... | |
const GenericVectorRV< Q_V, Q_M > & | qoiRv () const |
Returns the QoI RV; access to private attribute m_qoiRv. More... | |
const BaseVectorSequence< Q_V, Q_M > & | getParamChain () const |
Returns the parameter chain; access to private attribute m_paramChain. More... | |
Private Member Functions | |
void | commonConstructor () |
TODO: Common constructor. More... | |
Private Attributes | |
const BaseEnvironment & | m_env |
const BaseVectorRV< P_V, P_M > & | m_paramRv |
const BaseVectorFunction< P_V, P_M, Q_V, Q_M > & | m_qoiFunction |
GenericVectorRV< Q_V, Q_M > & | m_qoiRv |
BaseVectorSequence< Q_V, Q_M > * | m_paramChain |
BaseVectorSequence< Q_V, Q_M > * | m_qoiChain |
MonteCarloSG< P_V, P_M, Q_V, Q_M > * | m_mcSeqGenerator |
BaseVectorRealizer< Q_V, Q_M > * | m_solutionRealizer |
BaseJointPdf< Q_V, Q_M > * | m_solutionPdf |
const SfpOptionsValues * | m_optionsObj |
bool | m_userDidNotProvideOptions |
I/O methods | |
void | print (std::ostream &os) const |
TODO: Prints the sequence. More... | |
std::ostream & | operator<< (std::ostream &os, const StatisticalForwardProblem< P_V, P_M, Q_V, Q_M > &obj) |
This templated class represents a Statistical Forward Problem.
This templated class represents a statistical forward problem. It is templated on the types 'P_V' and 'Q_V' of vectors and types 'P_M' and 'Q_M' of matrices, where 'P_' stands for 'parameter' and 'Q_' stands for 'quantities of interest'. Conceptually, a statistical forward problem has two input entities and one output entity.
The input entities of a statistical forward problem are:
Let denote the mathematical QoI function and denote a vector of parameters. The QoI function object stores the routine that computes and whatever data necessary by such routine. See file 'libs/basic/inc/VectorFunction.h' for more details.
The output entity of a statistical forward problem is:
The QoI RV stores the solution according to the Bayesian approach. The solution of a SPF is computed by calling 'solveWithMonteCarlo()'. More operations, with different methods, will be available in the future.
The solution process might demand extra objects to be passed through the chosen solution operation interface. This distinction is important: this class separates 'what the problem is' from 'how the problem is solved'. Upon return from a solution operation, the QoI RV is available through the operation 'qoiRv()'. Such QoI RV is able to provide:
Definition at line 80 of file StatisticalForwardProblem.h.
QUESO::StatisticalForwardProblem< P_V, P_M, Q_V, Q_M >::StatisticalForwardProblem | ( | const char * | prefix, |
const SfpOptionsValues * | alternativeOptionsValues, | ||
const BaseVectorRV< P_V, P_M > & | paramRv, | ||
const BaseVectorFunction< P_V, P_M, Q_V, Q_M > & | qoiFunction, | ||
GenericVectorRV< Q_V, Q_M > & | qoiRv | ||
) |
Constructor.
Requirements: 1) the image set of the vector random variable 'paramRv' and the domain set of the QoI function 'qoiFunction' should belong to vector spaces of equal dimensions and 2) the image set of the QoI function 'qoiFunction' and the image set of the vector random variable 'qoiRv' should belong to vector spaces of equal dimensions. If the requirements are satisfied, the constructor then reads input options that begin with the string '<prefix>fp_'. Options reading is handled by class 'StatisticalForwardProblemOptions'. If no options input file is provided, the construction assigns alternativeOptionsValues
to the options of the SFP.
prefix | The prefix |
alternativeOptionsValues | Options (if no input file) |
paramRv | The input RV |
qoiFunction | The QoI function |
qoiRv | The QoI RV |
Definition at line 34 of file StatisticalForwardProblem.C.
References queso_require_equal_to_msg.
QUESO::StatisticalForwardProblem< P_V, P_M, Q_V, Q_M >::~StatisticalForwardProblem | ( | ) |
Destructor.
Definition at line 105 of file StatisticalForwardProblem.C.
|
private |
TODO: Common constructor.
bool QUESO::StatisticalForwardProblem< P_V, P_M, Q_V, Q_M >::computeSolutionFlag | ( | ) | const |
Whether or not compute the solution.
Definition at line 144 of file StatisticalForwardProblem.C.
const BaseVectorSequence< Q_V, Q_M > & QUESO::StatisticalForwardProblem< P_V, P_M, Q_V, Q_M >::getParamChain | ( | ) | const |
Returns the parameter chain; access to private attribute m_paramChain.
Definition at line 402 of file StatisticalForwardProblem.C.
References queso_require_msg.
void QUESO::StatisticalForwardProblem< P_V, P_M, Q_V, Q_M >::print | ( | std::ostream & | os | ) | const |
TODO: Prints the sequence.
Definition at line 415 of file StatisticalForwardProblem.C.
const GenericVectorRV< Q_V, Q_M > & QUESO::StatisticalForwardProblem< P_V, P_M, Q_V, Q_M >::qoiRv | ( | ) | const |
Returns the QoI RV; access to private attribute m_qoiRv.
Definition at line 373 of file StatisticalForwardProblem.C.
void QUESO::StatisticalForwardProblem< P_V, P_M, Q_V, Q_M >::solveWithMonteCarlo | ( | const McOptionsValues * | alternativeOptionsValues | ) |
Solves the problem through Monte Carlo algorithm.
Requirements: none at this moment. If the requirements are satisfied, this operation checks the member flag 'm_computeSolution' (one of the options read from the input file during construction). If the flag is 'false', the operation returns immediately, computing nothing. If the flag is 'true', the operation sets the member variable 'm_qoiRv' accordingly. The operation:
Definition at line 151 of file StatisticalForwardProblem.C.
References QUESO::ComputeCovCorrMatricesBetweenVectorSequences(), QUESO::BaseVectorCdf< V, M >::m_prefix, QUESO::FilePtrSetStruct::ofsVar, queso_error_msg, QUESO::SequenceOfVectors< V, M >::subUniformlySampledCdf(), QUESO::SequenceOfVectors< V, M >::unifiedUniformlySampledCdf(), and UQ_FILE_EXTENSION_FOR_MATLAB_FORMAT.
|
friend |
Definition at line 144 of file StatisticalForwardProblem.h.
|
private |
Definition at line 156 of file StatisticalForwardProblem.h.
|
private |
Definition at line 164 of file StatisticalForwardProblem.h.
|
private |
Definition at line 170 of file StatisticalForwardProblem.h.
|
private |
Definition at line 162 of file StatisticalForwardProblem.h.
|
private |
Definition at line 158 of file StatisticalForwardProblem.h.
|
private |
Definition at line 163 of file StatisticalForwardProblem.h.
|
private |
Definition at line 159 of file StatisticalForwardProblem.h.
|
private |
Definition at line 160 of file StatisticalForwardProblem.h.
|
private |
Definition at line 168 of file StatisticalForwardProblem.h.
|
private |
Definition at line 166 of file StatisticalForwardProblem.h.
|
private |
Definition at line 187 of file StatisticalForwardProblem.h.