Interface to the Trilinos package Amesos.
More...
#include "ml_include.h"
|
| int | ML_Amesos_Gen (ML *ml, int curr_level, int choice, int MaxProcs, double AddToDiag, Amesos_Handle_Type *Amesos_Handle) |
| |
| int | ML_Amesos_Solve (void *Amesos_Handle, double x[], double rhs[]) |
| |
| void | ML_Amesos_Destroy (void *Amesos_Handle) |
| |
|
int | ML_isKLUAvailable () |
| |
Interface to the Trilinos package Amesos.
The ML/Amesos interface can be used to solve the coarse problem with some of the sparse direct solvers supported by Amesos:
- KLU, a simple serial sparse solver, distributed with Amesos;
- UMFPACK, a serial sparse solver;
- SuperLU and SuperLU_DIST
- MUMPS, a multifrontal sparse direct solver.
For serial solvers, Amesos will take care to redistribute all required data to process 0, solve the linear system on process 0, then broadcast the solution back to all the processes.
For parallel solvers (like SuperLU_DIST and MUMPS), the user can tell Amesos how many processes should be used for the coarse solution. This number can be:
- a positive number, that defines how many processes will be used (if available);
- the number -1, meaning that Amesos will estimate the "best" number of processes;
- the number -2, meaning that Amesos will use the square root of the available processes.
In its current implementation, ML/Amesos converts the ML_Operator for the coarse level to and Epetra matrix ("heavy conversion").
- Note
- If
ML_AMESOS_DEBUG is defined, some checks are performed to verify that the linear system has been solved up to machine precision.
-
We experienced some problems with
out on TFLOPS. These problems were solved by replacing cout with puts().
- Date
- Last update to Doxygen: 21-Jun-05
◆ ML_Amesos_Destroy()
| void ML_Amesos_Destroy |
( |
void * |
Amesos_Handle | ) |
|
Destroy the Amesos object. Prints out some timing.
◆ ML_Amesos_Gen()
| int ML_Amesos_Gen |
( |
ML * |
ml, |
|
|
int |
curr_level, |
|
|
int |
choice, |
|
|
int |
MaxProcs, |
|
|
double |
AddToDiag, |
|
|
Amesos_Handle_Type * |
Amesos_Handle |
|
) |
| |
Generates the direct solver using Amesos.
This function performs several operations:
- wrap the ML_Operator for the given level to an Epetra_CrsMatrix
- creates the Amesos object;
- compute the symbolic and numeric factorzation.
- Parameters
-
| ml | (InOut) : ML_Structure |
| curr_level | (In) : specifies the level for which we have to define the direct solver; |
| choice | (In) : integer variable, that can be ML_AMESOS_KLU, ML_AMESOS_UMFPACK, ML_AMESOS_SUPERLUDIST, ML_AMESOS_MUMPS, ML_AMESOS_SCALAPACK; |
| MaxProcs | (In) : integer defining the maximum number of processes to use in the coarse solution (only for some of the supported Amesos solvers); |
| Amesos | (In) : add the specified value to the diagonal elements of the matrix. |
| Amesos_Handle | (Out) : it will contain a pointer to the Amesos object (casted to void *). |
If the required solver is not available, ML_Amesos_Gen will create a KLU solver. KLU is distributed with Amesos, and is enabled by default.
◆ ML_Amesos_Solve()
| int ML_Amesos_Solve |
( |
void * |
Amesos_Handle, |
|
|
double |
x[], |
|
|
double |
rhs[] |
|
) |
| |
Solves using Amesos, and the factorization computed by ML_Amesos_Gen.
int VAVdone
Definition: ml_operator.h:88
int ML_Epetra_PtAP(const Epetra_CrsMatrix &A, const Epetra_CrsMatrix &P, Epetra_CrsMatrix *&Result, bool verbose=false)
Does an P^TAP for Epetra_CrsMatrices using ML's kernels.
int SetOwnership(bool ownership)
Sets ownership.
Definition: ml_MultiLevelPreconditioner.h:497
Operator GetShiftedLaplacian1D(const int NX, const double Factor=0.99)
Creates a 1D shifted Laplacian.
virtual const Epetra_Comm & Comm() const=0
Class to track time spent in an object.
Definition: MLAPI_TimeObject.h:25
Black-box multilevel adaptive smoothed aggregation preconditioner.
Definition: MLAPI_MultiLevelAdaptiveSA.h:91
int NumMyRowEntries(int MyRow, int &NumEntries) const
Teuchos::ParameterList & GetList()
Gets a reference to the internally stored parameters' list.
Definition: ml_MultiLevelPreconditioner.h:419
void * aggr_viz_and_stats
Definition: ml_aggregate.h:84
void Apply_BCsToMatrixColumns(const int *dirichletRows, int numBCRows, const Epetra_CrsMatrix &Matrix)
Applies Dirichlet conditions to columns that rows already have.
Operator(const Operator &RHS)
Copy constructor.
Definition: MLAPI_Operator.h:72
void Init()
Initialize the MLAPI workspace.
InverseOperator & operator=(const InverseOperator &RHS)
Operator =.
virtual const Epetra_Comm & Comm() const
Returns a pointer to the Epetra_Comm communicator associated with this operator.
Definition: ml_RefMaxwell_11_Operator.h:121
bool Filled() const
If FillComplete() has been called, this query returns true, otherwise it returns false.
Definition: ml_Epetra_wrap_CrsGraph_as_RowMatrix.H:213
int PrintStencil2D(const int nx, const int ny, int NodeID=-1, const int EquationID=0)
Prints the computational stencil for the specified row and equation (for 2D Cartesian grids only)
Definition: ml_MultiLevelPreconditioner.cpp:3982
int NumGlobalRows() const
virtual ~EpetraBaseOperator()
Destructor.
Definition: MLAPI_EpetraBaseOperator.h:54
int GetMaxLevels() const
Returns the actual number of levels.
Definition: MLAPI_MultiLevelAdaptiveSA.h:192
void SetNullSpace(MultiVector &NullSpace)
Sets the null space multi-vector to NullSpace.
Definition: MLAPI_MultiLevelAdaptiveSA.h:210
Epetra_IntVector * FindLocalDirichletColumnsFromRows(const int *dirichletRows, int numBCRows, const Epetra_CrsMatrix &Matrix)
Finds Dirichlet the local Dirichlet columns, given the local Dirichlet rows.
Operator GetJacobiIterationOperator(const Operator &Amat, double Damping)
Returns an operator defined as (I - Damping A).
int NumMyIndices(int Row) const
int NumGlobalCols() const
const Epetra_BlockMap & ColMap() const
int ExtractMyRowCopy(int MyRow, int Length, int &NumEntries, double *Values, int *Indices) const
Returns a copy of the specified local row in user-provided arrays.
Definition: ml_Epetra_wrap_CrsGraph_as_RowMatrix.H:135
int GetNumMyRows() const
Returns the number of local rows.
Definition: MLAPI_Operator.h:212
void Print(int level=-2)
Print the individual operators in the multigrid hierarchy.
Definition: ml_MultiLevelPreconditioner.cpp:2722
Teuchos::RefCountPtr< DoubleVector > & GetRCPValues(const int v)
Returns a pointer to the double array (non-const version)
Definition: MLAPI_MultiVector.h:431
void ResetStartTime(void)
BaseObject()
Constructor with empty label.
Definition: MLAPI_BaseObject.h:39
MultiVector(const Space &VectorSpace, double **Values, const int NumVectors=1)
Constructor with a given Space, and user-provided array of values.
Definition: MLAPI_MultiVector.h:136
int Apply(const MultiVector &x, MultiVector &y) const
Applies this object to vector lhs, returns values in rhs.
int GetGlobalAggregates(Epetra_RowMatrix &A, Teuchos::ParameterList &List, double *thisns, Epetra_IntVector &aggrinfo)
Call ML aggregation on A according to parameters supplied in List. Return aggregates in aggrinfo.
int RightScale(const Epetra_Vector &x)
int SetDefaultsMaxwell(Teuchos::ParameterList &List, Teuchos::RCP< std::vector< int > > &options, Teuchos::RCP< std::vector< double > > ¶ms, bool Overwrite=true)
Sets default parameters for the eddy current equations equations.
int NumMyElements() const
Basic stream to save in a MATLAB-compatible file MLAPI objects.
int SetDefaults(std::string ProblemType, Teuchos::ParameterList &List, int *options=0, double *params=0, const bool OverWrite=true)
Sets default parameters for aggregation-based preconditioners.
const Space GetDomainSpace() const
Returns a reference to the internally stored domain space.
Definition: MLAPI_LoadBalanceOperator.h:227
int NumGlobalRows() const
Returns the global number of rows in the matrix.
Definition: ml_MultiLevelPreconditioner.h:537
virtual int ApplyInverse(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Applies the preconditioner to vector X, returns the result in Y.
Definition: ml_Ifpack_ML.h:122
void Compute()
Computes the hierarchy.
Definition: MLAPI_MultiLevelSA.h:134
Operator GetPtent1D(const MultiVector &D, const int offset=0)
Returns a newly created operator, containing D on the diagonal.
virtual const Epetra_Map & OperatorDomainMap() const
Returns the Epetra_Map object associated with the domain of this operator.
Definition: ml_RefMaxwell_11_Operator.h:124
int smooth_existing_P_tentative
Definition: ml_aggregate.h:79
void Reshape()
Resets this object.
Definition: MLAPI_MultiVector.h:199
int Apply(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Apply the inverse of the preconditioner to an Epetra_MultiVector (NOT AVAILABLE)
Definition: ml_EdgeMatrixFreePreconditioner.h:100
Function to set default values in a parameter list.
virtual long long NumGlobalDiagonals64() const
Returns the number of global nonzero diagonal entries, based on global row/column index comparisons.
const Space GetOperatorDomainSpace() const
Returns a copy of the internally stored domain space.
Definition: MLAPI_MultiLevelAdaptiveSA.h:120
virtual int NumProc() const=0
const Operator & A(const int i) const
Returns a reference to the operator of level i.
Definition: MLAPI_MultiLevelSA.h:101
int Apply(const MultiVector &X, MultiVector &Y) const
Applies this operator to LHS, returns the result in RHS.
Definition: MLAPI_Operator.h:294
virtual int RightScale(const Epetra_Vector &x)
Scales the Epetra_RowMatrix on the right with a Epetra_Vector x.
Definition: ml_RowMatrix.h:211
~TimeObject()
Destructor.
Definition: MLAPI_TimeObject.h:38
bool LowerTriangular() const
void ML_Amesos_Destroy(void *Amesos_Handle)
int * pivots
Definition: ml_operator.h:87
Teuchos::RefCountPtr< ML_Epetra::MultiLevelPreconditioner > & GetRCPMLPrec()
Returns a pointer to the internally stored IFPACK preconditioner.
virtual const Epetra_RowMatrix & Matrix() const
Returns a pointer to the matrix to be preconditioned.
Definition: ml_Ifpack_ML.h:130
double threshold
Definition: ml_aggregate.h:52
const Epetra_Map & RowMatrixColMap() const
Returns the Epetra_Map object associated with the columns of this matrix.
Definition: ml_Epetra_wrap_CrsGraph_as_RowMatrix.H:271
Utilities for MultiVector's.
virtual bool HasNormInf() const
NOT IMPLEMENTED.
Definition: MLAPI_EpetraBaseOperator.h:123
virtual int NumCompute() const
Returns the number of calls to Compute().
Definition: ml_Ifpack_ML.h:142
Operator ReadMatrix(const char *FileName)
Reads a matrix in MATLAB format.
int Apply(const MultiVector &b_f, MultiVector &x_f) const
Applies the preconditioner to b_f, returns the result in x_f.
Definition: MLAPI_MultiLevelAdaptiveSA.h:758
const Epetra_Map & OperatorRangeMap() const
Returns the Epetra_Map object associated with the range of this operator.
Definition: ml_MultiLevelOperator.h:174
LoadBalanceOperator(const LoadBalanceOperator &RHS)
Copy constructor.
Definition: MLAPI_LoadBalanceOperator.h:79
virtual const Space GetOperatorDomainSpace() const =0
Returns a copy of the domain space of this object.
void PrintSparsity(const Operator &A, int NumPDEEquations=1)
Prints on file the sparsity structure of input operator.
MultiVector & operator=(double rhs)
Sets all elements of this vector to rhs.
Definition: MLAPI_MultiVector.h:292
double GetComplexity()
Returns the multigrid preconditioner operator complexity.
Definition: MLAPI_MultiLevelAdaptiveSA.h:287
const Space GetVectorSpace() const
Returns the vector space of the underlying object.
int NumGlobalRows() const
const Epetra_Map & OperatorRangeMap() const
Returns the Epetra_Map object associated with the range of this operator.
Definition: ml_RowMatrix.h:316
ML_Operator * GetData() const
Returns a pointer to the internally stored ML_Operator.
Definition: MLAPI_Operator_Box.h:50
void Compute()
Creates an hierarchy using the provided or default null space.
Definition: MLAPI_MultiLevelAdaptiveSA.h:304
virtual int NumGlobalRows() const=0
int Restriction_smoothagg_transpose
Definition: ml_aggregate.h:81
Operator()
Default constructor.
Definition: MLAPI_Operator.h:50
Operator GetShiftedLaplacian2D(const int NX, const int NY, const double Factor=0.99, const bool RandomScale=false)
Creates a 2D shifted Laplacian.
bool UseTranspose() const
Returns the current UseTranspose setting.
Definition: ml_RefMaxwell.h:153
const Space GetVectorSpace() const
Returns the vector space of the underlying object.
int SetOwnership(bool ownership)
Sets ownership.
Definition: ml_RowMatrix.h:298
int ML_Epetra_matvec(ML_Operator *data, int in, double *p, int out, double *ap)
Matrix-vector function for Epetra matrices.
int ML_Epetra_RAP(const Epetra_CrsMatrix &A, const Epetra_CrsMatrix &P, const Epetra_CrsMatrix &R, Epetra_CrsMatrix *&Result, bool verbose)
Does an RAP for Epetra_CrsMatrices using ML's kernels.
virtual double NormInf() const
NOT IMPLEMENTED.
Definition: MLAPI_EpetraBaseOperator.h:105
int Apply(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Returns the result of a Operator applied to a Epetra_MultiVector X in Y.
Definition: ml_MultiLevelOperator.h:121
virtual double Condest() const
Returns the computed condition number estimate, or -1.0 if not computed.
Definition: ml_Ifpack_ML.h:115
void Remove_Zeroed_Rows(const Epetra_CrsMatrix &Matrix, double tol=0.0)
Drops a 1 on the diagonal of zero'd our rows.
std::ostream & Print(std::ostream &os, const bool verbose=true) const
Prints basic information about this object.
Definition: MLAPI_SerialMatrix.h:400
const Epetra_Comm & Comm() const
Returns a pointer to the Epetra_Comm communicator associated with this operator.
Definition: ml_RefMaxwell.h:159
int PutScalar(double ScalarConstant)
void Reshape()
Resets this object.
bool UseTranspose() const
Returns true if the transpose is used.
Definition: ml_Ifpack_ML.h:223
int NumMyDiagonals() const
virtual double NormOne() const
Returns the one norm of the global matrix.
Definition: ml_RowMatrix.h:236
int ReplaceMyValues(int MyRow, int NumEntries, const double *Values, const int *Indices)
virtual long long NumGlobalRows64() const
Returns the number of global matrix rows.
int NumGlobalCols() const
const Operator & A(const int i) const
Returns a reference to the operator of level i.
Definition: MLAPI_MultiLevelAdaptiveSA.h:162
int ApplyInverse(const Epetra_MultiVector &B, Epetra_MultiVector &X) const
Apply the preconditioner to RHS B to get result X (X is also initial guess)
const Space GetDomainSpace() const
Returns a reference to the internally stored domain space.
Definition: MLAPI_Operator.h:190
double operator_complexity
Definition: ml_aggregate.h:73
int ExtractView(double **A, int *MyLDA) const
const Teuchos::RefCountPtr< Epetra_RowMatrix > & GetRCPRowMatrix() const
Returns the RefCountPtr of RowMatrix_.
Definition: MLAPI_Operator.h:265
const Epetra_Map & OperatorDomainMap() const
returns ref to the OperatorDomainMap associated with this class
Definition: ml_Epetra_wrap_CrsGraph_as_RowMatrix.H:323
int GetGRID(const int LRID) const
Returns the global ID of local row ID LRID.
Definition: MLAPI_Operator.h:271
virtual long long NumGlobalNonzeros64() const
Returns the number of nonzero entries in the global matrix.
const Operator & R(const int i) const
Returns a reference to the restriction operator of level i.
Definition: MLAPI_MultiLevelAdaptiveSA.h:150
double NormInf() const
not implemented, method will throw error and terminate execution.
Definition: ml_Epetra_wrap_CrsGraph_as_RowMatrix.H:219
Definition: ml_operator.h:184
int Print() const
Print the global matrix. This uses a potentially artificial numbering.
const Space GetRangeSpace() const
Returns a reference to the internally stored range space.
Definition: MLAPI_Operator.h:195
Definition: MLAPI_Error.h:13
Definition: ml_operator.h:51
MultiVector & operator=(const MultiVector &rhs)
Copies the rhs into this object.
Definition: MLAPI_MultiVector.h:306
int ordering
Definition: ml_aggregate.h:49
Space()
Default constructor, defines an empty space.
Definition: MLAPI_Space.h:47
int ML_Operator_WrapEpetraCrsMatrix(Epetra_CrsMatrix *A, ML_Operator *newMatrix, bool verbose=false)
Wraps an Epetra_CrsMatrix into an ML_Operator, for the given level.
MLAPI interface to the Galeri package.
Definition: ml_aggregate.h:169
const Space GetOperatorDomainSpace() const
Returns a reference to the domain space of this object.
Specifies the number and distribution among processes of elements.
Definition: MLAPI_Space.h:40
int NumProc() const
Returns the number of processors in the communicator.
Definition: ml_MatrixFreePreconditioner.h:169
Ifpack_ML(Epetra_RowMatrix *A)
Constructor.
Definition: ml_Ifpack_ML.h:47
const Epetra_RowMatrix & C() const
Returns the coarser-level operator as an Epetra_RowMatrix.
Definition: ml_MatrixFreePreconditioner.h:134
Base class for all operator overloading related operations.
virtual int ExtractDiagonalCopy(Epetra_Vector &Diagonal) const
Returns a copy of the main diagonal in a user-provided vector.
double * nullspace_vect
Definition: ml_aggregate.h:63
Basic class for MLAPI objects.
Definition: MLAPI_BaseObject.h:35
const Epetra_BlockMap & Map() const
const InverseOperator & S(const int i) const
Returns a reference to the inverse operator of level i.
Definition: MLAPI_MultiLevelSA.h:113
MLAPI interface to AztecOO's solvers.
int ApplyInverse(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
not implemented, method will throw error and terminate execution.
Definition: ml_Epetra_wrap_CrsGraph_as_RowMatrix.H:303
MultiVector(const Space &VectorSpace, const int NumVectors=1, bool SetToZero=true)
Constructor for a given Space.
Definition: MLAPI_MultiVector.h:116
int SetDefaultsDD(Teuchos::ParameterList &List, Teuchos::RCP< std::vector< int > > &options, Teuchos::RCP< std::vector< double > > ¶ms, bool Overwrite=true)
Sets default parameters for aggregation-based 2-level domain decomposition preconditioners.
double Norm2(int v=-1) const
Computes the 2-norm of this vector.
Definition: MLAPI_MultiVector.h:648
Definition: ml_MultiLevelPreconditioner.h:958
bool UseTranspose() const
Returns the current UseTranspose setting.
Definition: ml_MultiLevelPreconditioner.h:506
MultiVectorCombination operator+(const MultiVector &x, const MultiVector &y)
Creates a new MultiVector, defined as x + y.
int AnalyzeCycle(const int NumCycles=1)
Analyze the effect of the ML cycle on a random std::vector.
Definition: ml_MultiLevelPreconditioner_Analyze.cpp:342
virtual std::ostream & Print(std::ostream &os) const
Prints basic information on iostream. This function is used by operator<<.
Definition: ml_Ifpack_ML.h:190
bool UpperTriangular() const
int GetNumGlobalRows() const
Returns the number of global rows.
Definition: MLAPI_LoadBalanceOperator.h:243
void UpdateFlops(double Flops) const
Updates internal counter by summing Flops.
Definition: MLAPI_CompObject.h:57
const Epetra_BlockMap & Map() const
Returns a reference to RowMatrix->Map().
Definition: ml_MultiLevelPreconditioner.h:531
double & operator()(const int i, const int v)
Returns the value of local element i (non-const version)
Definition: MLAPI_MultiVector.h:378
const Space GetVectorSpace() const
Returns the vector space of the underlying object.
const Space GetOperatorRangeSpace() const
Returns a copy of the internally stored range space.
Definition: MLAPI_MultiLevelSA.h:77
int Apply(const MultiVector &X, MultiVector &Y) const
Applies the operator to X, using Y as starting solution. Returns the solution in Y.
Definition: MLAPI_DistributedMatrix.h:228
void Reshape()
Resets this object.
Definition: MLAPI_LoadBalanceOperator.h:108
int Solve(bool Upper, bool Trans, bool UnitDiagonal, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
not implemented, method will throw error and terminate execution.
Definition: ml_Epetra_wrap_CrsGraph_as_RowMatrix.H:169
double NormOne() const
not implemented, method will throw error and terminate execution.
Definition: ml_Epetra_wrap_CrsGraph_as_RowMatrix.H:227
int SetUseTranspose(bool UseTranspose)
not implemented, method will always return -1
Definition: ml_Epetra_wrap_CrsGraph_as_RowMatrix.H:289
Definition: MLAPI_SerialMatrix.h:33
struct ML_Operator_Struct ** P_tentative
Definition: ml_aggregate.h:78
void Scale(const double Factor, int v=-1)
Scales each element by the specified factor.
Definition: MLAPI_MultiVector.h:752
const Epetra_Map & OperatorDomainMap() const
MultiLevelOperator(ML *ml_handle, const Epetra_Comm &myComm, const Epetra_Map &DomainMap, const Epetra_Map &RangeMap)
Uses an ML instance to implement the Epetra_Operator interface.
Operator & R(const int i)
Returns a reference to the restriction operator of level i.
Definition: MLAPI_MultiLevelAdaptiveSA.h:144
Definition: MLAPI_LinearCombinations.h:104
const Epetra_Comm & Comm() const
returns ref to the Epetra_Comm associated with this class
Definition: ml_Epetra_wrap_CrsGraph_as_RowMatrix.H:320
long long NumGlobalCols() const
Returns the number of global matrix columns.
Definition: ml_Epetra_wrap_CrsGraph_as_RowMatrix.H:241
Class to count flops.
Definition: MLAPI_CompObject.h:31
bool UseTranspose() const
const Epetra_Comm & Comm() const
Returns a pointer to the Epetra_Comm communicator associated with this operator.
Definition: ml_EdgeMatrixFreePreconditioner.h:125
Definition: ml_EdgeMatrixFreePreconditioner.h:50
int SetDefaultsSA(Teuchos::ParameterList &List, Teuchos::RCP< std::vector< int > > &options, Teuchos::RCP< std::vector< double > > ¶ms, bool Overwrite=true)
Sets default parameters for classical smoothed aggregation.
void SetDefaults(Teuchos::ParameterList &List)
Sets default values in input List.
double phase3_agg_creation
Definition: ml_aggregate.h:92
~MultiVector()
Destructor.
Definition: MLAPI_MultiVector.h:189
int MaxNumEntries() const
Returns the maximum of NumMyRowEntries() over all rows.
Definition: ml_Epetra_wrap_CrsGraph_as_RowMatrix.H:114
MultiVector & operator=(const std::string &Label)
Sets the name of this object, does not touch vector elements or space.
Definition: MLAPI_MultiVector.h:342
const Teuchos::RefCountPtr< ML_Operator_Box > & GetRCPOperatorBox() const
Returns the RefCountPtr of OperatorBox_.
Definition: MLAPI_Operator.h:254
int ML_Gen_Smoother_Ifpack(ML *ml, const char *Type, int Overlap, int nl, int pre_or_post, void *List, void *Comm)
const Epetra_BlockMap & DomainMap() const
const Space GetDomainSpace() const
Returns a copy of the internally stored domain space.
Definition: MLAPI_MultiLevelSA.h:83
Teuchos::RCP< Ifpack_Preconditioner > & GetRCPData()
Returns a pointer to the internally stored IFPACK preconditioner.
Definition: ml_RefMaxwell_11_Operator.h:42
int VisualizeSmoothers(int NumPrecCycles=1, int NumPostCycles=1)
Visualizes the effect of smoothers on a random std::vector.
Definition: ml_MultiLevelPreconditioner_Viz.cpp:86
AMGType
Enumerated type indicating the type of AMG solver to be used.
Definition: ml_MultiLevelPreconditioner.h:167
const Space GetVectorSpace() const
Returns the vector space of the underlying object.
virtual double InitializeFlops() const
Returns the number of flops in the initialization phase.
Definition: ml_Ifpack_ML.h:172
int operator()(int i) const
Returns the global ID of local element i.
Definition: MLAPI_Space.h:231
Definition: ml_aggregate.h:143
MultiVector & operator=(const BaseLinearCombination &rhs)
Sets the elements from the input BaseLinearCombination.
Definition: MLAPI_MultiVector.h:325
LoadBalanceOperator(const Space &DomainSpace, const Space &RangeSpace, Epetra_RowMatrix *Matrix, bool Ownership=true, Teuchos::RefCountPtr< ML_Operator_Box > AuxOp=Teuchos::null)
Constructor with given already FillComplete()'d object.
Definition: MLAPI_LoadBalanceOperator.h:68
int min_nodes_per_aggregate
Definition: ml_aggregate.h:50
virtual int NumMyCols() const=0
const char * Label() const
Returns the label of this operator.
Definition: ml_MatrixFreePreconditioner.h:98
Epetra_RowMatrix * RowMatrix() const
Returns pointer of the internally stored ML_Epetra::RowMatrix object.
int GetMyPID()
Returns the ID of the calling process.
Epetra_CrsMatrix * Epetra_MatrixAdd(Epetra_RowMatrix *B, Epetra_RowMatrix *Bt, double scalar)
Adds two Epetra_RowMatrix's, returns the result as an Epetra_CrsMatrix.
const Epetra_BlockMap & RowMap() const
int Apply(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Applies the operator to a std::vector (NOT SUPPORTED).
int MaxNumEntries() const
virtual ~MatrixFreePreconditioner()
destructor
Wrapper from ML_Operator to Epetra_RowMatrix.
MultiLevelAdaptiveSA(const Operator &FineMatrix, Teuchos::ParameterList &List, const int NumPDEEqns, const int MaxLevels=20)
Constructs the hierarchy for given Operator and parameters.
Definition: MLAPI_MultiLevelAdaptiveSA.h:98
MultiVector(const Space &VectorSpace, std::vector< Teuchos::RefCountPtr< DoubleVector > > RCPValues)
Constructor with a given Space, and user-provided array of values.
Definition: MLAPI_MultiVector.h:164
virtual std::ostream & Print(std::ostream &os, const bool verbose=true) const
Prints basic information about this object on std::ostream.
Definition: MLAPI_MultiVector.h:825
virtual int Apply(const Epetra_MultiVector &X_Epetra, Epetra_MultiVector &Y_Epetra) const
Applies the operator to X, returns the results in Y.
Definition: MLAPI_EpetraBaseOperator.h:72
int ML_Amesos_Solve(void *Amesos_Handle, double x[], double rhs[])
virtual int Multiply(bool TransA, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Returns the result of a Epetra_RowMatrix multiplied by a Epetra_MultiVector X in Y.
int EpetraMatrix2MLMatrix(ML *ml_handle, int level, Epetra_RowMatrix *Amat)
Wraps an Epetra_RowMatrix into an ML_Operators.
void(* data_destroy)(void *)
Definition: ml_operator.h:85
int GlobalAssemble(bool callFillComplete=true, Epetra_CombineMode combineMode=Add, bool save_off_and_reuse_map_exporter=false)
InverseOperator()
Empty constructor.
Definition: MLAPI_InverseOperator.h:52
double fine_complexity
Definition: ml_aggregate.h:74
int ExtractMyRowCopy(int MyRow, int Length, int &NumEntries, double *Values, int *Indices) const
Epetra_Comm & GetEpetra_Comm()
Returns a reference to the Epetra_Comm object defined on MPI_COMM_WORLD.
void Update(double alpha, const MultiVector &rhs, double beta)
Sets this = alpha * rhs + beta * this.
Definition: MLAPI_MultiVector.h:548
int smoothP_type
Definition: ml_aggregate.h:58
MLAPI wrapper for Epetra_FECrsMatrix, which allows MATLAB-like syntax.
void ML_BreakForDebugger(const Epetra_Comm &comm)
Stops the code, waiting for a debugger to attach.
virtual ~ML_RefMaxwell_11_Operator()
Destructor.
Operator Gallery(const std::string ProblemType, const Space &MySpace)
Creates a matrix using the TRIUTILS gallery.
const Space GetOperatorDomainSpace() const
Returns a copy of the internally stored domain space.
Definition: MLAPI_MultiLevelSA.h:71
const ML_Aggregate * GetML_Aggregate() const
Returns a pointer to the internally stored agg pointer.
Definition: ml_MultiLevelPreconditioner.h:612
double NormInf() const
Returns the infinity norm (not implemented).
Definition: ml_MultiLevelPreconditioner.h:503
const Space GetDomainSpace() const
Returns a reference to the domain space of this object.
Operator & operator=(const Operator &RHS)
Makes this object equivalent to RHS.
Definition: MLAPI_Operator.h:150
virtual int MatrixMatrix_Multiply(const Epetra_CrsMatrix &A, Epetra_CrsMatrix **C) const
Computes C= <me> * A. OptimizeStorage must be called for both A and the.
int coarsen_scheme
Definition: ml_aggregate.h:59
MultiVector(const MultiVector &rhs)
Copy constructor.
Definition: MLAPI_MultiVector.h:179
int ApplyInverse(const Epetra_MultiVector &X_Epetra, Epetra_MultiVector &Y_Epetra) const
Applies the operator to X, returns the results in Y.
Definition: MLAPI_EpetraBaseOperator.h:59
double ** nodal_coord
Definition: ml_aggregate.h:101
virtual double ComputeTime() const
Returns the time spent in Compute().
Definition: ml_Ifpack_ML.h:160
Definition: ml_operator.h:81
void Reshape(const Space &DomainSpace, const Space &RangeSpace, ML_Operator *Op, bool Ownership=true, Teuchos::RefCountPtr< ML_Operator_Box > AuxOp=Teuchos::null)
Reshape with given already computed ML_Operator pointer.
Definition: MLAPI_LoadBalanceOperator.h:114
void PrintUnused() const
Prints unused parameters in the input ParameterList on standard output.
Definition: ml_MultiLevelPreconditioner.h:399
~ML_Operator_Box()
Destructor.
Definition: MLAPI_Operator_Box.h:43
~CompObject()
Destructor.
Definition: MLAPI_CompObject.h:42
int GetNumMyCols() const
Returns the number of local columns.
Definition: MLAPI_LoadBalanceOperator.h:262
int nullspace_corrupted
Definition: ml_aggregate.h:64
Definition: ml_struct.h:131
int GetNumItersCoarse()
Returns the maximum number of applications on the coarser levels.
Definition: MLAPI_MultiLevelAdaptiveSA.h:275
double NormOne(int v=-1) const
Computes the one norm of this vector.
Definition: MLAPI_MultiVector.h:706
int InvColSums(Epetra_Vector &x) const
not implemented, method will throw error and terminate execution.
Definition: ml_Epetra_wrap_CrsGraph_as_RowMatrix.H:194
void Random(int v=-1)
Populates the vector with random elements.
Definition: MLAPI_MultiVector.h:778
virtual bool UseTranspose() const
Returns false.
Definition: MLAPI_EpetraBaseOperator.h:117
double NormInf() const
Returns the infinite norm of the operator (NOT SUPPORTED).
Definition: ml_MatrixFreePreconditioner.h:92
int GetNumGlobalCols() const
Returns the number of global columns.
Definition: MLAPI_LoadBalanceOperator.h:255
void Finalize()
Destroys the MLAPI workspace.
void Reshape(const Space &S, const int NumVectors=1, const bool SetToZero=true)
Sets the space of this vector.
Definition: MLAPI_MultiVector.h:213
int ML_num_transfers
Definition: ml_struct.h:78
const Epetra_Map & OperatorRangeMap() const
Returns a reference to the operator range map.
Definition: ml_Ifpack_ML.h:247
bool IsComputed() const
Returns true if the hierarchy has been successfully computed.
Definition: MLAPI_MultiLevelAdaptiveSA.h:216
void SetPrintLevel(int Level)
Sets the level of output (from 0 to 10, 0 being verbose).
int NumGlobalElements() const
int NumMyRowEntries(int MyRow, int &NumEntries) const
Returns the number of nonzero entries in MyRow.
Definition: ml_Epetra_wrap_CrsGraph_as_RowMatrix.H:106
void Update(double alpha, const MultiVector &x, double beta, const MultiVector &y)
Sets this = alpha * x + beta * y.
Definition: MLAPI_MultiVector.h:522
~Space()
Destructor.
Definition: MLAPI_Space.h:105
int NumMyDiagonals() const
Class for Reformulated Maxwell's Equations solvers. Inherited from ML_Epetra_Operator.
int GetNumMyCols() const
Returns the number of local columns.
Definition: MLAPI_Operator.h:224
int GetNumVectors() const
Returns the number of vectors.
Definition: MLAPI_MultiVector.h:401
Definition: MLAPI_DistributedMatrix.h:29
virtual bool IsInitialized() const
Returns true if the preconditioner has been successfully initialized, false otherwise.
Definition: ml_Ifpack_ML.h:80
int SetDefaultsDD_3Levels_LU(Teuchos::ParameterList &List, Teuchos::RCP< std::vector< int > > &options, Teuchos::RCP< std::vector< double > > ¶ms, bool Overwrite=true)
Sets default parameters for aggregation-based 3-level domain decomposition preconditioners with LU.
int GetBlockDiagonal(const Epetra_CrsGraph &Graph, std::string DiagonalColoringType)
Probes for the block diagonal of the given operator.
virtual int NumGlobalCols() const=0
int NumMyBlockRows() const
Overloaded operators for MultiVector's, Operator's, and InverseOpereator's.
Definition: ml_operator.h:118
MultiVector operator()(const MultiVector &LHS)
Applies the operator to LHS, returns the results.
void GetPtent(const Operator &A, Teuchos::ParameterList &List, const MultiVector &ThisNS, Operator &Ptent, MultiVector &NextNS)
Builds the tentative prolongator using aggregation.
int SetDefaultsNSSA(Teuchos::ParameterList &List, Teuchos::RCP< std::vector< int > > &options, Teuchos::RCP< std::vector< double > > ¶ms, bool Overwrite=true)
Sets defaults for energy minimization preconditioning for nonsymmetric problems.
virtual int NumInitialize() const
Returns the number of calls to Initialize().
Definition: ml_Ifpack_ML.h:136
bool HasNormInf() const
Returns true if the this object can provide an approximate Inf-norm, false otherwise.
Definition: ml_RefMaxwell.h:156
const Epetra_RowMatrix * GetRowMatrix() const
Returns the RefCountPtr of OperatorBox_.
Definition: MLAPI_LoadBalanceOperator.h:283
int ML_Anasazi_Get_SpectralNorm_Anasazi(ML_Operator *Amat, ML_Smoother *smoother, int MaxIters, double Tolerance, int IsProblemSymmetric, int UseDiagonalScaling, double *LambdaMax)
Interface from C code to Anasazi to compute the maximum eigenvalue.
Definition: ml_operator.h:92
virtual int Initialize()
Initialize the preconditioner.
Definition: ml_Ifpack_ML.h:74
const double & operator()(const int i, const int v) const
Returns the value of local element i.
Definition: MLAPI_MultiVector.h:369
LoadBalanceOperator & operator=(const LoadBalanceOperator &RHS)
Makes this object equivalent to RHS.
Definition: MLAPI_LoadBalanceOperator.h:176
int ** aggr_info
Definition: ml_aggregate.h:69
int LeftScale(const Epetra_Vector &x)
not implemented, method will throw error and terminate execution.
Definition: ml_Epetra_wrap_CrsGraph_as_RowMatrix.H:186
Definition: MLAPI_LinearCombinations.h:26
void SetUseSparse(const bool UseSparse)
Toggles the use of sparse MATLAB formats.
Definition: MLAPI_MATLABStream.h:234
Definition: MLAPI_BaseLinearCombination.h:24
const char * Label() const
Prints label associated to this object.
Definition: ml_MultiLevelPreconditioner.h:396
virtual long long NumGlobalCols64() const
Returns the number of global matrix columns.
int GetMyLength() const
Returns the local length of each vector.
Definition: MLAPI_MultiVector.h:407
int ApplyInverse(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Applies the preconditioner to std::vector X, returns the result in Y.
virtual const Epetra_Map & RowMatrixRowMap() const=0
int GetInputNumPDEEqns()
Returns the number of PDE equations on the current level.
Definition: MLAPI_MultiLevelAdaptiveSA.h:246
int * smoothP_damping_sweeps
Definition: ml_aggregate.h:57
void Update(const double alpha, int v=-1)
Sets this(v) = rhs.
Definition: MLAPI_MultiVector.h:459
virtual int ExtractMyRowCopy(int MyRow, int Length, int &NumEntries, double *Values, int *Indices) const
Returns a copy of the specified local row in user-provided arrays.
int Visualize(bool VizAggre, bool VizPreSmoother, bool VizPostSmoother, bool VizCycle, int NumApplPreSmoother, int NumApplPostSmoother, int NumCycleSmoother)
Generic interface to visualization methods.
Definition: ml_MultiLevelPreconditioner_Viz.cpp:148
int Coarsen(ML_Operator *A, ML_Aggregate **aggr, ML_Operator **P, ML_Operator **R, ML_Operator **C, int NumPDEEqns=1, int NullSpaceDim=1, double *NullSpace=NULL)
Performs coarsening for a given operator A.
MultiVector Duplicate(const MultiVector &y)
Creates a new vector, x, such that x = y.
virtual bool GetParticipation() const
Returns a bool indicating whether this proc participates in the operator application.
Definition: MLAPI_LoadBalanceOperator.h:212
int GetMaxLevels() const
Returns the actual number of levels.
Definition: MLAPI_MultiLevelSA.h:119
const Epetra_Import * Importer() const
double * dble_options
Definition: ml_struct.h:114
const Epetra_Map & OperatorRangeMap() const
returns ref to the OperatorRangeMap associated with this class
Definition: ml_Epetra_wrap_CrsGraph_as_RowMatrix.H:326
const Epetra_Map & OperatorDomainMap() const
Returns the domain map of the operator.
Definition: ml_MatrixFreePreconditioner.h:122
Adaptive smoothed aggregation preconditioner.
ML_Anasazi: default namespace for all Anasazi interfaces.
Definition: ml_anasazi.h:39
virtual double ComputeFlops() const
Returns the number of flops in the computation phase.
Definition: ml_Ifpack_ML.h:178
virtual double Condest(const Ifpack_CondestType CT=Ifpack_Cheap, const int MaxIters=1550, const double Tol=1e-9, Epetra_RowMatrix *matrix=0)
Computes the condition number estimate, returns its value.
Definition: ml_Ifpack_ML.h:106
int SolveMultiLevelSA(const MultiVector &b_f, MultiVector &x_f, int level) const
Recursively called core of the multi level preconditioner.
Definition: MLAPI_MultiLevelSA.h:312
RowMatrix(ML_Operator *Op, const Epetra_Comm *Comm=0, const bool cheap=false, const USR_COMM=MPI_COMM_WORLD)
Constructor, constructs Comm object if not provided.
std::ostream & Print(std::ostream &os, const bool verbose=true) const
Prints information on stream.
LoadBalanceOperator()
Default constructor.
Definition: MLAPI_LoadBalanceOperator.h:50
Operator(const Space &DomainSpace, const Space &RangeSpace, ML_Operator *Op, bool Ownership=true, Teuchos::RefCountPtr< ML_Operator_Box > AuxOp=Teuchos::null)
Constructor with given already computed ML_Operator pointer.
Definition: MLAPI_Operator.h:56
void ResetTimer() const
Resets the internal timer.
Definition: MLAPI_TimeObject.h:41
Basic class to wrap MLAPI::InverseOperator into Epetra_Operator.
Definition: MLAPI_EpetraBaseOperator.h:42
int GetGCID(const int LCID) const
Returns the global ID of local column ID LCID.
Definition: MLAPI_Operator.h:281
void AnalyzeCheap(const Operator &A)
Performs a cheap analysis of the properties of the input operator.
virtual const Epetra_Map & OperatorDomainMap() const
Returns a reference to the OperatorDomainMap.
Definition: MLAPI_EpetraBaseOperator.h:135
MATLABStream & operator<<(const int obj)
Writes on file the specified integer (on process 0 only).
Definition: MLAPI_MATLABStream.h:71
bool UseTranspose() const
Returns true if the tranpose of the operator is considerd (NOT SUPPORTED).
Definition: ml_MatrixFreePreconditioner.h:104
MatrixFreePreconditioner(const Epetra_Operator &Operator, const Epetra_CrsGraph &Graph, Epetra_MultiVector &NullSpace, const Epetra_Vector &PointDiagonal, Teuchos::ParameterList &List)
Constructor.
const Teuchos::RefCountPtr< Epetra_RowMatrix > RCPRowMatrix() const
Returns pointer of the internally stored ML_Epetra::RowMatrix object.
bool IncrementNullSpace()
Increments the null space dimension by one.
Definition: MLAPI_MultiLevelAdaptiveSA.h:548
virtual int NumApplyInverse() const
Returns the number of calls to ApplyInverse().
Definition: ml_Ifpack_ML.h:148
int VisualizeAggregates()
Visualizes the shape of the aggregates.
Definition: ml_MultiLevelPreconditioner_Viz.cpp:71
Definition: MLAPI_SerialMatrix.h:373
virtual bool IsComputed() const
Returns true if the preconditioner has been successfully computed, false otherwise.
Definition: ml_Ifpack_ML.h:100
std::ostream & Print(std::ostream &os, const bool verbose=true) const
Prints basic information about this object.
Definition: MLAPI_Operator.h:330
int GetGlobalLength() const
Returns the global length of each vector.
Definition: MLAPI_MultiVector.h:413
void Reshape()
Resets this object.
bool HasNormInf() const
Returns true if the this object can provide an approximate Inf-norm, false otherwise.
Definition: ml_RowMatrix.h:307
const Epetra_Map & OperatorDomainMap() const
Returns the Epetra_Map object associated with the domain of this operator.
Definition: ml_EdgeMatrixFreePreconditioner.h:128
virtual int NumMyRows() const=0
MatrixFreePreconditioner: a class to define preconditioners for Epetra_Operator's.
Definition: ml_MatrixFreePreconditioner.h:64
int ML_Smoother_Ifpack(ML_Smoother *sm, int inlen, double x[], int outlen, double rhs[])
virtual int NumMyRows() const
Returns the number of matrix rows owned by the calling processor.
const Space GetDomainSpace() const
Returns a copy of the internally stored domain space.
Definition: MLAPI_MultiLevelAdaptiveSA.h:132
void * vblock_data
Definition: ml_aggregate.h:106
Basic wrapper from ML_Operator to Epetra_RowMatrix.
Definition: ml_RowMatrix.h:44
void ReadSAMISKernel(const char *myKerFileName, MultiVector &A, const int limKer=-1)
Reads null space vectors from SAMIS binary format.
Wraps an ML preconditioner as an Ifpack_Preconditioner.
Definition: ml_Ifpack_ML.h:42
Operator GetRAP(const Operator &R, const Operator &A, const Operator &P)
Performs a triple matrix-matrix product, res = R * A *P.
Definition: ml_MultiLevelPreconditioner.h:1147
int ML_Anasazi_Get_FieldOfValuesBox_Interface(ML_Operator *Amat, struct ML_Field_Of_Values *fov)
Interface from C code to Anasazi to compute the field of values.
int MLShove(ML_Operator *Mat, MLVec< int > &rowPtr, MLVec< int > &cols, MLVec< double > &vals, int invec_leng, int(*commfunc)(double *vec, void *data), struct wrappedCommStruct &framework, int nGhost)
Take Crs std::vec's, make arrays and shove them into an ML Operator.
Definition: ml_MultiLevelPreconditioner.cpp:4447
int SetUseTranspose(bool UseTranspose)
Sets use transpose (not implemented).
Definition: ml_RefMaxwell.h:147
MultiVector()
Default constructor.
Definition: MLAPI_MultiVector.h:110
void Reshape()
Resets this object.
Definition: MLAPI_Operator.h:94
int ReadXML(const std::string &FileName, Teuchos::ParameterList &List, const Epetra_Comm &Comm)
Reads in parameter list options from file.
bool GetUseSparse() const
Returns true if the stream uses sparse MATLAB format.
Definition: MLAPI_MATLABStream.h:228
virtual ~CrsGraphWrapper()
Destructor.
Definition: ml_Epetra_wrap_CrsGraph_as_RowMatrix.H:91
const Teuchos::RefCountPtr< ML_Operator_Box > & GetRCPAuxOperatorBox() const
Returns the RefCountPtr of AuxOperatorBox_.
Definition: MLAPI_Operator.h:260
Definition: ml_struct.h:120
int AnalyzeCoarse()
Analyze the effect of the coarse solver on a random std::vector.
Definition: ml_MultiLevelPreconditioner_Analyze.cpp:281
int NumMyNonzeros() const
Returns the number of nonzero entries in the calling processor's portion of the matrix.
Definition: ml_Epetra_wrap_CrsGraph_as_RowMatrix.H:247
Interface to the Trilinos package Amesos.
virtual const Epetra_CrsMatrix & SM_Matrix()
EXPERIMENTAL: Return SM Matrix.
Definition: ml_RefMaxwell_11_Operator.h:130
int GetNumMyNonzeros() const
Returns the local number of nonzeros.
Definition: MLAPI_LoadBalanceOperator.h:276
const Teuchos::RCP< ML_Operator_Box > & GetRCPOperatorBox() const
Returns the RefCountPtr of OperatorBox_.
Definition: MLAPI_LoadBalanceOperator.h:297
const Epetra_Map & OperatorDomainMap() const
int GetOffset() const
Returns the global ID of the first element on the calling process (for linear distributions only).
Definition: MLAPI_Space.h:259
const Space GetRangeSpace() const
Returns a reference to the internally stored range space.
Definition: MLAPI_LoadBalanceOperator.h:232
int LeftScale(const Epetra_Vector &x)
int keep_P_tentative
Definition: ml_aggregate.h:77
bool HasNormInf() const
Returns true if the this object can provide an approximate Inf-norm, false otherwise.
Definition: ml_EdgeMatrixFreePreconditioner.h:122
virtual const Epetra_Map & RowMatrixColMap() const
Returns the Epetra_Map object associated with the columns of this matrix.
int NumGlobalDiagonals() const
Standard smoothed aggregation multilevel preconditioner.
int MaxNumIndices() const
const double & operator()(const int i) const
Returns the value of local element i (const version).
Definition: MLAPI_MultiVector.h:349
const Epetra_Map & RowMatrixRowMap() const
Returns the Epetra_Map object associated with the rows of this matrix.
Definition: ml_Epetra_wrap_CrsGraph_as_RowMatrix.H:265
int ML_num_levels
Definition: ml_struct.h:74
virtual int Solve(bool Upper, bool Trans, bool UnitDiagonal, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Returns result of a local-only solve using a triangular Epetra_RowMatrix with Epetra_MultiVectors X a...
Definition: ml_RowMatrix.h:140
void Complexities(double &complexity, double &fineNnz)
Return operator complexity and #nonzeros in fine grid matrix.
Definition: ml_MultiLevelPreconditioner.cpp:1520
int GetNumMyRows() const
Returns the number of local rows.
Definition: MLAPI_LoadBalanceOperator.h:249
virtual bool Filled() const
If FillComplete() has been called, this query returns true, otherwise it returns false.
Definition: ml_RowMatrix.h:221
double curr_threshold
Definition: ml_aggregate.h:53
std::ostream & Print(std::ostream &os, const bool verbose=true) const
Prints basic information about this object.
Definition: MLAPI_LoadBalanceOperator.h:378
int MLunamalgP(const MLVec< int > &amalgRowPtr, const MLVec< int > &amalgCols, const MLVec< double > &amalgVals, int maxDofPerNode, const MLVec< char > &status, bool fineIsPadded, MLVec< int > &rowPtr, MLVec< int > &cols, MLVec< double > &vals)
Unamalgamate prolongator so that it is suitable for PDE systems.
Definition: ml_MultiLevelPreconditioner.cpp:5080
const Epetra_Map & ColMap() const
MultiLevelSA(const Operator &FineMatrix, Teuchos::ParameterList &List, const bool ConstructNow=true)
Constructs the hierarchy for given Operator and parameters.
Definition: MLAPI_MultiLevelSA.h:54
int Apply(const Epetra_MultiVector &, Epetra_MultiVector &) const
Applies the matrix to a vector (NOT SUPPORTED)
Definition: ml_Ifpack_ML.h:205
int IsPreconditionerComputed() const
Queries whether multilevel hierarchy has been computed or not.
Definition: ml_MultiLevelPreconditioner.h:489
const Epetra_Map & RowMatrixRowMap() const
bool IsComputed() const
Returns true if the preconditioner has been successfully computed.
Definition: ml_MatrixFreePreconditioner.h:175
ML_RefMaxwell_11_Operator(const Epetra_CrsMatrix &SM_Matrix, const Epetra_CrsMatrix &D0_Matrix, const Epetra_CrsMatrix &M0inv_Matrix, const Epetra_CrsMatrix &M1_Matrix)
Constructor - All the matrices needed for Maxwell. OptimizeStorage must
virtual const Space GetVectorSpace() const =0
Returns the vector space of the underlying object.
~EdgeMatrixFreePreconditioner()
Destructor.
const Space GetOperatorRangeSpace() const
Returns a reference to the internally stored range space.
Definition: MLAPI_Operator.h:185
const Epetra_RowMatrix * GetRowMatrix() const
Returns the RefCountPtr of OperatorBox_.
Definition: MLAPI_Operator.h:242
Operator GetTranspose(const Operator &A, const bool byrow=true)
Returns a newly created transpose of A.
int GetNumGlobalCols() const
Returns the number of global columns.
Definition: MLAPI_Operator.h:218
~MATLABStream()
Finally closes the output file.
Definition: MLAPI_MATLABStream.h:58
Space & GetVectorSpace()
Returns the Space on which this vector is defined (non-const)
Definition: MLAPI_MultiVector.h:396
bool LowerTriangular() const
If matrix is lower triangular in local index space, this query returns true, otherwise it returns fal...
Definition: ml_Epetra_wrap_CrsGraph_as_RowMatrix.H:259
int ML_Amesos_Gen(ML *ml, int curr_level, int choice, int MaxProcs, double AddToDiag, Amesos_Handle_Type *Amesos_Handle)
const Operator & P(const int i) const
Returns a reference to the prolongator operator of level i.
Definition: MLAPI_MultiLevelSA.h:107
std::ostream & Print(std::ostream &os, const bool verbose=true) const
Prints out basic information about this object.
virtual int SetUseTranspose(bool UseTransposeFlag)
Sets the use of tranpose (NOT IMPLEMENTED).
Definition: MLAPI_EpetraBaseOperator.h:66
const Epetra_Map & RowMatrixColMap() const
const Epetra_Comm & Comm() const
Returns a reference to the communicator object.
Definition: ml_MatrixFreePreconditioner.h:116
const Epetra_Comm & Comm() const
Epetra_Time Time_
Object used to track time.
Definition: MLAPI_TimeObject.h:67
int NumGlobalNonzeros() const
virtual int NumGlobalNonzeros() const
Returns the number of nonzero entries in the global matrix.
MATLABStream(const std::string &FileName, bool UseSparse=true)
Opens the specified file for writing.
Definition: MLAPI_MATLABStream.h:44
virtual int NumMyRowEntries(int MyRow, int &NumEntries) const
Returns the number of nonzero entries in MyRow.
Operator GetIdentity(const Space &DomainSpace, const Space &RangeSpace)
Returns the identity matrix.
virtual double ApplyInverseFlops() const
Returns the number of flops in the application of the preconditioner.
Definition: ml_Ifpack_ML.h:184
int SetOwnership(bool ownership)
If set true, the multigrid hierarchy is destroyed when the Operator is destroyed.
Definition: ml_MultiLevelOperator.h:91
Base class for smoothers and coarse solvers.
Operator operator*(const Operator &A, const Operator &B)
Creates a new Operator, defined as A * B.
void Barrier()
Calls Mpi_Barrier() if MPI is enabled.
int CreateLabel()
Definition: ml_MultiLevelPreconditioner.cpp:2829
Teuchos::RefCountPtr< Ifpack_Preconditioner > & GetRCPData()
Returns a pointer to the internally stored IFPACK preconditioner.
int Scale(double ScalarValue)
void SetFlops(double Flops) const
Sets internal counter to Flops.
Definition: MLAPI_CompObject.h:51
Suite of utilities for MLAPI::Operator objects.
bool UseTranspose() const
Returns the current UseTranspose setting.
Definition: ml_EdgeMatrixFreePreconditioner.h:119
virtual ~LoadBalanceInverseOperator()
Destructor.
Definition: MLAPI_LoadBalanceInverseOperator.h:59
Operator & P(const int i)
Returns a reference to the prolongator operator of level i.
Definition: MLAPI_MultiLevelAdaptiveSA.h:168
int InvRowSums(Epetra_Vector &x) const
not implemented, method will throw error and terminate execution.
Definition: ml_Epetra_wrap_CrsGraph_as_RowMatrix.H:178
int GetNumGlobalNonzeros() const
Returns the global number of nonzeros.
Definition: MLAPI_LoadBalanceOperator.h:269
int ComputePreconditioner(const bool CheckFiltering=false)
Computes the multilevel hierarchy.
virtual bool UpperTriangular() const
If matrix is upper triangular in local index space, this query returns true, otherwise it returns fal...
void SetList(Teuchos::ParameterList &List)
Sets the internally stored list to List.
Definition: MLAPI_MultiLevelAdaptiveSA.h:222
const Teuchos::RCP< ML_Operator_Box > & GetRCPAuxOperatorBox() const
Returns the RefCountPtr of AuxOperatorBox_.
Definition: MLAPI_LoadBalanceOperator.h:303
int ApplyInverse(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Apply the preconditioner to an Epetra_MultiVector X, puts the result in Y.
Definition: ml_MultiLevelPreconditioner.cpp:2886
Definition: ml_operator.h:62
virtual ~RowMatrix()
Destructor.
virtual const Epetra_Map & OperatorRangeMap() const
Returns a reference to the OperatorRangeMap.
Definition: MLAPI_EpetraBaseOperator.h:141
void SetInputNumPDEEqns(const int n)
Returns the number of PDE equations on the finest level.
Definition: MLAPI_MultiLevelAdaptiveSA.h:240
void Apply_BCsToGradient(const Epetra_RowMatrix &EdgeMatrix, const Epetra_RowMatrix &T)
Applies boundary conditions to gradient matrix. (Maxwell's equations)
void UpdateTime(double t) const
Updates the internal timer with input value t.
Definition: MLAPI_TimeObject.h:53
bool HasNormInf() const
Returns true if the class furnishes an infinite norm.
Definition: ml_Ifpack_ML.h:229
const Space GetColumnSpace() const
Returns a reference to the internally stored column space.
Definition: MLAPI_Operator.h:200
int ApplyInverse(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
bool UpperTriangular() const
If matrix is upper triangular in local index space, this query returns true, otherwise it returns fal...
Definition: ml_Epetra_wrap_CrsGraph_as_RowMatrix.H:262
int NumMyDiagonals() const
Returns the number of local nonzero diagonal entries, based on global row/column index comparisons.
Definition: ml_Epetra_wrap_CrsGraph_as_RowMatrix.H:256
int NormInf(double *Result) const
int Norm2(double *Result) const
const Space GetRangeSpace() const
Returns a copy of the internally stored range space.
Definition: MLAPI_MultiLevelSA.h:89
Basic class to define operators within MLAPI.
const Space GetOperatorRangeSpace() const
Returns a reference to the internally stored range space.
Definition: MLAPI_LoadBalanceOperator.h:222
int max_neigh_already_selected
Definition: ml_aggregate.h:51
Teuchos::ParameterList ReadParameterList(const char *FileName)
Populates a list from specified file.
int VisualizeCycle(int NumCycles=1)
Visualizes the effect of the ML cycle on a random std::vector.
Definition: ml_MultiLevelPreconditioner_Viz.cpp:120
int ExtractMyRowView(int MyRow, int &NumEntries, double *&Values, int *&Indices) const
bool IsLinear() const
Returns true if the decomposition among processors is linear.
Definition: MLAPI_Space.h:265
const std::string & GetLabel() const
Returns the Label of this object.
Definition: MLAPI_BaseObject.h:61
void Apply_BCsToMatrixRows(const int *dirichletRows, int numBCRows, const Epetra_CrsMatrix &Matrix)
Applies Dirichlet conditions to matrix rows.
ML_Comm * Comm_ML()
Returns the ML communicator of this object.
Definition: ml_MatrixFreePreconditioner.h:157
virtual bool UseTranspose() const
Returns the current UseTranspose setting.
Definition: ml_RefMaxwell_11_Operator.h:112
ML_Aux_Data * aux_data
Definition: ml_operator.h:163
int ReplaceGlobalValues(int GlobalRow, int NumEntries, const double *Values, const int *Indices)
const LoadBalanceOperator & GetOperator() const
Returns a reference to the Operator of which this object defines the inverse.
int begin_level
Definition: ml_aggregate.h:71
Epetra_RowMatrix * RowMatrix() const
Returns pointer of the internally stored ML_Epetra::RowMatrix object.
int SetParameterList(const Teuchos::ParameterList &List)
Copies List into the internally stored parameter list object.
Definition: ml_MultiLevelPreconditioner.cpp:2819
void * vblock_data
Definition: ml_operator.h:193
virtual int NumGlobalCols() const
Returns the number of global matrix columns.
int NumGlobalPoints() const
int NumGlobalDiagonals() const
int SetUseTranspose(bool UseTranspose_in)
int nvblocks
Definition: ml_aggregate.h:75
virtual const Epetra_Import * RowMatrixImporter() const
Returns the Epetra_Import object that contains the import operations for distributed operations.
void * aggr_options
Definition: ml_aggregate.h:83
virtual const Epetra_Map & OperatorRangeMap() const
Returns the Epetra_Map object associated with the range of this operator.
Definition: ml_RefMaxwell_11_Operator.h:127
bool operator!=(const Space &RHS) const
Returns true if this Space is not equivalent to RHS.
Definition: MLAPI_Space.h:218
~Operator()
Destructor.
Definition: MLAPI_Operator.h:85
virtual int MaxNumEntries() const
Returns the maximum of NumMyRowEntries() over all rows.
InverseOperator: basic class to define smoother and coarse solvers.
Definition: MLAPI_InverseOperator.h:46
double NormInf() const
Returns the infinity norm of the global matrix.
Definition: ml_MultiLevelOperator.h:154
MLAPI interfaces to eigensolvers.
int ExtractDiagonalCopy(Epetra_Vector &Diagonal) const
bool HasNormInf() const
always returns false
Definition: ml_Epetra_wrap_CrsGraph_as_RowMatrix.H:317
int ML_num_actual_levels
Definition: ml_struct.h:75
long long NumGlobalDiagonals() const
Returns the number of global nonzero diagonal entries, based on global row/column index comparisons.
Definition: ml_Epetra_wrap_CrsGraph_as_RowMatrix.H:244
std::string GetSmootherType()
Returns the smoother solver type.
Definition: MLAPI_MultiLevelAdaptiveSA.h:228
const Epetra_BlockMap & SourceMap() const
int NumMyCols() const
Returns the local number of columns in the matrix.
Definition: ml_MultiLevelPreconditioner.h:555
Definition: MLAPI_LinearCombinations.h:82
int ML_init_flag
Definition: ml_struct.h:72
Definition: ml_operator.h:202
virtual const char * Label() const
Prints label associated to this object.
Definition: ml_RefMaxwell_11_Operator.h:118
ML_Epetra: default namespace for all Epetra interfaces.
Definition: ml_epetra_utils.h:249
ML_Epetra::CrsGraphWrapper: a class to wrap an Epetra_CrsGraph as Epetra_RowMatrix.
Definition: ml_Epetra_wrap_CrsGraph_as_RowMatrix.H:62
Interface to the Trilinos package Ifpack.
std::ostream & Print(std::ostream &os, const bool verbose=true) const
Prints on std::ostream basic information about this object.
Definition: MLAPI_Space.h:281
const Epetra_BlockMap & Map() const
Returns a reference to RowMatrix->Map().
Definition: ml_RowMatrix.h:329
Basic stream to save in a MATLAB-compatible file MLAPI objects.
Definition: MLAPI_MATLABStream.h:37
const Epetra_Map & OperatorRangeMap() const
Returns the range map of the operator.
Definition: ml_MatrixFreePreconditioner.h:128
int GetMaxCoarseSize()
Returns the maximum allowed coarse size.
Definition: MLAPI_MultiLevelAdaptiveSA.h:263
void Delete(const int v)
Deletes the last vector.
Definition: MLAPI_MultiVector.h:268
const char * Label() const
Returns a character string describing the operator.
Definition: ml_MultiLevelOperator.h:160
virtual bool LowerTriangular() const
If matrix is lower triangular in local index space, this query returns true, otherwise it returns fal...
const double * GetValues(const int v) const
Returns a pointer to the double array (const version)
Definition: MLAPI_MultiVector.h:425
EpetraBaseOperator(const Epetra_Map &inMap, const BaseOperator &Op)
Constructor.
Definition: MLAPI_EpetraBaseOperator.h:47
MLAPI wrapper for double vectors.
Definition: MLAPI_LinearCombinations.h:182
int MyGlobalElements(int *MyGlobalElementList) const
MultiLevelPreconditioner: a class to define black-box multilevel preconditioners using aggregation me...
Definition: ml_MultiLevelPreconditioner.h:234
long long NumGlobalRows() const
Returns the number of global matrix rows.
Definition: ml_Epetra_wrap_CrsGraph_as_RowMatrix.H:238
MultiVector Extract(const MultiVector &y, const int v)
Extracts a component from a vector.
int GetNumGlobalRows() const
Returns the number of global rows.
Definition: MLAPI_Operator.h:206
std::ostream & Print(std::ostream &os, const bool verbose=true) const
Prints basic information about this preconditioner.
Definition: MLAPI_MultiLevelSA.h:355
int Apply(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
int ML_Operator_WrapEpetraMatrix(Epetra_RowMatrix *A, ML_Operator *Result)
Wraps an Epetra_RowMatrix into an ML_Operators, for the given level.
Epetra_IntVector * LocalRowstoColumns(int *Rows, int numRows, const Epetra_CrsMatrix &Matrix)
Returns the local column numbers of the local rows passed in.
Definition: ml_operator.h:213
void Reshape(const int NumGlobalElements, const int NumMyElements, const int *MyGlobalElements)
Reset the dimension of the space by specifying the local number of elements and their global numberin...
Definition: MLAPI_Space.h:151
bool UpperTriangular() const
int ReComputePreconditioner(bool keepFineLevelSmoother=false)
Recompute the preconditioner (not implemented for Maxwell).
Definition: ml_MultiLevelPreconditioner.cpp:2584
const Epetra_Import * RowMatrixImporter() const
Basic class for distributed double-precision vectors.
Definition: MLAPI_MultiVector.h:103
void Reciprocal(int v=-1)
Replaces each element of the vector with its reciprocal.
Definition: MLAPI_MultiVector.h:730
Black-box multilevel smoothed aggregation preconditioner.
Definition: MLAPI_MultiLevelSA.h:47
const Space GetOperatorRangeSpace() const
Returns a reference to the range space of this object.
Operator & operator=(const std::string &Label)
Sets the label of this object.
Definition: MLAPI_Operator.h:170
virtual ~BaseOperator()
Virtual destructor.
Definition: MLAPI_BaseOperator.h:41
double NormInf() const
Returns the infinity norm (not implemented).
Definition: ml_EdgeMatrixFreePreconditioner.h:116
const Teuchos::RCP< Epetra_RowMatrix > & GetRCPRowMatrix() const
Returns the RefCountPtr of RowMatrix_.
Definition: MLAPI_LoadBalanceOperator.h:308
std::string GetCoarseType()
Returns the coarse solver type.
Definition: MLAPI_MultiLevelAdaptiveSA.h:234
bool SameAs(const Epetra_BlockMap &Map) const
int nullspace_dim
Definition: ml_aggregate.h:62
int InvColSums(Epetra_Vector &x) const
virtual ~MultiLevelSA()
Destructor.
Definition: MLAPI_MultiLevelSA.h:64
int ReComputePreconditioner()
Recomputes the preconditioner.
Definition: ml_EdgeMatrixFreePreconditioner.h:97
int Interface(const Epetra_RowMatrix *RowMatrix, Epetra_MultiVector &EigenVectors, double RealEigenvalues[], double ImagEigenvalues[], Teuchos::ParameterList &List, double RealEigenvectors[]=0, double ImagEigenvectors[]=0, int *NumRealEigenvectors=0, int *NumImagEigenvectors=0, ML *ml=0)
Interface to Anasazi to eigen-computations.
int ExtractMyRowCopy(int LocalRow, int LenOfIndices, int &NumIndices, int *Indices) const
const Space GetRangeSpace() const
Returns a reference to the range space of this object.
MultiLevelPreconditioner(const Epetra_RowMatrix &RowMatrix, const bool ComputePrec=true)
Constructs a MultiLevelPreconditioner with default values.
Definition: ml_MultiLevelPreconditioner.cpp:317
Definition: MLAPI_MultiVector.h:36
Space(const Space &RHS)
Copy constructor.
Definition: MLAPI_Space.h:95
void Reshape()
Resets this object.
Definition: MLAPI_Space.h:111
virtual int SumAll(double *PartialSums, double *GlobalSums, int Count) const=0
virtual const Epetra_Import * RowMatrixImporter() const=0
const Space GetRangeSpace() const
Returns a reference to the range space of this object.
Class to specify the number and distribution among processes of elements.
Epetra_CrsMatrix * Epetra_MatrixMult(Epetra_RowMatrix *B, Epetra_RowMatrix *Bt)
Multiplies two Epetra_RowMatrix's, returns the results as an Epetra_CrsMatrix.
virtual double InitializeTime() const
Returns the time spent in Initialize().
Definition: ml_Ifpack_ML.h:154
void Append(const MultiVector &rhs)
Appends a new vector.
Definition: MLAPI_MultiVector.h:253
int AnalyzeSmoothers(const int NumPreCycles=1, const int NumPostCycles=1)
Analyze the effect of each level's smoother on a random std::vector.
Definition: ml_MultiLevelPreconditioner_Analyze.cpp:173
int Solve(bool Upper, bool Trans, bool UnitDiagonal, const Epetra_Vector &x, Epetra_Vector &y) const
int Apply(const MultiVector &b_f, MultiVector &x_f) const
Applies the preconditioner to b_f, returns the result in x_f.
Definition: MLAPI_MultiLevelSA.h:297
bool UseTranspose() const
returns the usetranspose_ flag
Definition: ml_Epetra_wrap_CrsGraph_as_RowMatrix.H:314
const Space GetVectorSpace() const
Returns the vector space of the underlying object.
~MultiLevelOperator()
Destructor.
void Print(int whichHierarchy=-2)
Print the individual operators in the multigrid hierarchy.
~LoadBalanceOperator()
Destructor.
Definition: MLAPI_LoadBalanceOperator.h:99
virtual int Compute()
Computes all it is necessary to apply the preconditioner.
Definition: ml_Ifpack_ML.h:86
int FillComplete(bool OptimizeDataStorage=true)
int GetGRID(const int LRID) const
Returns the global ID of local row ID LRID.
Definition: MLAPI_LoadBalanceOperator.h:314
void Sort(int v=-1, const bool IsIncreasing=false)
Sorts the component of the vector.
Definition: MLAPI_MultiVector.h:796
MultiVector GetDiagonal(const Operator &A)
Returns a vector containing the diagonal elements of A.
double MaxEigAnorm(const Operator &Op, const bool DiagonalScaling=false)
Computes the maximum eigenvalue of Op using the A-norm of the operator.
int * vblock_info
Definition: ml_aggregate.h:76
int SetUseTranspose(bool UseTranspose)
Sets the use of the transpose of the operator (NOT SUPPORTED).
LoadBalanceInverseOperator()
Empty constructor.
Definition: MLAPI_LoadBalanceInverseOperator.h:53
double NormInf(int v=-1) const
Computes the infinite norm of this vector.
Definition: MLAPI_MultiVector.h:674
TimeObject()
Constructor, set counter to 0.0.
Definition: MLAPI_TimeObject.h:30
int TestSmoothers(const bool IsSymmetric=false)
Test several smoothers on fine-level matrix using the current parameters.
Definition: ml_MultiLevelPreconditioner.h:596
const Epetra_RowMatrix & RowMatrix() const
Returns a reference to the internally stored RowMatrix.
Definition: ml_MultiLevelPreconditioner.h:525
Definition: ml_aggregate.h:44
ML_Comm * comm
Definition: ml_struct.h:112
double MaxEigAnasazi(const Operator &Op, const bool DiagonalScaling=false)
Computes the maximum eigenvalue of Op using Anasazi.
const ML * GetML(const int WhichML=-1) const
Returns a pointer to the internally stored ml pointer.
Definition: ml_MultiLevelPreconditioner.h:601
Operator & A(const int i)
Returns a reference to the operator of level i.
Definition: MLAPI_MultiLevelAdaptiveSA.h:156
const Epetra_Map & OperatorRangeMap() const
Returns the Epetra_Map object associated with the range of this operator.
Definition: ml_EdgeMatrixFreePreconditioner.h:131
MultiVector Redistribute(const MultiVector &y, const int NumEquations)
Redistributes the entry of a vector as a multivector.
int max_coarse_size
Definition: ml_aggregate.h:48
int AnalyzeHierarchy(const bool AnalyzeMatrices, const int PreCycles, const int PostCycles, const int MLCycles)
Cheap analysis of each level matrix.
Definition: ml_MultiLevelPreconditioner_Analyze.cpp:79
virtual ~BaseObject()
Destructor.
Definition: MLAPI_BaseObject.h:52
Basic class to wrap MLAPI::InverseOperator into Epetra_Operator.
MLAPI: Default namespace for all MLAPI objects and functions.
Definition: MLAPI_Aggregation.h:24
int NumGlobalNonzeros() const
int ML_Epetra_getrow(ML_Operator *data, int N_requested_rows, int requested_rows[], int allocated_space, int columns[], double values[], int row_lengths[])
Getrow function for matrix of type Epetra_RowMatrix.
void SetRCPValues(const Teuchos::RefCountPtr< DoubleVector > &RCPValues, const int v)
Sets the RefCountPtr<Values_>
Definition: MLAPI_MultiVector.h:447
Functions to create aggregation-based prolongator operators.
Space(const int NumGlobalElements, const int NumMyElements, const int *MyGlobalElements)
Constructor for non-linear distributions.
Definition: MLAPI_Space.h:88
const InverseOperator & S(const int i) const
Returns a reference to the inverse operator of level i.
Definition: MLAPI_MultiLevelAdaptiveSA.h:186
int GetNumMyElements() const
Returns the local number of elements on the calling process.
Definition: MLAPI_Space.h:247
double * res1
Definition: ml_operator.h:89
virtual int ExtractMyRowCopy(int MyRow, int Length, int &NumEntries, double *Values, int *Indices) const=0
bool HasNormInf() const
Returns false.
Definition: ml_MatrixFreePreconditioner.h:110
double NormInf() const
Returns the infinity norm (not implemented).
Definition: ml_RefMaxwell.h:150
const Epetra_BlockMap & Map() const
Returns the Epetra_Map object associated with the rows of this matrix, derived from Epetra_Operator.
Definition: ml_Epetra_wrap_CrsGraph_as_RowMatrix.H:283
void SetupInitialNullSpace()
Computes the first component of the null space.
Definition: MLAPI_MultiLevelAdaptiveSA.h:429
const Epetra_Map & OperatorDomainMap() const
Returns the Epetra_Map object associated with the domain of this operator.
Definition: ml_RowMatrix.h:313
void BuildColumnSpace()
Build the column space, by computing the GID of all local columns.
Definition: MLAPI_LoadBalanceOperator.h:475
Base class for all MLAPI objects.
Definition: MLAPI_BaseOperator.h:36
virtual ~MultiLevelAdaptiveSA()
Destructor.
Definition: MLAPI_MultiLevelAdaptiveSA.h:113
int ExtractView(double **V) const
int vecleng
Definition: ml_operator.h:84
virtual const Epetra_Map & RowMatrixColMap() const=0
double GetTime() const
Returns the internally stored counter.
Definition: MLAPI_TimeObject.h:59
Definition: MLAPI_LoadBalanceOperator.h:44
virtual int MaxNumEntries() const=0
int MLShove(ML_Operator *Mat, MLVec< int > &rowPtr, MLVec< int > &cols, MLVec< double > &vals, int invec_leng, int(*commfunc)(double *vec, void *data), struct wrappedCommStruct &framework, int nGhost)
Take Crs std::vec's, make arrays and shove them into an ML Operator.
Definition: ml_MultiLevelPreconditioner.cpp:4447
std::ostream & Print(std::ostream &os, const bool verbose=true) const
Prints out basic information about this object.
virtual int LeftScale(const Epetra_Vector &x)
Scales the Epetra_RowMatrix on the left with a Epetra_Vector x.
Definition: ml_RowMatrix.h:181
double MaxEigCG(const Operator &Op, const bool DiagonalScaling=false)
Computes the maximum eigenvalue of Op using the CG method.
double * GetValues(const int v)
Returns a pointer to the double array (non-const version)
Definition: MLAPI_MultiVector.h:419
const Epetra_Comm & Comm() const
Returns a pointer to the Epetra_Comm communicator associated with this operator.
Definition: ml_MultiLevelPreconditioner.h:512
Definition: ml_aggregate.h:158
int max_levels
Definition: ml_aggregate.h:70
Space(const int NumGlobalElements, const int NumMyElements=-1)
Constructor with specified number of global and local elements.
Definition: MLAPI_Space.h:66
virtual int Apply(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Returns the result of a Epetra_Operator applied to a Epetra_MultiVector X in Y.
virtual int InvRowSums(Epetra_Vector &x) const
Computes the sum of absolute values of the rows of the Epetra_RowMatrix, results returned in x.
Definition: ml_RowMatrix.h:168
void SetMaxLevels(const int MaxLevels)
Returns the actual number of levels.
Definition: MLAPI_MultiLevelAdaptiveSA.h:198
const Epetra_Comm & Comm() const
Returns a pointer to the Epetra_Comm communicator associated with this operator.
Definition: ml_MultiLevelOperator.h:169
struct ML_Timing * timing
Definition: ml_struct.h:110
ML_Operator * GetML_Operator() const
Returns the RefCountPtr of OperatorBox_.
Definition: MLAPI_Operator.h:248
bool HasNormInf() const
Returns true if the this object can provide an approximate Inf-norm, false otherwise.
Definition: ml_MultiLevelOperator.h:166
int GetFieldOfValuesBox(const Epetra_RowMatrix *RowMatrix, double &MaxReal, double &MaxImag, Teuchos::ParameterList &AnasaziList)
Computes the size of a box containing the field of values.
const Epetra_Map & OperatorRangeMap() const
Returns the Epetra_Map object associated with the range of this operator.
Definition: ml_MultiLevelPreconditioner.h:518
const Space GetOperatorRangeSpace() const
Returns a reference to the range space of this object.
Operator(const Space &DomainSpace, const Space &RangeSpace, Epetra_RowMatrix *Matrix, bool Ownership=true, Teuchos::RefCountPtr< ML_Operator_Box > AuxOp=Teuchos::null)
Constructor with given already FillComplete()'d object.
Definition: MLAPI_Operator.h:64
Space & operator=(const Space &RHS)
Operator =.
Definition: MLAPI_Space.h:188
int ML_scheme
Definition: ml_struct.h:73
void Update(const MultiVector &rhs)
Sets this = rhs.
Definition: MLAPI_MultiVector.h:475
const Space GetColumnSpace() const
Returns a reference to the internally stored column space.
Definition: MLAPI_LoadBalanceOperator.h:237
const Epetra_Map & OperatorDomainMap() const
Returns the Epetra_Map object associated with the domain of this operator.
Definition: ml_RefMaxwell.h:162
Definition: MLAPI_LinearCombinations.h:58
int SetUseTranspose(bool UseTransposeFlag)
Sets use transpose (not implemented).
Definition: ml_RowMatrix.h:301
bool HasNormInf() const
Returns true if the this object can provide an approximate Inf-norm, false otherwise.
Definition: ml_MultiLevelPreconditioner.h:509
int GetAggregates(Epetra_RowMatrix &A, Teuchos::ParameterList &List, double *thisns, Epetra_IntVector &aggrinfo)
Call ML aggregation on A according to parameters supplied in List. Return aggregates in aggrinfo.
virtual int MaxAll(double *PartialMaxs, double *GlobalMaxs, int Count) const=0
const Operator & P(const int i) const
Returns a reference to the prolongator operator of level i.
Definition: MLAPI_MultiLevelAdaptiveSA.h:174
Operator operator/(const Operator &A, const double alpha)
Creates a new Operator, defined as A / alpha.
Definition: MLAPI_Expressions.h:206
virtual const Epetra_BlockMap & Map() const=0
const Space GetOperatorDomainSpace() const
Returns a reference to the internally stored domain space.
Definition: MLAPI_Operator.h:180
void SetLabel(const std::string &Label)
Sets the Label of this object to Label.
Definition: MLAPI_BaseObject.h:55
Operator GetScaledOperator(const Operator &A, const double alpha)
Multiply A by a double value, alpha.
wraps an MLAPI operator with zero rows on some processors.
int InvRowSums(Epetra_Vector &x) const
double drop_tol_for_smoothing
Definition: ml_aggregate.h:54
int Apply(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Apply the inverse of the preconditioner to an Epetra_MultiVector (NOT AVAILABLE)
Definition: ml_RefMaxwell.h:103
const char * Label_
Label for this object.
Definition: ml_MultiLevelOperator.h:183
int block_scaled_SA
Definition: ml_aggregate.h:88
int NumGlobalCols() const
Returns the global number of columns in the matrix.
Definition: ml_MultiLevelPreconditioner.h:543
MultiVector operator()(const MultiVector &LHS)
Applies the operator to LHS, returns the results.
virtual double NormInf() const
Returns the infinity norm of the global matrix.
int GetNumMyNonzeros() const
Returns the local number of nonzeros.
Definition: MLAPI_Operator.h:236
const Epetra_BlockMap & ColMap() const
virtual double ApplyInverseTime() const
Returns the time spent in ApplyInverse().
Definition: ml_Ifpack_ML.h:166
int GetGCID(const int LCID) const
Returns the global ID of local column ID LCID.
Definition: MLAPI_LoadBalanceOperator.h:324
int Epetra_PtAP(const Epetra_CrsMatrix &A, const Epetra_CrsMatrix &P, Epetra_CrsMatrix *&Result, bool keep_zero_rows=false, bool verbose=false)
Does an P^TAP for Epetra_CrsMatrices using EpetraExt's kernels.
virtual int SetUseTranspose(bool UseTranspose)
Sets use transpose (not implemented).
Definition: ml_RefMaxwell_11_Operator.h:66
virtual bool HasNormInf() const
Returns true if the this object can provide an approximate Inf-norm, false otherwise.
Definition: ml_RefMaxwell_11_Operator.h:115
int ExtractMyBlockRowView(int BlockRow, int &RowDim, int &NumBlockEntries, int *&BlockIndices, Epetra_SerialDenseMatrix **&Values) const
int TestSmoothers(Teuchos::ParameterList &InputList, const bool IsSymmetric=false)
Test several smoothers on fine-level matrix.
Definition: ml_MultiLevelPreconditioner_Test.cpp:75
int Apply(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Apply the inverse of the preconditioner to an Epetra_MultiVector (NOT AVAILABLE)
Definition: ml_MultiLevelPreconditioner.h:441
Operator: basic class to define operators within MLAPI.
Definition: MLAPI_Operator.h:44
virtual int NumGlobalRows() const
Returns the number of global matrix rows.
int SetUseTranspose(bool UseTranspose)
Sets use transpose (not implemented).
Definition: ml_EdgeMatrixFreePreconditioner.h:113
const Epetra_Map & OperatorDomainMap() const
Returns a reference to the operator domain map.
Definition: ml_Ifpack_ML.h:241
const Epetra_CrsMatrix & R() const
Returns the restriction operator as an Epetra_CrsMatrix.
Definition: ml_MatrixFreePreconditioner.h:151
virtual const Epetra_Map & OperatorRangeMap() const=0
Definition: ml_struct.h:69
virtual int InvColSums(Epetra_Vector &x) const
Computes the sum of absolute values of the columns of the Epetra_RowMatrix, results returned in x.
Definition: ml_RowMatrix.h:197
std::ostream & Print(std::ostream &os, const bool verbose=true) const
Prints basic information about this preconditioner.
Definition: MLAPI_MultiLevelAdaptiveSA.h:820
const char * Label() const
Returns the label of this object.
Definition: ml_Ifpack_ML.h:217
double smoothP_damping_factor
Definition: ml_aggregate.h:56
const Epetra_Import * RowMatrixImporter() const
Returns the Epetra_Import object that contains the import operations for distributed operations.
Definition: ml_Epetra_wrap_CrsGraph_as_RowMatrix.H:277
double ElapsedTime(void) const
double TotalCPUTime() const
Returns the total CPU time spent in this class.
BaseObject(const std::string &Label)
Constructor with given Label.
Definition: MLAPI_BaseObject.h:46
int N_nonzeros
Definition: ml_operator.h:130
int attach_scheme
Definition: ml_aggregate.h:55
int MLunamalgP(const MLVec< int > &amalgRowPtr, const MLVec< int > &amalgCols, const MLVec< double > &amalgVals, int maxDofPerNode, const MLVec< char > &status, bool fineIsPadded, MLVec< int > &rowPtr, MLVec< int > &cols, MLVec< double > &vals)
Unamalgamate prolongator so that it is suitable for PDE systems.
Definition: ml_MultiLevelPreconditioner.cpp:5080
int * aggr_count
Definition: ml_aggregate.h:66
Definition: MLAPI_LoadBalanceInverseOperator.h:47
int ML_Epetra_comm_wrapper(double vec[], void *data)
Update vec's ghost node via communication.
int InsertGlobalValues(int GlobalRow, int NumEntries, const double *Values, const int *Indices)
int MaxNumEntries() const
const char * Label() const
returns the label of this class
Definition: ml_Epetra_wrap_CrsGraph_as_RowMatrix.H:311
int NumMyRows() const
Returns the number of matrix rows owned by the calling processor.
Definition: ml_Epetra_wrap_CrsGraph_as_RowMatrix.H:250
int * int_options
Definition: ml_struct.h:113
const Epetra_Map & OperatorDomainMap() const
Returns the Epetra_Map object associated with the domain of this operator.
Definition: ml_MultiLevelOperator.h:172
MultiVector(const Space &VectorSpace, Teuchos::RefCountPtr< DoubleVector > RCPValues)
Constructor with a given Space, and user-provided RefCountPtr.
Definition: MLAPI_MultiVector.h:151
virtual int PtAP(const Epetra_CrsMatrix &A, ML_Comm *comm, ML_Operator **C) const
Computes C= A^T * <me> * A. OptimizeStorage must be called for both A and the.
Space(const Epetra_Map &Map)
Constructor with specified Epetra_Map.
Definition: MLAPI_Space.h:72
int SetDefaultsDD_LU(Teuchos::ParameterList &List, Teuchos::RCP< std::vector< int > > &options, Teuchos::RCP< std::vector< double > > ¶ms, bool Overwrite=true)
Sets default parameters for aggregation-based 2-level domain decomposition preconditioners,...
virtual int ApplyInverse(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Returns the result of a Epetra_Operator inverse applied to an.
Definition: ml_RefMaxwell_11_Operator.h:87
int GetNumGlobalElements() const
Returns the global number of elements.
Definition: MLAPI_Space.h:253
int GetNumItersFine()
Returns the maximum number of applications on the finest level.
Definition: MLAPI_MultiLevelAdaptiveSA.h:281
virtual const char * Label() const
Returns the label of this object.
Definition: MLAPI_EpetraBaseOperator.h:111
void Eig(const Operator &Op, MultiVector &ER, MultiVector &EI)
Computes eigenvalues and eigenvectors using LAPACK (w/ one process only).
ML * solver_
Pointer to the ML_Structure.
Definition: ml_MultiLevelOperator.h:174
double DotProduct(const MultiVector &rhs, int v=-1) const
Computes the dot product between this vector and rhs.
Definition: MLAPI_MultiVector.h:615
const char * Label() const
const Epetra_Comm & Comm() const
ML_Comm * GetML_Comm()
Returns a pointer to the ML_Comm object defined on MPI_COMM_WORLD.
bool IsComputed() const
Returns true if the hierarchy has been successfully computed, false otherwise.
Definition: MLAPI_MultiLevelSA.h:125
Operator & operator=(const std::string &Label)
Sets the label of this object.
Definition: MLAPI_LoadBalanceOperator.h:202
void Reshape(const int NumGlobalElements, const int NumMyElements=-1)
Resets the dimension of the space by specifying the local number of elements.
Definition: MLAPI_Space.h:121
std::string GetFileName() const
Returns the name of the output file.
Definition: MLAPI_MATLABStream.h:240
int SetUseTranspose(bool useTranspose)
Sets use transpose (not implemented).
Definition: ml_MultiLevelPreconditioner.h:500
CompObject()
Constructor, set counter to 0.0.
Definition: MLAPI_CompObject.h:36
int Apply(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
not implemented, method will throw error and terminate execution.
Definition: ml_Epetra_wrap_CrsGraph_as_RowMatrix.H:296
const Space GetDomainSpace() const
Returns a reference to the domain space of this object.
virtual int SetParameters(Teuchos::ParameterList &List)
Sets all the parameters for the preconditioner from the list.
Definition: ml_Ifpack_ML.h:60
int ComputePreconditioner(const bool CheckFiltering=false)
Computes the multilevel hierarchy.
Definition: ml_MultiLevelPreconditioner.cpp:1807
const Space GetVectorSpace() const
Returns the vector space of the underlying object.
Definition: MLAPI_LinearCombinations.h:35
int keep_agg_information
Definition: ml_aggregate.h:67
void UpdateTime() const
Updates the internal timer with the time spent since the last call to ResetTimer().
Definition: MLAPI_TimeObject.h:47
int RightScale(const Epetra_Vector &x)
not implemented, method will throw error and terminate execution.
Definition: ml_Epetra_wrap_CrsGraph_as_RowMatrix.H:202
Space & operator=(const std::string &Label)
Sets the Label of this object.
Definition: MLAPI_Space.h:224
void Reshape(const Space &DomainSpace, const Space &RangeSpace, ML_Operator *Op, bool Ownership=true, Teuchos::RefCountPtr< ML_Operator_Box > AuxOp=Teuchos::null)
Reshape with given already computed ML_Operator pointer.
Definition: MLAPI_Operator.h:100
const Epetra_Map & RowMap() const
double GetMaxReduction()
Returns the maximum allowed reduction.
Definition: MLAPI_MultiLevelAdaptiveSA.h:269
MATLAB-like serial matrix.
const MultiVector GetNullSpace() const
Gets a reference to the internally stored null space.
Definition: MLAPI_MultiLevelAdaptiveSA.h:204
virtual std::ostream & Print(std::ostream &os, const bool Verbose=true) const =0
Prints information on stream.
const Epetra_Comm & Comm() const
Returns a reference to the communicator of this object.
Definition: ml_Ifpack_ML.h:235
Definition: MLAPI_LinearCombinations.h:134
double GetFlops() const
Returns the internal counter of flops.
Definition: MLAPI_CompObject.h:45
int SolveMultiLevelSA(const MultiVector &b_f, MultiVector &x_f, int level) const
Recursively called core of the multi level preconditioner.
Definition: MLAPI_MultiLevelAdaptiveSA.h:777
Operator GetRecirc2D(const int NX, const int NY, const double conv, const double diff)
Creates a recirculation problem in 2D.
LoadBalanceOperator(const Space &DomainSpace, const Space &RangeSpace, ML_Operator *Op, bool Ownership=true, Teuchos::RefCountPtr< ML_Operator_Box > AuxOp=Teuchos::null)
Constructor with given already computed ML_Operator pointer.
Definition: MLAPI_LoadBalanceOperator.h:58
void Apply_OAZToMatrix(int *dirichletRows, int numBCRows, const Epetra_CrsMatrix &Matrix)
Does Row/Column OAZ to a matrix.
void Update(double alpha, const MultiVector &rhs)
Sets this = alpha * rhs.
Definition: MLAPI_MultiVector.h:496
virtual ~MultiLevelPreconditioner()
Destroys the preconditioner.
Definition: ml_MultiLevelPreconditioner.h:386
void * void_options
Definition: ml_struct.h:115
const Teuchos::RefCountPtr< DoubleVector > & GetRCPValues(const int v) const
Returns a pointer to the double array (const version)
Definition: MLAPI_MultiVector.h:439
void Reshape(const Space &DomainSpace, const Space &RangeSpace, Epetra_RowMatrix *Matrix, bool Ownership=true, Teuchos::RCP< ML_Operator_Box > AuxOp=Teuchos::null)
Reshape with given already FillComplete()'d object.
Definition: MLAPI_LoadBalanceOperator.h:132
int GetPrintLevel()
Retutns the level of output (always 0 if MyPID() != 0).
bool operator==(const Space &RHS) const
Returns true if this Space is equivalent to RHS.
Definition: MLAPI_Space.h:202
char * label
Definition: ml_struct.h:71
virtual const Epetra_Map & Map() const
Returns a reference to the Map of this object.
Definition: MLAPI_EpetraBaseOperator.h:147
void AdaptCompute(const bool UseDefaultOrSpecified, int AdditionalCandidates)
Setup the adaptive multilevel hierarchy.
Definition: MLAPI_MultiLevelAdaptiveSA.h:405
const Space & GetVectorSpace() const
Returns the Space on which this vector is defined.
Definition: MLAPI_MultiVector.h:390
int use_transpose
Definition: ml_aggregate.h:80
Wrapper for ML_Operator to make it suitable for RefCountPtr.
int GetNumGlobalNonzeros() const
Returns the global number of nonzeros.
Definition: MLAPI_Operator.h:230
Simple wrapper for ML_Operator struct.
Definition: MLAPI_Operator_Box.h:32
virtual const Epetra_Map & RowMatrixRowMap() const
Returns the Epetra_Map object associated with the rows of this matrix.
const Space GetOperatorRangeSpace() const
Returns a copy of the internally stored range space.
Definition: MLAPI_MultiLevelAdaptiveSA.h:126
int NumMyCols() const
Returns the number of matrix columns owned by the calling processor.
Definition: ml_Epetra_wrap_CrsGraph_as_RowMatrix.H:253
void Append(const int NumVectors=1, const bool SetToZero=true)
Appends a new vector.
Definition: MLAPI_MultiVector.h:234
void PrintUnused(std::ostream &os) const
Prints unused parameters in the input ParameterList on the specified stream.
Definition: ml_MultiLevelPreconditioner.h:405
MultiVectorCombination operator-(const MultiVector &x, const MultiVector &y)
Creates a new MultiVector, defined as x - y.
EdgeMatrixFreePreconditioner(Teuchos::RCP< const Epetra_Operator > Operator, Teuchos::RCP< const Epetra_Vector > Diagonal, Teuchos::RCP< const Epetra_CrsMatrix > D0_Matrix, Teuchos::RCP< const Epetra_CrsMatrix > D0_Clean_Matrix, Teuchos::RCP< const Epetra_CrsMatrix > TMT_Matrix, Teuchos::ArrayRCP< int > BCedges, const Teuchos::ParameterList &List, const bool ComputePrec=true)
Constructs an EdgeMatrixFreePreconditioner.
bool LowerTriangular() const
const Epetra_Map & OperatorRangeMap() const
Returns the Epetra_Map object associated with the range of this operator.
Definition: ml_RefMaxwell.h:165
int ML_Operator2EpetraCrsMatrix(ML_Operator *Ke, Epetra_CrsMatrix *&CrsMatrix, int &MaxNumNonzeros, bool CheckNonzeroRow, double &, int base=0, bool verbose=false)
Converts an ML_Operator into an Epetra_CrsMatrix.
int NumMyNonzeros() const
InverseOperator & S(const int i)
Returns a reference to the inverse operator of level i.
Definition: MLAPI_MultiLevelAdaptiveSA.h:180
Interface to the Trilinos package Anasazi.
const Teuchos::RCP< Epetra_RowMatrix > RCPRowMatrix() const
Returns pointer of the internally stored ML_Epetra::RowMatrix object.
const Epetra_Map & OperatorRangeMap() const
int SetUseTranspose(bool UseTrans)
If set true, transpose of this operator will be applied.
Definition: ml_MultiLevelOperator.h:109
int Apply(const MultiVector &x, MultiVector &y) const
Applies this object to vector lhs, returns values in rhs.
int Multiply(bool TransA, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
not implemented, method will throw error and terminate execution.
Definition: ml_Epetra_wrap_CrsGraph_as_RowMatrix.H:161
double TotalTime_
Internal counter.
Definition: MLAPI_TimeObject.h:69
virtual const Epetra_Map & OperatorDomainMap() const=0
int SetDefaultsRefMaxwell(Teuchos::ParameterList &inList, bool OverWrite=true)
Sets default parameters for aggregation-based 2-level domain decomposition preconditioners.
virtual int NumMyNonzeros() const
Returns the number of nonzero entries in the calling processor's portion of the matrix.
int NumMyNonzeros() const
void Complexities(double &complexity, double &fineNnz)
Return operator complexity and #nonzeros in fine grid matrix.
CrsGraphWrapper(const Epetra_CrsGraph &graph, const Epetra_Map &dm, const Epetra_Map &rm, const Epetra_Comm &comm)
Constructs a CrsGraphWrapper class.
Definition: ml_Epetra_wrap_CrsGraph_as_RowMatrix.H:79
int ExtractCrsDataPointers(int *&IndexOffset, int *&Indices, double *&Values_in) const
virtual bool GetParticipation() const
Returns a bool indicating whether this proc participates in the operator application.
Definition: MLAPI_LoadBalanceInverseOperator.h:82
bool UseTranspose() const
Returns the current UseTranspose setting.
Definition: ml_RowMatrix.h:304
ML_Operator_Box(ML_Operator *Op, bool Ownership=true)
Constructor.
Definition: MLAPI_Operator_Box.h:36
const Operator & GetOperator() const
Returns a reference to the Operator of which this object defines the inverse.
void BuildColumnSpace()
Build the column space, by computing the GID of all local columns.
Definition: MLAPI_Operator.h:426
Definition: MLAPI_LinearCombinations.h:215
int(* func)(void)
Definition: ml_struct.h:116
Definition: ml_aggregate.h:133
ML_Operator * GetML_Operator() const
Returns the RefCountPtr of OperatorBox_.
Definition: MLAPI_LoadBalanceOperator.h:290
void PrintList()
Prints on std::cout the values of the internally stored parameter list.
Definition: ml_MultiLevelPreconditioner.cpp:2803
const Operator & R(const int i) const
Returns a reference to the restriction operator of level i.
Definition: MLAPI_MultiLevelSA.h:95
int num_PDE_eqns
Definition: ml_aggregate.h:61
int SetUseTranspose(bool useTranspose)
Sets the use of transpose (NOT SUPPORTED)
Definition: ml_Ifpack_ML.h:196
Epetra_RowMatrix * ModifyEpetraMatrixColMap(const Epetra_RowMatrix &A, EpetraExt::CrsMatrix_SolverMap &transform, const char *matrixName=0, bool verbose=false)
Transforms Epetra matrix column map (if necessary) to be compatible with.
virtual double NormInf() const
Returns the infinity norm (not implemented).
Definition: ml_RefMaxwell_11_Operator.h:109
int DestroyPreconditioner()
Destroys all structures allocated in ComputePreconditioner() if the preconditioner has been computed.
int GetNumPDEEqns()
Sets the number of PDE equations on the current level.
Definition: MLAPI_MultiLevelAdaptiveSA.h:252
const Epetra_Comm & Comm() const
Returns a pointer to the Epetra_Comm communicator associated with this operator.
Definition: ml_RowMatrix.h:310
Interface to the Trilinos package Anasazi.
MultiLevelOperator: An implementation of the Epetra_Operator class.
Definition: ml_MultiLevelOperator.h:55
int ExtractDiagonalCopy(Epetra_Vector &Diagonal) const
not implemented, method will throw error and terminate execution.
Definition: ml_Epetra_wrap_CrsGraph_as_RowMatrix.H:150
virtual int NumMyDiagonals() const
Returns the number of local nonzero diagonal entries, based on global row/column index comparisons.
virtual const Space GetOperatorRangeSpace() const =0
Returns a copy of the range space of this object.
int Apply(const MultiVector &X, MultiVector &Y) const
Applies this operator to LHS, returns the result in RHS.
Definition: MLAPI_LoadBalanceOperator.h:337
virtual int NumMyCols() const
Returns the number of matrix columns owned by the calling processor.
virtual int NumGlobalDiagonals() const
Returns the number of global nonzero diagonal entries, based on global row/column index comparisons.
virtual int Multiply(bool TransA, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const=0
int Multiply(bool TransA, const Epetra_Vector &x, Epetra_Vector &y) const
int NumMyRows() const
Returns the local number of rows in the matrix.
Definition: ml_MultiLevelPreconditioner.h:549
virtual ~Ifpack_ML()
Destructor.
Definition: ml_Ifpack_ML.h:53
Collection of utilities for workspace.
const Space GetRangeSpace() const
Returns a copy of the internally stored range space.
Definition: MLAPI_MultiLevelAdaptiveSA.h:138
int SetDefaultsDD_3Levels(Teuchos::ParameterList &List, Teuchos::RCP< std::vector< int > > &options, Teuchos::RCP< std::vector< double > > ¶ms, bool Overwrite=true)
Sets default parameters for aggregation-based 3-level domain decomposition preconditioners.
virtual int MyPID() const=0
~InverseOperator()
Destructor.
Definition: MLAPI_InverseOperator.h:65
const Space GetVectorSpace() const
Returns the vector space of the underlying object.
double NormInf() const
Returns the norm inf (NOT SUPPORTED)
Definition: ml_Ifpack_ML.h:211
int * FindLocalDiricheltRowsFromOnesAndZeros(const Epetra_CrsMatrix &Matrix, int &numBCRows)
Finds the Dirichlet rows in a square matrix that got the one-and-zeros.
const Epetra_Map & OperatorDomainMap() const
Returns the Epetra_Map object associated with the domain of this operator.
Definition: ml_MultiLevelPreconditioner.h:515
LoadBalanceInverseOperator & operator=(const LoadBalanceInverseOperator &RHS)
Operator =.
double MaxEigPowerMethod(const Operator &Op, const bool DiagonalScaling=false)
Computes the maximum eigenvalue of Op using the power method.
int PutScalar(double ScalarConstant)
const Space GetOperatorDomainSpace() const
Returns a reference to the internally stored domain space.
Definition: MLAPI_LoadBalanceOperator.h:217
const Epetra_BlockMap & RowMap() const
int cur_level
Definition: ml_aggregate.h:72
long long NumGlobalNonzeros() const
Returns the number of nonzero entries in the global matrix.
Definition: ml_Epetra_wrap_CrsGraph_as_RowMatrix.H:235
virtual int Apply(const MultiVector &LHS, MultiVector &RHS) const =0
Applies the operator to X, using Y as starting solution. Returns the solution in Y.
int MyPID() const
Returns the PID of the calling processor.
Definition: ml_MatrixFreePreconditioner.h:163
void Epetra_CrsMatrix_Wrap_ML_Operator(ML_Operator *A, const Epetra_Comm &Comm, const Epetra_Map &RowMap, Epetra_CrsMatrix **Result, Epetra_DataAccess CV=::View, int base=0)
Wraps a ML_Operator into a Epetra_CrsMatrix.
void Reshape(const Space &DomainSpace, const Space &RangeSpace, Epetra_RowMatrix *Matrix, bool Ownership=true, Teuchos::RefCountPtr< ML_Operator_Box > AuxOp=Teuchos::null)
Reshape with given already FillComplete()'d object.
Definition: MLAPI_Operator.h:127
int ApplyInverse(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Returns the result of a Operator inverse applied to an Epetra_MultiVector X in Y.
void ReadSAMISMatrix(const char *filen, Operator &A, int &NumPDEEqns)
Reads symmetric matrix from SAMIS binary format.
int SumIntoGlobalValues(int GlobalRow, int NumEntries, const double *Values, const int *Indices)
void ML_Smoother_Clean_Ifpack(void *Ifpack_Handle)
ML black-box preconditioner for Epetra_RowMatrix derived classes.
const Teuchos::RefCountPtr< Epetra_IntSerialDenseVector > GetRCPMyGlobalElements() const
Returns a pointer to the list of global nodes.
Definition: MLAPI_Space.h:272
const Space GetOperatorDomainSpace() const
Returns a reference to the domain space of this object.
virtual const Epetra_Comm & Comm() const
Returns a reference to the communicator object.
Definition: MLAPI_EpetraBaseOperator.h:129
int Update(double ScalarA, const Epetra_MultiVector &A, double ScalarThis)
bool UseTranspose() const
Returns the current UseTranspose setting.
Definition: ml_MultiLevelOperator.h:163
int GetNumProcs()
Returns the total number of processes in the computation.
int DestroyPreconditioner()
Destroys all structures allocated in ComputePreconditioner() if the preconditioner has been computed.
Definition: ml_MultiLevelPreconditioner.cpp:101