queso-0.53.0
TeuchosVectorSpace.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/VectorSpace.h>
26 
27 #ifdef QUESO_HAS_TRILINOS
28 
29 #include <queso/TeuchosMatrix.h>
30 
31 namespace QUESO {
32 
33 template <>
34 Map*
36 {
37  return new Map(m_dimGlobal,0,m_env.selfComm());
38 }
39 
40 template<>
41 TeuchosVector*
43 {
44  return new TeuchosVector(m_env,*m_map);
45 }
46 
47 template<>
48 TeuchosVector*
50 {
51  return new TeuchosVector(m_env,*m_map,value);
52 }
53 
54 template<>
55 TeuchosMatrix*
57 {
58  return new TeuchosMatrix(m_env,*m_map,this->dimGlobal());
59 }
60 
61 template<>
62 TeuchosMatrix*
64 {
65  return new TeuchosMatrix(m_env,*m_map,diagValue);
66 }
67 
68 } // End namespace QUESO
69 
70 #endif // ifdef QUESO_HAS_TRILINOS
M * newMatrix() const
Creates an empty matrix of size given by Map&amp; map. See template specialization.
V * newVector() const
Creates an empty vector of size given by Map&amp; map. See template specialization.
M * newDiagMatrix(const V &v) const
Creates a diagonal matrix with the elements and size of vector v.
Definition: VectorSpace.C:205
Map * newMap()
Creates a new map. See template specialization.

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