Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members
SparseGenColLinSOE Class Reference#include <SparseGenColLinSOE.h>
Inheritance diagram for SparseGenColLinSOE::
List of all members.
Public Methods |
| SparseGenColLinSOE (SparseGenColLinSolver &theSolver) |
| SparseGenColLinSOE (int N, int NNZ, int *rowStartA, int *colA, SparseGenColLinSolver &theSolver) |
| ~SparseGenColLinSOE () |
int | getNumEqn (void) const |
int | setSize (Graph &theGraph) |
int | addA (const Matrix &, const ID &, double fact=1.0) |
int | addB (const Vector &, const ID &, double fact=1.0) |
int | setB (const Vector &, double fact=1.0) |
void | zeroA (void) |
void | zeroB (void) |
const Vector& | getX (void) |
const Vector& | getB (void) |
double | normRHS (void) |
void | setX (int loc, double value) |
int | setSparseGenColSolver (SparseGenColLinSolver &newSolver) |
int | sendSelf (int commitTag, Channel &theChannel) |
int | recvSelf (int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker) |
Detailed Description
SparseGenColLinSOE is class which is used to store the matrix equation
of order
using a sparse column-compacted storage scheme for
. The
matrix is stored in a 1d double array with
elements, where
is the number of non-zeroes in the matrix
. Two additional 1d integer arrays
and
are used to store information about the location of the coefficients, with
storing the location in the 1d double array of the start of column
and
identifying the row in
to which the
component in the 1d double array.
is of dimension
and
of dimension
. For example
\left[ \begin{array}{ccccc} a_{0,0} & 0 & a_{0,2} & a_{0,3} & 0 \ a_{1,0} & a_{1,1} & 0 & 0 & 0 \ 0 & a_{2,1} & a_{2,2} & 0 & 0 \ 0 & 0 & 0 & a_{3,3} & a_{3,4} \ a_{4,0} & a_{4,1} & 0 & 0 & a_{4,4} \end{array} \right]
is stored in:
\left[ \begin{array}{cccccccccccccc} a_{0,0} & a_{1,0} & a_{4,0} & a_{1,1} & a_{2,1} & a_{4,1} & a_{0,2} & a_{2,2} & a_{0,3} & a_{3,3} & a_{3,4} & a_{4,4} \ \end{array} \right]
with
colStartA = \left[ \begin{array}{cccccccccccccc} 0 & 3 & 6 & 8 & 10 & 12 \end{array} \right]
and
rowA = \left[ \begin{array}{cccccccccccccc} 0 & 1 & 4 & 1 & 2 & 4 & 0 & 2 & 0 & 3 & 3 & 4 \end{array} \right]
The
and
vectors are stored in 1d double arrays of length
. \
{\bf Interface} \ {// Constructors} \ {SparseGenColLinSOE(SparseGenColLinSolver &theSolver);} \ {SparseGenColLinSOE(int N, int NNZ, int *colStartA, int *rowA, SparseGenColLinSolver &theSolver); }
Definition at line 112 of file SparseGenColLinSOE.h.
Constructor & Destructor Documentation
SparseGenColLinSOE::SparseGenColLinSOE (
|
int N,
|
|
int NNZ,
|
|
int * rowStartA,
|
|
int * colA,
|
|
SparseGenColLinSolver & theSolver )
|
|
|
The {solver} and a unique class tag (defined in
classTags.h\form#24) are passed to the LinearSOE constructor. The system size is set to
and the matrix
is marked as not having been factored. Invokes {setLinearSOE(*this)} on the {solver}. No memory is allocated for the 3 1d arrays.
Definition at line 58 of file SparseGenColLinSOE.cpp. |
SparseGenColLinSOE::~SparseGenColLinSOE (
|
)
|
|
Member Function Documentation
int SparseGenColLinSOE::addA (
|
const Matrix & m,
|
|
const ID & id,
|
|
double fact = 1.0 ) [virtual]
|
|
int SparseGenColLinSOE::addB (
|
const Vector & v,
|
|
const ID & id,
|
|
double fact = 1.0 ) [virtual]
|
|
const Vector & SparseGenColLinSOE::getB (
|
void ) [virtual]
|
|
int SparseGenColLinSOE::getNumEqn (
|
void ) const [virtual]
|
|
const Vector & SparseGenColLinSOE::getX (
|
void ) [virtual]
|
|
double SparseGenColLinSOE::normRHS (
|
void ) [virtual]
|
|
|
This is a pure virtual method, one must be written for each instantiable subclass of MovableObject. Each object has to receive the data needed to be able to recreate itself in the new process after it has been sent through {theChannel}. If the object is an aggregation containing other objects, new objects of the correct type can be constructed using {theBroker}. To return
if successful or a
if not.
Reimplemented from MovableObject.
Definition at line 499 of file SparseGenColLinSOE.cpp. |
int SparseGenColLinSOE::sendSelf (
|
int commitTag,
|
|
Channel & theChannel ) [virtual]
|
|
|
This is a pure virtual method, one must be written for each instantiable subclass of MovableObject. Each object has to send the data needed to be able to reproduce that object in a remote process. The object uses the methods provided by {theChannel} object to send the data to another channel at the remote actor, the address of the channel is set before this method is called. An object of similar type at the remote actor is invoked with a {receiveSelf()} to receive the data. Returns
if successful (successful in that the data got to the channel), or a
if no data was sent.
Reimplemented from MovableObject.
Definition at line 493 of file SparseGenColLinSOE.cpp. |
int SparseGenColLinSOE::setB (
|
const Vector & v,
|
|
double fact = 1.0 ) [virtual]
|
|
int SparseGenColLinSOE::setSize (
|
Graph & theGraph ) [virtual]
|
|
|
The size of the system is determined from the Graph object {theGraph}, which must contain {size} vertices labelled
through
, the adjacency list for each vertex containing the associated vertices in a column of the matrix
. The size is determined by invoking {getNumVertex()} on {theGraph} and the number of non-zeros is determined by looking at the size of the adjacenecy list of each vertex in the graph, allowing space for the diagonal term. If the old space allocated for the 1d arrays is not big enough, it the old space is returned to the heap and new space is allocated from the heap. Prints a warning message, sets size to
and returns a
, if not enough memory is available on the heap for the 1d arrays. If memory is available, the components of the arrays are zeroed and
is marked as being unfactored. If the system size has increased, new Vector objects for
and
using the {(double ,int)} Vector constructor are created. The
and
are then determined by looping through the vertices, setting
the size of Vertices
adjacency list and placing the contents of
and the adjacency list into
in ascending order. Finally, the result of invoking {setSize()} on the associated Solver object is returned.
Reimplemented from LinearSOE.
Definition at line 131 of file SparseGenColLinSOE.cpp. |
void SparseGenColLinSOE::setX (
|
int loc,
|
|
double value ) [virtual]
|
|
void SparseGenColLinSOE::zeroA (
|
void ) [virtual]
|
|
|
Zeros the entries in the 1d array for
and marks the system as not having been factored.
Reimplemented from LinearSOE.
Definition at line 417 of file SparseGenColLinSOE.cpp. |
void SparseGenColLinSOE::zeroB (
|
void ) [virtual]
|
|
The documentation for this class was generated from the following files:
|