trilinos_solver.h
Go to the documentation of this file.
1 //LIC// ====================================================================
2 //LIC// This file forms part of oomph-lib, the object-oriented,
3 //LIC// multi-physics finite-element library, available
4 //LIC// at http://www.oomph-lib.org.
5 //LIC//
6 //LIC// Version 1.0; svn revision $LastChangedRevision$
7 //LIC//
8 //LIC// $LastChangedDate$
9 //LIC//
10 //LIC// Copyright (C) 2006-2016 Matthias Heil and Andrew Hazel
11 //LIC//
12 //LIC// This library is free software; you can redistribute it and/or
13 //LIC// modify it under the terms of the GNU Lesser General Public
14 //LIC// License as published by the Free Software Foundation; either
15 //LIC// version 2.1 of the License, or (at your option) any later version.
16 //LIC//
17 //LIC// This library is distributed in the hope that it will be useful,
18 //LIC// but WITHOUT ANY WARRANTY; without even the implied warranty of
19 //LIC// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 //LIC// Lesser General Public License for more details.
21 //LIC//
22 //LIC// You should have received a copy of the GNU Lesser General Public
23 //LIC// License along with this library; if not, write to the Free Software
24 //LIC// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
25 //LIC// 02110-1301 USA.
26 //LIC//
27 //LIC// The authors may be contacted at oomph-lib@maths.man.ac.uk.
28 //LIC//
29 //LIC//====================================================================
30 #ifndef OOMPH_TRILINOS_SOLVER_HEADER
31 #define OOMPH_TRILINOS_SOLVER_HEADER
32 
35 
36 #include "AztecOO.h"
37 
38 namespace oomph
39 {
40 
41 //=============================================================================
42 /// \short An Epetra_Operator class for oomph-lib preconditioners.
43 /// A helper class for TrilinosOomphLibPreconditioner to allow an oomph-lib
44 /// preconditioner (i.e. one derived from Preconditioner) to be used with
45 /// a trilinos solver (TrilinosAztecOOSolver)
46 //=============================================================================
47  class OomphLibPreconditionerEpetraOperator : public Epetra_Operator
48  {
49  public:
50 
51  /// \short Constructor - takes the pointer to the oomph-lib
52  /// preconditioner and the distribution of the preconditioner
53  /// Note: the oomph-lib preconditioner must be setup.
54  /// If use_eptra_values is true then the epetra vector values is used
55  /// within the vectors passed to the oomph-lib
56  /// preconditioner. If this is true none of the vector rebuild methods can
57  /// be called.
59  bool use_epetra_values = false)
60 #ifdef OOMPH_HAS_MPI
62  (preconditioner_pt->distribution_pt()->communicator_pt()->mpi_comm()),
63  Use_epetra_values(use_epetra_values)
64 #else
65  : Operator_comm(), Use_epetra_values(use_epetra_values)
66 #endif
67  {
68  // set the ooomph-lib preconditioner
69  Oomph_lib_preconditioner_pt = preconditioner_pt;
70 
71  // set the preconditioner label
72  Preconditioner_label = "oomph-lib Preconditioner";
73 
74  // setup the Epetra_map
77  }
78 
79  /// \short Destructor - deletes the Epetra_map and My_global_rows vector
80  /// (if MPI)
82  {
83  delete Operator_map_pt;
84  Operator_map_pt = 0;
85  }
86 
87  /// Broken copy constructor
90 #ifdef OOMPH_HAS_MPI
92 #else
93  : Operator_comm()
94 #endif
95  {
96  BrokenCopy::broken_copy("OomphLibPreconditionerEpetraOperator");
97  }
98 
99  /// Broken assignment operator.
100  void operator=(const OomphLibPreconditionerEpetraOperator&)
101  {
102  BrokenCopy::broken_assign("OomphLibPreconditionerEpetraOperator");
103  }
104 
105  /// Broken Epetra_Operator member - SetUseTranspose
107  {
108  std::ostringstream error_message;
109  error_message << "SetUseTranspose() is a pure virtual Epetra_Operator "
110  << "member that is not required for a Preconditioner"
111  << std::endl;
112  throw OomphLibError(
113  error_message.str(),
114  OOMPH_CURRENT_FUNCTION,
115  OOMPH_EXCEPTION_LOCATION);
116  }
117 
118  /// Broken Epetra_Operator member - Apply
119  int Apply(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
120  {
121  std::ostringstream error_message;
122  error_message << "Apply() is a pure virtual Epetra_Operator member"
123  << "that is not required for a Preconditioner" << std::endl;
124  throw OomphLibError(
125  error_message.str(),
126  OOMPH_CURRENT_FUNCTION,
127  OOMPH_EXCEPTION_LOCATION);
128  }
129 
130 
131  /// \short applies the oomph-lib preconditioner. Converts the Epetra vector
132  /// applys the preconditioner by calling the oomph-lib preconditioner's
133  /// preconditioner_solve functionality.
134  /// NOTE : the oomph-lib preconditioner is setup prior to being passed to
135  /// this class
136  int ApplyInverse(const Epetra_MultiVector &epetra_r,
137  Epetra_MultiVector &epetra_z) const
138  {
139  // the oomph-lib vector for r
140  DoubleVector oomph_r;
141 
142  // copy the Epetra_MultiVector r into an oomph-lib vector
143  double** r_pt;
144  epetra_r.ExtractView(&r_pt);
145  if (Use_epetra_values)
146  {
147  oomph_r.set_external_values
149  }
150  else
151  {
153  unsigned nrow_local =
155  for (unsigned i = 0; i < nrow_local; i++)
156  {
157  oomph_r[i] = r_pt[0][i];
158  }
159  }
160 
161  // oomph-lib vector for Y
162  DoubleVector oomph_z;
163  if (Use_epetra_values)
164  {
165  double** z_pt;
166  epetra_z.ExtractView(&z_pt);
167  DoubleVector oomph_z;
168  oomph_z.set_external_values(
170  *z_pt,false);
171  }
172  else
173  {
175  }
176 
177  // apply the preconditioner
179 
180  // if not using external data copy the oomph-lib vector oomph_Y back to Y
181  if (!Use_epetra_values)
182  {
183  unsigned nrow_local =
185  for (unsigned i = 0; i < nrow_local; i++)
186  {
187  epetra_z.ReplaceMyValue(i,0,oomph_z[i]);
188  }
189  }
190 
191  // return 0 to indicate success
192  return 0;
193  }
194 
195  /// Broken Epetra_Operator member - NormInf
196  double NormInf() const
197  {
198  std::ostringstream error_message;
199  error_message << "NormInf() is a pure virtual Epetra_Operator member"
200  << "that is not required for a Preconditioner" << std::endl;
201  throw OomphLibError(
202  error_message.str(),
203  OOMPH_CURRENT_FUNCTION,
204  OOMPH_EXCEPTION_LOCATION);
205  }
206 
207  /// Epetra_Operator::Label - returns a string describing the operator
208  const char* Label() const
209  {
210  return Preconditioner_label.c_str();
211  }
212 
213  /// Broken Epetra_Operator member - UseTranspose
214  bool UseTranspose() const
215  {
216  std::ostringstream error_message;
217  error_message << "UseTranspose() is a pure virtual Epetra_Operator member "
218  << "that is not required for a Preconditioner" << std::endl;
219  throw OomphLibError(
220  error_message.str(),
221  OOMPH_CURRENT_FUNCTION,
222  OOMPH_EXCEPTION_LOCATION);
223  }
224 
225  /// Broken Epetra_Operator member - HasNormInf
226  bool HasNormInf() const
227  {
228  std::ostringstream error_message;
229  error_message << "HasNormInf() is a pure virtual Epetra_Operator member "
230  << "that is not required for a Preconditioner" << std::endl;
231  throw OomphLibError(
232  error_message.str(),
233  OOMPH_CURRENT_FUNCTION,
234  OOMPH_EXCEPTION_LOCATION);
235  }
236 
237  /// Returns the Epetra MPI_Comm object
238  const Epetra_Comm& Comm() const
239  {
240  return Operator_comm;
241  }
242 
243  /// Epetra_Operator member - OperatorDomainMap
244  const Epetra_Map& OperatorDomainMap() const
245  {
246  return *Operator_map_pt;
247  }
248 
249  /// Epetra_Operator member - OperatorRangeMap
250  const Epetra_Map& OperatorRangeMap() const
251  {
252  return *Operator_map_pt;
253  }
254 
255 
256  private:
257 
258  /// A pointer to the oomph-lib preconditioner
260 
261 #ifdef OOMPH_HAS_MPI
262  /// An Epetra MPI Comm object
263  Epetra_MpiComm Operator_comm;
264 #else
265  /// An Epetra Serial Comm object
266  Epetra_SerialComm Operator_comm;
267 #endif
268 
269  /// \short Use the epetra data within the vectors passed to the oomph-lib
270  /// preconditioner. If this is true none of the vector rebuild methods can
271  /// be called.
273 
274  /// \short A pointer to an Epetra_Map object - describes distribution of the
275  /// preconditioner, in this instance it is primarily used to prescribe the
276  /// distribution
277  /// of the residual and solution vector
278  Epetra_Map* Operator_map_pt;
279 
280  /// a label for the preconditioner ( for Epetra_Operator::Label() )
282  };
283 
284 
285 //=============================================================================
286 /// \short An interface to the Trilinos AztecOO classes allowing it to be used
287 /// as an Oomph-lib LinearSolver.
288 /// The AztecOO solver is a Krylov Subspace solver; the solver type (either CG,
289 /// GMRES or BiCGStab) can be set using solver_type().
290 /// This solver can be preconditioned with Trilinos Preconditioners (derived
291 /// from TrilinosPreconditionerBase) or Oomph-lib preconditioners (derived
292 /// from Preconditioner). Preconditioners are set using preconditioner_pt().
293 //=============================================================================
295 {
296  public:
297 
298  /// Constructor.
300  {
301 
302  // By default use workaround for creating of epetra matrix that
303  // respects aztecoo's ordering requirements
304  Use_aztecoo_workaround_for_epetra_matrix_setup=true;
305 
306  // set pointer to Null
307  AztecOO_solver_pt = 0;
308 
309  // initially assume not problem based solve
310  Using_problem_based_solve = false;
311 
312  // if a problem based solve is performed then it should generate a
313  // serial matrix
314  Assemble_serial_jacobian = false;
315 
316  // by default we do not use external values in the oomph-lib preconditioner
317  If_oomphlib_preconditioner_use_epetra_values = false;
318 
319  // null the pts
320  Problem_pt = 0;
321  Epetra_matrix_pt = 0;
322  Epetra_preconditioner_pt = 0;
323 
324  // set solver defaults
325  Solver_type = GMRES;
326  Tolerance = 10e-10;
327 
328  // don't delete the matrix
329  Delete_matrix = false;
330  }
331 
332  /// Destructor - delete the solver and the matrices
334  {
335  // delete
336  clean_up_memory();
337 
338  // if Problem_based solve then the oomph matrix was generated by this class
339  // and should be deleted
340  if (Using_problem_based_solve)
341  {
342  delete Oomph_matrix_pt;
343  Oomph_matrix_pt = 0;
344  }
345  }
346 
347  /// Broken copy constructor.
349  {
350  BrokenCopy::broken_copy("TrilinosAztecOOSolver");
351  }
352 
353  /// Broken assignment operator.
355  {
356  BrokenCopy::broken_assign("TrilinosAztecOOSolver");
357  }
358 
359  /// \short Enable workaround for creating of epetra matrix that respects
360  /// aztecoo's ordering requirements
362  {Use_aztecoo_workaround_for_epetra_matrix_setup=true;}
363 
364  /// \short Disable workaround for creating of epetra matrix that respects
365  /// aztecoo's ordering requirements
367  {Use_aztecoo_workaround_for_epetra_matrix_setup=false;}
368 
369  /// \short Is workaround for creating of epetra matrix that respects
370  /// aztecoo's ordering requirements enabled?
372  {return Use_aztecoo_workaround_for_epetra_matrix_setup;}
373 
374  /// Clean up method - deletes the solver, the matrices and the preconditioner
376  {
377  // delete the solver
378  delete AztecOO_solver_pt;
379  AztecOO_solver_pt = 0;
380 
381  // delete the Epetra_Operator preconditioner (only if it is a wrapper to an
382  // oomphlib preconditioner in which case only the wrapper is deleted and
383  // not the actual preconditioner).
384  // if the preconditioner is Trilinos preconditioner then the
385  // Epetra_Operator is deleted when that preconditioner is deleted
386  if (Epetra_preconditioner_pt != 0)
387  {
388  if (dynamic_cast<OomphLibPreconditionerEpetraOperator*>
389  (Epetra_preconditioner_pt) != 0)
390  {
391  delete Epetra_preconditioner_pt;
392  Epetra_preconditioner_pt = 0;
393  }
394  }
395 
396  // don't delete the preconditioner but call its clean up memory method
397  if (this->preconditioner_pt() != 0)
398  {
399  this->preconditioner_pt()->clean_up_memory();
400  }
401 
402 
403  // delete the matrices
404  // This must now happen after the preconditioner delete because the
405  // ML preconditioner (and maybe others) use the communicator from the
406  // matrix in the destructor
407  delete Epetra_matrix_pt;
408  Epetra_matrix_pt = 0;
409  }
410 
411  /// \short Function which uses problem_pt's get_jacobian(...) function to
412  /// generate a linear system which is then solved. This function deletes
413  /// any existing internal data and then generates a new AztecOO solver.
414  void solve(Problem* const &problem_pt,DoubleVector &solution);
415 
416  /// \short Function to solve the linear system defined by matrix_pt and rhs.
417  /// \b NOTE 1. The matrix has to be of type CRDoubleMatrix or
418  /// DistributedCRDoubleMatrix.
419  /// \b NOTE 2. This function will delete any existing internal data and
420  /// generate a new AztecOO solver.
421  void solve(DoubleMatrixBase* const &matrix_pt,
422  const DoubleVector &rhs,
423  DoubleVector &solution);
424 
425  /// \short Function to resolve a linear system using the existing solver
426  /// data, allowing a solve with a new right hand side vector. This
427  /// function must be used after a call to solve(...) with
428  /// enable_resolve set to true.
429  void resolve(const DoubleVector &rhs,
430  DoubleVector &solution);
431 
432  /// \short Disable resolve function (overloads the LinearSolver
433  /// disable_resolve function).
435  {
436  Enable_resolve=false;
437  clean_up_memory();
438  }
439 
440  /// \short Call if the matrix can be deleted
441  void enable_delete_matrix() {Delete_matrix=true;}
442 
443  ///\ short Call if the matrix can not be deleted (default)
444  void disable_delete_matrix() {Delete_matrix=false;}
445 
446  /// Access function to Max_iter
447  unsigned& max_iter() {return Max_iter;}
448 
449  /// Acess function to Iterations
450  unsigned iterations() const {return Iterations;}
451 
452  /// Access function to Tolerance
453  double& tolerance() {return Tolerance;}
454 
455  /// Access function to Solver_type
456  unsigned& solver_type() {return Solver_type;}
457 
458  /// Function to return Jacobian_setup_time;
459  double jacobian_setup_time() {return Jacobian_setup_time;}
460 
461  /// Function to return Linear_solver_solution_time
462  double linear_solver_solution_time() {return Linear_solver_solution_time;}
463 
464  /// \short Set the assembly of the serial jacobian
465  /// when performing a problem-based solve
466  void enable_assemble_serial_jacobian() {Assemble_serial_jacobian=true;}
467 
468  /// Unset the assembly of the serial jacobian
469  void disable_assemble_serial_jacobian() {Assemble_serial_jacobian=false;}
470 
471  /// if this solver is using an oomph-lib preconditioner then the vectors
472  /// passed to preconditioner_solve(...) should be using the values in the
473  /// epetra vector as external data. If the vectors are using external
474  /// data then rebuild(...) methods cannot be used be used in the
475  /// preconditioner.
476  //bool& if_oomphlib_preconditioner_use_epetra_values()
477  // {
478  // return If_oomphlib_preconditioner_use_epetra_values;
479  // }
480 
481  /// \short Enumerated list to define which AztecOO solver is used
485 
486  protected:
487 
488  /// \short Helper function performs the actual solve once the AztecOO
489  /// solver is set up
490  void solve_using_AztecOO(Epetra_Vector* &rhs_pt, Epetra_Vector* &soln_pt);
491 
492  /// \short Helper function for setting up the solver. Converts the oomph-lib
493  /// matrices to Epetra matrices, sets up the preconditioner, creates the
494  /// Trilinos Aztec00 solver and passes in the matrix, preconditioner and
495  /// parameters.
496  void solver_setup(DoubleMatrixBase* const& matrix_pt);
497 
498  /// \short Use workaround for creating of epetra matrix that respects
499  /// aztecoo's ordering requirements
501 
502  /// Stores number of iterations used
503  unsigned Iterations;
504 
505  /// Pointer to the AztecOO solver
507 
508  /// Stores set up time for Jacobian
510 
511  /// Stores time for the solution (excludes time to set up preconditioner)
513 
514  /// \short Trilinos copies matrix data from oomph-lib's own CRDoubleMatrix
515  /// or DistributedCRDoubleMatrix to Trilinos's Epetra format - the Trilinos
516  /// solver no longer requires the oomph-lib matrices and therefore they could
517  /// be deleted to save memory. This must be requested explicitly by setting
518  /// this flag to TRUE.
519  /// \b NOTE: The matrix is deleted after the preconditioner is setup.
521 
522  /// \short If true, when performing a problem based solve a serial matrix
523  /// will be requested from Problem::get_jacobian(...). Defaults to true
525 
526  /// \short Defines which solver is set up - available types are
527  /// defined in AztecOO_solver_types
528  unsigned Solver_type;
529 
530  /// \short Helper flag keeping track of whether we called the
531  /// linear algebra or problem-based solve function.
533 
534  /// \short A pointer for the linear system matrix in Epetra_CrsMatrix format
535  Epetra_CrsMatrix* Epetra_matrix_pt;
536 
537  /// \short A pointer to the Epetra_Operator for the preconditioner. This is
538  /// only used if the preconditioner NOT a Trilinos preconditioner.
539  Epetra_Operator* Epetra_preconditioner_pt;
540 
541  /// Oomph lib matrix pointer
543 
544  /// \short A pointer to the underlying problem (NULL if MATRIX based solve)
545  /// The problem_pt is stored here in a problem based solve for the
546  /// preconditioner
548 
549  /// if this solver is using an oomph-lib preconditioner then the vectors
550  /// passed to preconditioner_solve(...) should be using the values in the
551  /// epetra vector as external data. If the vectors are using external
552  /// data then rebuild(...) methods cannot be used.
554 };
555 
556 }
557 #endif
Epetra_Map * Operator_map_pt
A pointer to an Epetra_Map object - describes distribution of the preconditioner, in this instance it...
double & tolerance()
Access function to Tolerance.
void broken_copy(const std::string &class_name)
Issue error message and terminate execution.
const Epetra_Comm & Comm() const
Returns the Epetra MPI_Comm object.
virtual void preconditioner_solve(const DoubleVector &r, DoubleVector &z)=0
Apply the preconditioner. Pure virtual generic interface function. This method should apply the preco...
double Jacobian_setup_time
Stores set up time for Jacobian.
double Linear_solver_solution_time
Stores time for the solution (excludes time to set up preconditioner)
double NormInf() const
Broken Epetra_Operator member - NormInf.
void disable_aztecoo_workaround_for_epetra_matrix_setup()
Disable workaround for creating of epetra matrix that respects aztecoo&#39;s ordering requirements...
double jacobian_setup_time()
Function to return Jacobian_setup_time;.
bool Delete_matrix
Trilinos copies matrix data from oomph-lib&#39;s own CRDoubleMatrix or DistributedCRDoubleMatrix to Trili...
Epetra_Operator * Epetra_preconditioner_pt
A pointer to the Epetra_Operator for the preconditioner. This is only used if the preconditioner NOT ...
cstr elem_len * i
Definition: cfortran.h:607
unsigned Iterations
Stores number of iterations used.
Epetra_SerialComm Operator_comm
An Epetra Serial Comm object.
const char * Label() const
Epetra_Operator::Label - returns a string describing the operator.
OomphLibPreconditionerEpetraOperator(Preconditioner *preconditioner_pt, bool use_epetra_values=false)
Constructor - takes the pointer to the oomph-lib preconditioner and the distribution of the precondit...
The Problem class.
Definition: problem.h:152
OomphCommunicator * communicator_pt() const
const access to the communicator pointer
void enable_aztecoo_workaround_for_epetra_matrix_setup()
Enable workaround for creating of epetra matrix that respects aztecoo&#39;s ordering requirements.
static OomphCommunicator * communicator_pt()
access to the global oomph-lib communicator
void disable_assemble_serial_jacobian()
Unset the assembly of the serial jacobian.
Epetra_CrsMatrix * Epetra_matrix_pt
A pointer for the linear system matrix in Epetra_CrsMatrix format.
int ApplyInverse(const Epetra_MultiVector &epetra_r, Epetra_MultiVector &epetra_z) const
applies the oomph-lib preconditioner. Converts the Epetra vector applys the preconditioner by calling...
An interface to the Trilinos AztecOO classes allowing it to be used as an Oomph-lib LinearSolver...
e
Definition: cfortran.h:575
The GMRES method.
An Epetra_Operator class for oomph-lib preconditioners. A helper class for TrilinosOomphLibPreconditi...
AztecOO_solver_types
Enumerated list to define which AztecOO solver is used.
The conjugate gradient method.
void clean_up_memory()
Clean up method - deletes the solver, the matrices and the preconditioner.
unsigned Solver_type
Defines which solver is set up - available types are defined in AztecOO_solver_types.
TrilinosAztecOOSolver(const TrilinosAztecOOSolver &)
Broken copy constructor.
bool HasNormInf() const
Broken Epetra_Operator member - HasNormInf.
void build(const DoubleVector &old_vector)
Just copys the argument DoubleVector.
~TrilinosAztecOOSolver()
Destructor - delete the solver and the matrices.
void disable_delete_matrix()
\ short Call if the matrix can not be deleted (default)
bool UseTranspose() const
Broken Epetra_Operator member - UseTranspose.
unsigned & max_iter()
Access function to Max_iter.
void enable_assemble_serial_jacobian()
Set the assembly of the serial jacobian when performing a problem-based solve.
unsigned & solver_type()
Access function to Solver_type.
const Epetra_Map & OperatorRangeMap() const
Epetra_Operator member - OperatorRangeMap.
std::string Preconditioner_label
a label for the preconditioner ( for Epetra_Operator::Label() )
void operator=(const TrilinosAztecOOSolver &)
Broken assignment operator.
unsigned nrow_local() const
access function for the num of local rows on this processor. If no MPI then Nrow is returned...
unsigned Max_iter
Max. # of Newton iterations.
bool Use_aztecoo_workaround_for_epetra_matrix_setup
Use workaround for creating of epetra matrix that respects aztecoo&#39;s ordering requirements.
DoubleMatrixBase * Oomph_matrix_pt
Oomph lib matrix pointer.
bool is_aztecoo_workaround_for_epetra_matrix_setup_enabled()
Is workaround for creating of epetra matrix that respects aztecoo&#39;s ordering requirements enabled...
Epetra_MpiComm Operator_comm
An Epetra MPI Comm object.
bool Using_problem_based_solve
Helper flag keeping track of whether we called the linear algebra or problem-based solve function...
Preconditioner base class. Gives an interface to call all other preconditioners through and stores th...
Preconditioner * Oomph_lib_preconditioner_pt
A pointer to the oomph-lib preconditioner.
void broken_assign(const std::string &class_name)
Issue error message and terminate execution.
void set_external_values(const LinearAlgebraDistribution *const &dist_pt, double *external_values, bool delete_external_values)
Allows are external data to be used by this vector. WARNING: The size of the external data must corre...
Epetra_Map * create_epetra_map(const LinearAlgebraDistribution *const dist)
create an Epetra_Map corresponding to the LinearAlgebraDistribution
AztecOO * AztecOO_solver_pt
Pointer to the AztecOO solver.
int SetUseTranspose(bool UseTranspose)
Broken Epetra_Operator member - SetUseTranspose.
std::string string(const unsigned &i)
Return the i-th string or "" if the relevant string hasn&#39;t been defined.
Problem * Problem_pt
A pointer to the underlying problem (NULL if MATRIX based solve) The problem_pt is stored here in a p...
unsigned iterations() const
Acess function to Iterations.
void disable_resolve()
Disable resolve function (overloads the LinearSolver disable_resolve function).
A vector in the mathematical sense, initially developed for linear algebra type applications. If MPI then this vector can be distributed - its distribution is described by the LinearAlgebraDistribution object at Distribution_pt. Data is stored in a C-style pointer vector (double*)
Definition: double_vector.h:61
bool Assemble_serial_jacobian
If true, when performing a problem based solve a serial matrix will be requested from Problem::get_ja...
const Epetra_Map & OperatorDomainMap() const
Epetra_Operator member - OperatorDomainMap.
bool Use_epetra_values
Use the epetra data within the vectors passed to the oomph-lib preconditioner. If this is true none o...
virtual void clean_up_memory()
Clean up memory (empty). Generic interface function.
int Apply(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Broken Epetra_Operator member - Apply.
Abstract base class for matrices of doubles – adds abstract interfaces for solving, LU decomposition and multiplication by vectors.
Definition: matrices.h:275
void enable_delete_matrix()
Call if the matrix can be deleted.
LinearAlgebraDistribution * distribution_pt() const
access to the LinearAlgebraDistribution
TrilinosAztecOOSolver()
Constructor.
Base class for all linear iterative solvers. This merely defines standard interfaces for linear itera...
double linear_solver_solution_time()
Function to return Linear_solver_solution_time.