MultiSetModel3D_t Derived Type

type, public, extends(Model) :: MultiSetModel3D_t


Inherits

type~~multisetmodel3d_t~~InheritsGraph type~multisetmodel3d_t MultiSetModel3D_t type~elementset3d ElementSet3D type~multisetmodel3d_t->type~elementset3d sets type~model Model type~multisetmodel3d_t->type~model type~mesh3d Mesh3D type~multisetmodel3d_t->type~mesh3d globalMesh type~setinterface3d SetInterface3D type~multisetmodel3d_t->type~setinterface3d iface type~settraceref SetTraceRef type~multisetmodel3d_t->type~settraceref traces type~elementset3d->type~mesh3d mesh type~dgmodel3d DGModel3D type~elementset3d->type~dgmodel3d model type~semhex SEMHex type~elementset3d->type~semhex geometry type~mesh3d_t Mesh3D_t type~mesh3d->type~mesh3d_t c_ptr c_ptr type~mesh3d->c_ptr sideInfo_gpu, mortarInfo_gpu, anisoMortarInfo_gpu type~setinterface3d_t SetInterface3D_t type~setinterface3d->type~setinterface3d_t type~setinterface3d->c_ptr faceElem_gpu, faceSide_gpu, outbox_gpu, ghost_gpu type~settraceref->c_ptr trace_gpu type~dgmodel3d->c_ptr xferOld_gpu, xferKind_gpu, xferElem_gpu, xferFamily_gpu, xferDepth_gpu, xferPath_gpu, xferWin_gpu type~dgmodel3d_t DGModel3D_t type~dgmodel3d->type~dgmodel3d_t type~semmesh SEMMesh type~mesh3d_t->type~semmesh type~vector3d Vector3D type~semhex->type~vector3d x, nHat, xMesh type~scalar3d Scalar3D type~semhex->type~scalar3d nScale, J type~tensor3d Tensor3D type~semhex->type~tensor3d dxds, dsdx type~lagrange Lagrange type~semhex->type~lagrange meshToModel type~dgmodel3d_t->type~model type~dgmodel3d_t->type~mesh3d mesh type~dgmodel3d_t->type~semhex geometry type~mappedscalar3d MappedScalar3D type~dgmodel3d_t->type~mappedscalar3d solution, source, fluxDivergence, dSdt, workSol type~mappedvector3d MappedVector3D type~dgmodel3d_t->type~mappedvector3d solutionGradient, flux type~boundaryconditionlist BoundaryConditionList type~dgmodel3d_t->type~boundaryconditionlist hyperbolicBCs, parabolicBCs type~domaindecomposition DomainDecomposition type~semmesh->type~domaindecomposition decomp 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~scalar3d->c_ptr interior_gpu, boundary_gpu, boundarynormal_gpu, extBoundary_gpu, avgBoundary_gpu type~scalar3d_t Scalar3D_t type~scalar3d->type~scalar3d_t type~tensor3d->c_ptr interior_gpu, boundary_gpu, extBoundary_gpu type~tensor3d_t Tensor3D_t type~tensor3d->type~tensor3d_t 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~mappedscalar3d->c_ptr jas_gpu, mortarBuff_gpu, anisoMortarBuff_gpu, halo_sendbuf_gpu, halo_recvbuf_gpu type~mappedscalar3d_t MappedScalar3D_t type~mappedscalar3d->type~mappedscalar3d_t type~domaindecomposition->c_ptr elemToRank_gpu, halo_sides_gpu type~domaindecomposition_t DomainDecomposition_t type~domaindecomposition->type~domaindecomposition_t type~mappedvector3d->c_ptr halo_sendbuf_gpu, halo_recvbuf_gpu, mortarBuff_gpu, anisoMortarBuff_gpu type~mappedvector3d_t MappedVector3D_t type~mappedvector3d->type~mappedvector3d_t type~boundarycondition BoundaryCondition type~boundaryconditionlist->type~boundarycondition current, head, tail type~self_dataobj SELF_DataObj type~vector3d_t->type~self_dataobj type~scalar3d_t->type~self_dataobj type~tensor3d_t->type~self_dataobj type~mappedscalar3d_t->type~semhex geometry type~mappedscalar3d_t->type~scalar3d type~boundarycondition->c_ptr elements_gpu, sides_gpu type~boundarycondition->type~boundarycondition next, prev type~self_dataobj->type~lagrange interp type~metadata Metadata type~self_dataobj->type~metadata meta EquationParser EquationParser type~self_dataobj->EquationParser eqn type~mappedvector3d_t->type~semhex geometry type~mappedvector3d_t->type~vector3d

