DVintegr_vol


Synopsis

determine the length, area, or volume and mass of an unstructured field


group DVintegr_vol {
Mesh+Iparam &in { /* input field */
xform+nonotify;
nnodes+req;
};
int+Iparam component=0;
int+Iparam dim;
float+Oparam volume; /* volume of field */
float+Oparam mass; ` /* mass of field */
method+notify_val+notify_inst upd_integr_vol = "integr_vol";
} ;

Description

DVintegr_vol calculates the length (1D cells), area (2D cells), or volume (3D cells) and mass of an unstructured field and outputs them as two float values.

Input

&in

A reference to an unstructured Mesh. Structured meshes (Mesh_Struct, Mesh_Unif, etc.) will be accepted but DVintegr_vol will create a temporary working version of the mesh by converting it to an unstructured Mesh of cell type Hex.

If only a Mesh is present, then only the length, area, or volume is calculated. To calculate mass, a Node_Data must be present.

component

An integer that selects which component of the Node_Data to use in the mass calculation. The selected component must be a scalar representing density. The default is the first (0th) component.

dim

An integer. This value only comes into play if the unstructured mesh contains mixed (1D and 2D, or 2D and 3D) cell types. Then, you must specify whether you want to calculate the length of the 1D cells, the area of the 2D cells, or the volume of the 3D cells.

Output

volume

A float value that is the volume of the field.

mass

A float value that is the mass of the field.

Algorithm

The algorithm used to calculate the volume and mass is: Gauss-Legendre quadrature (aka "Gauss sampling points").

Files

v/dv.v
modules/integr.c

Utility DVM macros

DVMintegr_param

Example

Libraries.Main.Mappers.volume_integrate

See also

Not applicable.