LinearEuler2D_t Derived Type

type, public, extends(DGModel2D) :: LinearEuler2D_t


Inherits

type~~lineareuler2d_t~~InheritsGraph type~lineareuler2d_t LinearEuler2D_t type~dgmodel2d~2 DGModel2D type~lineareuler2d_t->type~dgmodel2d~2 type~dgmodel2d_t DGModel2D_t type~dgmodel2d~2->type~dgmodel2d_t type~mappedscalar2d~2 MappedScalar2D type~dgmodel2d_t->type~mappedscalar2d~2 solution, source, fluxDivergence, dSdt, workSol type~mappedvector2d MappedVector2D type~dgmodel2d_t->type~mappedvector2d solutionGradient, flux type~boundaryconditionlist BoundaryConditionList type~dgmodel2d_t->type~boundaryconditionlist hyperbolicBCs, parabolicBCs type~mesh2d Mesh2D type~dgmodel2d_t->type~mesh2d mesh type~semquad SEMQuad type~dgmodel2d_t->type~semquad geometry type~model Model type~dgmodel2d_t->type~model type~mappedscalar2d_t MappedScalar2D_t type~mappedscalar2d~2->type~mappedscalar2d_t type~mappedvector2d_t MappedVector2D_t type~mappedvector2d->type~mappedvector2d_t type~boundarycondition BoundaryCondition type~boundaryconditionlist->type~boundarycondition current, head, tail type~mesh2d_t Mesh2D_t type~mesh2d->type~mesh2d_t type~vector2d~2 Vector2D type~semquad->type~vector2d~2 x, nHat, xMesh type~tensor2d~2 Tensor2D type~semquad->type~tensor2d~2 dxds, dsdx type~scalar2d~2 Scalar2D type~semquad->type~scalar2d~2 nScale, J type~lagrange Lagrange type~semquad->type~lagrange meshToModel type~mappedscalar2d_t->type~semquad geometry type~mappedscalar2d_t->type~scalar2d~2 type~semmesh SEMMesh type~mesh2d_t->type~semmesh type~mappedvector2d_t->type~semquad geometry type~mappedvector2d_t->type~vector2d~2 type~boundarycondition->type~boundarycondition next, prev c_ptr c_ptr type~boundarycondition->c_ptr elements_gpu, sides_gpu type~vector2d_t Vector2D_t type~vector2d~2->type~vector2d_t type~tensor2d_t Tensor2D_t type~tensor2d~2->type~tensor2d_t type~scalar2d_t Scalar2D_t type~scalar2d~2->type~scalar2d_t type~lagrange_t Lagrange_t type~lagrange->type~lagrange_t type~domaindecomposition DomainDecomposition type~semmesh->type~domaindecomposition decomp type~self_dataobj SELF_DataObj type~tensor2d_t->type~self_dataobj type~scalar2d_t->type~self_dataobj type~vector2d_t->type~self_dataobj 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

Inherited by

type~~lineareuler2d_t~~InheritedByGraph type~lineareuler2d_t LinearEuler2D_t type~lineareuler2d_pml_t LinearEuler2D_PML_t type~lineareuler2d_pml_t->type~lineareuler2d_t type~lineareuler2d LinearEuler2D type~lineareuler2d->type~lineareuler2d_t type~lineareuler2d~2 LinearEuler2D type~lineareuler2d~2->type~lineareuler2d_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 :: nstepped =0
integer, public :: nvar
type(BoundaryConditionList), public :: parabolicBCs

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.

logical, public :: prescribed_bcs_enabled =.true.
real(kind=prec), public :: rho0 =1.0_prec
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(:,:,:,:)
type(MappedScalar2D), public :: workSol

Type-Bound Procedures

procedure, public :: AdditionalFree => AdditionalFree_Model

  • public subroutine AdditionalFree_Model(this)

    Arguments

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

