queso-0.53.0
SimulationModel.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // QUESO - a library to support the Quantification of Uncertainty
5 // for Estimation, Simulation and Optimization
6 //
7 // Copyright (C) 2008-2015 The PECOS Development Team
8 //
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the Version 2.1 GNU Lesser General
11 // Public License as published by the Free Software Foundation.
12 //
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
17 //
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc. 51 Franklin Street, Fifth Floor,
21 // Boston, MA 02110-1301 USA
22 //
23 //-----------------------------------------------------------------------el-
24 
25 #ifndef UQ_SIMULATION_MODEL_H
26 #define UQ_SIMULATION_MODEL_H
27 
28 #include <queso/SimulationModelOptions.h>
29 #include <queso/SimulationStorage.h>
30 #include <queso/SequenceOfVectors.h>
31 #include <queso/Environment.h>
32 
33 namespace QUESO {
34 
35 class GslVector;
36 class GslMatrix;
37 
38 template <class S_V = GslVector, class S_M = GslMatrix, class P_V = GslVector, class P_M = GslMatrix, class Q_V = GslVector, class Q_M = GslMatrix>
40 {
41 public:
42  SimulationModel(const char* prefix,
43  const SmOptionsValues* alternativeOptionsValues, // dakota
44  const SimulationStorage<S_V,S_M,P_V,P_M,Q_V,Q_M>& simulStorage);
46 
47  unsigned int numBasis () const;
48  const std::vector<const S_V* >& xs_asterisks_standard() const;
49  const S_V& xSeq_original_mins () const;
50  const S_V& xSeq_original_ranges () const;
51  const std::vector<const P_V* >& ts_asterisks_standard() const;
52  const Q_V& etaSeq_original_mean () const;
53 #ifdef _GPMSA_CODE_TREATS_SIMULATION_VECTORS_IN_CHUNKS
54  double etaSeq_chunkStd (unsigned int chunkId) const;
55 #else
56  double etaSeq_allStd () const;
57 #endif
58  const Q_V& etaVec_transformed (const std::string& debugString) const;
59  const Q_V& basisVec (unsigned int basisId) const;
60  const Q_M& Kmat_eta () const;
61  const Q_M& Kmat () const;
62 
63  const SimulationModelOptions& optionsObj () const;
64  void print (std::ostream& os) const;
65  friend std::ostream& operator<<(std::ostream& os,
67  obj.print(os);
68  return os;
69  }
70 
71 private:
72  unsigned int computePEta (const Q_V& svdS_vec);
73  // Private variables
77 
78  unsigned int m_paper_p_x;
79  unsigned int m_paper_p_t;
80  unsigned int m_paper_m;
81  unsigned int m_paper_n_eta;
82 
92  std::vector<const S_V* > m_xs_asterisks_standard; // to be deleted on destructor
93 
100  std::vector<const P_V* > m_ts_asterisks_standard; // to be deleted on destructor
101 
106 #ifdef _GPMSA_CODE_TREATS_SIMULATION_VECTORS_IN_CHUNKS
107  std::vector<double> m_etaSeq_chunkMeans;
108  std::vector<double> m_etaSeq_chunkStds;
109 #else
112 #endif
119 
122  Q_M m_m_Imat;
123 
124  unsigned int m_paper_p_eta;
125  VectorSpace<Q_V,Q_M>* m_p_eta_space; // to be deleted on destructor
126  Q_M* m_Kmat_eta; // to be deleted on destructor
127  std::vector<Q_V* > m_kvec_is; // to be deleted on destructor
128  std::vector<Q_M* > m_Kmat_is; // to be deleted on destructor
129  Q_M* m_Kmat; // to be deleted on destructor
130 };
131 
132 } // End namespace QUESO
133 
134 #endif // UQ_SIMULATION_MODEL_H
const S_V & xSeq_original_ranges() const
unsigned int computePEta(const Q_V &svdS_vec)
SequenceOfVectors< Q_V, Q_M > m_etaSeq_original
const SimulationModelOptions & optionsObj() const
VectorSpace< Q_V, Q_M > m_m_space
const Q_M & Kmat_eta() const
SequenceOfVectors< S_V, S_M > m_xSeq_standard
VectorSpace< S_V, S_M > m_p_x_space
void print(std::ostream &os) const
const Q_V & etaSeq_original_mean() const
SequenceOfVectors< Q_V, Q_M > m_etaSeq_transformed
friend std::ostream & operator<<(std::ostream &os, const SimulationModel< S_V, S_M, P_V, P_M, Q_V, Q_M > &obj)
const BaseEnvironment & m_env
std::vector< const S_V * > m_xs_asterisks_standard
VectorSpace< Q_V, Q_M > m_eta_space
unsigned int numBasis() const
const Q_V & basisVec(unsigned int basisId) const
double etaSeq_allStd() const
const Q_M & Kmat() const
VectorSpace< Q_V, Q_M > m_n_eta_space
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
Definition: Environment.h:193
const std::vector< const P_V * > & ts_asterisks_standard() const
std::vector< Q_M * > m_Kmat_is
VectorSpace< Q_V, Q_M > * m_p_eta_space
const SmOptionsValues * m_optionsObj
std::vector< Q_V * > m_kvec_is
const Q_V & etaVec_transformed(const std::string &debugString) const
const std::vector< const S_V * > & xs_asterisks_standard() const
SequenceOfVectors< P_V, P_M > m_tSeq_standard
unsigned int m_paper_n_eta
SimulationModel(const char *prefix, const SmOptionsValues *alternativeOptionsValues, const SimulationStorage< S_V, S_M, P_V, P_M, Q_V, Q_M > &simulStorage)
SimulationModelOptions * m_simulationModelOptions
VectorSpace< P_V, P_M > m_p_t_space
const S_V & xSeq_original_mins() const
SequenceOfVectors< S_V, S_M > m_xSeq_original
std::vector< const P_V * > m_ts_asterisks_standard
SequenceOfVectors< P_V, P_M > m_tSeq_original

Generated on Thu Jun 11 2015 13:52:32 for queso-0.53.0 by  doxygen 1.8.5