Diffpack Documentation
Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Search
LinEqAdmFE Class Reference
user-friendly interface to the "LinEq*" classes for linear systems.
More...
#include <LinEqAdmFE.h>
Inheritance diagram for LinEqAdmFE::
List of all members.
Public Methods |
| | LinEqAdmFE (LinEqStorageMode storage_mode=EXTERNAL_SOLUTION) |
| | LinEqAdmFE (int rows, int cols, LinEqStorageMode storage_mode_=EXTERNAL_SOLUTION) |
| | ~LinEqAdmFE () |
| void | initAssemble (DegFreeFE &dof, bool compute_A=true, bool compute_RHS=true) |
| void | initAssemble (DegFreeFE &dof, Matrix(NUMT) &extern_matrix) |
| void | initAssemble (DegFreeFE &dof, Vector(NUMT) &extern_vector) |
| void | initAssemble (DegFreeFE &dof, Handle(Matrix(NUMT)) &extern_matrix) |
| void | initAssemble (DegFreeFE &dof, Handle(Vector(NUMT)) &extern_vector) |
| void | initAssemble (SystemCollector &syscoll) |
| void | initAssemble (VecSimplest(Handle(DegFreeFE)) &dof) |
| void | assemble (const MxElmMatVec &elmvcoll) |
| void | assemble (const ElmMatVec &elmv) |
| void | updateMatVecPrm (DegFreeFE &idof, DegFreeFE &jdof, int i, int j) |
| virtual void | define (MenuSystem &menu, int level=MAIN) |
Static Public Methods |
| void | defineStatic (MenuSystem &menu, int level) |
Detailed Description
user-friendly interface to the "LinEq*" classes for linear systems.
NAME: LinEqAdmFE - user-friendly interface to the "LinEq*" classes for linear systems
DESCRIPTION:
This class provides a user-friendly interface the various modules involved when solving a linear system of equations in a finite element setting. In such cases, the "LinEqAdmFE" object can also be used to assemble the coefficient matrix and the right-hand side. To summarise, the class can be used in three ways:
Storage mode 1, "EXTERNAL_STORAGE": All system data are allocated and assigned proper values outside the class. The quantities `$`A, x, b`$` and possible preconditioners must be attached to class "LinEqAdmFE" by using the "attach" function. This mode is the most common when working with finite difference methods, in which the "LinEqAdmFD" variant is usually preferred.
Storage mode 2, "EXTERNAL_SOLUTION": All system data, except the solution vector `$`x`$` are allocated internally. The solution vector must then be attached. This mode is used if the user has a field and want the grid point values of this field to be the solution vector in the system.
Storage mode 3, "INTERNAL_STORAGE": All system data (`$`A, x, b`$` and eventual preconditioners) are allocated internally. When using class "LinEqAdmFE" for finite element solvers, this is often the preferred mode.
Constructor & Destructor Documentation
|
|
The constructor of class "LinEqAdmFE" takes the storage mode as argument. The menu and "scan" functions depend on the mode. For mode 1, there are no menu items and no scanning for parameters regarding the matrix type. See also the base class "LinEqAdm". |
|
LinEqAdmFE::LinEqAdmFE (
|
int rows,
|
|
int cols,
|
|
LinEqStorageMode storage_mode_ = EXTERNAL_SOLUTION )
|
|
|
|
See documentation of one of the overloaded constructor. |
|
LinEqAdmFE::~LinEqAdmFE (
|
)
|
|
Member Function Documentation
|
void LinEqAdmFE::assemble (
|
const ElmMatVec & elmv )
|
|
|
|
See documentation of one of the overloaded functions. |
|
void LinEqAdmFE::assemble (
|
const MxElmMatVec & elmvcoll )
|
|
|
|
adds a small contribution to the global coefficient matrix and the right-hand side by calling the appropriate functionality of the chosen matrix format. This function is useful only when solving a partial differential equation by a finite element method, and assumes that "initAssemble" has been called initially. |
|
void LinEqAdmFE::define (
|
MenuSystem & menu,
|
|
int level = MAIN ) [virtual]
|
|
|
|
builds the "LinEqAdm" submenu and adds it to the specified menu system. The behaviour of "define" depends on the use of"fullMenu". Notice that there is also a static version of this function callled "defineStatic".
Reimplemented from LinEqAdm. |
|
void LinEqAdmFE::defineStatic (
|
MenuSystem & menu,
|
|
int level ) [static]
|
|
|
|
See documentation of one of the overloaded functions. |
|
|
See documentation of one of the overloaded functions. |
|
|
See documentation of one of the overloaded functions. |
|
|
See documentation of one of the overloaded functions. |
|
void LinEqAdmFE::initAssemble (
|
DegFreeFE & dof,
|
|
Vector(NUMT) & extern_vector )
|
|
|
|
See documentation of one of the overloaded functions. |
|
void LinEqAdmFE::initAssemble (
|
DegFreeFE & dof,
|
|
Matrix(NUMT) & extern_matrix )
|
|
|
|
See documentation of one of the overloaded functions. |
|
void LinEqAdmFE::initAssemble (
|
DegFreeFE & dof,
|
|
bool compute_A = true,
|
|
bool compute_RHS = true )
|
|
|
|
initializes the finite element assembly process. On basis of the "DegFreeFE" argument, the parameter objects for the linear system data structure are updated, that is, the linear system is redimensioned and thecoefficient matrix and right-hand side are initialized to zero for the assembly process.
Two boolean arguments can be given to the function, indicating whether the coefficient matrix and the right hand side are to be computed. The default values of these arguments are "true", that is, "initAssemble" assumes that everything is to be recomputed. In some problems the coefficient matrix is constant during several assembly processes and it is advantageous to set "compute_A" to "false". Only the right hand side will then be computed. The "LinEqAdm" can not control the ""computation"" of, e.g., the coefficient matrix, it can only prevent damaging of the coefficient matrix (the "assemble" function will not assemble the element matrix if "compute_A" is "false"). The user must take advantage of avoiding matrix computations in the finite element code. If the storage is external, the user owns the linear system and a warning message is given when calling "initAssemble". It is recommended to have full control of the data structure when using external storage, and the steps performed in "initAssemble" should be written elsewhere in the user''s code, after a thorough examination of which steps that are to be executed.
The overloaded versions of "initAssemble" that also takes a "Matrix" or "Vector" argument, redimensions the array and sets the entries to zero. The redimensioning is performed on basis of the information in the "dof" argument. Two other versions of these functions take "Handle(Matrix)" and "Handle(Vector)" arguments and creates the proper type of matrix (vector) according to the user''s answers on the "LinEqAdm" menu (the matrix format submenu). |
The documentation for this class was generated from the following file:
Copyright © 2003 inuTech GmbH. All rights reserved.