Inherited by

type~~multisetmodel3d_t~~InheritedByGraph type~multisetmodel3d_t MultiSetModel3D_t type~multisetmodel3d MultiSetModel3D type~multisetmodel3d->type~multisetmodel3d_t type~multisetmodel3d~2 MultiSetModel3D type~multisetmodel3d~2->type~multisetmodel3d_t

Contents

Source Code


Components

TypeVisibilityAttributesNameInitial
real(kind=prec), public :: dt
real(kind=prec), public :: entropy
type(Mesh3D), public, pointer:: globalMesh=> null()

Set id of every global element, s(e), e = 1..nGlobalElem (replicated).

logical, public :: gradient_enabled =.false.
type(SetInterface3D), public :: iface

Each set's solution%boundary, the trace the interface exchange sends.

logical, public :: interfacesReady =.false.
integer, public :: ioIterate =0
integer, public :: nInterfaceFaces =0

Interface map and ghost traces; built by SetupInterfaces.

integer, public :: nSets =0
integer, public :: nstepped =0
integer, public :: nvar
logical, public :: prescribed_bcs_enabled =.true.
integer, public, allocatable:: setGlobalId(:)

Number of set-k elements on lower ranks, k = 1..nSets.

integer, public, allocatable:: setOfElem(:)

Set-global id g_k(e) of every global element within its own set (replicated).

integer, public, allocatable:: setOffsetThisRank(:)

Number of interface faces summed over all sets and all ranks.

type(ElementSet3D), public, allocatable:: sets(:)

The global mesh the sets were extracted from. Not owned.

real(kind=prec), public :: t
logical, public :: tecplot_enabled =.true.
procedure(SELF_timeIntegrator), public, pointer:: timeIntegrator=> Euler_timeIntegrator
type(SetTraceRef), public, allocatable:: traces(:)

Type-Bound Procedures

procedure, public :: AdditionalFree => AdditionalFree_Model

  • public subroutine AdditionalFree_Model(this)

    Arguments

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

procedure, public :: AdditionalInit => AdditionalInit_Model

  • public subroutine AdditionalInit_Model(this)

    Arguments

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

procedure, public :: AdditionalOutput => AdditionalOutput_Model

  • public subroutine AdditionalOutput_Model(this, fileid)

    Arguments

    TypeIntentOptionalAttributesName
    class(Model), intent(inout) :: this
    integer(kind=HID_T), intent(in) :: fileid

procedure, public :: CalculateEntropy => CalculateEntropy_MultiSetModel3D_t

  • public subroutine CalculateEntropy_MultiSetModel3D_t(this)

    entropy = sum over sets k of the entropy of set k. Each set's CalculateEntropy is collective over its communicator, so it runs on every set, empty or not.

    Arguments

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

procedure, public :: CalculateTendency => CalculateTendency_MultiSetModel3D_t

  • public subroutine CalculateTendency_MultiSetModel3D_t(this)

    Exchange interface traces, fill the interface exterior states, then compute the tendency of every set with elements on this rank, in set order. See the module documentation for the stage order.

    Arguments

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

procedure, public :: Euler_timeIntegrator

  • public subroutine Euler_timeIntegrator(this, tn)

    Arguments

    TypeIntentOptionalAttributesName
    class(Model), intent(inout) :: this
    real(kind=prec), intent(in) :: tn

