Refine all elements defined in subtree by one level in the original mesh, and create a new mesh.
Orig_mesh needs to be a properly defined treelmesh, and subtree an accompanying subtree in that mesh. orig_bcs needs to be the boundary conditions accompanying the original mesh. New_mesh will be the resulting mesh after refining the elements at elempos. New_bcs will be the resulting boundary conditions for that new mesh. Per default, the elements from the orig_mesh that are not covered by the subtree are still part of new_mesh, just not refined. To change this behavior and include only the refined elements in the new mesh, set restrict_to_sub to true.
The boundary properties are the only ones, that will be inherited to the new mesh. All other properties will get lost!!!
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(treelmesh_type), | intent(in) | :: | orig_mesh | The original mesh to be refined.  | 
||
| type(tem_BC_prop_type), | intent(in) | :: | orig_bcs | Boundary conditions for the original mesh.  | 
||
| type(tem_subTree_type), | intent(in) | :: | subtree | (Process local) positions of elements to refine.  | 
||
| integer, | intent(in) | :: | ndims | Number of dimensions for the refinement The dimensionality can restrict the elements to create.  | 
||
| type(treelmesh_type), | intent(out) | :: | new_mesh | Newly created refined mesh.  | 
||
| type(tem_BC_prop_type), | intent(out) | :: | new_bcs | Boundary conditions for the new mesh.  | 
||
| logical, | intent(in), | optional | :: | restrict_to_sub | Flag to indicate, wether only refined elements should be put into the new mesh.  | 
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| logical, | public | :: | restrict | ||||
| logical, | public | :: | refine_all | ||||
| integer, | public | :: | iParent | ||||
| integer, | public | :: | nParents | ||||
| integer, | public | :: | parentpos | ||||
| integer, | public | :: | childpos | ||||
| integer, | public | :: | newpos | ||||
| integer, | public | :: | subpos | ||||
| integer, | public | :: | iError | ||||
| integer, | public | :: | bcprop | ||||
| integer, | public | :: | iBC_elem | ||||
| integer, | public | :: | iElem | ||||
| integer, | public | :: | iChild | ||||
| integer, | public | :: | iProp | ||||
| integer, | public | :: | iSide | ||||
| integer(kind=long_k), | public | :: | nNewElems | ||||
| integer(kind=long_k), | public | :: | nBCElems | ||||
| integer(kind=long_k), | public | :: | childID_off | ||||
| integer(kind=long_k), | public | :: | child_bcid(orig_bcs%nSides,2**ndims) | ||||
| integer, | public, | allocatable | :: | bc_child(:) | |||
| type(grw_long2darray_type), | public | :: | newbcid | ||||
| logical, | public | :: | has_boundary |