RegularGridMesh
The GeMA Regular Grid Mesh Plugin
Plugin options

Lua field options

Mesh fields parsed by the standard mesh plugin:

  • id: The mesh name
  • typeName: Plugin that will be used to load this mesh. Should be equal to 'RegularGridMesh.grid'.
  • description: The mesh description
  • coordinateDim: The number of dimensions for each node coordinate
  • coordinateUnit: The unit in which node coordinates are expressed
  • coordinateFormat: A format string used when printing node coordinates
  • nodeOrigin: A table storing the coordinate of the first grid point (lower left back). If absent, the origin will be equal to (0, 0, 0)
  • nodeCount: A table storing the number of nodes in each grid dimension. Required.
  • nodeSpacing: A table storing the node spacing in each grid dimension. Can also be a single number meaning that the spacing is equal for every dimension. If absent will be equal to 1.0. Spacings can not be equal to 0.0.
  • nodeWrap: An optional table storing a boolean for each grid dimension stating if the last node in each direction is connected to the first one or not. Default is false in every direction.
  • stateVars: A table with the list of the state var ids that will be stored in each mesh node
  • nodeAttributes: A table with the definition of the attributes associated with a mesh node
  • nodeSetData: A table storing a set of named collections of nodes. Each table entry is a sub-table that stores an id and a nodeList where each entry is a node id.

Example

Dummy example for a regular grid mesh with 20 columns and 10 rows, spaced by 2.0m in both directions and whose lower left corner starts at coordinate (10, 10).

Mesh
{
-- General mesh attributes
id = 'mesh',
typeName = 'RegularGridMesh.grid',
description = 'Simple test grid',
-- Mesh dimensions
coordinateDim = 2,
coordinateUnit = 'm',
coordinateFormat = '6.3f',
-- Mesh origin and spacing
nodeOrigin = {10.0, 10.0},
nodeCount = {20, 10},
nodeSpacing = 2.0, -- Could also be a table with the spacing in each direction
-- State vars associated with each node
stateVars = {'sv1', 'sv2'},
-- Attributes associated with each node
nodeAttributes = {
{id = 'na1', description = 'Node attribute 1', unit = 'degC', format='4.1f',
defVal = -999, functions = true, storage = 'both'},
{id = 'na2', description = 'Node attribute 2', dim = 2},
{id = 'na3', description = 'Node attribute 3', dim = '2x2', unit = 'cm'},
},
-- Node sets
nodeSetData = {
{ id = 'left nodes', nodeList = {1, 21, 41, 61, 81, 101, 121, 141, 161, 181} },
},
}