LinearEuler2D_PML_t Derived Type

type, public, extends(LinearEuler2D_t) :: LinearEuler2D_PML_t


Inherits

type~~lineareuler2d_pml_t~~InheritsGraph type~lineareuler2d_pml_t LinearEuler2D_PML_t type~mappedscalar2d MappedScalar2D type~lineareuler2d_pml_t->type~mappedscalar2d sigma_x, sigma_y type~lineareuler2d_t LinearEuler2D_t type~lineareuler2d_pml_t->type~lineareuler2d_t c_ptr c_ptr type~mappedscalar2d->c_ptr jas_gpu, mortarBuff_gpu, halo_sendbuf_gpu, halo_recvbuf_gpu type~mappedscalar2d_t MappedScalar2D_t type~mappedscalar2d->type~mappedscalar2d_t type~dgmodel2d DGModel2D type~lineareuler2d_t->type~dgmodel2d type~dgmodel2d->c_ptr xferOld_gpu, xferKind_gpu, xferElem_gpu, xferFamily_gpu, xferDepth_gpu, xferPath_gpu, xferWin_gpu type~dgmodel2d_t DGModel2D_t type~dgmodel2d->type~dgmodel2d_t type~semquad SEMQuad type~mappedscalar2d_t->type~semquad geometry type~scalar2d Scalar2D type~mappedscalar2d_t->type~scalar2d type~dgmodel2d_t->type~mappedscalar2d solution, source, fluxDivergence, dSdt, workSol type~dgmodel2d_t->type~semquad geometry type~mappedvector2d MappedVector2D type~dgmodel2d_t->type~mappedvector2d solutionGradient, flux type~mesh2d Mesh2D type~dgmodel2d_t->type~mesh2d mesh type~boundaryconditionlist BoundaryConditionList type~dgmodel2d_t->type~boundaryconditionlist hyperbolicBCs, parabolicBCs type~model Model type~dgmodel2d_t->type~model type~semquad->type~scalar2d nScale, J type~vector2d Vector2D type~semquad->type~vector2d x, nHat, xMesh type~tensor2d Tensor2D type~semquad->type~tensor2d dxds, dsdx type~lagrange Lagrange type~semquad->type~lagrange meshToModel 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~mappedvector2d->c_ptr mortarBuff_gpu, halo_sendbuf_gpu, halo_recvbuf_gpu type~mappedvector2d_t MappedVector2D_t type~mappedvector2d->type~mappedvector2d_t type~mesh2d->c_ptr sideInfo_gpu, mortarInfo_gpu type~mesh2d_t Mesh2D_t type~mesh2d->type~mesh2d_t 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~boundarycondition BoundaryCondition type~boundaryconditionlist->type~boundarycondition current, head, tail type~tensor2d->c_ptr interior_gpu, boundary_gpu, extBoundary_gpu type~tensor2d_t Tensor2D_t type~tensor2d->type~tensor2d_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~self_dataobj SELF_DataObj type~scalar2d_t->type~self_dataobj type~mappedvector2d_t->type~semquad geometry type~mappedvector2d_t->type~vector2d type~vector2d_t->type~self_dataobj type~semmesh SEMMesh type~mesh2d_t->type~semmesh type~tensor2d_t->type~self_dataobj 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~domaindecomposition DomainDecomposition type~semmesh->type~domaindecomposition decomp type~domaindecomposition->c_ptr elemToRank_gpu, halo_sides_gpu type~domaindecomposition_t DomainDecomposition_t type~domaindecomposition->type~domaindecomposition_t

Inherited by

type~~lineareuler2d_pml_t~~InheritedByGraph type~lineareuler2d_pml_t LinearEuler2D_PML_t type~lineareuler2d_pml LinearEuler2D_PML type~lineareuler2d_pml->type~lineareuler2d_pml_t type~lineareuler2d_pml~2 LinearEuler2D_PML type~lineareuler2d_pml~2->type~lineareuler2d_pml_t

Contents

Source Code


Components