procedure, public :: FillInterfaceBoundary => FillInterfaceBoundary_MultiSetModel3D_t

procedure, public :: ForwardStep => ForwardStep_Model

  • public subroutine ForwardStep_Model(this, tn, dt, ioInterval)

    Forward steps the model using the associated tendency procedure and time integrator

    Read more…

    Arguments

    TypeIntentOptionalAttributesName
    class(Model), intent(inout) :: this
    real(kind=prec), intent(in) :: tn
    real(kind=prec), intent(in) :: dt
    real(kind=prec), intent(in) :: ioInterval

procedure, public :: Free => Free_MultiSetModel3D_t

  • public subroutine Free_MultiSetModel3D_t(this)

    Free the interface map, then every set's model, geometry and sub-mesh, then the sub-mesh communicators. The global mesh is not owned and is left alone. Collective.

    Arguments

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

procedure, public :: GetSimulationTime

  • public subroutine GetSimulationTime(this, t)

    Returns the current simulation time stored in the model % t attribute

    Arguments

    TypeIntentOptionalAttributesName
    class(Model), intent(in) :: this
    real(kind=prec), intent(out) :: t

procedure, public :: IncrementIOCounter => IncrementIOCounter_MultiSetModel3D_t

procedure, public :: Init => Init_MultiSetModel3D_t

  • public subroutine Init_MultiSetModel3D_t(this, globalMesh, interp, setOfElemLocal, nSets)

    Split globalMesh into nSets element sets and build each set's sub-mesh and geometry. The set models are not created here; see the module documentation.

    Read more…

    Arguments

    TypeIntentOptionalAttributesName
    class(MultiSetModel3D_t), intent(out) :: this
    type(Mesh3D), intent(in), target:: globalMesh
    type(Lagrange), intent(in), pointer:: interp
    integer, intent(in) :: setOfElemLocal(1:globalMesh%nElem)
    integer, intent(in) :: nSets

procedure, public :: LowStorageRK2_timeIntegrator

  • public subroutine LowStorageRK2_timeIntegrator(this, tn)

    Arguments

    TypeIntentOptionalAttributesName
    class(Model), intent(inout) :: this
    real(kind=prec), intent(in) :: tn

procedure, public :: LowStorageRK3_timeIntegrator

  • public subroutine LowStorageRK3_timeIntegrator(this, tn)

    Arguments

    TypeIntentOptionalAttributesName
    class(Model), intent(inout) :: this
    real(kind=prec), intent(in) :: tn

procedure, public :: LowStorageRK4_timeIntegrator

  • public subroutine LowStorageRK4_timeIntegrator(this, tn)

    Arguments

    TypeIntentOptionalAttributesName
    class(Model), intent(inout) :: this
    real(kind=prec), intent(in) :: tn

procedure, public :: PostStepHook => PostStepHook_MultiSetModel3D_t

procedure, public :: PreStepHook => PreStepHook_MultiSetModel3D_t

procedure, public :: PreTendencyHook => PreTendencyHook_Model

  • public subroutine PreTendencyHook_Model(this)

    PreTendencyHook is a template routine that is used to house any additional calculations that you want to execute at the beginning of the tendency calculation routine. This default PreTendencyHook simply returns back to the caller without executing any instructions

    Read more…

    Arguments

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

procedure, public :: PrintType => PrintType_Model

  • public subroutine PrintType_Model(this)

    Arguments

    TypeIntentOptionalAttributesName
    class(Model), intent(in) :: this

procedure, public :: ReadModel => Read_MultiSetModel3D_t

  • public subroutine Read_MultiSetModel3D_t(this, filename)

    Read every set's solution from a file written by WriteModel, then copy it to the device. The file must hold the same element-set partition (setOfElem) and the same number of nodes per element; a variable with no dataset keeps its current value. The host copy is refreshed from the device first, so on GPU builds that value is the device's.

    Read more…

    Arguments

    TypeIntentOptionalAttributesName
    class(MultiSetModel3D_t), intent(inout) :: this
    character, intent(in) :: filename

