queso-0.57.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
SampledVectorMdf.C
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-2017 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 #include <queso/SampledVectorMdf.h>
26 
27 namespace QUESO {
28 
29 // Default constructor -----------------------------
30 template<class V,class M>
32  const char* prefix,
33  const ArrayOfOneDGrids <V,M>& oneDGrids,
34  const ArrayOfOneDTables<V,M>& mdfValues)
35  :
36  BaseVectorMdf<V,M>(prefix,oneDGrids.rowSpace()),
37  m_oneDGrids(oneDGrids),
38  m_mdfValues(mdfValues)
39 {
40  if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 5)) {
41  *m_env.subDisplayFile() << "Entering SampledVectorMdf<V,M>::constructor()"
42  << ": prefix = " << m_prefix
43  << std::endl;
44  }
45 
46  if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 5)) {
47  *m_env.subDisplayFile() << "Leaving SampledVectorMdf<V,M>::constructor()"
48  << ": prefix = " << m_prefix
49  << std::endl;
50  }
51 }
52 // Destructor ---------------------------------------
53 template<class V,class M>
55 {
56 }
57 // Math methods--------------------------------------
58 template<class V, class M>
59 void
61  const V& paramValues,
62  V& mdfVec) const
63 {
64  queso_error_msg("incomplete code");
65  return;
66 }
67 // I/O methods---------------------------------------
68 template <class V, class M>
69 void
70 SampledVectorMdf<V,M>::print(std::ostream& os) const
71 {
72  // Print values *of* grid points
73  os << m_oneDGrids;
74 
75  // Print *mdf* values *at* grid points
76  os << m_mdfValues;
77 
78  return;
79 }
80 
81 } // End namespace QUESO
Class to accommodate arrays of one-dimensional grid.
std::string m_prefix
Definition: VectorMdf.h:83
const BaseEnvironment & m_env
Definition: VectorMdf.h:82
Class to accommodate arrays of one-dimensional tables.
A templated (base) class for handling MDFs of vector functions.
Definition: VectorMdf.h:52
~SampledVectorMdf()
Destructor.
void print(std::ostream &os) const
Prints the vector MDF (values of the grid points and of the MDF at such grid points).
unsigned int displayVerbosity() const
Definition: Environment.C:450
SampledVectorMdf(const char *prefix, const ArrayOfOneDGrids< V, M > &oneDGrids, const ArrayOfOneDTables< V, M > &mdfValues)
Default constructor.
void values(const V &paramValues, V &mdfVec) const
TODO: Returns the values of the vector MDF at each element of paramValues.
std::ofstream * subDisplayFile() const
Access function for m_subDisplayFile (displays file on stream).
Definition: Environment.C:320

Generated on Tue Jun 5 2018 19:48:56 for queso-0.57.1 by  doxygen 1.8.5