Diffpack Documentation


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

MatVecContribFD Class Reference

contribution matrix and vector in FDM programming. More...

#include <MatVecContribFD.h>

List of all members.

Public Methods

 MatVecContribFD ()
void attach (DegFreeFD &dof)
void detach ()
 MatVecContribFD (DegFreeFD &dof)
 ~MatVecContribFD ()
bool refill (int node_idx, int curr_dof, Stencil &stencil)
bool refill (int glob_eqn)
void fill (const MatVecContribFD &contrib)
void scaleContrib (StencilUnion &stencil)
void insertAlgebraicDofs (int idx_base)
void insertAlgebraicEqn ()
DegFreeFDgetDegFreeFD ()
void enforceEssBC ()
bool ok () const
void print (Os os, int help=1) const
 COPY_CONSTRUCTOR (MatVecContribFD)
 ASSIGNMENT_OPERATOR (MatVecContribFD)

Public Attributes

int node_no
int curr_node_dof
int ndofs
Handle(DegFreeFDdof
Handle(VecSimpleH(VecSimple(NUMT))) alg_coeffs
Handle(VecSimpleH(VecSimple(int))) alg_pattern
Mat(NUMT) A
Vec(NUMT) b
VecSimple(int) loc2glob_row
VecSimple(int) loc2glob_col
Vec(NUMT) b_mod


Detailed Description

contribution matrix and vector in FDM programming.

NAME: MatVecContribFD - contribution matrix and vector in FDM programming

DESCRIPTION:

The class represents the contribution matrix and vector in finite difference programming. The class also holds the mapping between local and global degrees of freedom and data for the boundary conditions.

The class is used when assembling data for each degree of freedom. Even though the class contains a matrix contribution, this matrix should only cover one row. This is because the local to global column mapping differs for each node and each local degree of freedom in each node, hence each set of local to global column mapping is only valid for one single row in the main system.


Constructor & Destructor Documentation

MatVecContribFD::MatVecContribFD ( )
 

There are two ways of creating a class instance: 1) use the constructor without arguments and then attach a "DegFreeFD" object keeping track of the grid and linear system degrees of freedom, or 2) use the constructor that takes the "DegFreeFD" object as argument. Note that for each degree of freedom in each node, one must take a "refill" call in order to initialize the "MatVecContrib" object for that particular node and the corresponding stencil. The "refill" function will size "A" and "b" correctly, set these to zero, and compute the local-global degrees of freedom mapping ("loc2glob" array).

MatVecContribFD::MatVecContribFD ( DegFreeFD & dof )
 

See documentation of one of the overloaded constructor.

MatVecContribFD::~MatVecContribFD ( )
 


Member Function Documentation

MatVecContribFD::ASSIGNMENT_OPERATOR ( MatVecContribFD )
 

MatVecContribFD::COPY_CONSTRUCTOR ( MatVecContribFD )
 

void MatVecContribFD::attach ( DegFreeFD & dof )
 

void MatVecContribFD::detach ( ) [inline]
 

void MatVecContribFD::enforceEssBC ( )
 

enforces essential boundary conditions. If the system of linear equations, has an unknown which is a correction vector, special care must be taken. This is the case when e.g. Newton''s method are used for solving systems of nonlinear equations. In each linear problem it is assumed that the total solution has its boundary conditions inserted and that the correction vector must have zeroes for all entries where the value is known. That is, in the modification of "A" and "b" one must set the essential condition to be zero. The "MatVecContribFD :: enforceEssBC" function calls the "zeroInterpretationOfEssBC" of "DegFreeFD" for determining whether the user has indicated to the "DegFreeFD" object that all non-zero essential boundary condition values are to be interpreted as if they were zero. When Newton-Raphson''s method is used, it is important that the programmer calls the "fillEssBC2zero" function of the "DegFreeFD" class object prior to any "enforceEssBC."

void MatVecContribFD::fill ( const MatVecContribFD & contrib )
 

DegFreeFD & MatVecContribFD::getDegFreeFD ( ) [inline]
 

void MatVecContribFD::insertAlgebraicDofs ( int idx_base )
 

fill the contributions from the algebraic dofs into the datastructure. The supplied "idx_base" is the number of global node_dofs, that is, the base index for the algebraic dofs in the linear system.

void MatVecContribFD::insertAlgebraicEqn ( )
 

fill the contributions from the algebraic eqns into the datastructure.

bool MatVecContribFD::ok ( ) const
 

void MatVecContribFD::print ( Os os,
int help = 1 ) const
 

bool MatVecContribFD::refill ( int elm_no )
 

See documentation of one of the overloaded functions.

bool MatVecContribFD::refill ( int node_idx,
int curr_dof,
Stencil & stencil )
 

redim the contribution matrix and vectors to the correct size for the given node or global equation.

void MatVecContribFD::scaleContrib ( StencilUnion & stencil )
 

used to post multiply scaling factors from a StencilUnion into a computed MatVecContribFD before including the contribution into the matrix A.


Member Data Documentation

Mat(NUMT) MatVecContribFD::A
 

Handle(VecSimpleH(VecSimple(NUMT))) MatVecContribFD::alg_coeffs
 

Handle(VecSimpleH(VecSimple(int))) MatVecContribFD::alg_pattern
 

Vec(NUMT) MatVecContribFD::b
 

Vec(NUMT) MatVecContribFD::b_mod
 

int MatVecContribFD::curr_node_dof
 

Handle(DegFreeFD) MatVecContribFD::dof
 

VecSimple(int) MatVecContribFD::loc2glob_col
 

VecSimple(int) MatVecContribFD::loc2glob_row
 

int MatVecContribFD::ndofs
 

int MatVecContribFD::node_no
 


The documentation for this class was generated from the following file:
Copyright © 2003 inuTech GmbH. All rights reserved.