This module contains routines for boundary identification and qVal computation
HK: This module is utterly confusing, I do not really understand what all this code is actually doing, and it is hard to parse it. The module needs to be redesigned and cleaned up!
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=rk), | public, | parameter | :: | sdr_qVal_no_intersection | = | -1._rk | default qVal when no intersection |
This routine checks if a boundary need calc qVal for a given BCID It is used in identify_boundary routine
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(sdr_attrList_type), | intent(in) | :: | attribute | |||
integer, | intent(in) | :: | bcid |
This routine checks if a boundary need flood periphery for diagonal directions for a given BCID. It is used in identify_boundary routine
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(sdr_attrList_type), | intent(in) | :: | attribute | |||
integer, | intent(in) | :: | bcid |
This function returns the position of treeID of given coordReal in the the given mesh Start from minLevel which is the level of neighbor and find the treeID which is a leaf in protoTree
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | coordReal(3) | |||
type(treelmesh_type), | intent(in) | :: | mesh | Mesh contain geometry universe (bounding cube) info |
||
integer, | intent(in) | :: | minLevel | minlevel |
||
integer, | intent(in) | :: | maxLevel | maxlevel |
||
integer, | intent(out) | :: | leafLevel | level in which leaf node is found |
||
integer(kind=long_k), | intent(inout) | :: | leafTreeID | |||
type(sdr_protoTree_type), | intent(in) | :: | proto | preliminary tree |
position of treeID in proto tree
This function project given vector on an given plane
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | vecU(3) | vector to project |
||
type(tem_plane_type), | intent(in) | :: | plane | plane on which vecU will be projected |
output projected value
This routine checks for boundary neighbors and level of the boundary node
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | node_pos | Position of leaf in the preliminary tree |
||
integer(kind=long_k), | intent(in) | :: | treeID | treeID of parent node |
||
integer, | intent(in) | :: | coord(4) | Coordinate of treeID |
||
type(levelValues_type), | intent(in) | :: | leVal | level value of parent node |
||
type(sdr_protoTree_type), | intent(in) | :: | proto | preliminary tree |
||
type(sdr_geometry_type), | intent(in) | :: | geometry | contains all geometrical objects |
||
integer(kind=long_k), | intent(out) | :: | BC_ID(qQQQ) | Boundary ID for all 26 neighbor directions |
||
real(kind=rk), | intent(out) | :: | qVal(qQQQ) | distance from boundary for all 26 neighbor directions |
||
type(treelmesh_type), | intent(in) | :: | meshUniverse | contains bounding cube information |
This routine find the treeID on the opposite side neighbor of the periodic plane for current leaf node
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | elemBary(3) | current element barycenter |
||
integer, | intent(in) | :: | iDir | Current boundary neighbor direction |
||
integer(kind=long_k), | intent(inout) | :: | bc_ID | treeiD of opposite neighbor with periodic plane |
||
real(kind=rk), | intent(out) | :: | qVal | distance from boundary for direction iDir TodoHK: maybe turn this optional, why is it relevant for periodic? |
||
logical, | intent(inout) | :: | unKnownBnd | Set to true if a neighbor with no property is encountered |
||
integer, | intent(in) | :: | neighbor_pos | position of neighbor treeID in the proto%node list |
||
integer, | intent(in) | :: | neighbor_level | level of the periodic boundary neighbor node |
||
type(levelValues_type), | intent(in) | :: | leVal | level value of parent node |
||
type(sdr_protoTree_type), | intent(in) | :: | proto | preliminary tree |
||
type(sdr_geometry_type), | intent(in) | :: | geometry | contains all geometrical objects |
||
type(treelmesh_type), | intent(in) | :: | meshUniverse | contains bounding cube information |
This routine computes the minimum distance of a given link and all the geometries in a given node:\n the link is given by a vector and a origin point.\n the node is given by the node position in the protoTree.\n If there is no intersection, qVal returns -1.0
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(sdr_protoTree_type), | intent(in) | :: | proto | preliminary tree |
||
type(sdr_geometry_type), | intent(in) | :: | geometry | contains all geometrical objects |
||
real(kind=rk), | intent(in) | :: | dx | dx of current level |
||
integer, | intent(in) | :: | iDir | Direction |
||
real(kind=rk), | intent(in) | :: | origin(3) | current element barycenter |
||
integer | :: | node_pos | position of node to find the geometries |
|||
real(kind=rk), | intent(out) | :: | qVal | distance from boundary for all 26 neighbor directions |
This routine gets minBCID of the given node position in the protoTree. If the minBcid is periodic then it bcID is set to treeID of fluid node on the opposite side of periodic plane. It also computes the qVal if calc_dist = true. If qVal = -1 then there is no intersection and if qVal > 1 then the geometry is intersected after the link distance.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(sdr_protoTree_type), | intent(in) | :: | proto | preliminary tree |
||
type(sdr_geometry_type), | intent(in) | :: | geometry | contains all geometrical objects |
||
real(kind=rk), | intent(in) | :: | elemBary(3) | current element barycenter |
||
integer, | intent(in) | :: | iDir | Current boundary neighbor direction |
||
integer, | intent(in) | :: | bndnode_pos | position of node treeID in the proto%node list |
||
integer, | intent(in) | :: | level | level of the node |
||
type(levelValues_type), | intent(in) | :: | leVal | level value of parent node |
||
type(treelmesh_type), | intent(in) | :: | meshUniverse | contains bounding cube information |
||
integer(kind=long_k), | intent(out) | :: | BC_ID | Boundary ID for direction iDir |
||
integer(kind=long_k), | intent(inout) | :: | minBCID | minimum boundary id of current node before truncation |
||
real(kind=rk), | intent(out) | :: | qVal | distance from boundary for direction iDir |
||
logical, | intent(inout) | :: | unKnownBnd | Is true if a neighbor with no property is encountered |
This routine gives special treatment when qVal > 1.0 or qVal == -1.0 for flooded neighbor, treat it as normal fluid: clean BCID, set qVal to -1 (no itersection). for non-flooded neighbor, treat it as high order wall: set qVal to 1
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(sdr_protoTree_type), | intent(in) | :: | proto | preliminary tree |
||
real(kind=rk), | intent(inout) | :: | qVal | qValue |
||
integer(kind=long_k), | intent(inout) | :: | BCID | boundary id |
||
integer, | intent(in) | :: | neighPos | neighbor position in proto tree |
||
integer(kind=long_k), | intent(in), | optional | :: | treeID_periodic | negative treeID of periodic domain |