queso-0.53.0
Matrix.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-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 #include <queso/Matrix.h>
26 #include <queso/Defines.h>
27 
28 namespace QUESO {
29 
30 // Shaped constructor --------------------------------
31 Matrix::Matrix(const BaseEnvironment& env, const Map& map)
32  :
33  m_env (env),
34  m_map (map),
35  m_printHorizontally(true),
36  m_inDebugMode (false)
37 {
38 }
39 
40 // Destructor ---------------------------------------
42 {
43 }
44 
45 // Environment and Map methods ----------------------
46 const BaseEnvironment&
47 Matrix::env() const
48 {
49  return m_env;
50 }
51 
52 // --------------------------------------------------
53 const Map&
54 Matrix::map() const
55 {
56  return m_map;
57  //return (const Map&) (m_mat->Map());
58 }
59 
60 // --------------------------------------------------
61 unsigned int
63 {
64  return m_map.Comm().NumProc();
65 }
66 
67 // I/O and Miscellaneous methods --------------------
68 void
70 {
71  m_printHorizontally = value;
72  return;
73 }
74 
75 // --------------------------------------------------
76 bool
78 {
79  return m_printHorizontally;
80 }
81 
82 // --------------------------------------------------
83 void
84 Matrix::setInDebugMode(bool value) const
85 {
86  m_inDebugMode = value;
87  return;
88 }
89 
90 // --------------------------------------------------
91 bool
93 {
94  return m_inDebugMode;
95 }
96 
97 // --------------------------------------------------
98 void
100 {
101  //m_env = src.env;
102  //m_map = src.map;
105 
106  return;
107 }
108 
109 } // End namespace QUESO
virtual void base_copy(const Matrix &src)
Copies base data from matrix src to this matrix.
Definition: Matrix.C:99
bool getInDebugMode() const
Checks if QUESO will run through this class in debug mode.
Definition: Matrix.C:92
void setInDebugMode(bool value) const
Determines whether QUESO will run through this class in debug mode.
Definition: Matrix.C:84
const MpiComm & Comm() const
Access function for MpiComm communicator.
Definition: Map.C:131
const BaseEnvironment & m_env
QUESO environment variable.
Definition: Matrix.h:116
Class for matrix operations (virtual).
Definition: Matrix.h:46
int NumProc() const
Returns total number of processes.
Definition: MpiComm.C:103
Matrix()
Default constructor.
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
Definition: Environment.h:193
bool m_printHorizontally
Flag for either or not print this matrix.
Definition: Matrix.h:131
const BaseEnvironment & env() const
Definition: Matrix.C:47
const Map & m_map
Mapping variable.
Definition: Matrix.h:126
unsigned int numOfProcsForStorage() const
Definition: Matrix.C:62
bool m_inDebugMode
Flag for either or not QUESO is in debug mode.
Definition: Matrix.h:134
const Map & map() const
Definition: Matrix.C:54
A class for partitioning vectors and matrices.
Definition: Map.h:49
virtual ~Matrix()
Virtual Destructor.
Definition: Matrix.C:41
bool getPrintHorizontally() const
Checks if matrix will be is printed horizontally.
Definition: Matrix.C:77
void setPrintHorizontally(bool value) const
Determines whether the matrix should be printed horizontally.
Definition: Matrix.C:69

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