Moertel  Development
 All Classes Namespaces Files Functions Enumerations Friends Pages
Namespaces | Functions
mrtr_utils.H File Reference

A couple utility methods for the Moertel package. More...

#include <ctime>
#include <iostream>
#include "Teuchos_RCP.hpp"
#include <Epetra_Comm.h>
#include <Epetra_SerialComm.h>
#include "Epetra_SerialDenseMatrix.h"
#include "Epetra_SerialDenseSolver.h"
#include "Epetra_CrsMatrix.h"
#include "Epetra_Vector.h"
#include "Epetra_Export.h"
#include "ml_common.h"
#include "ml_include.h"
#include "ml_epetra_utils.h"
#include "ml_epetra.h"
#include "ml_epetra_operator.h"
#include "mrtr_segment.H"
#include "mrtr_functions.H"
#include "mrtr_node.H"
#include "mrtr_point.H"
Include dependency graph for mrtr_utils.H:
This graph shows which files directly or indirectly include this file:

Namespaces

 MOERTEL
 MOERTEL: namespace of the Moertel package.
 

Functions

MOERTEL::FunctionMOERTEL::AllocateFunction (MOERTEL::Function::FunctionType type, int out)
 Allocate a function of the correct type. More...
 
MOERTEL::SegmentMOERTEL::AllocateSegment (int type, int out)
 Allocate a Segment of the correct type. More...
 
bool MOERTEL::cross (double *out, const double *g1, const double *g2)
 Cross product. More...
 
double MOERTEL::dot (const double *g1, const double *g2, const int dim)
 Dot product. More...
 
double MOERTEL::length (const double *g, const int dim)
 Length of a vector. More...
 
bool MOERTEL::solve22 (const double A[][2], double *x, const double *b)
 Solve dense 2x2 system of equations. More...
 
bool MOERTEL::solve33 (const double A[][3], double *x, const double *b)
 Solve dense 3x3 system of equations. More...
 
int MOERTEL::digit_ten (int i)
 Return the '10' digit from an integer number.
 
void MOERTEL::sort (double *dlist, int N, int *list2)
 Sort dlist of length N in ascending, sort list2 according to dlist. More...
 
template<typename kind >
void MOERTEL::swap (kind &a, kind &b)
 Template to swap 2 <kind> instances. More...
 
int MOERTEL::MatrixMatrixAdd (const Epetra_CrsMatrix &A, bool transposeA, double scalarA, Epetra_CrsMatrix &B, double scalarB)
 Add matrices A+B. More...
 
Epetra_CrsMatrix * MOERTEL::MatMatMult (const Epetra_CrsMatrix &A, bool transA, const Epetra_CrsMatrix &B, bool transB, int outlevel)
 Multiply matrices A*B. More...
 
Epetra_CrsMatrix * MOERTEL::PaddedMatrix (const Epetra_Map rowmap, double val, const int numentriesperrow)
 Allocate and return a matrix padded with val on the diagonal. FillComplete() is NOT called on exit.
 
Epetra_CrsMatrix * MOERTEL::StripZeros (Epetra_CrsMatrix &A, double eps)
 Strip out values from a matrix below a certain tolerance. More...
 
bool MOERTEL::SplitMatrix2x2 (Teuchos::RCP< Epetra_CrsMatrix > A, Teuchos::RCP< Epetra_Map > &A11rowmap, Teuchos::RCP< Epetra_Map > &A22rowmap, Teuchos::RCP< Epetra_CrsMatrix > &A11, Teuchos::RCP< Epetra_CrsMatrix > &A12, Teuchos::RCP< Epetra_CrsMatrix > &A21, Teuchos::RCP< Epetra_CrsMatrix > &A22)
 split a matrix into a 2x2 block system where the rowmap of one of the blocks is given More...
 
Epetra_Map * MOERTEL::SplitMap (const Epetra_Map &Amap, const Epetra_Map &Agiven)
 split a rowmap of matrix A More...
 
bool MOERTEL::SplitVector (const Epetra_Vector &x, const Epetra_Map &x1map, Epetra_Vector *&x1, const Epetra_Map &x2map, Epetra_Vector *&x2)
 split a vector into 2 non-overlapping pieces
 
bool MOERTEL::MergeVector (const Epetra_Vector &x1, const Epetra_Vector &x2, Epetra_Vector &xresult)
 merge results from 2 vectors into one (assumes matching submaps)
 
bool MOERTEL::Print_Matrix (std::string name, Epetra_CrsMatrix &A, int ibase)
 Print matrix to file. More...
 
bool MOERTEL::Print_Graph (std::string name, Epetra_CrsGraph &A, int ibase)
 Print graph to file. More...
 
bool MOERTEL::Print_Vector (std::string name, Epetra_Vector &v, int ibase)
 Print vector to file. More...
 
int MOERTEL::ReportError (const std::stringstream &Message)
 Error reporting method.
 

Detailed Description

A couple utility methods for the Moertel package.

Date
Last update do Doxygen: 16-Dec-05