This module provides the description of colors for elements.
Colors might be used to describe different areas in the domain, for example varying material parameters.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public, | parameter | :: | colors_per_char | = | 7 |
Number of colors to store per character. We use the ASCII character set to encode the colors. Thus, 7 colors can be stored in each of them. This leaves us with unused space of 1/8 in the files. However, it is pretty likely that we will use less then 7 colors in common settings and in this case using a single byte for all colors is the smallest packing we can use conveniently. |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(tem_prophead_type), | public, | pointer | :: | header | => | null() |
Pointer to treelmesh_type%global%property |
integer, | public | :: | nColors |
Number of colors present in the mesh. |
|||
integer, | public | :: | nChars |
Number of characters required to store a bit for each color. |
|||
character(len=LabelLen), | public, | allocatable | :: | color_label(:) |
Array of labels identifying each of the colors. This array has a length of nColors |
||
real(kind=rk), | public, | allocatable | :: | color_fill(:) |
Value to use, where the color is present. |
||
real(kind=rk), | public, | allocatable | :: | color_void(:) |
Value to use, where the color is not present. |
||
character(len=1), | public, | allocatable | :: | colored_bit(:,:) |
Actual color identification. |
||
type(tem_property_type), | public, | pointer | :: | property | => | null() |
Pointer to treelmesh_type%property |
Load the color property from disk.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_color_prop_type), | intent(out) | :: | me |
Color definitions to load. |
||
type(treelmesh_type), | intent(in) | :: | tree |
Tree to build the polynomial subresolution information for |
||
integer, | intent(in) | :: | myPart |
Partition to load |
||
integer, | intent(in) | :: | comm |
Communicator to use |
Write the color property to disk.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_color_prop_type), | intent(out) | :: | me |
Color definitions to load. |
||
integer(kind=long_k), | intent(in) | :: | offset |
Offset of the local set of elements in the global list |
||
integer, | intent(in) | :: | nElems |
Local number of elements with this property |
||
character(len=*), | intent(in) | :: | basename |
Name of the file, the data is stored in, will be appended with ".lua" for the header information and ".lsb" or ".msb" for the binary data. An ".ascii" extension will be used for ASCII data. |
||
integer, | intent(in) | :: | myPart |
Partition to load |
||
integer, | intent(in) | :: | comm |
Communicator to use |