Skip to main content

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.

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_:

SubclassMethod to set parameters
ScalarMeshFieldSetScalarMeshFieldParam
STScalarMeshFieldSetSTScalarMeshFieldParam
VectorMeshFieldSetVectorMeshFieldParam
STVectorMeshFieldSetSTVectorMeshFieldParam
TensorMeshFieldSetTensorMeshFieldParam
STTensorMeshFieldSetSTTensorMeshFieldParam

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