m_MEF90_Ctx Module



Variables

Type Visibility Attributes Name Initial
character(len=MEF90MXSTRLEN), protected, dimension(8) :: MEF90ScalingList = [character(len=MEF90MXSTRLEN)::'constant', 'linear', 'file', 'expression', 'null', 'MEF90scaling', '_MEF90Scaling', '']
character(len=MEF90MXSTRLEN), protected, dimension(7) :: MEF90TimeInterpolationList = [character(len=MEF90MXSTRLEN)::'linear', 'Vcycle', 'quadratic', 'exo', 'MEF90TimeInterpolation', '_MEF90TimeInterpolation', '']

Enumerations

enum, bind(c)

Enumerators

enumerator:: MEF90Scaling_CST = 0
enumerator:: MEF90Scaling_Linear = 1
enumerator:: MEF90Scaling_File = 2
enumerator:: MEF90Scaling_Expr = 3
enumerator:: MEF90Scaling_Null = 4

Description

Author
Blaise Bourdin (2012-2014, bourdin@lsu.edu) Blaise Bourdin (2026, bourdin@mcmaster.ca)

MEF90Ctx_Type: The class holding the MEF90-wide state and options

enum, bind(c)

Enumerators

enumerator:: MEF90TimeInterpolation_linear = 0
enumerator:: MEF90TimeInterpolation_Vcycle = 1
enumerator:: MEF90TimeInterpolation_quadratic = 2
enumerator:: MEF90TimeInterpolation_exo = 3

Derived Types

type, public ::  MEF90CtxGlobalOptions_Type

MEF90CtxGlobalOptions_Type: the MEF90-wide options. The values given here are the defaults used by setFromOptions

Components

Type Visibility Attributes Name Initial
logical(kind=C_BOOL), public :: dryrun = PETSC_FALSE
integer(kind=C_INT32_T), public :: elementFamily = MEF90ElementFamilyLagrange
integer(kind=C_INT32_T), public :: elementOrder = 1_ki
integer(kind=C_INT32_T), public :: timeInterpolation = MEF90TimeInterpolation_linear
real(kind=C_DOUBLE), public :: timeMax = 1.0_kr
real(kind=C_DOUBLE), public :: timeMin = 0.0_kr
integer(kind=C_INT32_T), public :: timeNumCycle = 1_ki
integer(kind=C_INT32_T), public :: timeNumStep = 11_ki
integer(kind=C_INT32_T), public :: timeSkip = 0_ki
integer(kind=C_INT32_T), public :: verbose = 0_ki

type, public, extends(MEF90Object) ::  MEF90Ctx_Type

Components

Type Visibility Attributes Name Initial
integer(kind=C_INT32_T), public :: comm
character(kind=c_char, len=MEF90MXSTRLEN), public :: geometryfile
character(kind=c_char, len=MEF90MXSTRLEN), public :: name = "NULL"
integer(kind=C_INT32_T), public :: numProcs
character(kind=c_char, len=MEF90MXSTRLEN), public :: prefix
integer(kind=C_INT32_T), public :: rank
type(tPetscViewer), public :: resultViewer

The options are not stored: they are read from the options database where they are needed, with MEF90CtxGlobalOptionsSetFromOptions. Its options argument is intent(inout), so a caller that wants a default of its own sets it on the record before the call.

character(kind=c_char, len=MEF90MXSTRLEN), public :: resultfile

Type-Bound Procedures

procedure, public, pass(self) :: setFromOptions => MEF90CtxSetFromOptions
procedure, public, pass(self) :: view => MEF90Object_view
procedure, public, pass(self) :: view_internal => MEF90CtxView

Subroutines

public subroutine MEF90CtxCreate(comm, MEF90Ctx, prefix, ierr)

Author
Blaise Bourdin (2012-2014, bourdin@lsu.edu) Blaise Bourdin (2022, bourdin@mcmaster.ca)

MEF90CtxCreate:

Arguments

Type IntentOptional Attributes Name
integer(kind=C_INT32_T), intent(in) :: comm
type(MEF90Ctx_Type), intent(out) :: MEF90Ctx
character(len=*), intent(in) :: prefix
integer(kind=C_INT32_T), intent(inout) :: ierr

public subroutine MEF90CtxDestroy(MEF90Ctx, ierr)

Author
Blaise Bourdin (2012-2014, bourdin@lsu.edu) Blaise Bourdin (2022, bourdin@mcmaster.ca)

MEF90CtxDestroy:

Arguments

Type IntentOptional Attributes Name
type(MEF90Ctx_Type), intent(inout) :: MEF90Ctx
integer(kind=C_INT32_T), intent(out) :: ierr

public subroutine MEF90CtxGetTime(MEF90Ctx, t, ierr)

Author
Blaise Bourdin (2012-2014, bourdin@lsu.edu)

MEF90CtxGetTime:

Arguments

Type IntentOptional Attributes Name
type(MEF90Ctx_Type), intent(inout) :: MEF90Ctx

The number of time steps this returns is size(t). For the exo interpolation it comes from the file rather than from -time_numstep, so callers must use size(t) and not re-read -time_numstep to size their per-step arrays or to detect the last step.

real(kind=C_DOUBLE), dimension(:), pointer :: t
integer(kind=C_INT32_T), intent(out) :: ierr

public subroutine MEF90CtxGlobalOptionsSetFromOptions(comm, prefix, options, ierr)

Author
Blaise Bourdin (2012-2014, bourdin@lsu.edu) Blaise Bourdin (2026, bourdin@mcmaster.ca)

MEF90CtxGlobalOptionsSetFromOptions: reads the MEF90-wide options. options is intent(inout): whatever it holds on entry is used as the default, so that a caller can override the defaults carried by MEF90CtxGlobalOptions_Type before calling.

Arguments

Type IntentOptional Attributes Name
integer(kind=C_INT32_T), intent(in) :: comm
character(len=*), intent(in) :: prefix
type(MEF90CtxGlobalOptions_Type), intent(inout) :: options
integer(kind=C_INT32_T), intent(inout) :: ierr

public subroutine MEF90CtxSetFromOptions(self, ierr)

Author
Blaise Bourdin (2012-2014, bourdin@lsu.edu) Blaise Bourdin (2026, bourdin@mcmaster.ca)

MEF90CtxSetFromOptions: initializes a MEF90Ctx_Type from options

Arguments

Type IntentOptional Attributes Name
class(MEF90Ctx_Type), intent(inout) :: self
integer(kind=C_INT32_T), intent(inout) :: ierr

public subroutine MEF90CtxView(self, viewer, ierr)

Author
Blaise Bourdin (2026, bourdin@mcmaster.ca)

MEF90CtxView: the default viewer for a MEF90Ctx_Type

Arguments

Type IntentOptional Attributes Name
class(MEF90Ctx_Type), intent(in) :: self
type(tPetscViewer), intent(in) :: viewer
integer(kind=C_INT32_T), intent(inout) :: ierr