| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(SEMHex), | public, | pointer | :: | activeGeom | => | null() | its geometry |
| type(SEMQuad), | public, | pointer | :: | activeGeom2 | => | null() | surface geometry (only with a 2-D model) |
| type(Mesh3D), | public, | pointer | :: | activeMesh | => | null() | extruded mesh the 3-D model runs on |
| type(Mesh2D), | public, | pointer | :: | activeSurf | => | null() | surface mesh of the current columns |
| type(Mesh2D), | public, | pointer | :: | baseSurf | => | null() | caller-owned; metadata source for EmitMesh |
| integer, | public | :: | bottomBC | = | 0 | boundary condition id of the column bottoms |
|
| real(kind=prec), | public | :: | coarsenThreshold | = | 0.0_prec | ||
| real(kind=prec), | public, | allocatable | :: | energyWeights(:) | Migration windows for every rank, in surface elements (columns) and in 3-D elements |
||
| type(QuadTreeMesh2D), | public | :: | forest | ||||
| logical, | public | :: | hasModel2D | = | .false. | whether Init was given a 2-D model |
|
| type(RefinementIndicator3D), | public | :: | indicator | ||||
| type(Lagrange), | public, | pointer | :: | interp | => | null() | the models' solution interpolant |
| integer, | public | :: | ivar | = | SELF_AMR_ALLVARS | driving 3-D variable for the indicator |
|
| procedure(SELF_ExtrudedLevels), | public, | pointer, nopass | :: | levels | => | null() | |
| integer, | public | :: | maxLevel | = | 1 | refinement-level cap |
|
| integer, | public | :: | nHalo | = | 1 | refine-flag halo-expansion passes (in columns) |
|
| integer(kind=int64), | public | :: | nMigrateBytesRecv | = | 0 | ||
| integer(kind=int64), | public | :: | nMigrateBytesSent | = | 0 | ||
| integer(kind=int64), | public | :: | nMigrateElemRemote | = | 0 | ||
| integer, | public | :: | nz | = | 0 | layers per column |
|
| logical, | public | :: | ownsActive | = | .false. | whether the active meshes/geometries were emitted by us |
|
| real(kind=prec), | public | :: | refineThreshold | = | 0.0_prec | ||
| real(kind=prec), | public | :: | relativeEnergyFloor | = | SELF_AMR_DEFAULT_RELFLOOR | ||
| real(kind=prec), | public | :: | significantEnergyFloor | = | SELF_AMR_DEFAULT_RELFLOOR | ||
| integer, | public | :: | topBC | = | 0 | boundary condition id of the column tops |
|
| integer, | public, | allocatable | :: | winFirst(:) | |||
| integer, | public, | allocatable | :: | winFirst3(:) | Cumulative migration accounting, both models together |
||
| integer, | public, | allocatable | :: | winLast(:) | |||
| integer, | public, | allocatable | :: | winLast3(:) | Cumulative migration accounting, both models together |
Perform one adaptation epoch (see the module documentation). On return adapted reports whether the mesh changed; when it did, both models are rebound to the new meshes with their solutions transferred, and the caller should re-evaluate the time step (RecommendedTimeStep) and any model state derived from the mesh. model2d must be given exactly when Init was given one.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ExtrudedAMRController), | intent(inout), | target | :: | this | ||
| class(DGModel3D_t), | intent(inout) | :: | model3d | |||
| logical, | intent(out) | :: | adapted | |||
| class(DGModel2D_t), | intent(inout), | optional | :: | model2d |
Push the controller-owned amplitude-gate settings onto the indicator, after every indicator Init (which resets them).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ExtrudedAMRController), | intent(inout) | :: | this |
Release the forest, the indicator and every mesh/geometry the controller emitted. The models' mesh and geometry pointers dangle afterwards if they were running on emitted ones, so free or stop using the models first.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ExtrudedAMRController), | intent(inout) | :: | this |
Attach the controller to an initialized 3-D model on an extruded mesh, and optionally to a 2-D model on the surface mesh.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ExtrudedAMRController), | intent(out) | :: | this | |||
| class(DGModel3D_t), | intent(in) | :: | model3d | |||
| type(Mesh2D), | intent(in), | target | :: | surf | ||
| procedure(SELF_ExtrudedLevels) | :: | levels | ||||
| integer, | intent(in) | :: | bottomBC | |||
| integer, | intent(in) | :: | topBC | |||
| real(kind=prec), | intent(in) | :: | refineThreshold | |||
| real(kind=prec), | intent(in) | :: | coarsenThreshold | |||
| integer, | intent(in) | :: | ivar | |||
| integer, | intent(in) | :: | maxLevel | |||
| integer, | intent(in) | :: | nHalo | |||
| class(DGModel2D_t), | intent(in), | optional | :: | model2d | ||
| real(kind=prec), | intent(in), | optional | :: | relativeEnergyFloor | ||
| real(kind=prec), | intent(in), | optional | :: | energyWeights(:) | ||
| real(kind=prec), | intent(in), | optional | :: | significantEnergyFloor |
Level-based explicit time step bound: dtBase / 2**maxLevel, with dtBase stable on the base (level-0) mesh. Refinement halves the horizontal element size per level; the vertical spacing is unchanged, so this is conservative when the vertical CFL binds.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ExtrudedAMRController), | intent(in) | :: | this | |||
| real(kind=prec), | intent(in) | :: | dtBase |
type :: ExtrudedAMRController
type(QuadTreeMesh2D) :: forest
type(RefinementIndicator3D) :: indicator
procedure(SELF_ExtrudedLevels),pointer,nopass :: levels => null()
type(Mesh2D),pointer :: baseSurf => null() !! caller-owned; metadata source for EmitMesh
type(Mesh2D),pointer :: activeSurf => null() !! surface mesh of the current columns
type(Mesh3D),pointer :: activeMesh => null() !! extruded mesh the 3-D model runs on
type(SEMHex),pointer :: activeGeom => null() !! its geometry
type(SEMQuad),pointer :: activeGeom2 => null() !! surface geometry (only with a 2-D model)
type(Lagrange),pointer :: interp => null() !! the models' solution interpolant
logical :: ownsActive = .false. !! whether the active meshes/geometries were emitted by us
logical :: hasModel2D = .false. !! whether Init was given a 2-D model
integer :: nz = 0 !! layers per column
integer :: bottomBC = 0 !! boundary condition id of the column bottoms
integer :: topBC = 0 !! boundary condition id of the column tops
integer :: ivar = SELF_AMR_ALLVARS !! driving 3-D variable for the indicator
integer :: maxLevel = 1 !! refinement-level cap
integer :: nHalo = 1 !! refine-flag halo-expansion passes (in columns)
real(prec) :: refineThreshold = 0.0_prec
real(prec) :: coarsenThreshold = 0.0_prec
real(prec) :: relativeEnergyFloor = SELF_AMR_DEFAULT_RELFLOOR
real(prec) :: significantEnergyFloor = SELF_AMR_DEFAULT_RELFLOOR
real(prec),allocatable :: energyWeights(:)
!! Migration windows for every rank, in surface elements (columns) and in 3-D elements
integer,allocatable :: winFirst(:),winLast(:)
integer,allocatable :: winFirst3(:),winLast3(:)
!! Cumulative migration accounting, both models together
integer(int64) :: nMigrateBytesRecv = 0
integer(int64) :: nMigrateBytesSent = 0
integer(int64) :: nMigrateElemRemote = 0
contains
procedure,public :: Init => Init_ExtrudedAMRController
procedure,public :: Free => Free_ExtrudedAMRController
procedure,public :: Adapt => Adapt_ExtrudedAMRController
procedure,public :: RecommendedTimeStep => RecommendedTimeStep_ExtrudedAMRController
procedure,private :: ApplyIndicatorSettings => ApplyIndicatorSettings_ExtrudedAMRController
endtype ExtrudedAMRController