FEI Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
fei_LinProbMgr_EpetraBasic.hpp
Go to the documentation of this file.
1 /*
2 // @HEADER
3 // ************************************************************************
4 // FEI: Finite Element Interface to Linear Solvers
5 // Copyright (2005) Sandia Corporation.
6 //
7 // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the
8 // U.S. Government retains certain rights in this software.
9 //
10 // Redistribution and use in source and binary forms, with or without
11 // modification, are permitted provided that the following conditions are
12 // met:
13 //
14 // 1. Redistributions of source code must retain the above copyright
15 // notice, this list of conditions and the following disclaimer.
16 //
17 // 2. Redistributions in binary form must reproduce the above copyright
18 // notice, this list of conditions and the following disclaimer in the
19 // documentation and/or other materials provided with the distribution.
20 //
21 // 3. Neither the name of the Corporation nor the names of the
22 // contributors may be used to endorse or promote products derived from
23 // this software without specific prior written permission.
24 //
25 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
26 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
29 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 //
37 // Questions? Contact Alan Williams (william@sandia.gov)
38 //
39 // ************************************************************************
40 // @HEADER
41 */
42 
43 
44 #ifndef _fei_LinProbMgr_EpetraBasic_hpp_
45 #define _fei_LinProbMgr_EpetraBasic_hpp_
46 
48 
49 #include <fei_Include_Trilinos.hpp>
50 #include <fei_SharedPtr.hpp>
51 
52 #include <vector>
53 
55  public:
57  virtual ~LinProbMgr_EpetraBasic();
58 
63  void setRowDistribution(const std::vector<int>& ownedGlobalRows);
64 
69 
72  void setMatrixValues(double scalar);
73 
81  void setVectorValues(double scalar, bool soln_vector);
82 
86  int getLocalNumRows();
87 
91  int getRowLength(int row);
92 
105  int copyOutMatrixRow(int row, int len,
106  double* coefs, int* indices);
107 
115  int insertMatrixValues(int numRows, const int* rows,
116  int numCols, const int* cols,
117  const double* const* values,
118  bool sum_into);
119 
142  int insertVectorValues(int numValues,
143  const int* globalIndices,
144  const double* values,
145  bool sum_into,
146  bool soln_vector,
147  int vectorIndex=0);
148 
152  int copyOutVectorValues(int numValues,
153  const int* globalIndices,
154  double* values,
155  bool soln_vector,
156  int vectorIndex=0);
157 
163  double* getLocalVectorValuesPtr(bool soln_vector,
164  int vectorIndex=0);
165 
171  int globalAssemble();
172 
176 
180 
184 
185  private:
187  std::vector<int> ownedRows_;
196 };
197 
198 #endif // _LinProbMgr_EpetraBasic_hpp_
199 
void setMatrixGraph(fei::SharedPtr< fei::SparseRowGraph > matrixGraph)
void setRowDistribution(const std::vector< int > &ownedGlobalRows)
LinProbMgr_EpetraBasic(MPI_Comm comm)
fei::SharedPtr< Epetra_MultiVector > x_
virtual ~LinProbMgr_EpetraBasic()
fei::SharedPtr< Epetra_CrsMatrix > get_A_matrix()
double * getLocalVectorValuesPtr(bool soln_vector, int vectorIndex=0)
fei::SharedPtr< fei::SparseRowGraph > fei_srgraph_
fei::SharedPtr< Epetra_Comm > epetra_comm_
#define MPI_Comm
Definition: fei_mpi.h:56
int copyOutVectorValues(int numValues, const int *globalIndices, double *values, bool soln_vector, int vectorIndex=0)
fei::SharedPtr< Epetra_Map > epetra_rowmap_
void setMatrixValues(double scalar)
int insertMatrixValues(int numRows, const int *rows, int numCols, const int *cols, const double *const *values, bool sum_into)
fei::SharedPtr< Epetra_MultiVector > get_rhs_vector()
int getRowLength(int row)
fei::SharedPtr< Epetra_CrsMatrix > A_
int copyOutMatrixRow(int row, int len, double *coefs, int *indices)
fei::SharedPtr< Epetra_MultiVector > b_
fei::SharedPtr< Epetra_CrsGraph > crsgraph_
int insertVectorValues(int numValues, const int *globalIndices, const double *values, bool sum_into, bool soln_vector, int vectorIndex=0)
void setVectorValues(double scalar, bool soln_vector)
fei::SharedPtr< Epetra_MultiVector > get_solution_vector()