SetScalarFieldParam
Set the parameter for constructing a scalar field.
Interface
- ܀ Interface
- ️܀ See example
- ↢
INTERFACE
MODULE SUBROUTINE setScalarFieldParam(param, name, engine, fieldType, comm, global_n, local_n)
TYPE(ParameterList_), INTENT(INOUT) :: param
CHARACTER(*), INTENT(IN) :: name
CHARACTER(*), INTENT(IN) :: engine
INTEGER(I4B), OPTIONAL, INTENT(IN) :: fieldType
INTEGER(I4B), OPTIONAL, INTENT(IN) :: comm
INTEGER(I4B), OPTIONAL, INTENT(IN) :: global_n
INTEGER(I4B), OPTIONAL, INTENT(IN) :: local_n
END SUBROUTINE setScalarFieldParam
END INTERFACE
In this example we test following methods:
PROGRAM main
USE easifemBase
USE easifemClasses
TYPE( Domain_ ) :: dom
TYPE( ScalarFieldLis_ ) :: obj
TYPE( HDF5File_ ) :: meshfile, resultFile
TYPE( ParameterList_ ) :: param
INTEGER( I4B ) :: ierr
CHARACTER(*), PARAMETER :: engine = "LIS_OMP"
setScalarFieldParam
CALL FPL_INIT()
CALL param%initiate()
CALL SetScalarFieldParam( param=param, &
& fieldType=FIELD_TYPE_NORMAL, &
& name="U", &
& engine=engine)
Initiate
CALL meshfile%initiate( filename="./mesh.h5", mode="READ" )
CALL meshfile%open()
CALL dom%initiate( hdf5=meshfile, group="" )
CALL meshfile%Deallocate()
CALL obj%initiate( param, dom )
Let's display the scalar field.
CALL obj%Display("obj = ")
results
#obj =
# isInitiated : TRUE
# name :U
# fieldType : NORMAL
# engine :LIS_OMP
# comm: 0
# myRank: 0
# numProcs: 1
# global_n: 102
# local_n: 102
# is: 1
# ie: 103
# lis_ptr: 94802857847760
# domain : ASSOCIATED
# domains : NOT ALLOCATED
# tSize : 102
# # DOF data :
# Total Physical Variables :1
# Name : U
# Space Components : 1
# Time Components : 1
# Total Nodes : 102
# Storage Format : Nodes
# Value Map :
--------------
1
103
# VAR :U
DOF-1 ,
-------,
0.00000,
0.00000,
0.00000,
0.00000,
0.00000,
0.00000,
Export
CALL resultFile%initiate( filename="./result.h5", mode="NEW" )
CALL resultFile%open()
CALL obj%export( hdf5=resultFile, group="/scalarField1")
CALL resultFile%Deallocate()
Cleanup
CALL obj%Deallocate(); CALL dom%Deallocate()
CALL param%Deallocate(); CALL FPL_FINALIZE()
END PROGRAM main