| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| 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 | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(LinearEuler2D_PML_t), | intent(inout) | :: | this |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(LinearEuler2D_PML_t), | intent(inout) | :: | this |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Model), | intent(inout) | :: | this | |||
| integer(kind=HID_T), | intent(in) | :: | fileid |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel2D), | intent(inout) | :: | this |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel2D), | intent(inout) | :: | this |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel2D), | intent(inout) | :: | this |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel2D), | intent(inout) | :: | this |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Model), | intent(inout) | :: | this | |||
| real(kind=prec), | intent(in) | :: | tn |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel2D), | intent(inout) | :: | this |
Forward steps the model using the associated tendency procedure and time integrator
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Model), | intent(inout) | :: | this | |||
| real(kind=prec), | intent(in) | :: | tn | |||
| real(kind=prec), | intent(in) | :: | dt | |||
| real(kind=prec), | intent(in) | :: | ioInterval |
Free the 2D DG model, including GPU BC arrays.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel2D), | intent(inout) | :: | this |
Returns the current simulation time stored in the model % t attribute
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Model), | intent(in) | :: | this | |||
| real(kind=prec), | intent(out) | :: | t |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Model), | intent(inout) | :: | this |
Initialize the 2D DG model, then upload BC element/side arrays to GPU.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel2D), | intent(out) | :: | this | |||
| type(Mesh2D), | intent(in), | target | :: | mesh | ||
| type(SEMQuad), | intent(in), | target | :: | geometry |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Model), | intent(inout) | :: | this | |||
| real(kind=prec), | intent(in) | :: | tn |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Model), | intent(inout) | :: | this | |||
| real(kind=prec), | intent(in) | :: | tn |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Model), | intent(inout) | :: | this | |||
| real(kind=prec), | intent(in) | :: | tn |
Scan the mesh sideInfo and populate the elements/sides arrays for each registered boundary condition.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel2D_t), | intent(inout) | :: | 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
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Model), | intent(inout) | :: | this |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Model), | intent(in) | :: | this |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel2D_t), | intent(inout) | :: | this | |||
| character, | intent(in) | :: | fileName |
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.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Model), | intent(in) | :: | 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.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel2D_t), | intent(inout) | :: | this |
Method that can be overridden by users to report their own custom metrics after file io
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Model), | intent(inout) | :: | this |
Apply registered boundary conditions for the solution. Each boundary condition method loops over its own boundary faces.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel2D_t), | intent(inout) | :: | this |
Apply registered boundary conditions for the solution gradient. Each boundary condition method loops over its own boundary faces.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel2D_t), | intent(inout) | :: | this |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(LinearEuler2D_PML_t), | intent(inout) | :: | this |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(LinearEuler2D_PML_t), | intent(inout) | :: | this |
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.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| 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 |
Sets the model % t attribute with the provided simulation time
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Model), | intent(inout) | :: | this | |||
| real(kind=prec), | intent(in) | :: | t |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel2D_t), | intent(inout) | :: | this | |||
| character, | intent(in) | :: | eqnChar(1:this%solution%nVar) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel2D_t), | intent(inout) | :: | this | |||
| type(EquationParser), | intent(in) | :: | eqn(1:this%solution%nVar) |
Sets the time integrator method, using a character input
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Model), | intent(inout) | :: | this | |||
| character, | intent(in) | :: | integrator |
This subroutine sets the initial condition for a weak blast wave problem. The initial condition is given by
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| 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 |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel2D), | intent(inout) | :: | this | |||
| integer, | intent(in) | :: | m |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel2D), | intent(inout) | :: | this | |||
| integer, | intent(in) | :: | m |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel2D), | intent(inout) | :: | this | |||
| integer, | intent(in) | :: | m |
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)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel2D), | intent(inout) | :: | this | |||
| real(kind=prec), | intent(in), | optional | :: | dt |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel2D_t), | intent(inout) | :: | this | |||
| character, | intent(in), | optional | :: | fileName |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel2D_t), | intent(inout) | :: | this | |||
| character, | intent(in), | optional | :: | filename |
The entropy function is the sum of kinetic and internal energy For the linear model, this is
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(LinearEuler2D_t), | intent(in) | :: | this | |||
| real(kind=prec), | intent(in) | :: | s(1:this%nvar) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Model), | intent(in) | :: | this | |||
| real(kind=prec), | intent(in) | :: | s(1:this%nvar) | |||
| real(kind=prec), | intent(in) | :: | dsdx(1:this%nvar) |
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.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| 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) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| 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) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| 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 |
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.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| 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) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| 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) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Model), | intent(in) | :: | this | |||
| real(kind=prec), | intent(in) | :: | s(1:this%nvar) | |||
| real(kind=prec), | intent(in) | :: | dsdx(1:this%nvar) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| 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) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| 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) |
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.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(LinearEuler2D_PML_t), | intent(inout) | :: | this |
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 :: 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