![]() |
MmProcess
The GeMA Mesh Mapping Process Plugin
|
mm.meshMapping(meshId, bucketIndexObject, nodeDataIds, gaussDataIds, dstGauss, mappingOptions, translationMap) | ||
---|---|---|
Description: | Transfers data from a source mesh to a destination mesh. The process deals with source/destination data on nodes and/or gauss points. | |
Parameters: | meshId | A string with the destination mesh id. |
bucketIndexObject | A bucket index object with the source mesh references stored in. | |
nodeDataIds | A string with the id (or a lua table with various ids) of the source node data to be mapped on the destination mesh. Can be nil if parameter gaussDataIds is not. | |
gaussDataIds | A string with the id (or a lua table with various ids) of the source gauss data to be mapped on the destination mesh. Can be nil if parameter nodeDataIds is not. | |
dstGauss | A lua table of booleans which size is equal to the sum of sizes of parameter nodeDataIds and gaussDataIds tables. If boolean is false, it means that the corresponding value will be mapped on the nodes of the destination mesh. If boolean is true, the corresponding value will be mapped on the gauss points of the destination mesh. | |
mappingOptions | An optional lua table with a set of flags defining options for the mesh mapping. | |
translationMap | An optional lua table needed when the destination attributes, in the destination mesh, have different ids than the source ones. The given table should be indexed by the names of the source mesh ids, having as values de the names of the corresponding attribute ids on the destination mesh. If the x and y attributes from the source mesh should be mapped onto the a and b attributes of the destination mesh, this table should be equal to {x = "a", y = "b"} | |
Returns: | Nothing. |
In the code fragment below we want to map 'ux', 'uy' and 'p' data values from a source mesh. The two first values 'ux' and 'uy' are node values and will be transferred on gauss points of the destination mesh. The third value 'p' is a gauss value and will be transferred on nodes of the destination mesh. Before processing the mapping the first step is to create a bucket index of the elements of the source mesh. The bucket index object is the accelerating structure responsible to speed up the mapping process as explained here.
Important Note: it is the responsibility of the user to previously prepare the destination mesh to receive data. Depending on where the data will be stored (on nodes or on gauss points) the user may create the appropriate data values on the destination mesh.