interpolator_js Derived Type

type, public, extends(interpolator) :: interpolator_js

type~~interpolator_js~~InheritsGraph type~interpolator_js interpolator_js type~smoothness_indicators smoothness_indicators type~smoothness_indicators->type~interpolator_js is type~interpolator interpolator type~smoothness_indicators->type~interpolator is type~polynomials polynomials type~polynomials->type~interpolator_js polynom type~polynomials->type~interpolator polynom type~alpha_coefficients alpha_coefficients type~alpha_coefficients->type~interpolator_js alpha type~alpha_coefficients->type~interpolator alpha type~optimal_weights optimal_weights type~optimal_weights->type~interpolator_js weights type~optimal_weights->type~interpolator weights type~base_object base_object type~base_object->type~smoothness_indicators type~base_object->type~polynomials type~base_object->type~alpha_coefficients type~base_object->type~optimal_weights type~base_object->type~interpolator type~interpolator->type~interpolator_js
Help


Jiang-Shu (upwind) interpolator object.


Source Code


Components

TypeVisibility AttributesNameInitial
class(smoothness_indicators), public, allocatable:: is

Smoothness indicators.

class(alpha_coefficients), public, allocatable:: alpha

Alpha coefficients.

class(optimal_weights), public, allocatable:: weights

Optimal weights.

class(polynomials), public, allocatable:: polynom

Polynomilas.

integer(kind=I_P), private :: S =0_I_P

Stencil dimension.

real(kind=R_P), private :: eps =0._R_P

Parameter for avoiding divisiion by zero.


Type-Bound Procedures

procedure, public, nopass :: description

Return interpolator string-description.

  • private pure function description() result(string)

    Return interpolator string-descripition.

    Arguments

    None

    Return Value character(len=:), allocatable

    String-description.

procedure, public, pass(self) :: interpolate

Interpolate values.

  • private pure subroutine interpolate(self, S, stencil, location, interpolation)

    Interpolate values.

    Arguments

    Type IntentOptional AttributesName
    class(interpolator_js), intent(inout) :: self

    Interpolator.

    integer(kind=I_P), intent(in) :: S

    Number of stencils actually used.

    real(kind=R_P), intent(in) :: stencil(1:,1-S:)

    Stencil of the interpolation [1:2, 1-S:-1+S].

    character(len=*), intent(in) :: location

    Location of interpolation: left, right, both.

    real(kind=R_P), intent(out) :: interpolation(1:)

    Result of the interpolation, [1:2].

procedure, public, pass(self) :: create

Create interpolator.

  • private subroutine create(self, constructor)

    Create interpolator.

    Arguments

    Type IntentOptional AttributesName
    class(interpolator_js), intent(inout) :: self

    Interpolator.

    class(base_object_constructor), intent(in) :: constructor

    Constructor.

procedure, public, pass(self) :: destroy

Destroy interpolator.

  • private elemental subroutine destroy(self)

    Destoy interpolator.

    Arguments

    Type IntentOptional AttributesName
    class(interpolator_js), intent(inout) :: self

    Interpolator.

Source Code

type, extends(interpolator) :: interpolator_js
  !< Jiang-Shu (upwind) interpolator object.
  !<
  !< @note The WENO interpolator implemented is the *Efficient Implementation of Weighted ENO Schemes*,
  !< Guang-Shan Jiang, Chi-Wang Shu, JCP, 1996, vol. 126, pp. 202--228, doi:10.1006/jcph.1996.0130.
  !<
  !< @note The supported accuracy formal order are: 3rd, 5th, 7th, 9th, 11th, 13th, 15th, 17th  corresponding to use 2, 3, 4, 5, 6,
  !< 7, 8, 9 stencils composed of 2, 3, 4, 5, 6, 7, 8, 9 values, respectively.
  private
  integer(I_P) :: S = 0_I_P    !< Stencil dimension.
  real(R_P)    :: eps = 0._R_P !< Parameter for avoiding divisiion by zero.
  contains
    ! public deferred methods
    procedure, nopass     :: description !< Return interpolator string-description.
    procedure, pass(self) :: interpolate !< Interpolate values.
    ! public methods
    procedure, pass(self) :: create  !< Create interpolator.
    procedure, pass(self) :: destroy !< Destroy interpolator.
endtype interpolator_js