Skip to main content

ScalarMeshField

ScalarMeshField is a subclass of AbstractMeshField. It is used to store scalar variables defined on elements of mesh. We can define the variable either on the nodes of the finite element, or we can define these variables on the quadrature points.

  • By defining varType we can control how the scalar field changes inside an element.
  • By defining fieldType, we can control how the scalar field over the elements of mesh.

Getting Started​

This datatype should be used in the following way:

  • Initiate an instance of ScalarMeshField. This step will allocate required memory for the scalar field
  • Then, set the values in ScalarMeshField. This action is performed by using Set method. There are several ways to use Set method. The first one requires as to pass an instance of FEVariable.

All Methods​