queso-0.57.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-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/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<>
43 {
44  return new TeuchosVector(m_env,*m_map);
45 }
46 
47 template<>
50 {
51  return new TeuchosVector(m_env,*m_map,value);
52 }
53 
54 template<>
57 {
58  return new TeuchosMatrix(m_env,*m_map,this->dimGlobal());
59 }
60 
61 template<>
64 {
65  return new TeuchosMatrix(m_env,*m_map,diagValue);
66 }
67 
68 } // End namespace QUESO
69 
70 #endif // ifdef QUESO_HAS_TRILINOS
Class for matrix operations using Teuchos (Trilinos).
Definition: TeuchosMatrix.h:53
A class for partitioning vectors and matrices.
Definition: Map.h:49
M * newDiagMatrix(const V &v) const
Creates a diagonal matrix with the elements and size of vector v.
Definition: VectorSpace.C:190
Map * newMap()
Creates a new map. See template specialization.
Class for vector operations using Teuchos (Trilinos).
Definition: TeuchosVector.h:55
V * newVector() const
Creates an empty vector of size given by Map&amp; map. See template specialization.
M * newMatrix() const
Creates an empty matrix of size given by Map&amp; map. See template specialization.

Generated on Sat Apr 22 2017 14:04:35 for queso-0.57.0 by  doxygen 1.8.5