ECAdvection3D Derived Type

type, public, extends(ECAdvection3D_t) :: ECAdvection3D


Inherits

type~~ecadvection3d~~InheritsGraph type~ecadvection3d ECAdvection3D type~ecadvection3d_t ECAdvection3D_t type~ecadvection3d->type~ecadvection3d_t type~ecdgmodel3d ECDGModel3D type~ecadvection3d_t->type~ecdgmodel3d type~ecdgmodel3d_t ECDGModel3D_t type~ecdgmodel3d->type~ecdgmodel3d_t type~mappedtwopointvector3d MappedTwoPointVector3D type~ecdgmodel3d_t->type~mappedtwopointvector3d twoPointFlux type~mappedscalar3d MappedScalar3D type~ecdgmodel3d_t->type~mappedscalar3d mortarNormal type~dgmodel3d DGModel3D type~ecdgmodel3d_t->type~dgmodel3d type~mappedtwopointvector3d_t MappedTwoPointVector3D_t type~mappedtwopointvector3d->type~mappedtwopointvector3d_t type~mappedscalar3d_t MappedScalar3D_t type~mappedscalar3d->type~mappedscalar3d_t c_ptr c_ptr type~mappedscalar3d->c_ptr jas_gpu, mortarBuff_gpu, anisoMortarBuff_gpu, halo_sendbuf_gpu, halo_recvbuf_gpu type~dgmodel3d_t DGModel3D_t type~dgmodel3d->type~dgmodel3d_t type~dgmodel3d->c_ptr xferOld_gpu, xferKind_gpu, xferElem_gpu, xferFamily_gpu, xferDepth_gpu, xferPath_gpu, xferWin_gpu type~semhex SEMHex type~mappedtwopointvector3d_t->type~semhex geometry type~twopointvector3d TwoPointVector3D type~mappedtwopointvector3d_t->type~twopointvector3d type~mappedscalar3d_t->type~semhex geometry type~scalar3d Scalar3D type~mappedscalar3d_t->type~scalar3d type~dgmodel3d_t->type~mappedscalar3d solution, source, fluxDivergence, dSdt, workSol type~dgmodel3d_t->type~semhex geometry type~mesh3d Mesh3D type~dgmodel3d_t->type~mesh3d mesh type~mappedvector3d MappedVector3D type~dgmodel3d_t->type~mappedvector3d solutionGradient, flux type~boundaryconditionlist BoundaryConditionList type~dgmodel3d_t->type~boundaryconditionlist hyperbolicBCs, parabolicBCs type~model Model type~dgmodel3d_t->type~model type~semhex->type~scalar3d nScale, J type~vector3d Vector3D type~semhex->type~vector3d x, nHat, xMesh type~lagrange Lagrange type~semhex->type~lagrange meshToModel type~tensor3d Tensor3D type~semhex->type~tensor3d dxds, dsdx type~twopointvector3d->c_ptr interior_gpu type~twopointvector3d_t TwoPointVector3D_t type~twopointvector3d->type~twopointvector3d_t type~mesh3d->c_ptr sideInfo_gpu, mortarInfo_gpu, anisoMortarInfo_gpu type~mesh3d_t Mesh3D_t type~mesh3d->type~mesh3d_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~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~vector3d->c_ptr interior_gpu, boundary_gpu, extBoundary_gpu, avgBoundary_gpu, boundaryNormal_gpu type~vector3d_t Vector3D_t type~vector3d->type~vector3d_t type~semmesh SEMMesh type~mesh3d_t->type~semmesh 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~self_dataobj SELF_DataObj type~twopointvector3d_t->type~self_dataobj type~tensor3d->c_ptr interior_gpu, boundary_gpu, extBoundary_gpu type~tensor3d_t Tensor3D_t type~tensor3d->type~tensor3d_t type~scalar3d_t->type~self_dataobj type~mappedvector3d_t->type~semhex geometry type~mappedvector3d_t->type~vector3d type~boundarycondition->c_ptr elements_gpu, sides_gpu type~boundarycondition->type~boundarycondition next, prev type~vector3d_t->type~self_dataobj type~domaindecomposition DomainDecomposition type~semmesh->type~domaindecomposition decomp type~self_dataobj->type~lagrange interp type~metadata Metadata type~self_dataobj->type~metadata meta EquationParser EquationParser type~self_dataobj->EquationParser eqn type~tensor3d_t->type~self_dataobj type~domaindecomposition->c_ptr elemToRank_gpu, halo_sides_gpu type~domaindecomposition_t DomainDecomposition_t type~domaindecomposition->type~domaindecomposition_t

