conservative_object Derived Type

type, public, abstract :: conservative_object

Convervative object class.

Inherited By

type~~conservative_object~~InheritedByGraph type~conservative_object conservative_object type~conservative_compressible conservative_compressible type~conservative_object->type~conservative_compressible type~euler_1d euler_1d type~conservative_compressible->type~euler_1d U
Help

Source Code


Type-Bound Procedures

procedure(symmetric_operator), public, deferred, pass(lhs) :: add

Operator +.

procedure(array_interface), public, deferred, pass(self) :: array

Return serialized array of conservative.

  • pure function array_interface(self) result(array_) Prototype

    Return serialized array of conservative.

    Arguments

    Type IntentOptional AttributesName
    class(conservative_object), intent(in) :: self

    Conservative.

    Return Value real(kind=R8P), allocatable, (:)

    Serialized array of conservative.

generic, public :: assignment(=) => cons_assign_cons

Overload =.

procedure(compute_fluxes_interface), public, deferred, pass(self) :: compute_fluxes

Compute conservative fluxes.

  • subroutine compute_fluxes_interface(self, eos, normal, fluxes) Prototype

    Compute conservative fluxes.

    Arguments

    Type IntentOptional AttributesName
    class(conservative_object), intent(in) :: self

    Conservative.

    class(eos_object), intent(in) :: eos

    Equation of state.

    type(vector), intent(in) :: normal

    Normal (versor) of face where fluxes are given.

    class(conservative_object), intent(out) :: fluxes

    Conservative fluxes.

procedure(assignment_interface), public, deferred, pass(lhs) :: cons_assign_cons

Operator =.

procedure(cons_operator_real), public, deferred, pass(lhs) :: cons_divide_real

Operator cons / real.

  • function cons_operator_real(lhs, rhs) result(operator_result) Prototype

    Operator cons.op.real.

    Arguments

    Type IntentOptional AttributesName
    class(conservative_object), intent(in) :: lhs

    Left hand side.

    real(kind=R8P), intent(in) :: rhs

    Right hand side.

    Return Value class(conservative_object), allocatable

    Operator result.

procedure(symmetric_operator), public, deferred, pass(lhs) :: cons_multiply_cons

Operator *.

procedure(cons_operator_real), public, deferred, pass(lhs) :: cons_multiply_real

Operator cons * real.

  • function cons_operator_real(lhs, rhs) result(operator_result) Prototype

    Operator cons.op.real.

    Arguments

    Type IntentOptional AttributesName
    class(conservative_object), intent(in) :: lhs

    Left hand side.

    real(kind=R8P), intent(in) :: rhs

    Right hand side.

    Return Value class(conservative_object), allocatable

    Operator result.

procedure(description_interface), public, deferred, pass(self) :: description

Return pretty-printed object description.

  • pure function description_interface(self, prefix) result(desc) Prototype

    Return a pretty-formatted object description.

    Arguments

    Type IntentOptional AttributesName
    class(conservative_object), intent(in) :: self

    Conservative.

    character(len=*), intent(in), optional :: prefix

    Prefixing string.

    Return Value character(len=:), allocatable

    Description.

procedure(destroy_interface), public, deferred, pass(self) :: destroy

Destroy conservative.

  • elemental subroutine destroy_interface(self) Prototype

    Destroy conservative.

    Arguments

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

    Conservative.

procedure(initialize_interface), public, deferred, pass(self) :: initialize

Initialize conservative.

procedure(unary_operator), public, deferred, pass(self) :: negative

Unary operator - cons.

  • function unary_operator(self) result(operator_result) Prototype

    Unary operator .op.cons.

    Arguments

    Type IntentOptional AttributesName
    class(conservative_object), intent(in) :: self

    Conservative.

    Return Value class(conservative_object), allocatable

    Operator result.

generic, public :: operator(*) => cons_multiply_cons, cons_multiply_real, real_multiply_cons

Overload *.

generic, public :: operator(+) => add, positive

Overload +.

generic, public :: operator(-) => sub, negative

Overload -.

generic, public :: operator(/) => cons_divide_real

