This module provides descriptions for elements
dynamic array of variable types
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public, | parameter | :: | eT_undefined | = | -1 | |
| integer, | public, | parameter | :: | eT_nonExisting | = | 0 | |
| integer, | public, | parameter | :: | eT_fluid | = | 1 | |
| integer, | public, | parameter | :: | eT_ghostFromCoarser | = | 2 | |
| integer, | public, | parameter | :: | eT_ghostFromFiner | = | 3 | |
| integer, | public, | parameter | :: | eT_halo | = | 4 | |
| integer, | public, | parameter | :: | eT_distributedGhostFromFiner | = | 5 | |
| integer, | public, | parameter | :: | eT_sacrificed | = | 6 | Element properties which are created while adaptive refinement |
| integer, | public, | parameter | :: | eT_minNumber | = | -1 | eType integer values must be in the range of eT_minNumber <= eT_val <= eT_maxNumber |
| integer, | public, | parameter | :: | eT_maxNumber | = | 7 | |
| integer, | public, | parameter | :: | eT_minRelevant | = | 1 | Relevant number of element types. As the distributed ghost from finer are in the assemble list step collapsed with the normal ghosFromFiner, only eType = 1 to 4 needs to be treated afterwards |
| integer, | public, | parameter | :: | eT_maxRelevant | = | 4 | |
| character(len=12), | public, | parameter | :: | eT_labels(eT_minNumber:eT_maxNumber) | = | [' undefined', ' nonExisting', ' fluid', 'gFromCoarser', ' gFromFiner', ' halo', ' dgFromFiner', ' sacrificed', ' newFluid'] | Array of element type labels To use it, one can do the following: write(,) trim(eT_labels(levelDesc( level )%elem%eType%val( tPos ))) |
| integer, | private, | parameter | :: | eT_newFluid | = | 7 |
initialize the dynamic array
Include the subroutines for the dynamic array.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(grw_grw_stencilelementarray_type), | intent(out) | :: | me | |||
| integer, | intent(in), | optional | :: | length |
truncate the array, meaning cut off the trailing empty entries
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(grw_grw_stencilelementarray_type) | :: | me |
empty the entries without changing arrays
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(grw_grw_stencilelementarray_type) | :: | me |
destroy the dynamic array
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(grw_grw_stencilelementarray_type), | intent(inout) | :: | me |
insert an element at a given position
adds the value to a given position inside the growing array.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(grw_grw_stencilelementarray_type) | :: | me | ||||
| type(grw_stencilelementarray_type), | intent(in) | :: | val | |||
| integer, | intent(in) | :: | pos | |||
| integer, | intent(in), | optional | :: | length | optional length to expand the array |
adds the values starting from a given position inside the growing array.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(grw_grw_stencilelementarray_type) | :: | me | ||||
| type(grw_stencilelementarray_type), | intent(in) | :: | val(:) | |||
| integer, | intent(in) | :: | pos | |||
| integer, | intent(in), | optional | :: | length | optional length to expand the array |
append a value to the dynamic array and return its position.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(grw_grw_stencilelementarray_type) | :: | me | ||||
| type(grw_stencilelementarray_type), | intent(in) | :: | val | |||
| integer, | intent(in), | optional | :: | length | optional length to expand the array |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(grw_grw_stencilelementarray_type) | :: | me | ||||
| type(grw_stencilelementarray_type), | intent(in) | :: | val(:) | |||
| integer, | intent(in), | optional | :: | length | optional length to expand the array |
increase the size of the container for the array.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(grw_grw_stencilelementarray_type) | :: | me | ||||
| integer, | intent(in), | optional | :: | pos | ||
| integer, | intent(in), | optional | :: | length | optional length to expand the array |
return the number of total allocated memory (bytes) per element
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(tem_element_type), | intent(inout) | :: | me | element object |
||
| integer(kind=long_k), | intent(out) | :: | elemSize | number of total entries to be returned |
return the number of actual used memory (bytes) per element
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(tem_element_type), | intent(inout) | :: | me | element object |
||
| integer(kind=long_k), | intent(out) | :: | elemSize | number of total entries to be returned |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(tem_element_type), | intent(inout) | :: | me | |||
| integer, | intent(in) | :: | elemPos | |||
| integer, | intent(in) | :: | new_eType |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(tem_element_type), | intent(inout) | :: | me | |||
| integer, | intent(in) | :: | nElems | |||
| integer, | intent(in) | :: | elemPos(:) | |||
| integer, | intent(in) | :: | new_eType |
initialize an element and optionally set contents
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(tem_element_type), | intent(out) | :: | me | |||
| integer, | intent(in), | optional | :: | length |
append an element with its treeID, property, element type, position in Tree, position in boundary_ID, number of neighbors, procID
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(tem_element_type), | intent(inout) | :: | me | element object |
||
| integer(kind=long_k), | intent(in) | :: | tID | element treeID |
||
| integer(kind=long_k), | intent(in), | optional | :: | property | property associated with the treeID |
|
| integer, | intent(in), | optional | :: | eType | element type |
|
| integer, | intent(in), | optional | :: | pntTID | count of this type pointer of the treeID |
|
| integer, | intent(in), | optional | :: | sourceProc | the procID which is adding the element |
|
| integer, | intent(in), | optional | :: | nNeighIDs | number of neighbors |
|
| integer, | intent(in), | optional | :: | haloNesting | nesting level for haloElems |
|
| logical, | intent(in), | optional | :: | needsUpdate | ||
| type(tem_stencilElement_type), | intent(in), | optional | :: | stencilElements(:) | ||
| integer, | intent(out) | :: | pos | position of treeID |
||
| logical, | intent(out), | optional | :: | wasAdded |
truncate all the lists in the element object
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(tem_element_type), | intent(inout) | :: | me | element object |
destroy all the lists in the element object
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(tem_element_type), | intent(inout) | :: | me | element object |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(dyn_longarray_type), | private | :: | tID | Tree ID |
|||
| type(grw_longarray_type), | private | :: | property | Property |
|||
| type(grw_intarray_type), | private | :: | eType | element type: fluid, ghostFromCoarser, ghostFromFiner, halo |
|||
| type(grw_intarray_type), | private | :: | pntTID | Pointer to the original treeID list It should have the same size of tree It is destroyed in assemble_lists |
|||
| type(grw_grw_stencilelementarray_type), | private | :: | stencil | Stencils defined for this element |
|||
| type(grw_dynlongarray_type), | private | :: | neighID | neighbor treeIDs coming from the stencil definitions each element has a list of neighbors, so this is an array of array |
|||
| type(grw_intarray_type), | private | :: | sourceProc | source partition (starts at 1) |
|||
| type(grw_intarray_type), | private | :: | haloNesting | nesting (only relevant for halos, to include their neighborhood) |
|||
| type(grw_logicalarray_type), | private | :: | needsUpdate | does this element need an update |
|||
| integer, | private | :: | nElems(eT_minNumber:eT_maxNumber) | number of various types elements |
growing array type for type(grw_stencilelementarray_type)
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | private | :: | nvals | = | 0 | ||
| integer, | private | :: | containersize | = | 0 | ||
| type(grw_stencilelementarray_type), | private, | allocatable | :: | val(:) |
Return the element type of a treeID .
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=long_k), | intent(in) | :: | tID | the element you are looking for |
||
| type(tem_element_type), | intent(in) | :: | me | the descriptor you use for searching |
element type
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | eT |
Write element information to disk
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(tem_element_type), | intent(in) | :: | me | element object |
||
| integer, | intent(in) | :: | elemPos | |||
| integer, | intent(in) | :: | nUnit | |||
| logical, | intent(in), | optional | :: | compact | ||
| logical, | intent(in), | optional | :: | header | ||
| logical, | intent(in), | optional | :: | stencil | Whether to write stencil information |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | nElems(eT_minRelevant:eT_maxRelevant) | |||
| integer, | intent(in) | :: | outUnit |
Include the subroutines for the dynamic array.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(grw_grw_stencilelementarray_type), | intent(out) | :: | me | |||
| integer, | intent(in), | optional | :: | length |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(grw_grw_stencilelementarray_type), | intent(inout) | :: | me |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(grw_grw_stencilelementarray_type) | :: | me |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(grw_grw_stencilelementarray_type) | :: | me |
adds the value to a given position inside the growing array.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(grw_grw_stencilelementarray_type) | :: | me | ||||
| type(grw_stencilelementarray_type), | intent(in) | :: | val | |||
| integer, | intent(in) | :: | pos | |||
| integer, | intent(in), | optional | :: | length | optional length to expand the array |
adds the values starting from a given position inside the growing array.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(grw_grw_stencilelementarray_type) | :: | me | ||||
| type(grw_stencilelementarray_type), | intent(in) | :: | val(:) | |||
| integer, | intent(in) | :: | pos | |||
| integer, | intent(in), | optional | :: | length | optional length to expand the array |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(grw_grw_stencilelementarray_type) | :: | me | ||||
| type(grw_stencilelementarray_type), | intent(in) | :: | val | |||
| integer, | intent(in), | optional | :: | length | optional length to expand the array |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(grw_grw_stencilelementarray_type) | :: | me | ||||
| type(grw_stencilelementarray_type), | intent(in) | :: | val(:) | |||
| integer, | intent(in), | optional | :: | length | optional length to expand the array |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(grw_grw_stencilelementarray_type) | :: | me | ||||
| integer, | intent(in), | optional | :: | pos | ||
| integer, | intent(in), | optional | :: | length | optional length to expand the array |
initialize an element and optionally set contents
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(tem_element_type), | intent(out) | :: | me | |||
| integer, | intent(in), | optional | :: | length |
truncate all the lists in the element object
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(tem_element_type), | intent(inout) | :: | me | element object |
return the number of actual used memory (bytes) per element
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(tem_element_type), | intent(inout) | :: | me | element object |
||
| integer(kind=long_k), | intent(out) | :: | elemSize | number of total entries to be returned |
return the number of total allocated memory (bytes) per element
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(tem_element_type), | intent(inout) | :: | me | element object |
||
| integer(kind=long_k), | intent(out) | :: | elemSize | number of total entries to be returned |
destroy all the lists in the element object
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(tem_element_type), | intent(inout) | :: | me | element object |
append an element with its treeID, property, element type, position in Tree, position in boundary_ID, number of neighbors, procID
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(tem_element_type), | intent(inout) | :: | me | element object |
||
| integer(kind=long_k), | intent(in) | :: | tID | element treeID |
||
| integer(kind=long_k), | intent(in), | optional | :: | property | property associated with the treeID |
|
| integer, | intent(in), | optional | :: | eType | element type |
|
| integer, | intent(in), | optional | :: | pntTID | count of this type pointer of the treeID |
|
| integer, | intent(in), | optional | :: | sourceProc | the procID which is adding the element |
|
| integer, | intent(in), | optional | :: | nNeighIDs | number of neighbors |
|
| integer, | intent(in), | optional | :: | haloNesting | nesting level for haloElems |
|
| logical, | intent(in), | optional | :: | needsUpdate | ||
| type(tem_stencilElement_type), | intent(in), | optional | :: | stencilElements(:) | ||
| integer, | intent(out) | :: | pos | position of treeID |
||
| logical, | intent(out), | optional | :: | wasAdded |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(tem_element_type), | intent(inout) | :: | me | |||
| integer, | intent(in) | :: | elemPos | |||
| integer, | intent(in) | :: | new_eType |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(tem_element_type), | intent(inout) | :: | me | |||
| integer, | intent(in) | :: | nElems | |||
| integer, | intent(in) | :: | elemPos(:) | |||
| integer, | intent(in) | :: | new_eType |