Diffpack Documentation


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

PreproLaplace Class Reference

preprocessor based on Laplace equations and mappings. More...

#include <PreproLaplace.h>

Inheritance diagram for PreproLaplace::

FEM Prepro SimCase HandleId HandleId List of all members.

Public Methods

 PreproLaplace ()
 ~PreproLaplace ()
void attach (GridMapUDC &side_mapping, int nsd)
virtual const Geometrygeometry () const
virtual Geometrygeometry ()
virtual const Partitionpartition () const
virtual Partitionpartition ()
bool ok () const
virtual void define (MenuSystem &menu, int level=MAIN)
virtual void scan (MenuSystem &menu)
virtual void scan2 (MenuSystem &menu, LinEqAdmFE *external_lineq=NULL)
virtual void generateMesh (Grid &g)

Static Public Methods

void defineStatic (MenuSystem &menu, int level=MAIN)

Public Attributes

Ptv(real) attraction_point
Ptv(real) attraction_amplitude
Ptv(real) attraction_length

Protected Methods

real rhs (const Ptv(real) &x)
virtual void fillEssBC ()
virtual void integrands (ElmMatVec &elmat, const FiniteElement &fe)
void solvePDEs (GridFE &g)

Protected Attributes

Handle(GridFEgrid
Handle(DegFreeFEdof
Vec(NUMT) linear_solution
Mat(real) new_coor
Handle(LinEqAdmFElineq
int nsd
int eqind
Handle(GridMapUDCside_mapping
String partition_string

Detailed Description

preprocessor based on Laplace equations and mappings.

NAME: PreproLaplace - preprocessor based on Laplace equations and mappings

DESCRIPTION:

The class computes a mapping from a square/box shaped grid onto a deformed rectangle/box, where the deformed shape is defined by the user. The mapping is computed by solving a set of Laplace or Poisson equations. Hence, one can construct curvelinear or othogonal grids if desired.

The usage is similar to transfinite mappings described by the class "TransfMap". That is, the user defines a functor which computes the mapping from a reference domain (unit square/box) onto the physical domain. This functor (subclass of "GridMapUDC") is attached to the "PreproLaplace" object using the "attach" function. Thereafter, one can set various ""attraction"" features in the mapping, either by using the menu system or by manipulating the data members in "PreproLaplace" directly. Finally one calls the standard "generateMesh" function to compute a finite element grid.


Constructor & Destructor Documentation

PreproLaplace::PreproLaplace ( )
 

The constructor has no arguments. To initialize the object, call the "attach" function (for defining the mapping of the boundaries of the domain) and, if desired, the "scan" function for setting various parameters in the mapping.

MEMBER FUNCTIONS AND DATA:

\beginitems

\item["attach"] - attaches a definition of the mapping of the boundaries of the domain. This mapping is represented by a "GridMapUDC" object.

\item["partition"] - returns access to a partition object, which is of "PartitionBox" type in "PreproLaplace". This function is mainly used by general preprocessor interfaces like the "makegrid" program.

\item["attraction_point"] - point in the domain where the grid is attracted.

\item["attraction_amplitude"] - governs the amount of attraction to a point.

\item["attraction_length"] - measures the characteristic dimension of attraction to a point (the attraction strength is typically an exponential function with an amplitude and a decay length).

\item["scan"] - reads menu items (partition, attraction point, amplitude and length) and initializes the "PreproLaplace" object. For example, this "scan" function uses an internal "LinEqAdmFE" object for solving the system of equations that arises from the present preprocessor technique. In some cases, this class is used from a simulator class where a linear system has already been allocated. To save memory and allocation time, it is possible to utilize such external linear systems in the "PreproLaplace" class. One must then use "scan2" instead of "scan" and pass a pointer to the "LinEqAdmFE" object as argument.

\item["generateMesh"] - computes the grid. The method applies a grid over a box shaped reference domain (the unit hypercube). If the user has given a partition of this reference grid on the menu, "generateMesh" will use a "preproBox" object to create a reference grid. If the user has indicated no partition on the menu ("NONE" as answer), "generateMesh" assumes that the grid supplied as argument is a grid over the unit hypercube with the desired partition.

\enditems

PreproLaplace::~PreproLaplace ( ) [inline]
 


Member Function Documentation

void PreproLaplace::attach ( GridMapUDC & side_mapping,
int nsd )
 

void PreproLaplace::define ( MenuSystem & menu,
int level = MAIN ) [virtual]
 

Reimplemented from FEM.

void PreproLaplace::defineStatic ( MenuSystem & menu,
int level = MAIN ) [static]
 

Reimplemented from FEM.

void PreproLaplace::fillEssBC ( ) [protected, virtual]
 

to be implemented in the derived simulator class, to be called for handling of essential bounday conditions.

Reimplemented from FEM.

void PreproLaplace::generateMesh ( Grid & g ) [virtual]
 

Reimplemented from Prepro.

Geometry & PreproLaplace::geometry ( ) [virtual]
 

Reimplemented from Prepro.

const Geometry & PreproLaplace::geometry ( ) const [virtual]
 

Reimplemented from Prepro.

void PreproLaplace::integrands ( ElmMatVec & elmat,
const FiniteElement & fe ) [protected, virtual]
 

to be implemented in the derived simulator class. Its purpose is to compute the contributions to the element matrix and element vector (in terms of an "ElmMatVec" object) for a given element number and integration point (in terms of a "FiniteElement" object). For this purpose the input "FiniteElement" object is used to evaluate basis functions, and derivatives thereof.

Reimplemented from FEM.

bool PreproLaplace::ok ( ) const [virtual]
 

Reimplemented from Prepro.

Partition & PreproLaplace::partition ( ) [virtual]
 

Reimplemented from Prepro.

const Partition & PreproLaplace::partition ( ) const [virtual]
 

Reimplemented from Prepro.

real PreproLaplace::rhs ( const Ptv(real) & x ) [protected]
 

void PreproLaplace::scan ( MenuSystem & menu ) [virtual]
 

Reimplemented from FEM.

void PreproLaplace::scan2 ( MenuSystem & menu,
LinEqAdmFE * external_lineq = NULL ) [virtual]
 

void PreproLaplace::solvePDEs ( GridFE & g ) [protected]
 


Member Data Documentation

Ptv(real) PreproLaplace::attraction_amplitude
 

Ptv(real) PreproLaplace::attraction_length
 

Ptv(real) PreproLaplace::attraction_point
 

Handle(DegFreeFE) PreproLaplace::dof [protected]
 

int PreproLaplace::eqind [protected]
 

Handle(GridFE) PreproLaplace::grid [protected]
 

Vec(NUMT) PreproLaplace::linear_solution [protected]
 

Handle(LinEqAdmFE) PreproLaplace::lineq [protected]
 

Mat(real) PreproLaplace::new_coor [protected]
 

int PreproLaplace::nsd [protected]
 

String PreproLaplace::partition_string [protected]
 

Handle(GridMapUDC) PreproLaplace::side_mapping [protected]
 


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