Main Page   Alphabetical List   Compound List   File List   Compound Members  

fem::FEM Class Reference

this class drives the resolution of the pde using the Finite Element Method. More...

#include <femSolver.hpp>

List of all members.

Public Methods

 DECLARE_TYPE (femMesh::femPoint, femPoint)
 DECLARE_TYPE (femMesh::femTriangle, femTriangle)
 DECLARE_TYPE (creal *, cmatptr)
 DECLARE_TYPE (float *, matptr)
 FEM (femMeshPtr=0, int quadra=0)
 default constructor.

 ~FEM ()
 destructor.

float solvePDE (fcts *param, int how)
 solve the PDE. More...

creal deriv (int m, creal *f, int ksolv, int i)
creal convect (creal *f, creal *u1, creal *u2, float dt, int i)
creal rhsConvect (creal *f, creal *u1, creal *u2, float dt, int i)
creal fctval (creal *f, float x, float y)
int getregion (int k)
creal gfemuser (creal what, creal *f, int i)
creal P1ctoP1 (creal *f, int i)
creal prodscalar (creal *f, creal *g)
creal ginteg (int, int, int, creal *, creal *, int)
creal binteg (int, int, int, creal *, creal *, int)
void initvarmat (int how, int flagcomplexe, int N, fcts *param)
void assemble (int how, int flagcomplexe, int N, int k, creal *a, creal *b, fcts *param)
void solvevarpde (int N, fcts *param, int how)
 DECLARE_TYPE (femMesh::femPoint, femPoint)
 DECLARE_TYPE (femMesh::femTriangle, femTriangle)
 DECLARE_TYPE (creal *, cmatptr)
 DECLARE_TYPE (float *, matptr)
 FEM (femMeshPtr=0, int quadra=0)
 default constructor.

 ~FEM ()
 destructor.

float solvePDE (fcts *param, int how)
 solve the PDE. More...

creal deriv (int m, creal *f, int ksolv, int i)
creal convect (creal *f, creal *u1, creal *u2, float dt, int i)
creal rhsConvect (creal *f, creal *u1, creal *u2, float dt, int i)
creal fctval (creal *f, float x, float y)
int getregion (int k)
creal gfemuser (creal what, creal *f, int i)
creal P1ctoP1 (creal *f, int i)
creal prodscalar (creal *f, creal *g)
creal ginteg (int, int, int, creal *, creal *, int)
creal binteg (int, int, int, creal *, creal *, int)
void initvarmat (int how, int flagcomplexe, int N, fcts *param)
void assemble (int how, int flagcomplexe, int N, int k, creal *a, creal *b, fcts *param)
void solvevarpde (int N, fcts *param, int how)

Public Attributes

float * normlx
float * normly
float * normlx
float * normly


Detailed Description

this class drives the resolution of the pde using the Finite Element Method.

Author:
Christophe Prud'homme <Christophe.Prudhomme@ann.jussieu.fr>
See also:
femMesh
Version:
#
Id:
femSolver.hpp,v 1.2 2001/07/12 14:11:57 prudhomm Exp
#


Member Function Documentation

int fem::FEM::getregion int   k
 

Returns:
the ngt of a femTriangle to which belongs vertex k

int fem::FEM::getregion int   i
 

Returns:
the ngt of a femTriangle to which belongs vertex k
01277 {
01278   return __mesh->ngt[listHead[i]];
01279 
01280 }

float fem::FEM::solvePDE fcts *   param,
int   how
 

solve the PDE.

Parameters:
param   contain all the possible data for computation
how   defines if the P1 quadrature

float fem::FEM::solvePDE fcts *   param,
int   how
 

solve the PDE.

Parameters:
param   contain all the possible data for computation
how   defines if the P1 quadrature
01001 {
01002   long            nsl = ((long) ns) * (2 * ((long) bdth) + 1);
01003   int             factorize = 1;
01004 
01005   if (how > nhowmax)
01006     erreur ("Too many linear systems");
01007   if (how < 0)
01008      {
01009        factorize = 0;
01010        how = -how;
01011        if (((how > nhow1) && (N == 1)) || ((how > nhow2) && (N == 2)))
01012           {
01013             sprintf (errbuf, "solve(..,'-%d') refers to an inexistant system", how);
01014             erreur (errbuf);
01015           }
01016      }
01017   if (((how > nhow1) && (N == 1)) || ((how > nhow2) && (N == 2)))
01018      {
01019        switch (N)
01020           {
01021           case 1:
01022             if (flag.complexe)
01023               a1c[nhow1++] = new creal[nsl];
01024             else
01025               a1[nhow1++] = new float[nsl];
01026 
01027             break;
01028           case 2:
01029             a2[nhow2++].init (nsl);
01030             break;
01031           }
01032      }
01033   if (flag.complexe)
01034      {
01035        if (N == 1)
01036          return pdeian (a1c[how - 1], param->sol1c, param->f1c, param->g1c, param->p1c, param->b1c,
01037                         param->nuxx1c, param->nuxy1c, param->nuyx1c, param->nuyy1c, param->a11c,
01038                         param->a21c, param->c1c, factorize);
01039        else if (N == 2)
01040          return pdeian (a2[how - 1], param->sol2, param->f2, param->g2, param->p2, param->b2,
01041                         param->nuxx2, param->nuxy2, param->nuyx2, param->nuyy2, param->a12,
01042                         param->a22, param->c2, factorize); 
01043        else
01044          return -1.F;
01045 
01046      }
01047   else
01048      {
01049        if (N == 1)
01050          return pdeian (a1[how - 1], param->sol1, param->f1, param->g1, param->p1, param->b1,
01051                         param->nuxx1, param->nuxy1, param->nuyx1, param->nuyy1, param->a11,
01052                         param->a21, param->c1, factorize);
01053        else if (N == 2)
01054          return pdeian (a2[how - 1], param->sol2, param->f2, param->g2, param->p2, param->b2,
01055                         param->nuxx2, param->nuxy2, param->nuyx2, param->nuyy2, param->a12,
01056                         param->a22, param->c2, factorize); 
01057        else
01058          return -1.F;
01059      }
01060 }


The documentation for this class was generated from the following files:
This is the FreeFEM reference manual
Provided by The KFEM project