Overload /.

  • private function cons_divide_real(lhs, rhs) result(operator_result)

    Operator cons / real.

    Arguments

    Type IntentOptional AttributesName
    class(conservative_compressible), intent(in) :: lhs

    Left hand side.

    real(kind=R8P), intent(in) :: rhs

    Right hand side.

    Return Value class(conservative_object), allocatable

    Operator result.

procedure(unary_operator), public, deferred, pass(self) :: positive

Unary operator + cons.

  • function unary_operator(self) result(operator_result) Prototype

    Unary operator .op.cons.

    Arguments

    Type IntentOptional AttributesName
    class(conservative_object), intent(in) :: self

    Conservative.

    Return Value class(conservative_object), allocatable

    Operator result.

procedure(pressure_interface), public, deferred, pass(self) :: pressure

Return pressure value.

  • elemental function pressure_interface(self, eos) result(pressure_) Prototype

    Return pressure value.

    Arguments

    Type IntentOptional AttributesName
    class(conservative_object), intent(in) :: self

    Conservative.

    class(eos_object), intent(in) :: eos

    Equation of state.

    Return Value real(kind=R8P)

    Pressure value.

procedure(real_operator_cons), public, deferred, pass(rhs) :: real_multiply_cons

Operator real * cons.

  • function real_operator_cons(lhs, rhs) result(operator_result) Prototype

    Operator real.op.cons.

    Arguments

    Type IntentOptional AttributesName
    real(kind=R8P), intent(in) :: lhs

    Left hand side.

    class(conservative_object), intent(in) :: rhs

    Right hand side.

    Return Value class(conservative_object), allocatable

    Operator result.

procedure(symmetric_operator), public, deferred, pass(lhs) :: sub

Operator -.

procedure(velocity_interface), public, deferred, pass(self) :: velocity

Return velocity vector.

  • elemental function velocity_interface(self) result(velocity_) Prototype

    Return velocity vector.

    Arguments

    Type IntentOptional AttributesName
    class(conservative_object), intent(in) :: self

    Conservative.

    Return Value type(vector)

    Velocity vector.

Source Code

type, abstract :: conservative_object
   !< Convervative object class.
   contains
      ! deferred methods
      procedure(array_interface),          pass(self), deferred :: array              !< Return serialized array of conservative.
      procedure(compute_fluxes_interface), pass(self), deferred :: compute_fluxes     !< Compute conservative fluxes.
      procedure(description_interface),    pass(self), deferred :: description        !< Return pretty-printed object description.
      procedure(destroy_interface),        pass(self), deferred :: destroy            !< Destroy conservative.
      procedure(initialize_interface),     pass(self), deferred :: initialize         !< Initialize conservative.
      procedure(pressure_interface),       pass(self), deferred :: pressure           !< Return pressure value.
      procedure(velocity_interface),       pass(self), deferred :: velocity           !< Return velocity vector.
      procedure(assignment_interface),     pass(lhs),  deferred :: cons_assign_cons   !< Operator `=`.
      procedure(cons_operator_real),       pass(lhs),  deferred :: cons_divide_real   !< Operator `cons / real`.
      procedure(symmetric_operator),       pass(lhs),  deferred :: cons_multiply_cons !< Operator `*`.
      procedure(cons_operator_real),       pass(lhs),  deferred :: cons_multiply_real !< Operator `cons * real`.
      procedure(real_operator_cons),       pass(rhs),  deferred :: real_multiply_cons !< Operator `real * cons`.
      procedure(symmetric_operator),       pass(lhs),  deferred :: add                !< Operator `+`.
      procedure(unary_operator),           pass(self), deferred :: positive           !< Unary operator `+ cons`.
      procedure(symmetric_operator),       pass(lhs),  deferred :: sub                !< Operator `-`.
      procedure(unary_operator),           pass(self), deferred :: negative           !< Unary operator `- cons`.
      ! operators
      generic :: assignment(=) => cons_assign_cons                                         !< Overload `=`.
      generic :: operator(+) => add, positive                                              !< Overload `+`.
      generic :: operator(-) => sub, negative                                              !< Overload `-`.
      generic :: operator(*) => cons_multiply_cons, cons_multiply_real, real_multiply_cons !< Overload `*`.
      generic :: operator(/) => cons_divide_real                                           !< Overload `/`.
endtype conservative_object