SetTensorMeshFieldParam
This subroutine the parameters of tensor mesh field.
- ܀ Interface
- example
- ↢
INTERFACE
MODULE SUBROUTINE SetTensorMeshFieldParam(param, name, &
& fieldType, varType, engine, defineOn, dim1, dim2, nns)
TYPE(ParameterList_), INTENT(INOUT) :: param
CHARACTER(*), INTENT(IN) :: name
INTEGER(I4B), INTENT(IN) :: fieldType
INTEGER(I4B), INTENT(IN) :: varType
CHARACTER(*), INTENT(IN) :: engine
INTEGER(I4B), INTENT(IN) :: defineOn
!! Nodal, Quadrature
INTEGER(I4B), INTENT(IN) :: dim1
INTEGER(I4B), INTENT(IN) :: dim2
INTEGER(I4B), INTENT(IN) :: nns
!! Number of node in space
END SUBROUTINE setTensorMeshFieldParam
END INTERFACE
Example 1
info
This example shows how to initiate an instance of Mesh by reading data from mesh file, which is in HDF5File_ format. We will also construct an instance of VectorMeshField_.
PROGRAM main
USE easifemBase
USE easifemClasses
IMPLICIT NONE
TYPE( HDF5File_ ) :: meshfile
TYPE( Mesh_ ) :: amesh
TYPE( VectorMeshField_ ) :: obj
TYPE( ParameterList_ ) :: param
Step 1:
Initiate and open the mesh file which is in HDF5File_ format.
CALL meshfile%Initiate( FileName="./mesh.h5", MODE="READ" )
CALL meshfile%Open()
CALL amesh%Initiate(hdf5=meshfile, group="/surfaceEntities_1" )
Step 2:
Initiate an instance of VectorMeshField_.
CALL FPL_INIT(); CALL param%initiate()
CALL SetVectorMeshFieldParam( &
& param=param, &
& name='aVector', &
& varType = Constant, &
& fieldType=TypeField%normal, &
& engine='NATIVE_SERIAL', &
& defineOn=Nodal, &
& nns=6, &
& spaceCompo=amesh%GetNSD() )
CALL obj%Initiate( param=param, mesh=amesh )
CALL obj%Display( 'obj: ' )
The above code will initiate an instance of VectorMeshField_
, which will contain following data.
Object INITIATED: TRUE
name: aVector
prefix: VectorMeshField
fieldType: NORMAL
engine: NATIVE_SERIAL
tSize: 484
defineOn: Nodal
rank: Vector
varType: Constant
shape:
-------
2
val ALLOCATED: TRUE
mesh ASSOCIATED: TRUE
Let's try to understand the following situation:
- We save data in a two dimensional array
val
. - The number of rows in
val
in this example is1
. Because, we have setvarType=Constant
, all nodes (we have specified 6 nodes) in an element have constant vector valued. Read more about the Shape method. - The number of columns in
val
is484
elements in the mesh.
Step 3:
CALL obj%Deallocate()
CALL amesh%Deallocate()
CALL meshfile%Close()
CALL meshfile%Deallocate()
CALL param%Deallocate(); CALL FPL_FINALIZE()
END PROGRAM main