Set
This method should be called when we are done adding entries into MeshSelection_
.
After this method we should not call add
method.
Interface
- Interface
- ️See example
- ↢
INTERFACE
MODULE SUBROUTINE Set(obj)
CLASS(MeshSelection_), INTENT(INOUT) :: obj
END SUBROUTINE Set
END INTERFACE
This example shows how to use MeshSelection_
with meshSelectionByID
option.
PROGRAM main
USE easifemBase
USE easifemClasses
IMPLICIT NONE
TYPE( MeshSelection_ ) :: obj
type(ParameterList_) :: param
Let us initiate an instance of MeshSelection_
wherein we will select the mesh by using mesh-ids.
CALL FPL_INIT(); call param%Initiate()
CALL SetMeshSelectionParam(param=param, isSelectionByMeshID=.TRUE., prefix=obj%GetPrefix())
CALL obj%Initiate( param=param )
Adding mesh regions:
CALL obj%Add( dim=0, meshID=[1,2,3,4,5,6])
CALL obj%Add( dim=1, meshID=[2,5,6,7])
CALL obj%Add( dim=2, meshID=[1,3,5,6,8])
CALL obj%Add( dim=3, meshID=[1,8])
After adding the regions in the MeshSelection_
, we should call set()
method. This call will do all the necessary steps.
CALL obj%Set()
Display the content.
CALL obj%Display( "" )
cleanup
CALL obj%Deallocate()
CALL param%Deallocate()
CALL FPL_FINALIZE
END PROGRAM main