procedure, public :: ReportEntropy => ReportEntropy_Model

  • public subroutine ReportEntropy_Model(this)

    Base method for reporting the entropy of a model to stdout. Only override this procedure if additional reporting is needed. Alternatively, if you think additional reporting would be valuable for all models, open a pull request with modifications to this base method.

    Arguments

    TypeIntentOptionalAttributesName
    class(Model), intent(in) :: this

procedure, public :: ReportMetrics => ReportMetrics_MultiSetModel3D_t

  • public subroutine ReportMetrics_MultiSetModel3D_t(this)

    Report each set's metrics. Rank-local; sets with no elements on this rank are skipped, since their min and max are undefined.

    Arguments

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

procedure, public :: ReportUnmappedBoundaries => ReportUnmappedBoundaries_MultiSetModel3D_t

procedure, public :: ReportUserMetrics => ReportUserMetrics_Model

  • public subroutine ReportUserMetrics_Model(this)

    Method that can be overridden by users to report their own custom metrics after file io

    Arguments

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

procedure, public :: SetNumberOfVariables => SetNumberOfVariables_Model

procedure, public :: SetSimulationTime

  • public subroutine SetSimulationTime(this, t)

    Sets the model % t attribute with the provided simulation time

    Arguments

    TypeIntentOptionalAttributesName
    class(Model), intent(inout) :: this
    real(kind=prec), intent(in) :: t

generic, public :: SetTimeIntegrator => SetTimeIntegrator_withChar

  • public subroutine SetTimeIntegrator_withChar(this, integrator)

    Sets the time integrator method, using a character input

    Read more…

    Arguments

    TypeIntentOptionalAttributesName
    class(Model), intent(inout) :: this
    character, intent(in) :: integrator

procedure, public :: SetupInterfaces => SetupInterfaces_MultiSetModel3D_t

procedure, private :: SyncSetClocks

  • public subroutine SyncSetClocks(this)

    Copy the parent's simulation time and time step to every set model.

    Arguments

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

procedure, public :: UpdateGRK2 => UpdateGRK2_MultiSetModel3D_t

  • public subroutine UpdateGRK2_MultiSetModel3D_t(this, m)

    Stage m of the low-storage RK2 update, for every set with elements on this rank.

    Arguments

    TypeIntentOptionalAttributesName
    class(MultiSetModel3D_t), intent(inout) :: this
    integer, intent(in) :: m

procedure, public :: UpdateGRK3 => UpdateGRK3_MultiSetModel3D_t

  • public subroutine UpdateGRK3_MultiSetModel3D_t(this, m)

    Stage m of the low-storage RK3 update, for every set with elements on this rank.

    Arguments

    TypeIntentOptionalAttributesName
    class(MultiSetModel3D_t), intent(inout) :: this
    integer, intent(in) :: m

procedure, public :: UpdateGRK4 => UpdateGRK4_MultiSetModel3D_t

  • public subroutine UpdateGRK4_MultiSetModel3D_t(this, m)

    Stage m of the low-storage RK4 update, for every set with elements on this rank.

    Arguments

    TypeIntentOptionalAttributesName
    class(MultiSetModel3D_t), intent(inout) :: this
    integer, intent(in) :: m

procedure, public :: UpdateSolution => UpdateSolution_MultiSetModel3D_t

  • public subroutine UpdateSolution_MultiSetModel3D_t(this, dt)

    Forward-Euler update of every set with elements on this rank. dt defaults to the parent's time step.

    Arguments

    TypeIntentOptionalAttributesName
    class(MultiSetModel3D_t), intent(inout) :: this
    real(kind=prec), intent(in), optional :: dt

