Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

FullGenLinSOE Class Reference

#include <FullGenLinSOE.h>

Inheritance diagram for FullGenLinSOE::

LinearSOE SystemOfEqn MovableObject List of all members.

Public Methods

 FullGenLinSOE (FullGenLinSolver &theSolver)
 FullGenLinSOE (int N, FullGenLinSolver &theSolver)
 ~FullGenLinSOE ()
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 VectorgetX (void)
const VectorgetB (void)
double normRHS (void)
void setX (int loc, double value)
int setFullGenSolver (FullGenLinSolver &newSolver)
int recvSelf (int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker)

Friends

int sendSelf (int commitTag, Channel &theChannel)

Detailed Description

FullGenLinSOE is class which is used to store a full general system. The matrix is stored in a 1d double array with elements, where is the size of the system. is stored at location , where and range from to , i.e. C notation. For example when :

\left[ \begin{array}{ccc} a_{0,0} & a_{0,1} & a_{0,2} \ a_{1,0} & a_{1,1} & a_{1,2} \ a_{2,0} & a_{2,1} & a_{2,2} \ \end{array} \right]

is stored in:

\left[ \begin{array}{cccccccccccccccccccc} a_{0,0} & a_{1,0} & a_{2,0} & a_{0,1} & a_{1,1} & a_{2,1} & a_{0,2} & a_{1,2} & a_{2,2} \ \end{array} \right]

The and vectors are stored in 1d double arrays of length . To allow the solvers access to this data, the solvers that use this class are all declared as friend classes. \

{\bf Interface} \ {// Constructors} \ {FullGenLinSOE(FullGenLinSolver &theSolver);} \ {FullGenLinSOE(int N, FullGenLinSolver &theSolver); }

Definition at line 84 of file FullGenLinSOE.h.


Constructor & Destructor Documentation

FullGenLinSOE::FullGenLinSOE ( FullGenLinSolver & theSolver )
 

Definition at line 48 of file FullGenLinSOE.cpp.

FullGenLinSOE::FullGenLinSOE ( int N,
FullGenLinSolver & 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 FullGenLinSOE.cpp.

FullGenLinSOE::~FullGenLinSOE ( )
 

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. Obtains memory from the heap for the 1d arrays storing the data for , and and stores the size of these arrays. If not enough memory is available for these arrays a warning message is printed and the system size is set to . Invokes {setLinearSOE(*this)} and {setSize()} on {solver}, printing a warning message if {setSize()} returns a negative number. Also creates Vector objects for and using the {(double *,int)} Vector constructor.

Definition at line 111 of file FullGenLinSOE.cpp.


Member Function Documentation

int FullGenLinSOE::addA ( const Matrix & m,
const ID & id,
double fact = 1.0 ) [virtual]
 

First tests that {loc} and {M} are of compatible sizes; if not a warning message is printed and a is returned. The LinearSOE object then assembles {fact} times the Matrix {M} into the matrix . The Matrix is assembled into at the locations given by the ID object {loc}, i.e. . If the location specified is outside the range, i.e. the corresponding entry in {M} is not added to . If {fact} is equal to or , more efficient steps are performed. Returns .

Reimplemented from LinearSOE.

Definition at line 210 of file FullGenLinSOE.cpp.

int FullGenLinSOE::addB ( const Vector & v,
const ID & id,
double fact = 1.0 ) [virtual]
 

First tests that {loc} and {V} are of compatible sizes; if not a warning message is printed and a is returned. The LinearSOE object then assembles {fact} times the Vector {V} into the vector . The Vector is assembled into at the locations given by the ID object {loc}, i.e. . If a location specified is outside the range, e.g. , the corresponding entry in {V} is not added to . If {fact} is equal to , or , more efficient steps are performed. Returns .

Reimplemented from LinearSOE.

Definition at line 259 of file FullGenLinSOE.cpp.

const Vector & FullGenLinSOE::getB ( void ) [virtual]
 

Returns the Vector object created for .

Reimplemented from LinearSOE.

Definition at line 361 of file FullGenLinSOE.cpp.

int FullGenLinSOE::getNumEqn ( void ) const [virtual]
 

A method which returns the current size of the system.

Reimplemented from LinearSOE.

Definition at line 122 of file FullGenLinSOE.cpp.

const Vector & FullGenLinSOE::getX ( void ) [virtual]
 

Returns the Vector object created for .

Reimplemented from LinearSOE.

Definition at line 351 of file FullGenLinSOE.cpp.

double FullGenLinSOE::normRHS ( void ) [virtual]
 

Returns the 2-norm of the vector .

Reimplemented from LinearSOE.

Definition at line 371 of file FullGenLinSOE.cpp.

int FullGenLinSOE::recvSelf ( int commitTag,
Channel & theChannel,
FEM_ObjectBroker & theBroker ) [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 408 of file FullGenLinSOE.cpp.

int FullGenLinSOE::setB ( const Vector & v,
double fact = 1.0 ) [virtual]
 

First tests that {V} and the size of the system are of compatible sizes; if not a warning message is printed and a is returned. The LinearSOE object then sets the vector {b} to be {fact} times the Vector {V}. If {fact} is equal to , or , more efficient steps are performed. Returns .

Reimplemented from LinearSOE.

Definition at line 296 of file FullGenLinSOE.cpp.

int FullGenLinSOE::setFullGenSolver ( FullGenLinSolver & newSolver )
 

Definition at line 384 of file FullGenLinSOE.cpp.

int FullGenLinSOE::setSize ( Graph & theGraph ) [virtual]
 

The size of the system is determined by invoking {getNumVertex()} on {theGraph}. 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. Finally, the result of invoking {setSize()} on the associated Solver object is returned.

Reimplemented from LinearSOE.

Definition at line 128 of file FullGenLinSOE.cpp.

void FullGenLinSOE::setX ( int loc,
double value ) [virtual]
 

If {loc} is within the range of , sets .

Reimplemented from LinearSOE.

Definition at line 344 of file FullGenLinSOE.cpp.

void FullGenLinSOE::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 325 of file FullGenLinSOE.cpp.

void FullGenLinSOE::zeroB ( void ) [virtual]
 

Zeros the entries in the 1d array for .

Reimplemented from LinearSOE.

Definition at line 336 of file FullGenLinSOE.cpp.


Friends And Related Function Documentation

int sendSelf ( int commitTag,
Channel & theChannel ) [friend]
 

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 402 of file FullGenLinSOE.cpp.


The documentation for this class was generated from the following files:
Copyright Contact Us