m_calculate Module

This module calculates spatial derivatives (first and second spatial derivatives in X, Y, Z directions like ddx, ddy, ddz, etc.) using high-order compact finite difference schemes. It also calculates chemical reaction rates, positive/negative component extraction, and threshold operations, incorporating memory cache efficiency (cache blocking) and transpose optimization operations (tp2).



Functions

public function rxn_rate(c)

Computes the chemical reaction rate based on the progress variable c.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64) :: c

The progress variable (0.0 to 1.0).

Return Value real(kind=real64)

public function threshold_min_max(c, minc, maxc)

Arguments

Type IntentOptional Attributes Name
real(kind=real64) :: c
real(kind=real64) :: minc
real(kind=real64) :: maxc

Return Value real(kind=real64)

public function positive(c)

Arguments

Type IntentOptional Attributes Name
real(kind=real64) :: c

Return Value real(kind=real64)

public function negative(c)

Arguments

Type IntentOptional Attributes Name
real(kind=real64) :: c

Return Value real(kind=real64)


Subroutines

public subroutine m_calculate_init()

Initializes the workspace arrays and matrices.

Read more…

Arguments

None

public subroutine m_calculate_finalize()

Arguments

None

public subroutine ddx1d(dst, src)

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(out), dimension(1,nxp) :: dst
real(kind=real64), intent(in), dimension(1,nxp) :: src

public subroutine ddx(dst, src)

Computes the first-order derivative in the X-direction.

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(out), dimension(nxp,nyp,nzp) :: dst

3D output derivative field (nxp, nyp, nzp).

real(kind=real64), intent(in), dimension(nxp,nyp,nzp) :: src

3D input scalar field (nxp, nyp, nzp).

public subroutine ddy(dst, src)

Computes the first-order derivative in the Y-direction.

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(out), dimension(nxp,nyp,nzp) :: dst

3D output derivative field (nxp, nyp, nzp).

real(kind=real64), intent(in), dimension(nxp,nyp,nzp) :: src

3D input scalar field (nxp, nyp, nzp).

public subroutine ddz(dst, src)

Computes the first-order derivative in the Z-direction.

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(out), dimension(nxp,nyp,nzp) :: dst

3D output derivative field (nxp, nyp, nzp).

real(kind=real64), intent(in), dimension(nxp,nyp,nzp) :: src

3D input scalar field (nxp, nyp, nzp).

public subroutine d2dx1d(dst, src)

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(out), dimension(nxp) :: dst
real(kind=real64), intent(in), dimension(nxp) :: src

public subroutine d2dx(dst, src)

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(out), dimension(nxp,nyp,nzp) :: dst
real(kind=real64), intent(in), dimension(nxp,nyp,nzp) :: src

public subroutine d2dy(dst, src)

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(out), dimension(nxp,nyp,nzp) :: dst
real(kind=real64), intent(in), dimension(nxp,nyp,nzp) :: src

public subroutine d2dz(dst, src)

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(out), dimension(nxp,nyp,nzp) :: dst
real(kind=real64), intent(in), dimension(nxp,nyp,nzp) :: src

public subroutine tp(a, b, nx)

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(out) :: a(nb,nx)
real(kind=real64), intent(in) :: b(nx,nb)
integer, intent(in) :: nx

public subroutine tp2(a, b, n1, n2)

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(out) :: a(n1,n2)
real(kind=real64), intent(in) :: b(n2,n1)
integer, intent(in) :: n1
integer, intent(in) :: n2