AbstractMeshField
AbstractMeshField_
is defined to contain the element level data inside a finite element. In simple terms it contains Scalar
, Vector
, and Tensor
data defined inside the element of finite element mesh.
It can contains nodal
or quadrature
value.
nodal
The nodal values are defined on the nodes of element.
quadrature
The quadrature values are defined on the Gauss-quadrature points of element. These points are usually different from the nodes of the element.
This abstract class has following subclasses.
- ScalarMeshField
- STScalarMeshField
- VectorMeshField
- STVectorMeshField
- TensorMeshField
- STTensorMeshField
Construct an instance
There are three ways to initiate an instance of AbstractMeshField_
.
- Initiate by using
ParameterList_
- Initiate by using
UserFunction_
- Initiate by using
AbstractMaterial_
Initiate by using ParameterList_
In this case, first, we set the parameters in an instance of ParameterList_
:
After setting the parameters, we call Initiate
method to construct an instance of AbstractMeshField_
. The interface of initiate method is given below.
INTERFACE AbstractMeshFieldInitiate
MODULE SUBROUTINE Initiate1(obj, param, mesh)
CLASS(AbstractMeshField_), INTENT(INOUT) :: obj
TYPE(ParameterList_), INTENT(IN) :: param
TYPE(Mesh_), TARGET, INTENT(IN) :: mesh
END SUBROUTINE Initiate1
END INTERFACE AbstractMeshFieldInitiate
Initiate by using UserFunction_
To initiate an instance of AbstractMeshField_
by using a UserFunction, we call Initiate method, which has the following interface.
INTERFACE
MODULE SUBROUTINE Initiate(obj, mesh, func, name, engine, nnt)
CLASS(AbstractMeshField_), INTENT(INOUT) :: obj
TYPE(Mesh_), TARGET, INTENT(IN) :: mesh
CLASS(UserFunction_), INTENT(INOUT) :: func
CHARACTER(*), INTENT(IN) :: name
CHARACTER(*), INTENT(IN) :: engine
INTEGER(I4B), OPTIONAL, INTENT(IN) :: nnt
END SUBROUTINE Initiate
END INTERFACE
Initiate by using AbstractMaterial_
To initiate an instance of AbstractMeshField by using AbstractMaterial, we call Initiate method, which as following interface.
INTERFACE
MODULE SUBROUTINE Initiate(obj, mesh, material, name, engine)
CLASS(AbstractMeshField_), INTENT(INOUT) :: obj
TYPE(Mesh_), TARGET, INTENT(IN) :: mesh
CLASS(AbstractMaterial_), INTENT(INOUT) :: material
CHARACTER(*), INTENT(IN) :: name
CHARACTER(*), INTENT(IN) :: engine
END SUBROUTINE Initiate
END INTERFACE
Setting value
Setting value by using FEVariable_
By using Set method and the FEVariable we can set the individual value in the AbstractMeshField_
. The interface is given below.
INTERFACE
MODULE SUBROUTINE Set(obj, globalElement, fevar)
CLASS(AbstractMeshField_), INTENT(INOUT) :: obj
INTEGER(I4B), OPTIONAL, INTENT(IN) :: globalElement
TYPE(FEVariable_), INTENT(IN) :: fevar
END SUBROUTINE Set
END INTERFACE
Setting value by using UserFunction
We can use Set method and the UserFunction to set the values in AbstractMeshField_
. The interface of this method is given below.
INTERFACE
MODULE SUBROUTINE Set(obj, func, dom, timeVec)
CLASS(AbstractMeshField_), INTENT(INOUT) :: obj
CLASS(UserFunction_), INTENT(INOUT) :: func
CLASS(Domain_), INTENT(INOUT) :: dom
REAL(DFP), OPTIONAL, INTENT(IN) :: timeVec(:)
END SUBROUTINE Set
END INTERFACE
Getting value
Currently, we can only get the individual values in an instance of FEVariable. The interface is given below.
INTERFACE
MODULE SUBROUTINE Get(obj, globalElement, fevar)
CLASS(AbstractMeshField_), INTENT(IN) :: obj
INTEGER(I4B), OPTIONAL, INTENT(IN) :: globalElement
TYPE(FEVariable_), INTENT(INOUT) :: fevar
END SUBROUTINE Get
END INTERFACE
Methods
📄️ Structure
varType specify how a value changes inside an element. The value can be constant, space-dependent, time-dependent, or space-time dependent.
📄️ SetAbstractMeshFieldParam
This routine sets the parameters necessary for constructing an instance of AbstractMeshField_.
📄️ Initiate
Initiate an instance of AbstractMeshField_.
📄️ Set
Set data in AbstractMeshField_.
📄️ Add
Add data to AbstractMeshField.
📄️ Get
Get data from the AbstractMeshField_
📄️ CheckEssentialParam
This method checks the essential parameters.
📄️ Deallocate
This method dealllocates the data stored in AbstractMeshField.
📄️ Display
Display the content of AbstractMeshField.
📄️ Export
Export data stored in AbstractField to HDF5File.
📄️ GetPointer
Returns the pointer to fortran array stored inside AbstractMeshField
📄️ GetPrefix
Get the prefix.
📄️ Import
Import data from HDF5 file.
📄️ Shape
Returns the shape of the data in each element.
📄️ Size
This method returns the size of the field.