Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

omgNeumann.h File Reference

Go to the source code of this file.

Functions

void getPrivateMatricesForKSP_Shell_Jac2 (Mat mat, Mat *AmatPrivate, Mat *PmatPrivate, MatStructure *pFlag)
void solve_neumann (std::vector< double > &pts, void(*CalcCoef)(const std::vector< double > &pts, std::vector< double > &values), void(*CalcRHS)(const std::vector< double > &pts, std::vector< double > &values), int numMultigridLevels, Vec &sol, ot::DAMG *&damg)
 This function calculates the approximate solution to the scalar equation -div(alpha*grad u) + beta * u = f in the unit cube subject to homogeneous Neumann boundary conditions.
void solve_neumann_oct (std::vector< ot::TreeNode > &octs, void(*CalcCoef)(const std::vector< double > &pts, std::vector< double > &values), void(*CalcRHS)(const std::vector< double > &pts, std::vector< double > &values), int numMultigridLevels, Vec &sol, ot::DAMG *&damg)
 This function calculates the approximate solution to the scalar equation -div(alpha*grad u) + beta * u = f in the unit cube subject to homogeneous Neumann boundary conditions.


Function Documentation

void getPrivateMatricesForKSP_Shell_Jac2 Mat  mat,
Mat *  AmatPrivate,
Mat *  PmatPrivate,
MatStructure *  pFlag
 

Definition at line 1287 of file omgJac.C.

References ot::DAMG, and Jac2MFreeData::Jmat_private.

void solve_neumann std::vector< double > &  pts,
void(*)(const std::vector< double > &pts, std::vector< double > &values)  CalcCoef,
void(*)(const std::vector< double > &pts, std::vector< double > &values)  CalcRHS,
int  numMultigridLevels,
Vec &  sol,
ot::DAMG *&  damg
 

This function calculates the approximate solution to the scalar equation -div(alpha*grad u) + beta * u = f in the unit cube subject to homogeneous Neumann boundary conditions.

Author:
Ilya Lashuk
Parameters:
pts coordinates of points. Each point must be in [0,1)^3. Octree will be built based on these points. No octant of the octree will contain more than 1 point. Coordinates are stored in a sequence X1, Y1, Z1, X2, Y2, Z2, ...
CalcCoef function pointer to function which will calculate the values of "alpha" and "beta" (see the equation above) for the center of each octant. Coordinates of all centers are provided in the first parameter (layout is X1,Y1,Z1,X2,Y2,Z2,...). Values should be returned in second parameter. The following layout should be used: alpha1,beta1,alpha2,beta2,.... Caller will set the array size for the second parameter (to be equal to 2/3 size of the first parameter).
CalcRHS function pointer to function which will calculate the value of "f" (see the equation above) for the center of each octant. Coordinates of all centers are provided in the first parameter (layout is the same as above). Values of "f" should be returned in second parameter. Caller will set the array size for the second parameter (to be equal to 1/3 size of the first parameter).
numMultigridLevels desired number of multigrid levels.
sol in this parameter the solution is returned. This object is automatically destroyed when the "damg" object (see next parameter) is destroyed.
damg in this parameter the multigrid context (used to calculate solution) is returned. User must destroy this object when no longer needed by calling DAMGDestroy

Definition at line 832 of file omgNeumann.C.

References ot::balanceOctree(), CalculateCenters(), ComputeJacobian2(), ComputeRHS_omgNeumann(), CreateJacobian2(), createLmatType2(), createMmatType2(), createRHSType2(), ot::DAMG, ot::DAMGCreateAndSetDA(), DAMGGetx, ot::DAMGSetKSP(), ot::DAMGSolve(), DendroIntL, destroyLmatType2(), destroyMmatType2(), destroyRHSType2(), DestroyUserContexts(), force_values, LaplacianType2Stencil, MassType2Stencil, ot::points2Octree(), RHSType2Stencil, and SetPDECoefFromPts().

Referenced by main().

void solve_neumann_oct std::vector< ot::TreeNode > &  octs,
void(*)(const std::vector< double > &pts, std::vector< double > &values)  CalcCoef,
void(*)(const std::vector< double > &pts, std::vector< double > &values)  CalcRHS,
int  numMultigridLevels,
Vec &  sol,
ot::DAMG *&  damg
 

This function calculates the approximate solution to the scalar equation -div(alpha*grad u) + beta * u = f in the unit cube subject to homogeneous Neumann boundary conditions.

Author:
Ilya Lashuk
Parameters:
octs sequence of octants. Octree will be built by completing this sequence of octants.
CalcCoef function pointer to function which will calculate the values of "alpha" and "beta" (see the equation above) for the center of each octant. Coordinates of all centers are provided in the first parameter (layout is X1,Y1,Z1,X2,Y2,Z2,...). Values should be returned in second parameter. The following layout should be used: alpha1,beta1,alpha2,beta2,.... Caller will set the array size for the second parameter (to be equal to 2/3 size of the first parameter).
CalcRHS function pointer to function which will calculate the value of "f" (see the equation above) for the center of each octant. Coordinates of all centers are provided in the first parameter (layout is the same as above). Values of "f" should be returned in second parameter. Caller will set the array size for the second parameter (to be equal to 1/3 size of the first parameter).
numMultigridLevels desired number of multigrid levels.
sol in this parameter the solution is returned. This object is automatically destroyed when the "damg" object (see next parameter) is destroyed.
damg in this parameter the multigrid context (used to calculate solution) is returned. User must destroy this object when no longer needed by calling DAMGDestroy

Definition at line 949 of file omgNeumann.C.

References ot::balanceOctree(), CalculateCenters(), ot::completeOctree(), ComputeJacobian2(), ComputeRHS_omgNeumann(), CreateJacobian2(), createLmatType2(), createMmatType2(), createRHSType2(), ot::DAMG, ot::DAMGCreateAndSetDA(), DAMGGetx, ot::DAMGSetKSP(), ot::DAMGSolve(), DendroIntL, destroyLmatType2(), destroyMmatType2(), destroyRHSType2(), DestroyUserContexts(), force_values, ot::DA::getMaxDepth(), LaplacianType2Stencil, MassType2Stencil, RHSType2Stencil, and SetPDECoefFromPts().

Referenced by main().


Generated on Tue Mar 24 16:14:08 2009 for DENDRO by  doxygen 1.3.9.1