m_MEF90_HeatXfer_class Module



Variables

Type Visibility Attributes Name Initial
character(len=MEF90MXSTRLEN), protected, dimension(6) :: MEF90HeatXFer_timeSteppingTypeList = [character(len=MEF90MXSTRLEN)::'null', 'SteadyState', 'Transient', 'MEF90_HeatXFer_timeSteppingType', '_MEF90_HeatXFer_timeSteppingType', '']

Enumerations

enum, bind(c)

Enumerators

enumerator:: MEF90HeatXfer_timeSteppingTypeNULL = 0
enumerator:: MEF90HeatXFer_timeSteppingTypeSteadyState = 1
enumerator:: MEF90HeatXFer_timeSteppingTypeTransient = 2

Description

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

MEF90HeatXfer_Type: The class holding the state and the options of a heat transfer problem


Derived Types

Components

Type Visibility Attributes Name Initial
logical(kind=C_BOOL), public :: Has_BC = PETSC_FALSE
real(kind=C_DOUBLE), public, dimension(3) :: advectionVector = [0.0_kr, 0.0_kr, 0.0_kr]
real(kind=C_DOUBLE), public :: boundaryTemperature = 0.0_kr
real(kind=C_DOUBLE), public :: density = 1.0_kr

Material properties. thermalConductivity is a symmetric matrix, so it is dimension dependent and allocated by MEF90HeatXferCellSetOptionsSetFromOptions

real(kind=C_DOUBLE), public :: flux = 0.0_kr
real(kind=C_DOUBLE), public :: specificHeat = 1.0_kr
class(mef90Mat), public, allocatable :: thermalConductivity

Components

Type Visibility Attributes Name Initial
logical(kind=C_BOOL), public :: Has_BC = PETSC_FALSE
real(kind=C_DOUBLE), public :: boundaryFlux = 0.0_kr
real(kind=C_DOUBLE), public :: boundaryTemperature = 0.0_kr
real(kind=C_DOUBLE), public :: externalTemperature = 0.0_kr
real(kind=C_DOUBLE), public :: surfaceThermalConductivity = 0.0_kr

type, public ::  MEF90HeatXferGlobalOptions_Type

MEF90HeatXferGlobalOptions_Type: the problem-wide options of a MEF90HeatXfer_Type. The values given here are the defaults used by setFromOptions

Components

Type Visibility Attributes Name Initial
logical(kind=C_BOOL), public :: addNullSpace = PETSC_FALSE
integer(kind=C_INT32_T), public :: boundaryFluxScaling = MEF90Scaling_Linear
integer(kind=C_INT32_T), public :: boundaryTemperatureScaling = MEF90Scaling_Linear

scaling = time (step) scaling law currently CST, Linear, Null (not present), File

integer(kind=C_INT32_T), public :: externalTemperatureScaling = MEF90Scaling_Linear
integer(kind=C_INT32_T), public :: fluxScaling = MEF90Scaling_Linear
real(kind=C_DOUBLE), public :: initialTemperature = 0.0_kr
logical(kind=C_BOOL), public :: temperatureExport = PETSC_TRUE
integer(kind=C_INT32_T), public :: timeSteppingType = MEF90HeatXFer_timeSteppingTypeSteadyState

Components

Type Visibility Attributes Name Initial
logical(kind=C_BOOL), public :: Has_BC = PETSC_FALSE
real(kind=C_DOUBLE), public :: boundaryTemperature = 0.0_kr

type, public, extends(MEF90Object) ::  MEF90HeatXfer_Type

Components

Type Visibility Attributes Name Initial
type(tPetscSF), public :: IOToTemperatureSF
type(tPetscSF), public :: IOToboundaryFluxSF
type(tPetscSF), public :: IOToexternalTemperatureSF
type(tPetscSF), public :: IOTofluxSF
type(MEF90Ctx_Type), public, pointer :: MEF90Ctx => null()
type(c_ptr), public :: PETScCtx = C_NULL_PTR

Handle on self, set once in MEF90HeatXferCreate with PETScCtx = c_loc(HeatXfer), and handed to PETSc wherever an application context is expected: SNESSetFunction, SNESSetJacobian, TSSetIFunction, TSSetIJacobian, ... The callbacks in m_MEF90_HeatXfer recover the context with call c_f_pointer(PETScCtx, MEF90HeatXferCtx)

Read more…
type(tVec), public, pointer :: boundaryFluxLocal => null()
type(tPetscSF), public :: boundaryFluxToIOSF
type(tPetscSF), public :: boundaryToTemperatureSF
integer(kind=C_INT32_T), public :: comm
integer(kind=C_INT32_T), public :: dim
type(tVec), public, pointer :: externalTemperatureLocal => null()
type(tPetscSF), public :: externalTemperatureToIOSF
type(tVec), public, pointer :: fluxLocal => null()
type(tPetscSF), public :: fluxToIOSF
type(MEF90HeatXferGlobalOptions_Type), public :: globalOptions
type(tDM), public :: megaDM
character(kind=c_char, len=MEF90MXSTRLEN), public :: name = "NULL"
character(kind=c_char, len=MEF90MXSTRLEN), public :: prefix
type(tVec), public, pointer :: temperatureLocal => null()
type(tPetscSF), public :: temperatureToIOSF
type(tPetscViewer), public :: viewer

Type-Bound Procedures

procedure, public, pass(self) :: setFromOptions => MEF90HeatXferSetFromOptions
procedure, public, pass(self) :: view => MEF90Object_view
procedure, public, pass(self) :: view_internal => MEF90HeatXferView

Subroutines

public subroutine MEF90HeatXferCellSetOptionsSetFromOptions(comm, prefix, dim, options, ierr)

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

MEF90HeatXferCellSetOptionsSetFromOptions: reads the options of a single cell set

Arguments

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

public subroutine MEF90HeatXferCreate(HeatXfer, dm, MEF90Ctx, prefix, ierr)

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

MEF90HeatXferCreate: allocates all the fields of a MEF90HeatXfer_Type

Arguments

Type IntentOptional Attributes Name
type(MEF90HeatXfer_Type), intent(out), target :: HeatXfer

HeatXfer has the target attribute so that HeatXfer%PETScCtx can be handed over to PETSc as an application context. The actual argument MUST therefore also have the target attribute.

type(tDM), intent(in), target :: dm
type(MEF90Ctx_Type), intent(in), target :: MEF90Ctx
character(len=*), intent(in) :: prefix
integer(kind=C_INT32_T), intent(inout) :: ierr

public subroutine MEF90HeatXferDestroy(HeatXfer, ierr)

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

MEF90HeatXferDestroy: destroys a MEF90HeatXfer_Type

Arguments

Type IntentOptional Attributes Name
type(MEF90HeatXfer_Type), intent(inout) :: HeatXfer
integer(kind=C_INT32_T), intent(inout) :: ierr

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

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

MEF90HeatXferFaceSetOptionsSetFromOptions: reads the options of a single face set

Arguments

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

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

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

MEF90HeatXferGlobalOptionsSetFromOptions_Private: reads the problem-wide options of a MEF90HeatXfer_Type

Arguments

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

public subroutine MEF90HeatXferSetFromOptions(self, ierr)

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

MEF90HeatXferSetFromOptions: initializes a MEF90HeatXfer_Type from options

Arguments

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

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

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

MEF90HeatXferVertexSetOptionsSetFromOptions: reads the options of a single vertex set

Arguments

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

public subroutine MEF90HeatXferView(self, viewer, ierr)

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

MEF90HeatXferView: the default viewer for a MEF90HeatXfer_Type

Arguments

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