ExtrudedAMRController Derived Type

type, public :: ExtrudedAMRController


Inherits

type~~extrudedamrcontroller~~InheritsGraph type~extrudedamrcontroller ExtrudedAMRController type~quadtreemesh2d QuadTreeMesh2D type~extrudedamrcontroller->type~quadtreemesh2d forest type~mesh2d Mesh2D type~extrudedamrcontroller->type~mesh2d baseSurf, activeSurf type~refinementindicator3d RefinementIndicator3D type~extrudedamrcontroller->type~refinementindicator3d indicator type~semhex SEMHex type~extrudedamrcontroller->type~semhex activeGeom type~mesh3d Mesh3D type~extrudedamrcontroller->type~mesh3d activeMesh type~semquad SEMQuad type~extrudedamrcontroller->type~semquad activeGeom2 type~lagrange Lagrange type~extrudedamrcontroller->type~lagrange interp c_ptr c_ptr type~mesh2d->c_ptr sideInfo_gpu, mortarInfo_gpu type~mesh2d_t Mesh2D_t type~mesh2d->type~mesh2d_t type~refinementindicator3d->c_ptr Pmodal_gpu, indicator_gpu, flag_gpu, gate_gpu, energyWeight_gpu type~refinementindicator3d_t RefinementIndicator3D_t type~refinementindicator3d->type~refinementindicator3d_t type~semhex->type~lagrange meshToModel type~vector3d Vector3D type~semhex->type~vector3d x, nHat, xMesh type~tensor3d Tensor3D type~semhex->type~tensor3d dxds, dsdx type~scalar3d Scalar3D type~semhex->type~scalar3d nScale, J type~mesh3d->c_ptr sideInfo_gpu, mortarInfo_gpu, anisoMortarInfo_gpu type~mesh3d_t Mesh3D_t type~mesh3d->type~mesh3d_t type~semquad->type~lagrange meshToModel type~vector2d Vector2D type~semquad->type~vector2d x, nHat, xMesh type~tensor2d Tensor2D type~semquad->type~tensor2d dxds, dsdx type~scalar2d Scalar2D type~semquad->type~scalar2d nScale, J type~lagrange->c_ptr qWeights_gpu, iMatrix_gpu, dMatrix_gpu, dgMatrix_gpu, dSplitMatrix_gpu, bMatrix_gpu, mortarR_gpu, mortarP_gpu type~lagrange_t Lagrange_t type~lagrange->type~lagrange_t type~semmesh SEMMesh type~mesh2d_t->type~semmesh type~vector3d->c_ptr interior_gpu, boundary_gpu, extBoundary_gpu, avgBoundary_gpu, boundaryNormal_gpu type~vector3d_t Vector3D_t type~vector3d->type~vector3d_t type~tensor3d->c_ptr interior_gpu, boundary_gpu, extBoundary_gpu type~tensor3d_t Tensor3D_t type~tensor3d->type~tensor3d_t type~scalar3d->c_ptr interior_gpu, boundary_gpu, boundarynormal_gpu, extBoundary_gpu, avgBoundary_gpu type~scalar3d_t Scalar3D_t type~scalar3d->type~scalar3d_t type~mesh3d_t->type~semmesh type~vector2d->c_ptr interior_gpu, boundary_gpu, extBoundary_gpu, avgBoundary_gpu, boundaryNormal_gpu type~vector2d_t Vector2D_t type~vector2d->type~vector2d_t type~tensor2d->c_ptr interior_gpu, boundary_gpu, extBoundary_gpu type~tensor2d_t Tensor2D_t type~tensor2d->type~tensor2d_t type~scalar2d->c_ptr interior_gpu, boundary_gpu, boundarynormal_gpu, extBoundary_gpu, avgBoundary_gpu type~scalar2d_t Scalar2D_t type~scalar2d->type~scalar2d_t type~domaindecomposition DomainDecomposition type~semmesh->type~domaindecomposition decomp type~self_dataobj SELF_DataObj type~vector3d_t->type~self_dataobj type~tensor3d_t->type~self_dataobj type~vector2d_t->type~self_dataobj type~scalar3d_t->type~self_dataobj type~tensor2d_t->type~self_dataobj type~scalar2d_t->type~self_dataobj type~domaindecomposition->c_ptr elemToRank_gpu, halo_sides_gpu type~domaindecomposition_t DomainDecomposition_t type~domaindecomposition->type~domaindecomposition_t type~self_dataobj->type~lagrange interp type~metadata Metadata type~self_dataobj->type~metadata meta EquationParser EquationParser type~self_dataobj->EquationParser eqn

Contents

Source Code


Components

TypeVisibilityAttributesNameInitial
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


Type-Bound Procedures

procedure, public :: Adapt => Adapt_ExtrudedAMRController

  • public subroutine Adapt_ExtrudedAMRController(this, model3d, adapted, model2d)

    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.

    Arguments

    TypeIntentOptionalAttributesName
    class(ExtrudedAMRController), intent(inout), target:: this
    class(DGModel3D_t), intent(inout) :: model3d
    logical, intent(out) :: adapted
    class(DGModel2D_t), intent(inout), optional :: model2d

procedure, private :: ApplyIndicatorSettings => ApplyIndicatorSettings_ExtrudedAMRController

procedure, public :: Free => Free_ExtrudedAMRController

  • public subroutine Free_ExtrudedAMRController(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.

    Arguments

    TypeIntentOptionalAttributesName
    class(ExtrudedAMRController), intent(inout) :: this

procedure, public :: Init => Init_ExtrudedAMRController

  • public subroutine Init_ExtrudedAMRController(this, model3d, surf, levels, bottomBC, topBC, refineThreshold, coarsenThreshold, ivar, maxLevel, nHalo, model2d, relativeEnergyFloor, energyWeights, significantEnergyFloor)

    Attach the controller to an initialized 3-D model on an extruded mesh, and optionally to a 2-D model on the surface mesh.

    Read more…

    Arguments

    TypeIntentOptionalAttributesName
    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

procedure, public :: RecommendedTimeStep => RecommendedTimeStep_ExtrudedAMRController

  • public function RecommendedTimeStep_ExtrudedAMRController(this, dtBase) result(dt)

    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.

    Arguments

    TypeIntentOptionalAttributesName
    class(ExtrudedAMRController), intent(in) :: this
    real(kind=prec), intent(in) :: dtBase

    Return Value real(kind=prec)

Source Code

  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