procedure, public :: AdditionalInit => AdditionalInit_LinearEuler2D_t

  • public subroutine AdditionalInit_LinearEuler2D_t(this)

    Register the (CPU) no-normal-flow and radiation boundary conditions. GPU builds call this parent and then overwrite both registrations with the device kernels in AdditionalInit_LinearEuler2D.

    Arguments

    TypeIntentOptionalAttributesName
    class(LinearEuler2D_t), 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 :: ApplyTransferPlan => ApplyTransferPlan_DGModel2D_t

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

    Transfer the staged pre-regrid solution onto the regridded mesh through plan, filling the rank-local element range [eFirst,eLast] of the new solution.

    Read more…

    Arguments

    TypeIntentOptionalAttributesName
    class(DGModel2D_t), intent(inout) :: 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 :: uGlobal(:,:,:,:)

procedure, public :: BoundaryFlux => BoundaryFlux_DGModel2D_t

procedure, public :: CalculateEntropy => CalculateEntropy_DGModel2D_t

procedure, public :: CalculateSolutionGradient => CalculateSolutionGradient_DGModel2D_t

procedure, public :: CalculateTendency => CalculateTendency_DGModel2D_t

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_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_DGModel2D_t

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_t

  • public subroutine Init_DGModel2D_t(this, mesh, geometry)

    Arguments

    TypeIntentOptionalAttributesName
    class(DGModel2D_t), 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 :: 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_t

  • public subroutine Regrid_DGModel2D_t(this, mesh, geometry)

    Rebind a live model to a new mesh/geometry pair (AMR regrid). The mesh-sized solution storage is reallocated and the boundary-condition registrations and maps are rebuilt for the new mesh, while everything that is not mesh-sized is preserved: the time state (t, dt, entropy, IO counter), the time-integrator selection, configuration flags, and any model-specific parameters (Init is intent(out) and would reset all of these). nvar/nstepped are unchanged - the model solves the same equations on a new mesh.

    Read more…

    Arguments

    TypeIntentOptionalAttributesName
    class(DGModel2D_t), 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 :: 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_t

procedure, public :: SetNumberOfVariables => SetNumberOfVariables_LinearEuler2D_t

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_DGModel2D_t

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_t

  • public subroutine StageSolutionForTransfer_DGModel2D_t(this)

    Preserve the current solution ahead of a regrid, so that Regrid may release the storage it lives in. Pair with ApplyTransferPlan, which consumes the staged copy:

    Read more…

    Arguments

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

procedure, public :: UpdateGRK2 => UpdateGRK2_DGModel2D_t

procedure, public :: UpdateGRK3 => UpdateGRK3_DGModel2D_t

procedure, public :: UpdateGRK4 => UpdateGRK4_DGModel2D_t

procedure, public :: UpdateSolution => UpdateSolution_DGModel2D_t

  • public subroutine UpdateSolution_DGModel2D_t(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_t), 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_t

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

    The entropy function is the sum of kinetic and internal energy For the linear model, this is

    Read more…

    Arguments

    TypeIntentOptionalAttributesName
    class(LinearEuler2D_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_t

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

    Arguments

    TypeIntentOptionalAttributesName
    class(LinearEuler2D_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_t

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

    Characteristic-decomposition (impedance-matched) interface flux for linear acoustics with possibly discontinuous sound speed.

    Read more…

    Arguments

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

Source Code

  type,extends(dgmodel2d) :: LinearEuler2D_t
    ! Add any additional attributes here that are specific to your model
    real(prec) :: rho0 = 1.0_prec ! Reference density (used to fill variable 5 in initial conditions)
    real(prec) :: g = 0.0_prec ! gravitational acceleration (y-direction only)

  contains
    procedure :: SetNumberOfVariables => SetNumberOfVariables_LinearEuler2D_t
    procedure :: SetMetadata => SetMetadata_LinearEuler2D_t
    procedure :: AdditionalInit => AdditionalInit_LinearEuler2D_t
    procedure :: entropy_func => entropy_func_LinearEuler2D_t
    procedure :: flux2d => flux2d_LinearEuler2D_t
    procedure :: riemannflux2d => riemannflux2d_LinearEuler2D_t
    !procedure :: source2d => source2d_LinearEuler2D_t
    procedure :: SphericalSoundWave => SphericalSoundWave_LinearEuler2D_t

  endtype LinearEuler2D_t