Diffpack Documentation


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

FDM Class Reference

base class and methods for finite difference programming. More...

#include <FDM.h>

Inheritance diagram for FDM::

SimCase HandleId List of all members.

Public Methods

 FDM ()
virtual ~FDM ()
virtual void makeSystem (DegFreeFD &dof, StencilCollection &ptopcoll, StencilCollection &rhs_stencil, LinEqAdmFD &lineq, bool compute_A=true, bool compute_RHS=true)
virtual void makeSystem (DegFreeFD &dof, StencilCollection &ptopcoll, FieldLattice &rhs_stencil, LinEqAdmFD &lineq, bool compute_A=true, bool compute_RHS=true)
virtual void makeSystem (DegFreeFD &dof, StencilCollection &ptopcoll, FieldsLattice &rhs_fields, LinEqAdmFD &lineq, bool compute_A=true, bool compute_RHS=true)
double getCPUtime4makeSystem () const
 COPY_CONSTRUCTOR (FDM)
 ASSIGNMENT_OPERATOR (FDM)

Protected Methods

void cputime ()
virtual void calcMatVecContrib (int node_no, MatVecContribFD &contrib, Stencil &stencil, DegFreeFD &dof)
void fillAndAssembleContrib (int node_no, MatVecContribFD &contrib, Stencil &stencil, DegFreeFD &dof, LinEqAdmFD &lineq, int curr_dof)
void fillAndAssembleContrib (MatVecContribFD &contrib, DegFreeFD &dof, LinEqAdmFD &lineq)
void fillRightHandSide (StencilCollection &stencils, DegFreeFD &dof, LinEqAdmFD &lineq)

Protected Attributes

CPUclock cpu
double cpu_time_makeSystem
MatVecContribFD contrib

Detailed Description

base class and methods for finite difference programming.

NAME: FDM - base class and methods for finite difference programming

DESCRIPTION:

Class "FDM" offers tools for setting up a linear system based on an object of type "DegFreeFD" and a set of stencils representing the left and right hand side of the system.


Constructor & Destructor Documentation

FDM::FDM ( )
 

There is only one constructor, a constructor without arguments. Further initialization is unnecessary.

FDM::~FDM ( ) [virtual]
 


Member Function Documentation

FDM::ASSIGNMENT_OPERATOR ( FDM )
 

FDM::COPY_CONSTRUCTOR ( FDM )
 

void FDM::calcMatVecContrib ( int node_no,
MatVecContribFD & contrib,
Stencil & stencil,
DegFreeFD & dof ) [protected, virtual]
 

void FDM::cputime ( ) [protected]
 

void FDM::fillAndAssembleContrib ( MatVecContribFD & contrib,
DegFreeFD & dof,
LinEqAdmFD & lineq ) [protected]
 

void FDM::fillAndAssembleContrib ( int node_no,
MatVecContribFD & contrib,
Stencil & stencil,
DegFreeFD & dof,
LinEqAdmFD & lineq,
int curr_dof ) [protected]
 

void FDM::fillRightHandSide ( StencilCollection & stencils,
DegFreeFD & dof,
LinEqAdmFD & lineq ) [protected]
 

double FDM::getCPUtime4makeSystem ( ) const [inline]
 

void FDM::makeSystem ( DegFreeFD & dof,
StencilCollection & ptopcoll,
FieldsLattice & rhs_fields,
LinEqAdmFD & lineq,
bool compute_A = true,
bool compute_RHS = true ) [virtual]
 

See documentation of one of the overloaded functions.

void FDM::makeSystem ( DegFreeFD & dof,
StencilCollection & ptopcoll,
FieldLattice & rhs_stencil,
LinEqAdmFD & lineq,
bool compute_A = true,
bool compute_RHS = true ) [virtual]
 

See documentation of one of the overloaded functions.

void FDM::makeSystem ( DegFreeFD & dof,
StencilCollection & ptopcoll,
StencilCollection & rhs_stencil,
LinEqAdmFD & lineq,
bool compute_A = true,
bool compute_RHS = true ) [virtual]
 

computes the linear system arising from a finite difference method. Based on the information from the "DegFreeFD" object, and the stencil collection for both the left and right hand side (or in some cases a "FieldLattice" or "FieldsLattice" objects for the right hand side). It is necessary that the supplied stencil collections match the grid and indexset information in the "DegFreeFD" object. That is, if an indexsetunion is set in the "DegFreeFD", the stencil collection must have the same number of stencils per degree of freedom as the number of sets in the indexset union, the stencils must also be organized such that they occur in the same order as the indexsets they should be applied with. If there is only one indexset specified or no indexset at all, the stencil collection must have one stencil per degree of freedom. Note that if the single specified indexset does not cover the entire grid, the linear system will be incomplete and must be finished by the user. It is currently left up to the user to ensure that the supplied stencil is valid inside the corresponding indexset. In the case that no indexset or indexset union has been specified, the stencil will be applied on every node in the grid, and if parts of the stencil is outside the grid, these entries will be ignored. This may lead to some incorrect matrix entries in rows corresponding to the edge of the grid, and it is left up to the user to edit these values.

It is recommended to use a complete indexset collection and a corresponding stencil collection such that the linear system is automatically correctly set.

The "makeSystem" functions measures the CPU time spent in the function. This CPU time is written to the logfile (casename.dp) if more than half a second is spent in the "makeSystem" function. Similar CPU time information is provided by "LinEqAdm :: solve" and written on the same line in the logfile. The CPU time is available in an internal (protected) variable that the programmer can use in a derived simulation class if desired.


Member Data Documentation

MatVecContribFD FDM::contrib [protected]
 

CPUclock FDM::cpu [protected]
 

double FDM::cpu_time_makeSystem [protected]
 


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