|
DOUG 0.2
|
Coarse grid implementation and utility functions. More...
Data Types | |
| type | CoarseGridElem |
| Coarse grid element. More... | |
| type | RefinedElem |
| type | CoarseGrid |
| Used for both global and local coarse grids. More... | |
Functions/Subroutines | |
| type(CoarseGrid) | CoarseGrid_new () |
| subroutine | CoarseGrid_allocate (C, nsd, nnode, coords, els, refels, cfreemap, local) |
| Allocate memory for CoarseGrid. | |
| subroutine | CoarseGrid_Destroy (C) |
| Free memory used by CoarseGrid. | |
| subroutine | CoarseGrid_pl2D_plotMesh (C, INIT_CONT_END) |
| integer | getelem (coords, mins, h, nc) |
| Get the initial coarse grid element the fine node lies in. | |
| subroutine | getRefBounds (refi, C, nsd, minv, maxv) |
| Calculate the bounds of the given refined coarse element. | |
| subroutine | adjustBounds (ct, pt, nsd, minv, maxv) |
| Create the bounds for the element whose one corner is ct, that is otherwise bounded by minv/maxv and contains pt. | |
| integer | getDir (ds, nsd) |
| Caluclate the direction number (1-4 or 1-7). | |
| integer | getNextElem (eli, dir, nsd, C) |
| Get the next coarse element in that direction. | |
| integer | getNeighbourEl (el, dir, nsd, nsame, C) |
| Locate the neighbour of a refined node in a given direction. | |
Variables | |
| integer, parameter | COARSE_CENTER_GEOM = 1 |
| Center choosing options. | |
| integer, parameter | COARSE_CENTER_MEAN = 2 |
| integer, parameter | COARSE_CENTER_MERID = 3 |
| integer, parameter | COARSE_INTERPOLATION_MULTLIN = 1 |
| Interpolation variants. | |
| integer, parameter | COARSE_INTERPOLATION_INVDIST = 2 |
| integer, parameter | COARSE_INTERPOLATION_KRIGING = 3 |
Coarse grid implementation and utility functions.
To familiarize yourself with the geometric coarse grid implementation, we recommend you get a printout of the type descriptions for CoarseGrid, Mesh and SpMtx and then proceed through the following files CreateCoarse->TransmitCoarse->CreateRestrict->GeomInterp->CoarseAllgathers It might be wise to also follow the flow of functions in main.F90 in parallel with the above process. This file mainly contains utility functions.
Some comments about the comments in the coarse grid code:
| subroutine CoarseGrid_class::adjustBounds | ( | real(kind=xyzk),dimension(nsd),intent(in) | ct, |
| real(kind=xyzk),dimension(nsd),intent(in) | pt, | ||
| integer,intent(in) | nsd, | ||
| real(kind=xyzk),dimension(nsd),intent(inout) | minv, | ||
| real(kind=xyzk),dimension(nsd),intent(inout) | maxv | ||
| ) |
Create the bounds for the element whose one corner is ct, that is otherwise bounded by minv/maxv and contains pt.
Definition at line 477 of file CoarseGrid.F90.
Referenced by ChooseCenter::ChooseCenter().
| subroutine CoarseGrid_class::CoarseGrid_allocate | ( | type(CoarseGrid),intent(inout) | C, |
| integer,intent(in),optional | nsd, | ||
| integer,intent(in),optional | nnode, | ||
| logical,intent(in),optional | coords, | ||
| logical,intent(in),optional | els, | ||
| logical,intent(in),optional | refels, | ||
| logical,intent(in),optional | cfreemap, | ||
| logical,intent(in),optional | local | ||
| ) |
Allocate memory for CoarseGrid.
Definition at line 149 of file CoarseGrid.F90.
References not.
Referenced by ChooseCenter::ChooseCenter(), CreateCoarseGrid::CreateCoarseFreemap(), TransmitCoarse::ReceiveCoarse(), and TransmitCoarse::SendCoarse().
| subroutine CoarseGrid_class::CoarseGrid_Destroy | ( | type(CoarseGrid),intent(inout) | C | ) |
Free memory used by CoarseGrid.
| C | The CoarseGrid to deallocate |
Definition at line 205 of file CoarseGrid.F90.
Referenced by CoarsePreconditioner_geometric_mod::CoarsePreconditioner_geometric_Init().
| type(CoarseGrid) CoarseGrid_class::CoarseGrid_new | ( | ) |
Definition at line 122 of file CoarseGrid.F90.
Referenced by TransmitCoarse::ReceiveCoarse(), and TransmitCoarse::SendCoarse().
| subroutine CoarseGrid_class::CoarseGrid_pl2D_plotMesh | ( | type(CoarseGrid),intent(in) | C, |
| integer,intent(in),optional | INIT_CONT_END | ||
| ) |
Definition at line 236 of file CoarseGrid.F90.
References not, or(), and globals::stream.
Referenced by CoarsePreconditioner_geometric_mod::CoarsePreconditioner_geometric_Init().
| integer CoarseGrid_class::getDir | ( | real(kind=xyzk),dimension(:),intent(in) | ds, |
| integer,intent(in) | nsd | ||
| ) |
Caluclate the direction number (1-4 or 1-7).
2 ^ 1 --+-> in the 2D case 4 | 3
Definition at line 498 of file CoarseGrid.F90.
Referenced by GeomInterp::CalcMlinearInterp(), ChooseCenter::ChooseCenter(), and getNeighbourEl().
| integer CoarseGrid_class::getelem | ( | real(kind=xyzk),dimension(:),intent(in) | coords, |
| real(kind=xyzk),dimension(:),intent(in) | mins, | ||
| real(kind=xyzk),dimension(:),intent(in) | h, | ||
| integer,dimension(:),intent(in) | nc | ||
| ) |
Get the initial coarse grid element the fine node lies in.
Only valid for global mesh, assumes all elems to be present
Definition at line 403 of file CoarseGrid.F90.
Referenced by ChooseCenter::ChooseCenter().
| integer CoarseGrid_class::getNeighbourEl | ( | integer,intent(in) | el, |
| integer,intent(in) | dir, | ||
| integer,intent(in) | nsd, | ||
| integer,dimension(:),intent(in) | nsame, | ||
| type(CoarseGrid),intent(in) | C | ||
| ) |
Locate the neighbour of a refined node in a given direction.
Uses getNextElem, so some restrictions apply.
| el | the element whose neighbour we want |
| dir | the direction to get the neighbour from |
| nsd | num of dimensions |
| nsame | next refinements of same level |
| C | the coarse grid itself |
Definition at line 565 of file CoarseGrid.F90.
References getDir(), and getNextElem().
Referenced by CreateCoarseGrid::CreateHangingNodes().
| integer CoarseGrid_class::getNextElem | ( | integer,intent(in) | eli, |
| integer,intent(in) | dir, | ||
| integer,intent(in) | nsd, | ||
| type(CoarseGrid),intent(in) | C | ||
| ) |
Get the next coarse element in that direction.
Directions are 1,2,4 and -1,-2,-4. Only valid for global mesh, assumes all elems to be present.
Definition at line 514 of file CoarseGrid.F90.
Referenced by getNeighbourEl().
| subroutine CoarseGrid_class::getRefBounds | ( | integer,intent(in) | refi, |
| type(CoarseGrid),intent(in) | C, | ||
| integer,intent(in) | nsd, | ||
| real(kind=xyzk),dimension(:),intent(out) | minv, | ||
| real(kind=xyzk),dimension(:),intent(out) | maxv | ||
| ) |
Calculate the bounds of the given refined coarse element.
Definition at line 427 of file CoarseGrid.F90.
References not.
Referenced by ChooseCenter::ChooseCenter().
| integer,parameter CoarseGrid_class::COARSE_CENTER_GEOM = 1 |
Center choosing options.
Definition at line 47 of file CoarseGrid.F90.
Referenced by CreateCoarseGrid::CreateCoarse().
| integer,parameter CoarseGrid_class::COARSE_CENTER_MEAN = 2 |
Definition at line 48 of file CoarseGrid.F90.
Referenced by CreateCoarseGrid::CreateCoarse().
| integer,parameter CoarseGrid_class::COARSE_CENTER_MERID = 3 |
Definition at line 49 of file CoarseGrid.F90.
Referenced by CreateCoarseGrid::CreateCoarse().
| integer,parameter CoarseGrid_class::COARSE_INTERPOLATION_INVDIST = 2 |
Definition at line 53 of file CoarseGrid.F90.
Referenced by CoarseCreateRestrict::CreateRestrict().
| integer,parameter CoarseGrid_class::COARSE_INTERPOLATION_KRIGING = 3 |
Definition at line 54 of file CoarseGrid.F90.
Referenced by CoarseCreateRestrict::CreateRestrict().
| integer,parameter CoarseGrid_class::COARSE_INTERPOLATION_MULTLIN = 1 |
Interpolation variants.
Definition at line 52 of file CoarseGrid.F90.
Referenced by CoarseCreateRestrict::CreateRestrict().
1.7.3-20110217