Contents

Source Code


Components

TypeVisibilityAttributesNameInitial
type(MappedScalar3D), public :: dSdt
real(kind=prec), public :: dt
real(kind=prec), public :: entropy
type(MappedVector3D), public :: flux
type(MappedScalar3D), public :: fluxDivergence
type(SEMHex), public, pointer:: geometry
logical, public :: gradient_enabled =.false.
type(BoundaryConditionList), public :: hyperbolicBCs
integer, public :: ioIterate =0
type(Mesh3D), public, pointer:: mesh
type(MappedScalar3D), public :: mortarNormal
logical, public :: mortarNormalReady =.false.
integer, public :: nUnmappedBoundaries =0

The first unregistered bcid found, and meaningful only when nUnmappedBoundaries > 0: -1 is itself a legal bcid, so it cannot double as an "absent" marker.

integer, public :: nstepped =0
integer, public :: nvar
type(BoundaryConditionList), public :: parabolicBCs

Mesh boundary faces whose sideInfo(5) boundary condition id matches no registered boundary condition, counted over the whole domain by MapBoundaryConditions and summed across ranks. Nothing writes solution%extBoundary on such a face, so the Riemann solver reads zeros at t = 0 and stale values afterwards. ReportUnmappedBoundaries warns about them once, from the top of ForwardStep.

integer, public :: planAllocElem =0

new-element count the plan buffers are sized for

integer, public :: planAllocStride =0

plan%path leading dimension they are sized for

logical, public :: prescribed_bcs_enabled =.true.
type(MappedScalar3D), public :: solution
type(MappedVector3D), public :: solutionGradient
type(MappedScalar3D), public :: source
real(kind=prec), public :: t
logical, public :: tecplot_enabled =.true.
procedure(SELF_timeIntegrator), public, pointer:: timeIntegrator=> Euler_timeIntegrator
real(kind=prec), public, allocatable:: transferStage(:,:,:,:,:)

Migrated old-element window, held between MigrateOldWindow and ApplyTransferPlan on the multi-rank path: the contiguous run of OLD elements this rank's new element range references. Flat, because it is viewed through a rank-remapped pointer whose element lower bound is the window's first GLOBAL old element index - the numbering the transfer plan uses. Persistent and grow-only, so a settled adapting run allocates nothing here. The GPU backend overrides the migration and keeps the window in device memory instead, leaving this unallocated.

type(MappedTwoPointVector3D), public :: twoPointFlux
real(kind=prec), public :: u
logical, public :: unmappedBoundariesReported =.false.
integer, public :: unmappedBoundaryID =-1
real(kind=prec), public :: v
real(kind=prec), public :: w
real(kind=prec), public, allocatable:: winStage(:)
integer, public :: winStageFirst =0

global old index of winStage's first element

integer, public :: winStageN =0

window element count; 0 means no window is migrated

type(MappedScalar3D), public :: workSol
integer(kind=c_size_t), public :: xferAllocBytes =0
type(c_ptr), public :: xferDepth_gpu =c_null_ptr

plan%depth

type(c_ptr), public :: xferElem_gpu =c_null_ptr

plan%sourceElem

type(c_ptr), public :: xferFamily_gpu =c_null_ptr

plan%family

type(c_ptr), public :: xferKind_gpu =c_null_ptr

plan%sourceKind

integer, public :: xferNOld =0

element count of the staged field (its device stride) Migrated old-element window, device-resident: the contiguous run of OLD elements this rank's new element range references, assembled by MigrateOldWindow and consumed by ApplyTransferPlan. Its own capacity and lifecycle, separate from xferOld_gpu, because the two have different lifetimes and different sizes - a window is the hull of a rank's new range in the OLD numbering and can be larger than the local old field - and because keeping them apart is what lets an unpaired stage/migrate be caught rather than silently served.