TypeVisibilityAttributesNameInitial
type(MappedScalar2D), public :: dSdt
real(kind=prec), public :: dt
real(kind=prec), public :: entropy
type(MappedVector2D), public :: flux
type(MappedScalar2D), public :: fluxDivergence
real(kind=prec), public :: g =0.0_prec
type(SEMQuad), public, pointer:: geometry=> null()
logical, public :: gradient_enabled =.false.
type(BoundaryConditionList), public :: hyperbolicBCs
integer, public :: ioIterate =0
type(Mesh2D), public, pointer:: mesh=> null()
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 edges 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 an edge, 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

character(len=SELF_MESH_MATNAME_LENGTH), public :: pml_material_prefix ="pml"
integer, public :: pml_ramp_exponent =3
real(kind=prec), public :: pml_sigma_max =0.0_prec
real(kind=prec), public :: pml_width =1.0_prec
real(kind=prec), public :: pml_x_max =0.0_prec
real(kind=prec), public :: pml_x_min =0.0_prec
real(kind=prec), public :: pml_y_max =0.0_prec
real(kind=prec), public :: pml_y_min =0.0_prec
logical, public :: prescribed_bcs_enabled =.true.
real(kind=prec), public :: rho0 =1.0_prec
type(MappedScalar2D), public :: sigma_x
type(MappedScalar2D), public :: sigma_y
type(MappedScalar2D), public :: solution
type(MappedVector2D), public :: solutionGradient
type(MappedScalar2D), 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.

logical, public :: unmappedBoundariesReported =.false.

Pre-regrid copy of the solution, held between StageSolutionForTransfer and ApplyTransferPlan so that Regrid is free to release the storage it was read from. The base implementation stages on the host; the GPU backend overrides both procedures and stages device-side instead, leaving this unallocated.

integer, public :: unmappedBoundaryID =-1
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(MappedScalar2D), 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_LinearEuler2D_PML_t

