Module to describe attributes attached to geometrical objects.
Attribute list will be a dynamic unique list. Thus, multiple definitions of the same attribute in the configuration file does not result in multiple storages.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public, | parameter | :: | sdr_object_kinds_max | = | 5 | Maximal number of different object kinds to distinguish. This is used to allow allocations of arrays for all object kinds with direct access to each component by the sdr_*_object constants below. |
integer, | public, | parameter | :: | sdr_Boundary_object | = | 1 | Identifier for boundary objects |
integer, | public, | parameter | :: | sdr_Seed_object | = | 2 | Identifier for seed objects |
integer, | public, | parameter | :: | sdr_Refinement_object | = | 3 | Identifier for refinement objects |
integer, | public, | parameter | :: | sdr_Fluidifyable_object | = | 4 | Identifier for solid objects, that can be fluidify in the solver |
integer, | public, | parameter | :: | sdr_noSolidification_object | = | 5 | Identifier for no Solidification objects |
initialize the dynamic array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grw_distancerefinearray_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_distancerefinearray_type) | :: | me |
empty the entries without changing arrays
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grw_distancerefinearray_type) | :: | me |
destroy the dynamic array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grw_distancerefinearray_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_distancerefinearray_type) | :: | me | ||||
type(sdr_distanceRefine_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_distancerefinearray_type) | :: | me | ||||
type(sdr_distanceRefine_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_distancerefinearray_type) | :: | me | ||||
type(sdr_distanceRefine_type), | intent(in) | :: | val | |||
integer, | intent(in), | optional | :: | length | optional length to expand the array |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grw_distancerefinearray_type) | :: | me | ||||
type(sdr_distanceRefine_type), | intent(in) | :: | val(:) | |||
integer, | intent(in), | optional | :: | length | optional length to expand the array |
fix the dynamic array, meaning: store the array in the sorted order and cut off the trailing empty entries
fixing the dynamic array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dyn_attributearray_type) | :: | me |
return the position of a given value in the array val, which is what you usually want to know. it is the index of a given value
the actual position of a given value in the dynamic array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dyn_attributearray_type), | intent(in) | :: | me | |||
type(sdr_attribute_type), | intent(in) | :: | val | |||
logical, | intent(in), | optional | :: | nextifnotfound | flag to indicate, if the position of the next entry in the sorted list should be returned instead, if val is not found. |
|
integer, | intent(in), | optional | :: | lower | ||
integer, | intent(in), | optional | :: | upper |
increase the size of the container for the array.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grw_distancerefinearray_type) | :: | me | ||||
integer, | intent(in), | optional | :: | pos | ||
integer, | intent(in), | optional | :: | length | optional length to expand the array |
initialize the dynamic array
initialization of a dynamic array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dyn_attributearray_type), | intent(out) | :: | me | |||
integer, | intent(in), | optional | :: | length |
destroy the dynamic array
destruction of a dynamic array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dyn_attributearray_type), | intent(inout) | :: | me |
append a value to the dynamic array and return its position.
appending a value to the dynamic array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dyn_attributearray_type) | :: | me | ||||
type(sdr_attribute_type), | intent(in) | :: | val | |||
integer, | intent(in), | optional | :: | length | optional length to expand the array |
|
integer, | intent(out), | optional | :: | pos | position in the array, if the value is found |
|
logical, | intent(out), | optional | :: | wasadded | flag to indicate, if val was newly added |
appending a sorted list of values to the dynamic array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dyn_attributearray_type) | :: | me | ||||
type(sdr_attribute_type), | intent(in) | :: | val(:) | |||
integer, | intent(in), | optional | :: | length | optional length to expand the array |
|
integer, | intent(out), | optional | :: | pos(:) | position in the array, the values are found at. |
|
logical, | intent(out), | optional | :: | wasadded(:) | flag to indicate, if val was newly added |
truncate the array, meaning cut off the trailing empty entries
truncate the array after the last valid entry and hence cut off the empty trailing empty entries
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dyn_attributearray_type) | :: | me |
empty the array, reset nvals to be 0
empty all contents of the array without changing the size or status of any array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dyn_attributearray_type) | :: | me |
increase the size of the container for the array.
expanding the dynamic array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dyn_attributearray_type) | :: | me | ||||
integer, | optional | :: | increment | |||
integer, | intent(in), | optional | :: | length | optional length to expand the array |
return the position of a given value in the list 'sorted'. this is mainly for internal usage. the sorted list is only a pointer list to the actual values thus, in order to get the index of a given value, you need to look up the entry in the sorted list. this is done by the positionofval routine
return the sorted position of a value in the given dynamic array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dyn_attributearray_type), | intent(in) | :: | me | |||
type(sdr_attribute_type), | intent(in) | :: | val | |||
logical, | intent(in), | optional | :: | nextifnotfound | flag to indicate, if the next entry in the list should be returned, if the searched one is not found. |
|
integer, | intent(in), | optional | :: | lower | ||
integer, | intent(in), | optional | :: | upper |
This function provides the test for equality of two attributes.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(sdr_attribute_type), | intent(in) | :: | left | attribute to compare |
||
type(sdr_attribute_type), | intent(in) | :: | right | attribute to compare against |
is equal??
This function provides the test for unequality of two attributes.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(sdr_attribute_type), | intent(in) | :: | left | attribute to compare |
||
type(sdr_attribute_type), | intent(in) | :: | right | attribute to compare against |
is unequal??
This function provides a comparison of two attributes.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(sdr_attribute_type), | intent(in) | :: | left | attribute to compare |
||
type(sdr_attribute_type), | intent(in) | :: | right | attribute to compare against |
is smaller??
This function provides a comparison of two attributes.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(sdr_attribute_type), | intent(in) | :: | left | attribute to compare |
||
type(sdr_attribute_type), | intent(in) | :: | right | attribute to compare against |
is smaller??
This function provides a comparison of two attributes.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(sdr_attribute_type), | intent(in) | :: | left | attribute to compare |
||
type(sdr_attribute_type), | intent(in) | :: | right | attribute to compare against |
is greater??
This data type describes type of attribute
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | private | :: | kind | Kind of this attribute: - boundary - seed - refinement - fluidifyable - noSolidification |
|||
character(len=labelLen), | private | :: | label | Label to identify this attribute. |
|||
character(len=labelLen), | private | :: | color | Color to associate the object with. |
|||
integer, | private | :: | level | Refinement level to resolve this attribute with at least. |
|||
integer, | private | :: | id | = | 0 | ID in the list of attributes of this kind. |
|
integer, | private | :: | uni_id | = | 0 | Uni-id of this attribute in the list of unique names for this kind. (labels for boundaries, colors for seeds) |
|
logical, | private | :: | subresolution | = | .false. | This object should be resolved further than the elements of the mesh. |
|
logical, | private | :: | calc_dist | = | .false. | Indicator of whether to calculate link-wise distance |
|
logical, | private | :: | flood_diagonal | = | .true. | Indicator of whether to flood diagonal node during flood_periphery |
|
integer, | private | :: | distRefine_id | = | 0 | Uni-id to identify attribute with certain number of distance refinement |
|
integer, | private | :: | distance_first | = | 0 | Start position of distance refine object of this attribute in growing array of distance refine |
|
integer, | private | :: | distance_last | = | 0 | Last position of distance refine object of this attribute in growing array of distance refine |
dynamic array (da) type for type(sdr_attribute_type)
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | private | :: | nvals | = | 0 | ||
integer, | private | :: | containersize | = | 0 | ||
type(sdr_attribute_type), | private, | allocatable | :: | val(:) | |||
integer, | private, | allocatable | :: | sorted(:) |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(dyn_attributearray_type), | private | :: | dynArray | Dynamic array of all unique attributes. |
|||
type(dyn_labelarray_type), | private | :: | uni_name(sdr_object_kinds_max) | Unique list of used names for the various attribute kinds. |
|||
integer, | private | :: | none_color_id | = | -1 | uni_id of the 'none' color. |
|
integer, | private, | allocatable | :: | bc_color_id(:) | ID of unique colors for each kindpos(sdr_Boundary_object). |
||
logical, | private, | allocatable | :: | color_inverted(:) | Flag for each unique color, wether it should be inverted. |
||
type(grw_logicalarray_type), | private | :: | bc_uni_calcdist | Growing array with flags on whether to calculate distances for each unique boundary. |
|||
type(grw_intarray_type), | private | :: | kindpos(sdr_object_kinds_max) | A list of all the attribute positions for each kind. This provides the mapping of the kind id to the attribute position. |
|||
type(grw_distancerefinearray_type), | private | :: | distRefine | Growing array of distance refinement info for boundary attribute. Use dynArray%distRefine_id to create attribute with distance refine |
This data type contains info for distance refinement defined in config file for each boundary attribute.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=rk), | private | :: | radius | Defines the distance to which this boundary should be refined |
|||
integer, | private | :: | reach_level | level to refine nodes with in given radius |
growing array type for type(sdr_distancerefine_type)
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | private | :: | nvals | = | 0 | ||
integer, | private | :: | containersize | = | 0 | ||
type(sdr_distanceRefine_type), | private, | allocatable | :: | val(:) |
Returns if any bc attribute has the subresolution option set.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(sdr_attrList_type), | intent(in) | :: | attribute | The attribute list to check th boundaries in. |
Returned value, true if any boundary object has the subresolution flag set.
Returns if any bc attribute has the distance refine option with reach_level>0.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(sdr_attrList_type), | intent(in) | :: | attribute | The attribute list to check th boundaries in. |
Returned value, true if any boundary object has the valid distance refine
Returns if periodic bc attribute is defined
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(sdr_attrList_type), | intent(in) | :: | attribute | The attribute list to check th boundaries in. |
Returned value, true if periodic attribute is defined
Get all attributes of the given object kind and (unique) id from the list of attributes in "attribute".
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(sdr_attrList_type), | intent(in) | :: | attribute | The list of attributes to look up the unique entries in. |
||
integer, | intent(in) | :: | object_kind | The kind of objects to look for (boundaries, seeds, refinements...) |
||
integer, | intent(in) | :: | id | The unique id, to look for (all attributes with this id will be returned). |
Resulting list of attributes with the same unique id.
return the sorted position of a value in the given dynamic array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dyn_attributearray_type), | intent(in) | :: | me | |||
type(sdr_attribute_type), | intent(in) | :: | val | |||
logical, | intent(in), | optional | :: | nextifnotfound | flag to indicate, if the next entry in the list should be returned, if the searched one is not found. |
|
integer, | intent(in), | optional | :: | lower | ||
integer, | intent(in), | optional | :: | upper |
the actual position of a given value in the dynamic array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dyn_attributearray_type), | intent(in) | :: | me | |||
type(sdr_attribute_type), | intent(in) | :: | val | |||
logical, | intent(in), | optional | :: | nextifnotfound | flag to indicate, if the position of the next entry in the sorted list should be returned instead, if val is not found. |
|
integer, | intent(in), | optional | :: | lower | ||
integer, | intent(in), | optional | :: | upper |
This function provides the test for equality of two attributes.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(sdr_attribute_type), | intent(in) | :: | left | attribute to compare |
||
type(sdr_attribute_type), | intent(in) | :: | right | attribute to compare against |
is equal??
This function provides the test for unequality of two attributes.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(sdr_attribute_type), | intent(in) | :: | left | attribute to compare |
||
type(sdr_attribute_type), | intent(in) | :: | right | attribute to compare against |
is unequal??
This function provides a comparison of two attributes.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(sdr_attribute_type), | intent(in) | :: | left | attribute to compare |
||
type(sdr_attribute_type), | intent(in) | :: | right | attribute to compare against |
is smaller??
This function provides a comparison of two attributes.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(sdr_attribute_type), | intent(in) | :: | left | attribute to compare |
||
type(sdr_attribute_type), | intent(in) | :: | right | attribute to compare against |
is smaller??
This function provides a comparison of two attributes.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(sdr_attribute_type), | intent(in) | :: | left | attribute to compare |
||
type(sdr_attribute_type), | intent(in) | :: | right | attribute to compare against |
is greater??
Subroutine to initialize the list for all attributes
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(sdr_attrList_type), | intent(out) | :: | me |
This routine loads the attribute information from the config file.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(sdr_attrList_type), | intent(inout) | :: | attrList | dynamic array of attribute type |
||
type(flu_State) | :: | conf | ||||
integer, | intent(in) | :: | thandle | |||
type(dyn_labelarray_type), | intent(in) | :: | subres_colors | List of colors which should by default use subelement resolution for their boundaries. |
||
integer, | intent(out) | :: | attr_pos |
Identify all unique boundary colors, after all boundary attributes and seeds are known.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(sdr_attrList_type), | intent(inout) | :: | attribute |
Look up colors that should be inverted and set their inversion flag accordingly.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(sdr_attrList_type), | intent(inout) | :: | attribute | |||
type(dyn_labelarray_type), | intent(in) | :: | invert_color |
This routine loads the distance refine table from attribute table and appends the loaded distance in radius and level to refine nodes within radius the given radius.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(sdr_attrList_type), | intent(inout) | :: | attrList | dynamic array of attribute type |
||
type(flu_State) | :: | conf | ||||
integer, | intent(in) | :: | thandle | |||
type(sdr_attribute_type), | intent(inout) | :: | attribute | save attibute info temporarily |
load single distance refine table
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(sdr_attrList_type), | intent(inout) | :: | attrList | dynamic array of attribute type |
||
type(flu_State) | :: | conf | ||||
integer, | intent(in) | :: | thandle | |||
type(sdr_attribute_type), | intent(inout) | :: | attribute | save attibute info temporarily |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grw_distancerefinearray_type), | intent(out) | :: | me | |||
integer, | intent(in), | optional | :: | length |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grw_distancerefinearray_type), | intent(inout) | :: | me |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grw_distancerefinearray_type) | :: | me |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grw_distancerefinearray_type) | :: | me |
adds the value to a given position inside the growing array.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grw_distancerefinearray_type) | :: | me | ||||
type(sdr_distanceRefine_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_distancerefinearray_type) | :: | me | ||||
type(sdr_distanceRefine_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_distancerefinearray_type) | :: | me | ||||
type(sdr_distanceRefine_type), | intent(in) | :: | val | |||
integer, | intent(in), | optional | :: | length | optional length to expand the array |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grw_distancerefinearray_type) | :: | me | ||||
type(sdr_distanceRefine_type), | intent(in) | :: | val(:) | |||
integer, | intent(in), | optional | :: | length | optional length to expand the array |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grw_distancerefinearray_type) | :: | me | ||||
integer, | intent(in), | optional | :: | pos | ||
integer, | intent(in), | optional | :: | length | optional length to expand the array |
initialization of a dynamic array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dyn_attributearray_type), | intent(out) | :: | me | |||
integer, | intent(in), | optional | :: | length |
destruction of a dynamic array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dyn_attributearray_type), | intent(inout) | :: | me |
appending a value to the dynamic array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dyn_attributearray_type) | :: | me | ||||
type(sdr_attribute_type), | intent(in) | :: | val | |||
integer, | intent(in), | optional | :: | length | optional length to expand the array |
|
integer, | intent(out), | optional | :: | pos | position in the array, if the value is found |
|
logical, | intent(out), | optional | :: | wasadded | flag to indicate, if val was newly added |
appending a sorted list of values to the dynamic array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dyn_attributearray_type) | :: | me | ||||
type(sdr_attribute_type), | intent(in) | :: | val(:) | |||
integer, | intent(in), | optional | :: | length | optional length to expand the array |
|
integer, | intent(out), | optional | :: | pos(:) | position in the array, the values are found at. |
|
logical, | intent(out), | optional | :: | wasadded(:) | flag to indicate, if val was newly added |
truncate the array after the last valid entry and hence cut off the empty trailing empty entries
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dyn_attributearray_type) | :: | me |
empty all contents of the array without changing the size or status of any array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dyn_attributearray_type) | :: | me |
fixing the dynamic array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dyn_attributearray_type) | :: | me |
expanding the dynamic array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dyn_attributearray_type) | :: | me | ||||
integer, | optional | :: | increment | |||
integer, | intent(in), | optional | :: | length | optional length to expand the array |