Initiate
This routine initiates the kernel.
Interface
INTERFACE
MODULE SUBROUTINE SSF_Initiate(obj, param, dom, domains)
CLASS(MovingMesh_), INTENT(INOUT) :: obj
TYPE(ParameterList_), INTENT(IN) :: param
CLASS(Domain_), OPTIONAL, TARGET, INTENT(INOUT) :: dom
TYPE(DomainPointer_), OPTIONAL, TARGET, INTENT(INOUT) :: domains(:)
END SUBROUTINE SSF_Initiate
END INTERFACE
Example
This example shows how to initiate the kernel.
PROGRAM main
USE easifemBase
USE easifemClasses
USE easifemMaterials
USE easifemKernels
USE MovingMesh_Class
IMPLICIT NONE
TYPE( MovingMesh_ ) :: obj
TYPE( HDF5File_ ) :: domainFile
TYPE( Domain_ ) :: dom
TYPE( ParameterList_ ) :: param
CHARACTER( * ), PARAMETER :: engine="NATIVE_SERIAL"
INTEGER( I4B ), PARAMETER :: CoordinateSystem = KERNEL_CARTESIAN
INTEGER( I4B ), PARAMETER :: nsd = 2
INTEGER( I4B ), PARAMETER :: nnt = 1
REAL( DFP ), PARAMETER :: dt = 0.0_DFP
REAL( DFP ), PARAMETER :: startTime = 0.0_DFP
REAL( DFP ), PARAMETER :: endTime = 0.0_DFP
REAL( DFP ), PARAMETER :: currentTime = 0.0_DFP
INTEGER( I4B ), PARAMETER :: currentTimeStep = 1
INTEGER( I4B ), PARAMETER :: totalTimeStep = 1
REAL( DFP ), PARAMETER :: gravity(3)=[0.0, -9.8, 0.0]
CHARACTER( * ), PARAMETER :: domainFileName="./mesh.h5"
INTEGER( I4B ), PARAMETER :: maxIter = 100
INTEGER( I4B ), PARAMETER :: tMaterials= 1
INTEGER( I4B ), PARAMETER :: tDirichletBC = 2
INTEGER( I4B ), PARAMETER :: tNeumannBC = 0
CHARACTER(*), PARAMETER :: baseInterpolationForSpace="LagrangeInterpolation"
CHARACTER(*), PARAMETER :: baseContinuityForSpace="H1"
CHARACTER(*), PARAMETER :: quadratureTypeForSpace="GaussLegendre"
INTEGER( I4B ), PARAMETER :: postProcessOpt = 1
INTEGER(I4B), PARAMETER :: ls_solverName = LIS_GMRES
INTEGER(I4B), PARAMETER :: ls_preconditionOption= NO_PRECONDITION
INTEGER(I4B), PARAMETER :: ls_convergenceIn = convergenceInRes
INTEGER(I4B), PARAMETER :: ls_convergenceType = relativeConvergence
INTEGER( I4B ), PARAMETER :: ls_maxIter = 100
LOGICAL( LGT ), PARAMETER :: ls_relativeToRHS = .TRUE.
INTEGER( I4B ), PARAMETER :: ls_KrylovSubspaceSize=20
REAL( DFP ) , PARAMETER :: ls_rtol=1.0E-10
REAL( DFP ) , PARAMETER :: ls_atol=1.0E-10
Set parameters for kernel.
CALL FPL_INIT(); CALL param%Initiate()
Set parameters for the kernel.
CALL SetMovingMeshParam( &
& param=param, &
& engine=engine, &
& coordinateSystem=coordinateSystem, &
& nsd=nsd, &
& nnt=nnt, &
& dt=dt, &
& startTime=startTime, &
& endTime=endTime, &
& currentTime=currentTime, &
& currentTimeStep=currentTimeStep, &
& totalTimeStep=totalTimeStep, &
& gravity=gravity, &
& domainFile=domainFileName, &
!!& materialInterfaces=materialInterfaces, &
& maxIter=maxIter, &
& tMaterials=tMaterials, &
& tDirichletBC=tDirichletBC, &
& tNeumannBC=tNeumannBC, &
& baseInterpolationForSpace=baseInterpolationForSpace, &
& baseContinuityForSpace=baseContinuityForSpace, &
& quadratureTypeForSpace=quadratureTypeForSpace, &
& postProcessOpt=postProcessOpt)
Setting parameters for linear solver.
CALL SetLinSolverParam( &
& param=param, &
& solverName=ls_solverName,&
& preconditionOption=ls_preconditionOption, &
& convergenceIn=ls_convergenceIn, &
& convergenceType=ls_convergenceType, &
& maxIter=ls_maxIter, &
& relativeToRHS=ls_relativeToRHS, &
& KrylovSubspaceSize=ls_KrylovSubspaceSize, &
& rtol=ls_rtol, &
& atol=ls_atol )
Initiate domain by reading data from a domain file.
CALL domainFile%Initiate( filename=domainFileName, MODE="READ" )
CALL domainFile%Open()
CALL dom%Initiate( domainFile, "" )
Initiate the kernel.
CALL obj%Initiate(param=param, dom=dom )
CALL obj%Display("")
CALL obj%Deallocate()
CALL dom%Deallocate()
CALL domainFile%Deallocate()
CALL param%Deallocate(); CALL FPL_FINALIZE()
END PROGRAM main