procedure, public :: AdditionalInit => AdditionalInit_LinearEuler2D_PML_t

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 :: ApplyTransferPlan => ApplyTransferPlan_DGModel2D

  • public subroutine ApplyTransferPlan_DGModel2D(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(DGModel2D), intent(inout), target:: this
    type(TransferPlan2D), 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_DGModel2D

procedure, public :: CalculateEntropy => CalculateEntropy_DGModel2D

procedure, public :: CalculateSolutionGradient => CalculateSolutionGradient_DGModel2D

procedure, public :: CalculateTendency => CalculateTendency_DGModel2D

procedure, public :: DownloadOldWindow => DownloadOldWindow_DGModel2D

  • public subroutine DownloadOldWindow_DGModel2D(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(DGModel2D), intent(in) :: this
    integer, intent(in) :: wFirst
    integer, intent(in) :: wLast
    real(kind=prec), intent(out), target, contiguous:: uWin(:,:,:,:)

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_DGModel2D

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_DGModel2D

  • public subroutine Free_DGModel2D(this)

    Free the 2D DG model, including GPU BC arrays.

    Arguments

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

  • public subroutine Init_DGModel2D(this, mesh, geometry)

    Initialize the 2D DG model, then upload BC element/side arrays to GPU.

    Arguments

    TypeIntentOptionalAttributesName
    class(DGModel2D), intent(out) :: this
    type(Mesh2D), intent(in), target:: mesh
    type(SEMQuad), 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_DGModel2D_t

  • public subroutine MapBoundaryConditions_DGModel2D_t(this)

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

    Arguments

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

procedure, public :: MigrateOldWindow => MigrateOldWindow_DGModel2D

  • public subroutine MigrateOldWindow_DGModel2D(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(DGModel2D), 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_DGModel2D_t

  • public subroutine Read_DGModel2D_t(this, fileName)

    Arguments

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

procedure, public :: Regrid => Regrid_DGModel2D

  • public subroutine Regrid_DGModel2D(this, mesh, geometry)

    GPU regrid: release the device copies of the old boundary-condition element/side arrays, rebuild the model storage and BC maps on the new mesh (base Regrid), then upload the new BC arrays to the device - the same device bookkeeping Init/Free do around the base Init/Free.

    Arguments

    TypeIntentOptionalAttributesName
    class(DGModel2D), intent(inout) :: this
    type(Mesh2D), intent(in), target:: mesh
    type(SEMQuad), 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_DGModel2D_t

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

procedure, public :: ReportUnmappedBoundaries => ReportUnmappedBoundaries_DGModel2D_t

  • public subroutine ReportUnmappedBoundaries_DGModel2D_t(this)

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

    Read more…

    Arguments

    TypeIntentOptionalAttributesName
    class(DGModel2D_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_DGModel2D_t

  • public subroutine setboundarycondition_DGModel2D_t(this)

    Apply registered boundary conditions for the solution. Each boundary condition method loops over its own boundary faces.

    Arguments

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

procedure, public :: SetGradientBoundaryCondition => setgradientboundarycondition_DGModel2D_t

  • public subroutine setgradientboundarycondition_DGModel2D_t(this)

    Apply registered boundary conditions for the solution gradient. Each boundary condition method loops over its own boundary faces.

    Arguments

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

procedure, public :: SetMetadata => SetMetadata_LinearEuler2D_PML_t

procedure, public :: SetNumberOfVariables => SetNumberOfVariables_LinearEuler2D_PML_t

procedure, public :: SetPMLProfile => SetPMLProfile_LinearEuler2D_PML_t

  • public subroutine SetPMLProfile_LinearEuler2D_PML_t(this, x_interior_min, x_interior_max, y_interior_min, y_interior_max, pml_width, sigma_max, ramp_exponent)

    Populate the per-node sigma_x, sigma_y fields. Only nodes inside elements whose material name starts with this%pml_material_prefix receive non-zero damping; all other nodes are forced to zero so the interior solution remains unmodified.

    Arguments

    TypeIntentOptionalAttributesName
    class(LinearEuler2D_PML_t), intent(inout) :: this
    real(kind=prec), intent(in) :: x_interior_min
    real(kind=prec), intent(in) :: x_interior_max
    real(kind=prec), intent(in) :: y_interior_min
    real(kind=prec), intent(in) :: y_interior_max
    real(kind=prec), intent(in) :: pml_width
    real(kind=prec), intent(in) :: sigma_max
    integer, intent(in), optional :: ramp_exponent

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 :: SphericalSoundWave => SphericalSoundWave_LinearEuler2D_t

  • public subroutine SphericalSoundWave_LinearEuler2D_t(this, rhoprime, Lr, x0, y0, c)

    This subroutine sets the initial condition for a weak blast wave problem. The initial condition is given by

    Read more…

    Arguments

    TypeIntentOptionalAttributesName
    class(LinearEuler2D_t), intent(inout) :: this
    real(kind=prec), intent(in) :: rhoprime
    real(kind=prec), intent(in) :: Lr
    real(kind=prec), intent(in) :: x0
    real(kind=prec), intent(in) :: y0
    real(kind=prec), intent(in) :: c

procedure, public :: StageSolutionForTransfer => StageSolutionForTransfer_DGModel2D

  • public subroutine StageSolutionForTransfer_DGModel2D(this)

    Stage the pre-regrid solution on the DEVICE (Stage 6a), replacing the base implementation's device-to-host copy of the whole field. Regrid subsequently releases solution%interior_gpu, so the field is copied device-to-device into a buffer this model owns; ApplyTransferPlan then reads it from there.

    Read more…

    Arguments

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

procedure, public :: UpdateGRK2 => UpdateGRK2_DGModel2D

  • public subroutine UpdateGRK2_DGModel2D(this, m)

    Arguments

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

procedure, public :: UpdateGRK3 => UpdateGRK3_DGModel2D

  • public subroutine UpdateGRK3_DGModel2D(this, m)

    Arguments

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

procedure, public :: UpdateGRK4 => UpdateGRK4_DGModel2D

  • public subroutine UpdateGRK4_DGModel2D(this, m)

    Arguments

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

procedure, public :: UpdateSolution => UpdateSolution_DGModel2D

  • public subroutine UpdateSolution_DGModel2D(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(DGModel2D), intent(inout) :: this
    real(kind=prec), intent(in), optional :: dt

procedure, public :: WriteModel => Write_DGModel2D_t

  • public subroutine Write_DGModel2D_t(this, fileName)

    Arguments

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

procedure, public :: WriteTecplot => WriteTecplot_DGModel2D_t

  • public subroutine WriteTecplot_DGModel2D_t(this, filename)

    Arguments

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

procedure, public :: entropy_func => entropy_func_LinearEuler2D_PML_t

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

    Acoustic energy for the PML model. The background density is the scalar this%rho0 (the PML variant does not carry a per-node background density; its variable 5 is the auxiliary phi_u, not rho0), and the sound speed is taken from s(4). This overrides the parent entropy_func, which reads rho0 from s(5).

    Arguments

    TypeIntentOptionalAttributesName
    class(LinearEuler2D_PML_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_LinearEuler2D_PML_t

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

    Interior flux. Variables 1-4 use the parent linear Euler 2D flux; auxiliary variables 5-7 carry zero flux in both directions and are evolved purely by the PML source term.

    Arguments

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

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

    Impedance-matched Riemann flux for acoustic variables 1-4, with zero flux returned for the auxiliary variables 5-7. The acoustic formula is identical to the parent LinearEuler2D model; see riemannflux2d_LinearEuler2D_t for the derivation.

    Arguments

    TypeIntentOptionalAttributesName
    class(LinearEuler2D_PML_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: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)

procedure, public :: sourcemethod => sourcemethod_LinearEuler2D_PML_t

  • public subroutine sourcemethod_LinearEuler2D_PML_t(this)

    Hu (2001) unsplit PML source term, evaluated per node. In the interior (sigma_x = sigma_y = 0) this leaves the acoustic variables untouched and the auxiliaries integrate q in time but never re-enter the dynamics (since the coupling coefficient sigma_xsigma_y is zero). Inside the PML, the (sigma_x + sigma_y) damping plus the sigma_xsigma_y*phi term produce the correct perfectly-matched behaviour for the linear Euler 2D system.

    Read more…

    Arguments

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

Source Code

  type,extends(LinearEuler2D_t) :: LinearEuler2D_PML_t

    type(MappedScalar2D) :: sigma_x ! sigma_x(x,y) damping coefficient, one variable per node
    type(MappedScalar2D) :: sigma_y ! sigma_y(x,y) damping coefficient, one variable per node

    ! PML region tagging and ramp parameters (set by SetPMLProfile)
    real(prec) :: pml_x_min = 0.0_prec
    real(prec) :: pml_x_max = 0.0_prec
    real(prec) :: pml_y_min = 0.0_prec
    real(prec) :: pml_y_max = 0.0_prec
    real(prec) :: pml_width = 1.0_prec
    real(prec) :: pml_sigma_max = 0.0_prec
    integer :: pml_ramp_exponent = 3
    character(LEN=SELF_MESH_MATNAME_LENGTH) :: pml_material_prefix = "pml"

  contains
    procedure :: SetNumberOfVariables => SetNumberOfVariables_LinearEuler2D_PML_t
    procedure :: SetMetadata => SetMetadata_LinearEuler2D_PML_t
    procedure :: AdditionalInit => AdditionalInit_LinearEuler2D_PML_t
    procedure :: AdditionalFree => AdditionalFree_LinearEuler2D_PML_t
    procedure :: entropy_func => entropy_func_LinearEuler2D_PML_t
    procedure :: flux2d => flux2d_LinearEuler2D_PML_t
    procedure :: riemannflux2d => riemannflux2d_LinearEuler2D_PML_t
    procedure :: sourcemethod => sourcemethod_LinearEuler2D_PML_t
    procedure :: SetPMLProfile => SetPMLProfile_LinearEuler2D_PML_t

  endtype LinearEuler2D_PML_t