integer, public :: xferNWin =0

window element count (its device stride); 0 means no window

type(c_ptr), public :: xferOld_gpu =c_null_ptr

pre-regrid solution, staged device-side

type(c_ptr), public :: xferPath_gpu =c_null_ptr

plan%path

integer(kind=c_size_t), public :: xferWinBytes =0

current capacity, grown but never shrunk

integer, public :: xferWinFirst =0

global old index of the window's first element

type(c_ptr), public :: xferWin_gpu =c_null_ptr

Type-Bound Procedures

procedure, public :: AdditionalFree => AdditionalFree_Model

  • public subroutine AdditionalFree_Model(this)

    Arguments

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

procedure, public :: AdditionalInit => AdditionalInit_ECAdvection3D

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 :: ApplyExtrudedTransferPlan => ApplyExtrudedTransferPlan_DGModel3D_t

  • public subroutine ApplyExtrudedTransferPlan_DGModel3D_t(this, plan, nz, interp, cFirst, cLast)

    Transfer the staged (or migrated) pre-regrid solution of a model on an EXTRUDED mesh onto its regridded extruded mesh, driven by the 2-D transfer plan of the surface forest. Fills the new solution's local columns cFirst..cLast (global surface element indices), which must be this rank's whole new column range: (cLast-cFirst+1)*nz = solution%nElem.

    Read more…

    Arguments

    TypeIntentOptionalAttributesName
    class(DGModel3D_t), intent(inout), target:: this
    type(TransferPlan2D), intent(in) :: plan
    integer, intent(in) :: nz
    type(Lagrange), intent(in) :: interp
    integer, intent(in) :: cFirst
    integer, intent(in) :: cLast

procedure, public :: ApplyTransferPlan => ApplyTransferPlan_DGModel3D

  • public subroutine ApplyTransferPlan_DGModel3D(this, plan, interp, eFirst, eLast, uGlobal, oldFirst)

    Apply the transfer plan on the device, writing solution%interior_gpu directly and moving no solution data across the PCIe/xGMI link - on any number of ranks.

    Read more…

    Arguments

    TypeIntentOptionalAttributesName
    class(DGModel3D), intent(inout), target:: this
    type(TransferPlan3D), intent(in), target:: plan
    type(Lagrange), intent(in) :: interp
    integer, intent(in) :: eFirst
    integer, intent(in) :: eLast
    real(kind=prec), intent(in), optional contiguous:: uGlobal(:,:,:,:,:)
    integer, intent(in), optional :: oldFirst

procedure, public :: BoundaryFlux => BoundaryFlux_ECAdvection3D

procedure, public :: CalculateEntropy => CalculateEntropy_DGModel3D

procedure, public :: CalculateSolutionGradient => CalculateSolutionGradient_DGModel3D

procedure, public :: CalculateTendency => CalculateTendency_ECDGModel3D

procedure, public :: DownloadOldWindow => DownloadOldWindow_DGModel3D

  • public subroutine DownloadOldWindow_DGModel3D(this, wFirst, wLast, uWin)

    Copy the device-resident migrated window to the host, for the SELF_AMR_MIGRATE_VERIFY diagnostic only. This is exactly the host traffic the device path exists to avoid, so it must never appear on the default path.

    Read more…

    Arguments

    TypeIntentOptionalAttributesName
    class(DGModel3D), intent(in) :: this
    integer, intent(in) :: wFirst
    integer, intent(in) :: wLast
    real(kind=prec), intent(out), target, contiguous:: uWin(:,:,:,:,:)

