queso-0.57.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
VectorSet.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/Environment.h>
26 #include <queso/Defines.h>
27 #include <queso/VectorSet.h>
28 #include <queso/GslVector.h>
29 #include <queso/GslMatrix.h>
30 #include <queso/TeuchosVector.h>
31 #include <queso/TeuchosMatrix.h>
32 
33 namespace QUESO {
34 
35 // Default constructor
36 template <class V, class M>
38  : m_env(*(new EmptyEnvironment()))
39 {
40 }
41 
42 // Shaped constructor
43 template <class V, class M>
44 VectorSet<V,M>::VectorSet(const BaseEnvironment& env, const char * prefix,
45  double volume)
46  : m_env(env),
47  m_prefix(prefix),
48  m_volume(volume)
49 {
50  if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 54)) {
51  *m_env.subDisplayFile() << "Entering VectorSet<V,M>::constructor()"
52  << std::endl;
53  }
54 
55  if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 54)) {
56  *m_env.subDisplayFile() << "Leaving VectorSet<V,M>::constructor()"
57  << std::endl;
58  }
59 }
60 
61 // Destructor
62 template <class V, class M>
64 {
65  if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 54)) {
66  *m_env.subDisplayFile() << "Entering VectorSet<V,M>::destructor()"
67  << std::endl;
68  }
69 
70  if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 54)) {
71  *m_env.subDisplayFile() << "Leaving VectorSet<V,M>::destructor()"
72  << std::endl;
73  }
74 }
75 
76 // Environment methods
77 template <class V, class M>
79 {
80  return m_env;
81 }
82 
83 template <class V, class M>
84 const std::string& VectorSet<V,M>::prefix() const
85 {
86  return m_prefix;
87 }
88 
89 // Mathematical methods
90 template <class V, class M>
91 double VectorSet<V,M>::volume() const
92 {
93  return m_volume;
94 }
95 
96 // I/O methods
97 template <class V, class M>
98 void VectorSet<V,M>::print(std::ostream& os) const
99 {
100  os << "In VectorSet<V,M>::print()"
101  << ": nothing to be printed" << std::endl;
102  return;
103 }
104 
105 } // End namespace QUESO
106 
108 #ifdef QUESO_HAS_TRILINOS
110 #endif
VectorSet()
Default Constructor.
Definition: VectorSet.C:37
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
Definition: Environment.h:198
const std::string & prefix() const
Access to private attribute m_prefix.
Definition: VectorSet.C:84
This class sets up the environment underlying the use of the QUESO library by an executable.
Definition: Environment.h:484
double volume() const
Set volume; access to private attribute m_volume.
Definition: VectorSet.C:91
const BaseEnvironment & m_env
Definition: VectorSet.h:104
virtual ~VectorSet()
Virtual destructor.
Definition: VectorSet.C:63
virtual void print(std::ostream &os) const
Prints nothing.
Definition: VectorSet.C:98
unsigned int displayVerbosity() const
Definition: Environment.C:450
std::ofstream * subDisplayFile() const
Access function for m_subDisplayFile (displays file on stream).
Definition: Environment.C:320
const BaseEnvironment & env() const
Environment. Access to private attribute m_env.
Definition: VectorSet.C:78

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