SCI Home Software Documentation Installation User's Guide Developer's Guide

CIBC:Documentation:SCIRun:Reference:SCIRun:CalculateDataArray

From SCIRun Documentation Wiki

Jump to: navigation, search

Contents

CalculateDataArray

Information

Package: SCIRun
Catagory: DataArrayMath
Author(s): Jeroen Stinstra
Status: Supported in latest version
Version: 3.0

Description

Summary

This module computes a new scalar, vector or tensor array based upon a combination of scalars, vectors, and tensors.

Detailed Description

Overview

This module allows the user to compute a new scalar, vector, or tensor array. A scalar array is a Nx1 matrix, a vector array is a Nx3 matrix, and a tensor array is a Nx6 or Nx9 matrix (A nx6 tensor is defined as xx, xy, xz, yy, yz, zz). These matrices are used to store scalar, vector or tensor data associated with a mesh or field. To compute new scalar, vector or tensor values one has to supply a user-defined function that computes the new values. This function can be either supplied through the GUI or it can be supplied as a string. The module loops through each array element and uses the user-defined function to compute a new value. The output in this case is a function of scalar, vector, or tensor arrays. The function is applied by taking the next element of each array and applying the function to these variables. When the array size of one of the input variables is 1, it is assumed to be a constant value and it is taken each time the module gets a value from that array. The final size of the array is determined by the size of the other input arrays, or by the separate size input port. The latter is supplied in case all inputs are of size one, in which case the module needs a way to determine the size of the output.

Input ports

The first input port specifies the first data array called DATA. The second port is an optional port that allows to set the function that needs to be evaluated. The third and next ports correspond to scalar, vector, or tensor arrays that are used in the computation of the new data.

Input elements

There are several input elements available to compute a new scalar values. A short list is displayed below.

DATA: The scalar, vector, or tensor array that which needs to have new values calculated for.

INDEX: The index number, which is the row index. Indexing starts at 0.

SIZE: The size of the of the new array.

A,B,C,...: Matrices representing either scalar, vector, or tensor arrays. A scalar array is a nx1 matrix with scalar values, a vector array is a nx3 matrix and a tensor array is either a nx6 or nx9 matrix. In case of 6 elements they are stored in the following order: xx,xy,xz,yy,yz, and zz. The number of elements in each array can be either one or the number of scalars in the array. In case only one element is given, it is assumed to be a constant that applies to all data elements. This module allows up to 26 different matrices to be used. The third port refers to scalar, vector or tensor A, the fourth port to B, etc.

Output elements

RESULT: The output is stored in the variable RESULT.


Frequently Asked Questions


Known Bugs


Recent Changes


Go back to Documentation:SCIRun:Reference:SCIRun

Personal tools