class ProfileSPDLinSOE : public LinearSOE


Inheritance:


Public Methods

ProfileSPDLinSOE(ProfileSPDLinSolver &theSolver)
ProfileSPDLinSOE(int N, int *iLoc, ProfileSPDLinSolver &theSolver)
~ProfileSPDLinSOE()
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)
void setX(int loc, double value)
const Vector& getX(void)
const Vector& getB(void)
double normRHS(void)
int setProfileSPDSolver(ProfileSPDLinSolver &newSolver)
int sendSelf(int commitTag, Channel &theChannel)
int recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker)

Inherited from LinearSOE:

Public Methods

virtual int solve(void)

Protected Methods

int setSolver(LinearSOESolver &newSolver)
LinearSOESolver* getSolver(void)

Inherited from SystemOfEqn:


Inherited from MovableObject:

Public Methods

int getClassTag(void) const
int getDbTag(void) const
void setDbTag(int dbTag)

Documentation

ProfileSPDLinSOE is class which is used to store a symmetric system of equations using a profile storage scheme. The upper triangular part of A is stored in a 1d double array with the diagonals of A located at positions given by an integer array iLoc. For example when n=5 and A as shown below:

\left[ \begin{array}{ccccc} a_{0,0} & a_{0,1} & 0 & 0 & a_{0,4}

ProfileSPDLinSOE(ProfileSPDLinSolver &theSolver)

ProfileSPDLinSOE(int N, int *iLoc, ProfileSPDLinSolver \&theSolver);

ProfileSPDLinSOE(int N, int *iLoc, ProfileSPDLinSolver &theSolver)

~ProfileSPDLinSOE()

The solver and a unique class tag (defined in <classTags.h>) are passed to the LinearSOE constructor. The system size is set to 0 and the matrix A is marked as not having been factored. Invokes setLinearSOE(*this) on the solver. No memory is allocated for the 1d arrays.

int getNumEqn(void) const

A method which returns the current size of the system

int setSize(Graph &theGraph)

The size of the system is determined by looking at the adjacency ID of each Vertex in the Graph object G. This is done by first determining the column height for each Vertex i in G, done by setting iLoc(i) equal to 0 and then checking for each Vertex in G, whether any of the vertex tags in the Vertices adjacency ID results in iLoc(i) being increased. Knowing the col height of each column, the values of iLoc can be determined. Knowing iLoc and the size of the system (the number of Vertices in G, a check to see if the previously allocated 1d arrays for A, x and b are large enough. If the memory portions allocated for the 1d arrays are not big enough, the old space is returned to the heap and new space is allocated from the heap. Printins a warning message if not enough memory is available on the heap for the 1d arrays and returns a -1. If memory is available, the components of the arrays are zeroed and A is marked as being unfactored. If the system size has increased, new Vector objects for x and b using the (double *,int) Vector constructor are created. Finally, the result of invoking setSize() on the associated Solver object is returned.

int addA(const Matrix &, const ID &, double fact = 1.0)

First tests that loc and M are of compatable sizes; if not a warning message is printed and a -1 is returned. The LinearSOE object then assembles fact times the Matrix M into the matrix A. The Matrix is assembled into A at the locations given by the ID object loc, i.e. a_{loc(i),loc(j)} += fact * M(i,j). If the location specified is outside the range, i.e. (-1,-1) the corrseponding entry in M is not added to A. If fact is equal to 0.0 or 1.0, more efficient steps are performed. Returns 0.

int addB(const Vector &, const ID &, double fact = 1.0)

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

int setB(const Vector &, double fact = 1.0)

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

void zeroA(void)

Zeros the entries in the 1d array for A and marks the system as not having been factored

void zeroB(void)

Zeros the entries in the 1d array for b

void setX(int loc, double value)

If loc is within the range of x, sets x(loc) = value

const Vector& getX(void)

const Vector& getB(void)

double normRHS(void)

int setProfileSPDSolver(ProfileSPDLinSolver &newSolver)

int sendSelf(int commitTag, Channel &theChannel)

int recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker)


This class has no child classes.

alphabetic index Contents

this page has been generated automatically by a slightly modified version of doc++ for OpenSees

Copyright Contact Us