The reference element.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer(kind=ip), | public | :: | n | Order of this element. |
|||
real(kind=wp), | public, | dimension(:), allocatable | :: | r | Node location within this element. |
||
real(kind=wp), | public, | dimension(:), allocatable | :: | w | Weights for integration. |
||
real(kind=wp), | public, | dimension(:,:), allocatable | :: | v | Vandermonde matrix for this element. |
||
real(kind=wp), | public, | dimension(:,:), allocatable | :: | dr | Derivative matrix for this element. |
||
real(kind=wp), | public, | dimension(:,:), allocatable | :: | lift | Lift matrix for this element. |
||
real(kind=wp), | public, | dimension(:,:), allocatable | :: | filter | An optional smoothing filter. |
||
logical, | public | :: | have_filter | Set to .true. if a filter has been initialized. |
The finalizer.
Use characteristic_flux for either char_flux_real or char_flux_complex.
The real version of the characteristic flux routine.
Interface for the characteristic flux routine for real data types.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ref_element), | intent(in) | :: | this | Has to be a reference element type. |
||
integer(kind=ip), | intent(in) | :: | nvar | The number of variables the characteristic flux has to be computed for. |
||
integer(kind=ip), | intent(in) | :: | order | The order of the reference element. Used to declare the size of the return array. |
||
real(kind=wp), | intent(in), | dimension(2,nvar) | :: | uint | The boundary data internal to this element. |
|
real(kind=wp), | intent(in), | dimension(2,nvar) | :: | uext | The boundary data external to this element. |
|
real(kind=wp), | intent(in), | dimension(2,nvar) | :: | flux | The boundary fluxes. |
|
real(kind=wp), | intent(in), | dimension(2,nvar) | :: | lambda | The boundary characteristic speeds. |
|
real(kind=wp), | intent(in), | dimension(2,nvar,nvar) | :: | s | The matrix that converts from characteristic to evolved variables. |
|
real(kind=wp), | intent(in), | dimension(2,nvar,nvar) | :: | sinv | The matrix that converts from evolved to characteristic variables. |
|
logical, | intent(in) | :: | debug_output | Currently ignored for the real version of this routine. |
At return the numerical flux has been lifted to the whole element.
The complex version of the characteristic flux routine.
Interface for the characteristic flux routine for complex data types.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ref_element), | intent(in) | :: | this | Has to be a reference element type. |
||
integer(kind=ip), | intent(in) | :: | nvar | The number of variables the characteristic flux has to be computed for. |
||
integer(kind=ip), | intent(in) | :: | order | The order of the reference element. Used to declare the size of the return array. |
||
complex(kind=wp), | intent(in), | dimension(2,nvar) | :: | uint | The boundary data internal to this element. |
|
complex(kind=wp), | intent(in), | dimension(2,nvar) | :: | uext | The boundary data external to this element. |
|
complex(kind=wp), | intent(in), | dimension(2,nvar) | :: | flux | The boundary fluxes. |
|
real(kind=wp), | intent(in), | dimension(2,nvar) | :: | lambda | The boundary characteristic speeds. |
|
real(kind=wp), | intent(in), | dimension(2,nvar,nvar) | :: | s | The matrix that converts from characteristic to evolved variables. |
|
real(kind=wp), | intent(in), | dimension(2,nvar,nvar) | :: | sinv | The matrix that converts from evolved to characteristic variables. |
|
logical, | intent(in) | :: | debug_output | If .true., produce debug output |
At return the numerical flux has been lifted to the whole element.
type ref_element
!! The reference element.
integer(ip) :: n
!! Order of this element.
real(wp), dimension(:), allocatable :: r
!! Node location within this element.
real(wp), dimension(:), allocatable :: w
!! Weights for integration.
real(wp), dimension(:,:), allocatable :: v
!! Vandermonde matrix for this element.
real(wp), dimension(:,:), allocatable :: dr
!! Derivative matrix for this element.
real(wp), dimension(:,:), allocatable :: lift
!! Lift matrix for this element.
real(wp), dimension(:,:), allocatable :: filter
!! An optional smoothing filter.
logical :: have_filter
!! Set to .true. if a filter has been initialized.
contains
generic :: characteristic_flux => char_flux_real, &
char_flux_complex
!! Use characteristic_flux for either char_flux_real or
!! char_flux_complex.
procedure :: char_flux_real
!! The real version of the characteristic flux routine.
procedure :: char_flux_complex
!! The complex version of the characteristic flux routine.
final :: deallocate_ref_element
!! The finalizer.
end type ref_element