LinearEuler2D_PML Derived Type

type, public, extends(LinearEuler2D_PML_t) :: LinearEuler2D_PML


Inherits

type~~lineareuler2d_pml~2~~InheritsGraph type~lineareuler2d_pml~2 LinearEuler2D_PML type~lineareuler2d_pml_t LinearEuler2D_PML_t type~lineareuler2d_pml~2->type~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 type~mappedscalar2d_t MappedScalar2D_t type~mappedscalar2d->type~mappedscalar2d_t type~dgmodel2d DGModel2D type~lineareuler2d_t->type~dgmodel2d 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~model Model type~dgmodel2d_t->type~model type~mesh2d Mesh2D type~dgmodel2d_t->type~mesh2d mesh type~boundaryconditionlist BoundaryConditionList type~dgmodel2d_t->type~boundaryconditionlist hyperbolicBCs, parabolicBCs type~semquad->type~scalar2d nScale, J type~vector2d Vector2D type~semquad->type~vector2d x, nHat type~tensor2d Tensor2D type~semquad->type~tensor2d dxds, dsdx type~scalar2d->c_ptr blas_handle, interior_gpu, boundary_gpu, boundarynormal_gpu, extBoundary_gpu, avgBoundary_gpu, interpWork type~scalar2d_t Scalar2D_t type~scalar2d->type~scalar2d_t type~vector2d->c_ptr blas_handle, interior_gpu, boundary_gpu, extBoundary_gpu, avgBoundary_gpu, boundaryNormal_gpu, interpWork type~vector2d_t Vector2D_t type~vector2d->type~vector2d_t type~self_dataobj SELF_DataObj type~scalar2d_t->type~self_dataobj type~mappedvector2d_t MappedVector2D_t type~mappedvector2d->type~mappedvector2d_t type~mesh2d->c_ptr sideInfo_gpu type~mesh2d_t Mesh2D_t type~mesh2d->type~mesh2d_t type~boundarycondition BoundaryCondition type~boundaryconditionlist->type~boundarycondition current, head, tail type~tensor2d->c_ptr blas_handle, interior_gpu, boundary_gpu, extBoundary_gpu type~tensor2d_t Tensor2D_t type~tensor2d->type~tensor2d_t type~vector2d_t->type~self_dataobj type~mappedvector2d_t->type~semquad geometry type~mappedvector2d_t->type~vector2d type~lagrange Lagrange type~self_dataobj->type~lagrange interp type~metadata Metadata type~self_dataobj->type~metadata meta EquationParser EquationParser type~self_dataobj->EquationParser eqn type~tensor2d_t->type~self_dataobj type~semmesh SEMMesh type~mesh2d_t->type~semmesh type~boundarycondition->c_ptr elements_gpu, sides_gpu type~boundarycondition->type~boundarycondition next, prev type~lagrange->c_ptr qWeights_gpu, iMatrix_gpu, dMatrix_gpu, dgMatrix_gpu, dSplitMatrix_gpu, bMatrix_gpu type~lagrange_t Lagrange_t type~lagrange->type~lagrange_t type~domaindecomposition DomainDecomposition type~semmesh->type~domaindecomposition decomp type~lagrange_t->c_ptr blas_handle type~domaindecomposition->c_ptr elemToRank_gpu type~domaindecomposition_t DomainDecomposition_t type~domaindecomposition->type~domaindecomposition_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
logical, public :: gradient_enabled =.false.
type(BoundaryConditionList), public :: hyperbolicBCs
integer, public :: ioIterate =0
type(Mesh2D), public, pointer:: mesh
integer, public :: nvar
type(BoundaryConditionList), public :: parabolicBCs
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
type(MappedScalar2D), public :: workSol

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 :: BoundaryFlux => BoundaryFlux_DGModel2D

procedure, public :: CalculateEntropy => CalculateEntropy_DGModel2D

procedure, public :: CalculateSolutionGradient => CalculateSolutionGradient_DGModel2D

procedure, public :: CalculateTendency => CalculateTendency_DGModel2D

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 :: PreTendency => PreTendency_Model

  • public subroutine PreTendency_Model(this)

    PreTendency 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 PreTendency 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 :: 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_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 :: 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_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_PML_t

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

    Interior flux. Variables 1-5 use the parent linear Euler 2D flux; auxiliary variables 6-9 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-5, with zero flux returned for the auxiliary variables 6-9. 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_PML_t) :: LinearEuler2D_PML
  endtype LinearEuler2D_PML