Get
Get entries from vector field.
Calling example:
Interface 1
- ܀ Interface
- ️܀ See example
- ↢
INTERFACE
MODULE SUBROUTINE stvField_get1(obj, VALUE, globalNode, spaceCompo, &
& timeCompo)
CLASS(STVectorFieldLis_), INTENT(IN) :: obj
REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: VALUE(:)
INTEGER(I4B), OPTIONAL, INTENT(IN) :: globalNode
INTEGER(I4B), OPTIONAL, INTENT(IN) :: spaceCompo
INTEGER(I4B), OPTIONAL, INTENT(IN) :: timeCompo
END SUBROUTINE stvField_get1
END INTERFACE
-
If
globalnode
is present then this routine returns the space-time values at theglobalnode
. Note that the returned values are stored invalue
inNODES_FMT
format. You can get the space-time nodal values by reshapingvalue
, that is,reshape(value, [spaceCompo, timeCompo])
. -
If
spaceCompo
andtimeCompo
are present, then this routine returns all the nodal values of specified space-time component. The size ofvalue
will betNodes
. -
If
spaceCompo
is present andtimeCompo
is not present, then this routine returns nodal values of all time components invalue
. The data is stored inNODES_FMT
. Therefore, by reshapingvalue
asreshape(value, [timeCompo, tNodes])
you can retrive data. -
If
timeCompo
is present andspaceCompo
is not present, then this routine returns nodal values of all space components invalue
. The data is stored inNODES_FMT
. Therefore, by reshapingvalue
asreshape(value, [spaceCompo, tNodes])
you can retrive data.
In this example we test the Get method.
PROGRAM main
USE easifemBase
USE easifemClasses
TYPE( Domain_ ) :: dom
TYPE( STVectorFieldLis_ ) :: obj
TYPE( HDF5File_ ) :: meshfile
TYPE( ParameterList_ ) :: param
INTEGER( I4B ) :: ierr
INTEGER( I4B ), PARAMETER :: spaceCompo=2_I4B
INTEGER( I4B ), PARAMETER :: timeCompo=2_I4B
REAL( DFP ), ALLOCATABLE :: svalue(:,:,:)
REAL( DFP ), ALLOCATABLE :: value(:)
CHARACTER(*), PARAMETER :: engine = "LIS_OMP"
INTEGER( I4B ) :: tnodes
! import domain
CALL meshfile%initiate( filename="./mesh.h5", mode="READ" )
CALL meshfile%open()
CALL dom%initiate( hdf5=meshfile, group="" )
CALL meshfile%Deallocate()
! set parameters for VectorField_
CALL FPL_INIT()
CALL param%initiate()
CALL SetSTVectorFieldParam( &
& param=param, &
& fieldType=FIELD_TYPE_NORMAL, &
& name="U", &
& engine=engine, &
& spaceCompo=spaceCompo, &
& timeCompo=timeCompo)
CALL obj%initiate( param, dom )
tnodes = dom%getTotalNodes()
call reallocate(svalue, spaceCompo, timeCompo, tnodes)
call random_number(svalue)
call obj%set(value=svalue)
call obj%get(value=value, globalNode=3)
call display(svalue(:,:,3), "set value(:,:,3) = ")
call display(value, "get value = ")
call obj%get(value=value, spaceCompo=1, timeCompo=1)
call display(svalue(1,1,:), "set value(1,1,:) = ")
call display(value, "get value = ")
call obj%get(value=value, spaceCompo=2)
call display(svalue(2,:,1:3), "set value(2,:,:) = ")
call display(value, "get value = ")
call obj%get(value=value, timeCompo=2)
call display(svalue(:,2,1:3), "set value(:,2,1:3) = ")
call display(value, "get value = ")
CALL obj%Deallocate(); CALL dom%Deallocate()
CALL param%Deallocate(); CALL FPL_FINALIZE()
END PROGRAM main
set value(:,:,3) =
-------------------
0.147476 0.747876
0.171333 0.127092
get value(:,:,3) =
-------------------
0.147476
0.171333
0.747876
0.127092
set value(1,1,:) =
-------------------
0.241280
0.812112
0.498660
get value =
------------
0.241280
0.812112
0.498660
set value(2,:,1:3) =
----------------------------
0.900714 0.183391 0.119554
0.649540 0.061109 0.117385
get value =
------------
0.900714
0.649540
0.183391
0.061109
0.119554
0.117385
.
.
.
set value(:,2,1:3) =
----------------------------
0.965499 0.382799 0.656891
0.646576 0.781357 0.206606
get value =
------------
0.965499
0.646576
0.382799
0.781357
0.656891
0.206606
.
.
.
Interface 2
- ܀ Interface
- ️܀ See example
- ↢
INTERFACE
MODULE SUBROUTINE stvField_get2(obj, VALUE)
CLASS(STVectorFieldLis_), INTENT(IN) :: obj
REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: VALUE(:, :, :)
END SUBROUTINE stvField_get2
END INTERFACE
- This routine returns all nodal values of all space-time components.
- The shape of
value
is (spaceCompo, timeCompo, tNodes
).
In this example we test the Get method.
PROGRAM main
USE easifemBase
USE easifemClasses
TYPE( Domain_ ) :: dom
TYPE( STVectorFieldLis_ ) :: obj
TYPE( HDF5File_ ) :: meshfile
TYPE( ParameterList_ ) :: param
INTEGER( I4B ) :: ierr
INTEGER( I4B ), PARAMETER :: spaceCompo=2_I4B
INTEGER( I4B ), PARAMETER :: timeCompo=2_I4B
REAL( DFP ), ALLOCATABLE :: svalue(:,:,:)
REAL( DFP ), ALLOCATABLE :: value(:, :, :)
CHARACTER(*), PARAMETER :: engine = "LIS_OMP"
INTEGER( I4B ) :: tnodes
! import domain
CALL meshfile%initiate( filename="./mesh.h5", mode="READ" )
CALL meshfile%open()
CALL dom%initiate( hdf5=meshfile, group="" )
CALL meshfile%Deallocate()
! set parameters for VectorField_
CALL FPL_INIT()
CALL param%initiate()
CALL SetSTVectorFieldParam( &
& param=param, &
& fieldType=FIELD_TYPE_NORMAL, &
& name="U", &
& engine=engine, &
& spaceCompo=spaceCompo, &
& timeCompo=timeCompo)
CALL obj%initiate( param, dom )
tnodes = dom%getTotalNodes()
call reallocate(svalue, spaceCompo, timeCompo, tnodes)
call random_number(svalue)
call obj%set(value=svalue)
call obj%get(value=value)
call display(svalue(:,:,3), "set value(:,:,3) = ")
call display(value(:,:,3), "get value = ")
CALL obj%Deallocate(); CALL dom%Deallocate()
CALL param%Deallocate(); CALL FPL_FINALIZE()
END PROGRAM main
set value(:,:,3) =
-------------------
0.131827 0.736131
0.861203 0.200003
get value =
------------------
0.131827 0.736131
0.861203 0.200003
Interface 3
- ܀ Interface
- ️܀ See example
- ↢
INTERFACE
MODULE SUBROUTINE stvField_get3(obj, VALUE, globalNode)
CLASS(STVectorFieldLis_), INTENT(IN) :: obj
REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: VALUE(:, :, :)
INTEGER(I4B), INTENT(IN) :: globalNode(:)
END SUBROUTINE stvField_get3
END INTERFACE
- This routine returns space-time nodal values of global nodes
- The shape of
value
is (spaceCompo, timeCompo, size(globalNode)
)
In this example we test the Get method.
PROGRAM main
USE easifemBase
USE easifemClasses
TYPE( Domain_ ) :: dom
TYPE( STVectorFieldLis_ ) :: obj
TYPE( HDF5File_ ) :: meshfile
TYPE( ParameterList_ ) :: param
INTEGER( I4B ) :: ierr
INTEGER( I4B ), PARAMETER :: spaceCompo=2_I4B
INTEGER( I4B ), PARAMETER :: timeCompo=2_I4B
REAL( DFP ), ALLOCATABLE :: svalue(:,:,:)
REAL( DFP ), ALLOCATABLE :: value(:, :, :)
CHARACTER(*), PARAMETER :: engine = "LIS_OMP"
INTEGER( I4B ) :: tnodes
! import domain
CALL meshfile%initiate( filename="./mesh.h5", mode="READ" )
CALL meshfile%open()
CALL dom%initiate( hdf5=meshfile, group="" )
CALL meshfile%Deallocate()
! set parameters for VectorField_
CALL FPL_INIT()
CALL param%initiate()
CALL SetSTVectorFieldParam( &
& param=param, &
& fieldType=FIELD_TYPE_NORMAL, &
& name="U", &
& engine=engine, &
& spaceCompo=spaceCompo, &
& timeCompo=timeCompo)
CALL obj%initiate( param, dom )
tnodes = dom%getTotalNodes()
call reallocate(svalue, spaceCompo, timeCompo, tnodes)
call random_number(svalue)
call obj%set(value=svalue)
call obj%get(value=value, globalNode=arange(1,3,1))
call display(svalue(:,:,1:3), "set value(:,:,1:3) = ")
call display(value(:,:,1:3), "get value = ")
CALL obj%Deallocate(); CALL dom%Deallocate()
CALL param%Deallocate(); CALL FPL_FINALIZE()
END PROGRAM main
set value(:,:,1:3) =( :, :, 1 ) =
----------------------------------
0.756550 0.362901
0.014583 0.965337
set value(:,:,1:3) =( :, :, 2 ) =
----------------------------------
0.640156 0.578452
0.030592 0.802883
set value(:,:,1:3) =( :, :, 3 ) =
----------------------------------
0.661545 0.874983
0.684608 0.628923
get value =( :, :, 1 ) =
-------------------------
0.756550 0.362901
0.014583 0.965337
get value =( :, :, 2 ) =
-------------------------
0.640156 0.578452
0.030592 0.802883
get value =( :, :, 3 ) =
-------------------------
0.661545 0.874983
0.684608 0.628923
Interface 4
- ܀ Interface
- ️܀ See example
- ↢
INTERFACE
MODULE SUBROUTINE stvField_get4(obj, VALUE, globalNode, spaceCompo, &
& timeCompo)
CLASS(STVectorFieldLis_), INTENT(IN) :: obj
REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: VALUE(:)
INTEGER(I4B), INTENT(IN) :: globalNode(:)
INTEGER(I4B), INTENT(IN) :: spaceCompo
INTEGER(I4B), INTENT(IN) :: timeCompo
END SUBROUTINE stvField_get4
END INTERFACE
- This method returns the nodal value of a given space-time component.
- The size of
value
is same as the size ofglobalNode
.
In this example we test the Get method.
PROGRAM main
USE easifemBase
USE easifemClasses
TYPE( Domain_ ) :: dom
TYPE( STVectorFieldLis_ ) :: obj
TYPE( HDF5File_ ) :: meshfile
TYPE( ParameterList_ ) :: param
INTEGER( I4B ) :: ierr
INTEGER( I4B ), PARAMETER :: spaceCompo=2_I4B
INTEGER( I4B ), PARAMETER :: timeCompo=2_I4B
REAL( DFP ), ALLOCATABLE :: svalue(:,:,:)
REAL( DFP ), ALLOCATABLE :: value(:)
CHARACTER(*), PARAMETER :: engine = "LIS_OMP"
INTEGER( I4B ) :: tnodes
! import domain
CALL meshfile%initiate( filename="./mesh.h5", mode="READ" )
CALL meshfile%open()
CALL dom%initiate( hdf5=meshfile, group="" )
CALL meshfile%Deallocate()
! set parameters for VectorField_
CALL FPL_INIT()
CALL param%initiate()
CALL SetSTVectorFieldParam( &
& param=param, &
& fieldType=FIELD_TYPE_NORMAL, &
& name="U", &
& engine=engine, &
& spaceCompo=spaceCompo, &
& timeCompo=timeCompo)
CALL obj%initiate( param, dom )
tnodes = dom%getTotalNodes()
call reallocate(svalue, spaceCompo, timeCompo, tnodes)
call random_number(svalue)
call obj%set(value=svalue)
call obj%get(value=value, globalNode=arange(1,3,1), spaceCompo=1, &
& timeCompo=1)
call display(svalue(1,1,1:3), "set value(1,1,1:3) = ")
call display(value, "get value = ")
CALL obj%Deallocate(); CALL dom%Deallocate()
CALL param%Deallocate(); CALL FPL_FINALIZE()
END PROGRAM main
set value(1,1,1:3) =
---------------------
0.360376
0.515725
0.139868
get value =
------------
0.360376
0.515725
0.139868
Interface 5
- ܀ Interface
- ️܀ See example
- ↢
INTERFACE
MODULE SUBROUTINE stvField_get5(obj, VALUE, globalNode, spaceCompo, &
& timeCompo)
CLASS(STVectorFieldLis_), INTENT(IN) :: obj
REAL(DFP), INTENT(INOUT) :: VALUE
INTEGER(I4B), INTENT(IN) :: globalNode
INTEGER(I4B), INTENT(IN) :: spaceCompo
INTEGER(I4B), INTENT(IN) :: timeCompo
END SUBROUTINE stvField_get5
END INTERFACE
- This method returns a single entry of a space-time component at a given node.
In this example we test the Get method.
PROGRAM main
USE easifemBase
USE easifemClasses
TYPE( Domain_ ) :: dom
TYPE( STVectorFieldLis_ ) :: obj
TYPE( HDF5File_ ) :: meshfile
TYPE( ParameterList_ ) :: param
INTEGER( I4B ) :: ierr
INTEGER( I4B ), PARAMETER :: spaceCompo=2_I4B
INTEGER( I4B ), PARAMETER :: timeCompo=2_I4B
REAL( DFP ), ALLOCATABLE :: svalue(:,:,:)
REAL( DFP ) :: value
CHARACTER(*), PARAMETER :: engine = "LIS_OMP"
INTEGER( I4B ) :: tnodes
! import domain
CALL meshfile%initiate( filename="./mesh.h5", mode="READ" )
CALL meshfile%open()
CALL dom%initiate( hdf5=meshfile, group="" )
CALL meshfile%Deallocate()
! set parameters for VectorField_
CALL FPL_INIT()
CALL param%initiate()
CALL SetSTVectorFieldParam( &
& param=param, &
& fieldType=FIELD_TYPE_NORMAL, &
& name="U", &
& engine=engine, &
& spaceCompo=spaceCompo, &
& timeCompo=timeCompo)
CALL obj%initiate( param, dom )
tnodes = dom%getTotalNodes()
call reallocate(svalue, spaceCompo, timeCompo, tnodes)
call random_number(svalue)
call obj%set(value=svalue)
call obj%get(value=value, globalNode=3, spaceCompo=1, &
& timeCompo=1)
call display(svalue(1,1,3), "set value(1,1,1:3) = ")
call display(value, "get value = ")
CALL obj%Deallocate(); CALL dom%Deallocate()
CALL param%Deallocate(); CALL FPL_FINALIZE()
END PROGRAM main
set value(1,1,1:3) = 0.959122
get value = 0.959122
Interface 6
- ܀ Interface
- ️܀ See example
- ↢
INTERFACE
MODULE SUBROUTINE stvField_get6(obj, VALUE, istart, iend, stride)
CLASS(STVectorFieldLis_), INTENT(IN) :: obj
REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: VALUE(:, :, :)
INTEGER(I4B), INTENT(IN) :: istart
INTEGER(I4B), INTENT(IN) :: iend
INTEGER(I4B), INTENT(IN) :: stride
END SUBROUTINE stvField_get6
END INTERFACE
- This routine returns space-time nodal values at multiple nodes.
In this example we test the Get method.
PROGRAM main
USE easifemBase
USE easifemClasses
TYPE( Domain_ ) :: dom
TYPE( STVectorFieldLis_ ) :: obj
TYPE( HDF5File_ ) :: meshfile
TYPE( ParameterList_ ) :: param
INTEGER( I4B ) :: ierr
INTEGER( I4B ), PARAMETER :: spaceCompo=2_I4B
INTEGER( I4B ), PARAMETER :: timeCompo=2_I4B
REAL( DFP ), ALLOCATABLE :: svalue(:,:,:)
REAL( DFP ), ALLOCATABLE :: value(:, :, :)
CHARACTER(*), PARAMETER :: engine = "LIS_OMP"
INTEGER( I4B ) :: tnodes
! import domain
CALL meshfile%initiate( filename="./mesh.h5", mode="READ" )
CALL meshfile%open()
CALL dom%initiate( hdf5=meshfile, group="" )
CALL meshfile%Deallocate()
! set parameters for VectorField_
CALL FPL_INIT()
CALL param%initiate()
CALL SetSTVectorFieldParam( &
& param=param, &
& fieldType=FIELD_TYPE_NORMAL, &
& name="U", &
& engine=engine, &
& spaceCompo=spaceCompo, &
& timeCompo=timeCompo)
CALL obj%initiate( param, dom )
tnodes = dom%getTotalNodes()
call reallocate(svalue, spaceCompo, timeCompo, tnodes)
call random_number(svalue)
call obj%set(value=svalue)
call obj%get(value=value, istart=1, iend=3, stride=1)
call display(svalue(:,:,1:3), "set value(:,:,1:3) = ")
call display(value(:,:,1:3), "get value = ")
CALL obj%Deallocate(); CALL dom%Deallocate()
CALL param%Deallocate(); CALL FPL_FINALIZE()
END PROGRAM main
set value(:,:,1:3) =( :, :, 1 ) =
----------------------------------
0.180902 0.420299
0.983944 0.386861
set value(:,:,1:3) =( :, :, 2 ) =
----------------------------------
0.248634 0.276885
0.320403 0.242269
set value(:,:,1:3) =( :, :, 3 ) =
----------------------------------
0.026450 0.434365
0.303477 0.002217
get value =( :, :, 1 ) =
-------------------------
0.180902 0.420299
0.983944 0.386861
get value =( :, :, 2 ) =
-------------------------
0.248634 0.276885
0.320403 0.242269
get value =( :, :, 3 ) =
-------------------------
0.026450 0.434365
0.303477 0.002217
Interface 7
- ܀ Interface
- ️܀ See example
- ↢
INTERFACE
MODULE SUBROUTINE stvField_get7(obj, VALUE, istart, iend, stride, &
& spaceCompo, timeCompo)
CLASS(STVectorFieldLis_), INTENT(IN) :: obj
REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: VALUE(:)
INTEGER(I4B), INTENT(IN) :: istart
INTEGER(I4B), INTENT(IN) :: iend
INTEGER(I4B), INTENT(IN) :: stride
INTEGER(I4B), INTENT(IN) :: spaceCompo
INTEGER(I4B), INTENT(IN) :: timeCompo
END SUBROUTINE stvField_get7
END INTERFACE
- This routine returns the nodal values of specified space-time component
- Node numbers are specified by triplets
In this example we test the Get method.
PROGRAM main
USE easifemBase
USE easifemClasses
TYPE( Domain_ ) :: dom
TYPE( STVectorFieldLis_ ) :: obj
TYPE( HDF5File_ ) :: meshfile
TYPE( ParameterList_ ) :: param
INTEGER( I4B ) :: ierr
INTEGER( I4B ), PARAMETER :: spaceCompo=2_I4B
INTEGER( I4B ), PARAMETER :: timeCompo=2_I4B
REAL( DFP ), ALLOCATABLE :: svalue(:,:,:)
REAL( DFP ), ALLOCATABLE :: value(:)
CHARACTER(*), PARAMETER :: engine = "LIS_OMP"
INTEGER( I4B ) :: tnodes
! import domain
CALL meshfile%initiate( filename="./mesh.h5", mode="READ" )
CALL meshfile%open()
CALL dom%initiate( hdf5=meshfile, group="" )
CALL meshfile%Deallocate()
! set parameters for VectorField_
CALL FPL_INIT()
CALL param%initiate()
CALL SetSTVectorFieldParam( &
& param=param, &
& fieldType=FIELD_TYPE_NORMAL, &
& name="U", &
& engine=engine, &
& spaceCompo=spaceCompo, &
& timeCompo=timeCompo)
CALL obj%initiate( param, dom )
tnodes = dom%getTotalNodes()
call reallocate(svalue, spaceCompo, timeCompo, tnodes)
call random_number(svalue)
call obj%set(value=svalue)
call obj%get(value=value, istart=1, iend=3, stride=1, &
& spaceCompo=1, timeCompo=1)
call display(svalue(1,1,1:3), "set value(1,1,1:3) = ")
call display(value, "get value = ")
CALL obj%Deallocate(); CALL dom%Deallocate()
CALL param%Deallocate(); CALL FPL_FINALIZE()
END PROGRAM main
set value(1,1,1:3) =
---------------------
0.826815
0.325986
0.024318
get value =
------------
0.826815
0.325986
0.024318
Interface 8
- ܀ Interface
- ️܀ See example
- ↢
INTERFACE
MODULE SUBROUTINE stvField_get8(obj, VALUE, globalNode)
CLASS(STVectorFieldLis_), INTENT(IN) :: obj
REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: VALUE(:, :)
INTEGER(I4B), INTENT(IN) :: globalNode
END SUBROUTINE stvField_get8
END INTERFACE
- This method returns the space-time nodal value at a given node.
- The shape of
value
is (spaceCompo
,timeCompo
).
In this example we test the Get method.
PROGRAM main
USE easifemBase
USE easifemClasses
TYPE( Domain_ ) :: dom
TYPE( STVectorFieldLis_ ) :: obj
TYPE( HDF5File_ ) :: meshfile
TYPE( ParameterList_ ) :: param
INTEGER( I4B ) :: ierr
INTEGER( I4B ), PARAMETER :: spaceCompo=2_I4B
INTEGER( I4B ), PARAMETER :: timeCompo=2_I4B
REAL( DFP ), ALLOCATABLE :: svalue(:,:,:)
REAL( DFP ), ALLOCATABLE :: value(:, :)
CHARACTER(*), PARAMETER :: engine = "LIS_OMP"
INTEGER( I4B ) :: tnodes
! import domain
CALL meshfile%initiate( filename="./mesh.h5", mode="READ" )
CALL meshfile%open()
CALL dom%initiate( hdf5=meshfile, group="" )
CALL meshfile%Deallocate()
! set parameters for VectorField_
CALL FPL_INIT()
CALL param%initiate()
CALL SetSTVectorFieldParam( &
& param=param, &
& fieldType=FIELD_TYPE_NORMAL, &
& name="U", &
& engine=engine, &
& spaceCompo=spaceCompo, &
& timeCompo=timeCompo)
CALL obj%initiate( param, dom )
tnodes = dom%getTotalNodes()
call reallocate(svalue, spaceCompo, timeCompo, tnodes)
call random_number(svalue)
call obj%set(value=svalue)
call obj%get(value=value, globalNode=3_I4B)
call display(svalue(:,:,3), "set value(:,:,3) = ")
call display(value, "get value = ")
CALL obj%Deallocate(); CALL dom%Deallocate()
CALL param%Deallocate(); CALL FPL_FINALIZE()
END PROGRAM main
set value(:,:,3) =
-------------------
0.129860 0.440831
0.624638 0.761094
get value =
------------------
0.129860 0.440831
0.624638 0.761094
Interface 9
- ܀ Interface
- ️܀ See example
- ↢
INTERFACE
MODULE SUBROUTINE stvField_get9(obj, VALUE, globalNode)
CLASS(STVectorFieldLis_), INTENT(IN) :: obj
TYPE(FEVariable_), INTENT(INOUT) :: VALUE
INTEGER(I4B), INTENT(IN) :: globalNode(:)
END SUBROUTINE stvField_get9
END INTERFACE
- This routine returns space-time nodal value of specified nodes in FEVariable.
value
is FEVariable of SpaceTime type.
In this example we test the Get method.
PROGRAM main
USE easifemBase
USE easifemClasses
TYPE( Domain_ ) :: dom
TYPE( STVectorFieldLis_ ) :: obj
TYPE( HDF5File_ ) :: meshfile
TYPE( ParameterList_ ) :: param
INTEGER( I4B ) :: ierr
INTEGER( I4B ), PARAMETER :: spaceCompo=2_I4B
INTEGER( I4B ), PARAMETER :: timeCompo=2_I4B
REAL( DFP ), ALLOCATABLE :: svalue(:,:,:)
REAL( DFP ), ALLOCATABLE :: value(:, :)
CHARACTER(*), PARAMETER :: engine = "LIS_OMP"
INTEGER( I4B ) :: tnodes
type(FEVariable_) :: fevar
! import domain
CALL meshfile%initiate( filename="./mesh.h5", mode="READ" )
CALL meshfile%open()
CALL dom%initiate( hdf5=meshfile, group="" )
CALL meshfile%Deallocate()
! set parameters for VectorField_
CALL FPL_INIT()
CALL param%initiate()
CALL SetSTVectorFieldParam( &
& param=param, &
& fieldType=FIELD_TYPE_NORMAL, &
& name="U", &
& engine=engine, &
& spaceCompo=spaceCompo, &
& timeCompo=timeCompo)
CALL obj%initiate( param, dom )
tnodes = dom%getTotalNodes()
call reallocate(svalue, spaceCompo, timeCompo, tnodes)
call random_number(svalue)
call obj%set(value=svalue)
call obj%get(value=fevar, globalNode=arange(1,3,1))
call display(svalue(:,:,1:3), "set value(:,:,3) = ")
call display(fevar, "get value = ")
CALL obj%Deallocate(); CALL dom%Deallocate()
CALL param%Deallocate(); CALL FPL_FINALIZE()
END PROGRAM main
set value(:,:,3) =( :, :, 1 ) =
--------------------------------
0.189357 0.579115
0.412881 0.543243
set value(:,:,3) =( :, :, 2 ) =
--------------------------------
0.860663 0.715234
0.946888 0.539013
set value(:,:,3) =( :, :, 3 ) =
--------------------------------
0.240968 0.771520
0.793377 0.683370
get value =
RANK :: 1 (VECTOR)
# VarType: SPACE & TIME
# VALUE:( :, :, 1 ) =
----------------------------
0.189357 0.860663 0.240968
0.412881 0.946888 0.793377
# VALUE:( :, :, 2 ) =
----------------------------
0.579115 0.715234 0.771520
0.543243 0.539013 0.683370
Interface 10
INTERFACE
MODULE SUBROUTINE stvField_get10(obj, VALUE, spaceCompo, timeCompo)
CLASS(STVectorFieldLis_), INTENT(IN) :: obj
CLASS(AbstractNodeField_), INTENT(INOUT) :: VALUE
INTEGER(I4B), OPTIONAL, INTENT(IN) :: spaceCompo
INTEGER(I4B), OPTIONAL, INTENT(IN) :: timeCompo
END SUBROUTINE stvField_get10
END INTERFACE
- This method returns the space component as an instance of AbstractNodeField.