gradient
Synopsis
compute the vector gradient of a vector field
Input Port
in_field
|
Mesh + Node_Data
|
ui_parent
|
user interface parent object
|
Parameters
data component
|
UIradioBoxLabel
|
select a component of the input field
|
Output Port
out_fld
|
same Mesh + Node_Data
|
out_obj
|
output renderable object
|
Description
gradient computes the vector gradient of a field with any mesh type.
Input
in_field
The input must be a field with any type of mesh and Node_Data. At least one of the Node_Data's components must be a scalar.
ui_parent
A port to connect to a user interface object that contains the macro's widgets. By default, it is connected to the default user interface object in the application in which the macro is instanced. (This default connection is not drawn.)
Parameters
data component
UIradioBoxLabel. Radio buttons to pick which component of in_field to use to compute the gradient. You must pick a scalar component. The default is the first (0th) component. If node data labels are present, they are displayed.
Output Port
out_fld
The output field contains a new Node_Data that has a three-element vector float value at each node representing the gradient. Its mesh is a reference to the input mesh.
out_obj
This is a renderable version of the output field.
Algorithm
The algorithm used to compute the gradient in structured meshes is a finite difference approximation based on a central difference scheme. For unstructured meshes, the function is based on the cell shape functions and their derivatives.In both cases, the equation used to compute the gradient is:
Example
Libraries.Examples.Vizualization.Grad
v/dv_examp/grad.v
File
v/modules.v
See also related modules