procedure, public :: WriteModel => Write_MultiSetModel3D_t

  • public subroutine Write_MultiSetModel3D_t(this, filename)

    Write every set's solution and geometry to one HDF5 file; see the module documentation for the layout. Without filename the file is solution..h5, as for a single model.

    Read more…

    Arguments

    TypeIntentOptionalAttributesName
    class(MultiSetModel3D_t), intent(inout) :: this
    character, intent(in), optional :: filename

procedure, public :: WriteTecplot => WriteTecplot_MultiSetModel3D_t

procedure, public :: entropy_func => entropy_func_Model

  • public pure function entropy_func_Model(this, s) result(e)

    Arguments

    TypeIntentOptionalAttributesName
    class(Model), intent(in) :: this
    real(kind=prec), intent(in) :: s(1:this%nvar)

    Return Value real(kind=prec)

procedure, public :: flux1D => flux1d_Model

  • public pure function flux1d_Model(this, s, dsdx) result(flux)

    Arguments

    TypeIntentOptionalAttributesName
    class(Model), intent(in) :: this
    real(kind=prec), intent(in) :: s(1:this%nvar)
    real(kind=prec), intent(in) :: dsdx(1:this%nvar)

    Return Value real(kind=prec)(1:this%nvar)

procedure, public :: flux2D => flux2d_Model

  • public pure function flux2d_Model(this, s, dsdx) result(flux)

    Arguments

    TypeIntentOptionalAttributesName
    class(Model), intent(in) :: this
    real(kind=prec), intent(in) :: s(1:this%nvar)
    real(kind=prec), intent(in) :: dsdx(1:this%nvar,1:2)

    Return Value real(kind=prec)(1:this%nvar,1:2)

procedure, public :: flux3D => flux3d_Model

  • public pure function flux3d_Model(this, s, dsdx) result(flux)

    Arguments

    TypeIntentOptionalAttributesName
    class(Model), intent(in) :: this
    real(kind=prec), intent(in) :: s(1:this%nvar)
    real(kind=prec), intent(in) :: dsdx(1:this%nvar,1:3)

    Return Value real(kind=prec)(1:this%nvar,1:3)

procedure, public :: riemannflux1d => riemannflux1d_Model

  • public pure function riemannflux1d_Model(this, sL, sR, dsdx, nhat) result(flux)

    Arguments

    TypeIntentOptionalAttributesName
    class(Model), intent(in) :: this
    real(kind=prec), intent(in) :: sL(1:this%nvar)
    real(kind=prec), intent(in) :: sR(1:this%nvar)
    real(kind=prec), intent(in) :: dsdx(1:this%nvar)
    real(kind=prec), intent(in) :: nhat

    Return Value real(kind=prec)(1:this%nvar)

procedure, public :: riemannflux2d => riemannflux2d_Model

  • public pure function riemannflux2d_Model(this, sL, sR, dsdx, nhat) result(flux)

    Arguments

    TypeIntentOptionalAttributesName
    class(Model), intent(in) :: this
    real(kind=prec), intent(in) :: sL(1:this%nvar)
    real(kind=prec), intent(in) :: sR(1:this%nvar)
    real(kind=prec), intent(in) :: dsdx(1:this%nvar,1:2)
    real(kind=prec), intent(in) :: nhat(1:2)

    Return Value real(kind=prec)(1:this%nvar)

procedure, public :: riemannflux3d => riemannflux3d_Model

  • public pure function riemannflux3d_Model(this, sL, sR, dsdx, nhat) result(flux)

    Arguments

    TypeIntentOptionalAttributesName
    class(Model), intent(in) :: this
    real(kind=prec), intent(in) :: sL(1:this%nvar)
    real(kind=prec), intent(in) :: sR(1:this%nvar)
    real(kind=prec), intent(in) :: dsdx(1:this%nvar,1:3)
    real(kind=prec), intent(in) :: nhat(1:3)

    Return Value real(kind=prec)(1:this%nvar)

