Mesh function Application Object


A Mesh_function is a Maths_function that:

EXAMPLE - The Mesh_function 'my_function_from_gauss_points' is defined with respect to the mesh shown in Figure 1. This function has 16 control values. The function uses bi-linear interpolation/extrapolation within each cell from the control values that are at Gauss points within the cell.

Figure 1: Mesh function with interpolation from Gauss points Mesh function with interpolation from Gauss points

EXAMPLE - The Mesh_function 'my_function_from_corners' is defined with respect to the mesh shown in Figure 2. This function has 9 control values. The function uses bi-linear interpolation/extrapolation within each cell from the control values that are at corners of the cell.

Figure 2: Mesh function with interpolation from corner verticesMesh function with interpolation from Gauss points

EXPRESS specification:

*)
ENTITY Mesh_function
  SUBTYPE OF (Maths_function);
  basis :  OPTIONAL LIST[1,?] OF Mesh_function_basis;
  control_values :  Table;
  mesh :  Mesh;
  uniform_basis :  OPTIONAL BOOLEAN;
  values_at_vertices :  BOOLEAN;
  WHERE
    necessary_basis :  values_at_vertices OR EXISTS (basis);
    uniform_specified :  EXISTS (basis) = EXISTS (uniform_basis);
    one_basis_if_uniform :  IF EXISTS (basis) AND 
                               EXISTS (uniform_basis) THEN
                              IF uniform_basis THEN
                                SIZEOF (basis) = 1;
                              ELSE
                                TRUE;
                              ENDIF;
                            ELSE
                              TRUE;
                            ENDIF;   
END_ENTITY;
(*

Attribute definitions:

basis: the Mesh_function_basis that specifies the method of interpolation or extrapolation to be used within each cell of the mesh.

If uniform_basis is true, then a single Mesh_function_basis is specified for use within each cell. If uniform_basis is false, then a Mesh_function_basis is specified separately for each cell of the mesh.

control_values: the Table that contains the control values at the vertices of the cells of the mesh or at the discretisation points within each cell. The Table shall be a structured according to the following rule.

The Table is a function with:

domain:
an integer tuple space that identifies the discretisation points of the Mesh_function;
range:
the range of the Mesh_function.

The components of the integer tuple space domain are shown in Table 1.

Table 1: Domain of the control values Table for a Mesh_function

unstructured mesh values at vertices i
where:
  • i is the position in the vertex array specified for the unstructured mesh.
unstructured mesh discretisation points for each cell j1, j2, ...jn, i
where:
  • j1, j2, ...jn is the position in the pattern of discretisation points, for the cell basis;
  • i is the position in the cell array specified for the unstructured mesh.
structured mesh values at vertices i1, i2, ...in
where:
  • i1, i2, ...in is the position of the vertex in the structured mesh.
structured mesh discretisation points for each cell j1, j2, ...jn, i1, i2, ...in
where:
  • j1, j2, ...jn is the position in the pattern of discretisation points, for the cell basis;
  • i1, i2, ...in is the position of the vertex in the structured mesh.

mesh: the Mesh for the Mesh_function.

uniform_basis: a flag that indicate whether or not the Mesh_function a uniform basis, as follows:

values_at_vertices: a flag that indicate whether or not the control values are specified for the vertices or the cells of Mesh, as follows:

Formal propositions:

necessary_basis: if values_at_vertices is false, then a basis shall be supplied.

NOTE - If the control values are specified for a separate pattern of discretisation points for each cell, then the basis attribute is required to specify the pattern.

uniform_specified: a uniform_basis flag shall be supplied if, and only if, a basis is supplied.

one_basis_if_uniform: the length of the basis list shall be 1, if the a uniform_basis flag is true.

NOTE - each cell has the same basis if the uniform_basis flag is true. Therefore, only one basis shall be supplied.