procedure, public :: ECMortarFlux => ECMortarFlux_ECDGModel3D_t

  • public subroutine ECMortarFlux_ECDGModel3D_t(this)

    Entropy-stable surface fluxes on anisotropic (2-subface) mortar faces, the 3-D counterpart of ECMortarFlux_ECDGModel2D_t (Friedrich et al., J. Sci. Comput. 77, 2018). Overwrites flux%boundaryNormal on every anisotropic mortar face, after BoundaryFlux.

    Read more…

    Arguments

    TypeIntentOptionalAttributesName
    class(ECDGModel3D_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 :: FluxMethod => fluxmethod_DGModel3D

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_ECAdvection3D

  • public subroutine Free_ECAdvection3D(this)

    Free EC Advection 3D, including GPU BC arrays.

    Arguments

    TypeIntentOptionalAttributesName
    class(ECAdvection3D), 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

  • public subroutine IncrementIOCounter(this)

    Arguments

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

procedure, public :: Init => Init_ECAdvection3D

  • public subroutine Init_ECAdvection3D(this, mesh, geometry)

    Initialize EC Advection 3D, then upload BC element/side arrays to GPU.

    Arguments

    TypeIntentOptionalAttributesName
    class(ECAdvection3D), intent(out) :: this
    type(Mesh3D), intent(in), target:: mesh
    type(SEMHex), intent(in), target:: geometry

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 :: MapBoundaryConditions => MapBoundaryConditions_DGModel3D_t

  • public subroutine MapBoundaryConditions_DGModel3D_t(this)

    Scan the mesh sideInfo and populate the elements/sides arrays for each registered boundary condition.

    Arguments

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

procedure, public :: MigrateOldWindow => MigrateOldWindow_DGModel3D

  • public subroutine MigrateOldWindow_DGModel3D(this, winFirst, winLast, wFirst, wLast, nBytesRecv, nBytesSent, nElemRemote)

    Assemble this rank's window of the pre-regrid old field IN DEVICE MEMORY, replacing the base implementation's host-memory migration. The rank's own run is copied device-to-device and the peers' runs are received directly into device memory, so no solution data crosses the host link and the windowed ApplyTransferPlan that follows runs as a device kernel.

    Read more…

    Arguments

    TypeIntentOptionalAttributesName
    class(DGModel3D), intent(inout) :: this
    integer, intent(in) :: winFirst(:)
    integer, intent(in) :: winLast(:)
    integer, intent(in) :: wFirst
    integer, intent(in) :: wLast
    integer(kind=int64), intent(inout) :: nBytesRecv
    integer(kind=int64), intent(inout) :: nBytesSent
    integer(kind=int64), intent(inout) :: nElemRemote

procedure, public :: PostStepHook => PostStepHook_Model

  • public subroutine PostStepHook_Model(this)

    PostStepHook is a template routine invoked by the time integrators once immediately after each completed time step (after this%t has advanced by this%dt). The default implementation is a no-op.

    Read more…

    Arguments

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

procedure, public :: PreStepHook => PreStepHook_Model

  • public subroutine PreStepHook_Model(this)

    PreStepHook is a template routine invoked by the time integrators once immediately before each time step is taken (before any Runge-Kutta stages of that step). The default implementation is a no-op.

    Read more…

    Arguments

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

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_DGModel3D_t

  • public subroutine Read_DGModel3D_t(this, fileName)

    Arguments

    TypeIntentOptionalAttributesName
    class(DGModel3D_t), intent(inout) :: this
    character, intent(in) :: fileName

procedure, public :: Regrid => Regrid_ECDGModel3D_t

  • public subroutine Regrid_ECDGModel3D_t(this, mesh, geometry)

    Rebind the EC model to a new mesh/geometry pair (AMR regrid). The parent Regrid resizes the DG fields and rebuilds the boundary conditions; this adds the mesh-sized state of the split form, which the parent does not know about: the two-point flux, and the mortar-normal staging field, which exists only while the mesh has mortars. The backend's Regrid runs, so a GPU backend's device-buffer regrid is included. The same mortar restrictions as Init apply to the new mesh.

    Arguments

    TypeIntentOptionalAttributesName
    class(ECDGModel3D_t), intent(inout) :: this
    type(Mesh3D), intent(in), target:: mesh
    type(SEMHex), intent(in), target:: geometry

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_DGModel3D_t

  • public subroutine ReportMetrics_DGModel3D_t(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(DGModel3D_t), intent(inout) :: this

procedure, public :: ReportUnmappedBoundaries => ReportUnmappedBoundaries_DGModel3D_t

  • public subroutine ReportUnmappedBoundaries_DGModel3D_t(this)

    Warn, once, about mesh boundary faces whose bcid has no registered boundary condition. MapBoundaryConditions establishes the count; ForwardStep calls this.

    Read more…

    Arguments

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

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 :: SetBoundaryCondition => setboundarycondition_DGModel3D_t

procedure, public :: SetGradientBoundaryCondition => setgradientboundarycondition_DGModel3D_t

procedure, public :: SetMetadata => SetMetadata_DGModel3D_t

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 :: SourceMethod => SourceMethod_ECAdvection3D

  • public subroutine SourceMethod_ECAdvection3D(this)

    No source term — upload the zero-initialised host array to device.

    Arguments

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

procedure, public :: StageSolutionForTransfer => StageSolutionForTransfer_DGModel3D

  • public subroutine StageSolutionForTransfer_DGModel3D(this)

    Stage the pre-regrid solution on the DEVICE, replacing the base implementation's device-to-host copy of the whole field. Pair with ApplyTransferPlan, which consumes the staged copy:

    Read more…

    Arguments

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

procedure, public :: TwoPointFluxMethod => TwoPointFluxMethod_ECAdvection3D

procedure, public :: UpdateGRK2 => UpdateGRK2_DGModel3D

  • public subroutine UpdateGRK2_DGModel3D(this, m)

    Arguments

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

procedure, public :: UpdateGRK3 => UpdateGRK3_DGModel3D

  • public subroutine UpdateGRK3_DGModel3D(this, m)

    Arguments

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

procedure, public :: UpdateGRK4 => UpdateGRK4_DGModel3D

  • public subroutine UpdateGRK4_DGModel3D(this, m)

    Arguments

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

procedure, public :: UpdateSolution => UpdateSolution_DGModel3D

  • public subroutine UpdateSolution_DGModel3D(this, dt)

    Computes a solution update as , where dt is either provided through the interface or taken as the Model's stored time step size (model % dt)

    Arguments

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

procedure, public :: WriteModel => Write_DGModel3D_t

  • public subroutine Write_DGModel3D_t(this, fileName)

    Arguments

    TypeIntentOptionalAttributesName
    class(DGModel3D_t), intent(inout) :: this
    character, intent(in), optional :: fileName

procedure, public :: WriteTecplot => WriteTecplot_DGModel3D_t

  • public subroutine WriteTecplot_DGModel3D_t(this, filename)

    Arguments

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

procedure, public :: entropy_func => entropy_func_ECAdvection3D_t

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

    Quadratic entropy: eta(u) = u^2 / 2

    Arguments

    TypeIntentOptionalAttributesName
    class(ECAdvection3D_t), 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_ECAdvection3D_t

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

    Local Lax-Friedrichs (Rusanov) Riemann flux for linear advection. Uses the per-face spectral radius lambda = |u.n|, matching upwind (Godunov) for linear advection: tangential faces (u.n=0) contribute zero flux, avoiding spurious dissipation across element interfaces whose face normal is perpendicular to the velocity.

    Arguments

    TypeIntentOptionalAttributesName
    class(ECAdvection3D_t), 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)

procedure, public :: twopointflux3d => twopointflux3d_ECAdvection3D_t

  • public pure function twopointflux3d_ECAdvection3D_t(this, sL, sR) result(flux)

    Arithmetic-mean two-point flux for linear advection. Entropy-conserving with respect to eta(u) = u^2/2.

    Arguments

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

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

Source Code

  type,extends(ECAdvection3D_t),public :: ECAdvection3D

  contains

    procedure :: Init => Init_ECAdvection3D
    procedure :: Free => Free_ECAdvection3D
    procedure :: AdditionalInit => AdditionalInit_ECAdvection3D
    procedure :: BoundaryFlux => BoundaryFlux_ECAdvection3D
    procedure :: TwoPointFluxMethod => TwoPointFluxMethod_ECAdvection3D
    procedure :: SourceMethod => SourceMethod_ECAdvection3D

  endtype ECAdvection3D