procedure, public :: source1d => source1d_Model

  • public pure function source1d_Model(this, s, dsdx) result(source)

    Arguments

    TypeIntentOptionalAttributesName
    class(Model), intent(in) :: this
    real(kind=prec), intent(in) :: s(1:this%nvar)
    real(kind=prec), intent(in) :: dsdx(1:this%nvar)

    Return Value real(kind=prec)(1:this%nvar)

procedure, public :: source2d => source2d_Model

  • public pure function source2d_Model(this, s, dsdx) result(source)

    Arguments

    TypeIntentOptionalAttributesName
    class(Model), intent(in) :: this
    real(kind=prec), intent(in) :: s(1:this%nvar)
    real(kind=prec), intent(in) :: dsdx(1:this%nvar,1:2)

    Return Value real(kind=prec)(1:this%nvar)

procedure, public :: source3d => source3d_Model

  • public pure function source3d_Model(this, s, dsdx) result(source)

    Arguments

    TypeIntentOptionalAttributesName
    class(Model), intent(in) :: this
    real(kind=prec), intent(in) :: s(1:this%nvar)
    real(kind=prec), intent(in) :: dsdx(1:this%nvar,1:3)

    Return Value real(kind=prec)(1:this%nvar)

Source Code

  type,extends(Model) :: MultiSetModel3D_t
    integer :: nSets = 0
    type(ElementSet3D),allocatable :: sets(:)
    !! The global mesh the sets were extracted from. Not owned.
    type(Mesh3D),pointer :: globalMesh => null()
    !! Set id of every global element, s(e), e = 1..nGlobalElem (replicated).
    integer,allocatable :: setOfElem(:)
    !! Set-global id g_k(e) of every global element within its own set (replicated).
    integer,allocatable :: setGlobalId(:)
    !! Number of set-k elements on lower ranks, k = 1..nSets.
    integer,allocatable :: setOffsetThisRank(:)
    !! Number of interface faces summed over all sets and all ranks.
    integer :: nInterfaceFaces = 0
    !! Interface map and ghost traces; built by SetupInterfaces.
    type(SetInterface3D) :: iface
    !! Each set's solution%boundary, the trace the interface exchange sends.
    type(SetTraceRef),allocatable :: traces(:)
    logical :: interfacesReady = .false.

  contains

    procedure :: Init => Init_MultiSetModel3D_t
    procedure :: SetupInterfaces => SetupInterfaces_MultiSetModel3D_t
    procedure :: FillInterfaceBoundary => FillInterfaceBoundary_MultiSetModel3D_t
    procedure :: Free => Free_MultiSetModel3D_t

    procedure :: CalculateTendency => CalculateTendency_MultiSetModel3D_t
    procedure :: UpdateSolution => UpdateSolution_MultiSetModel3D_t
    procedure :: UpdateGRK2 => UpdateGRK2_MultiSetModel3D_t
    procedure :: UpdateGRK3 => UpdateGRK3_MultiSetModel3D_t
    procedure :: UpdateGRK4 => UpdateGRK4_MultiSetModel3D_t

    procedure :: PreStepHook => PreStepHook_MultiSetModel3D_t
    procedure :: PostStepHook => PostStepHook_MultiSetModel3D_t
    procedure :: IncrementIOCounter => IncrementIOCounter_MultiSetModel3D_t
    procedure :: CalculateEntropy => CalculateEntropy_MultiSetModel3D_t
    procedure :: ReportMetrics => ReportMetrics_MultiSetModel3D_t
    procedure :: ReportUnmappedBoundaries => ReportUnmappedBoundaries_MultiSetModel3D_t

    procedure :: ReadModel => Read_MultiSetModel3D_t
    procedure :: WriteModel => Write_MultiSetModel3D_t
    procedure :: WriteTecplot => WriteTecplot_MultiSetModel3D_t

    procedure,private :: SyncSetClocks

  endtype MultiSetModel3D_t