Multigrid extension for NeuroFEM 
  last change: 14.01.2008  

New Solver - Methods and members

This page should give an overview of all the methods and members of the new solver class. They are grouped by their functionality.


FMGSolver(Grid_c& VolumeGrid_);
This is the constructor of the new solver. The Parameter VolumeGrid_ is a reference to the grid of NeuroFEM.


void Init(int ElemPerCell_, int numUnknowns_, int numCells_, doublereal* rhs_, doublereal* sol_);
In this initialization method all required data transfers from NeuroFEM are handle. For this some informations have to be passed from NeuroFEM as parameters.


void Solve();
This is the solving method. Additional the results are stored back to NeuroFEM within this method.


Grid_c& VolumeGrid;
int numUnknowns;
int ElemPerCell;
int numCells;
doublereal* rhs;
doublereal* sol;
Internal storages for parameters passed from NeuroFEM.


void GetNodePosition(int NodeNumber, double* XPos, double* YPos, double* ZPos);
int* GetCellNodes(int CellNumber);
Those two methods allow access to node and cell informations in NeuroFEM.


double maxX, maxZ, maxY, minX, minZ, minY, deltaX, deltaZ, deltaY;
int NumCellsX, NumCellsY, NumCellsZ;
void GetBoundingBox();
void MapNodeToIndices(int NodeNumber, int* i, int* j, int* k);
void MapCellToIndices(int CellNumber, int* i, int* j, int* k);
Those members and methods are use to map NeuroFEM nodes and cells to ParExPDE nodes and cells. The GetBoundingBox method also stores the minimal and maximal x, y and z values of the NeuroFEM nodes as well as their number in each direction.


int sizeX, sizeY, sizeZ;
int PaddingPower2(int input);
This method is used to enlarge the size of the bounding box to power of 2 (or 1.25, 1.5, 1.75 times a power of 2). By this the multigrid is guaranteed to work very good in the coarsening.


int number_levels;
int points, pointsx, pointsy, pointsz;
int cgridcorrections;
int presmooth;
int postsmooth;
int precg;
int postcg;
double eps;
double omega;
int vcycle[10];
int counter[10];
Those are parameters which define to settings and state of the multigrid algorithm.


ParExPDE::StandardFETransferOperator* transfer_operator;
ParExPDE::ETVariable* f;
ParExPDE::ETVariable* u;
ParExPDE::ETVariable* r;
ParExPDE::ETVariable* d;
ParExPDE::ETVariable* g;
double* normi;
These are the ParExPDE variables that are required for applying the multigrid.


ParExPDE::Blockgrid* grid;
ParExPDE::Discretization* disc_levels;
ParExPDE::Partition* partition;
ParExPDE::LSMDifferentialOperator op;
These members are the ParExPDE describtion of the problem (grid, local stiffness matrices, etc.).


void BuildGrids();
void BuildMatrix();
void InitValues();
void SolveProblem();
void StoreSolution();
void ShiftSolution();
Those are methods which are called in the Init or Solve method for doing part of the work. Some of them are documented seperately.


void CGIterate(int loopcount);
void SolveProblemTry();
Those two methods are experimental methods and need not to be applied anywhere.