IGLib 1.4
The IGLib base library for development of numerical, technical and business applications.
|
Field where field elements are arranged in a 3 dimensional array. Usually represents a field over a structured 3D mesh. Elements can be accessed either through a single index running over all elements of the array, or by 3 indices indexing elements in 3 basic directions of the grid. The first index ("x direction") ie least significant and the last index is most significant. More...
Public Member Functions | |
StructuredField3d () | |
Constructs a new empty 3D field (no elements contained) with no name and no description. | |
StructuredField3d (int dim1, int dim2, int dim3) | |
Constructs a new 3D field with the specified dimensions, name and description. Table of elements is allocated. Elements of the field are arranged in a 3D structured grid. | |
StructuredField3d (int dim1, int dim2, int dim3, string fieldName) | |
Constructs a new 3D field with the specified dimensions, name and description. Table of elements is allocated. Elements of the field are arranged in a 3D structured grid. | |
StructuredField3d (int dim1, int dim2, int dim3, string fieldName, string fieldDescription) | |
Constructs a new 3D field with the specified dimensions, name and description. Table of elements is allocated. Elements of the field are arranged in a 3D structured grid. | |
int | GetIndex (int i1, int i2, int i3) |
Returns the linear index of the component that is identified by 3 separate indices. Field elements are stored in one dimensional array but they can be accesses by 3 indices as they were part of 3 dimensional array.The last index (for "z direction") is most significant and the first one (in "x direction") is least significant. | |
void | getIndices (int index, out int i1, out int i2, out int i3) |
Converts linear (contiguous) index to 3 separate indices for 3 dimensions. The last index (for "z direction") is most significant and the first one (in "x direction") is least significant. | |
virtual void | SetDimensions (int d1, int d2, int d3) |
Sets all three dimensions of the current 3D structured field. | |
Static Public Member Functions | |
static void | MapCoordinatesPlain (StructuredField3d< vec3 > referenceField, StructuredField3d< vec3 > targetField, IFunc3d fx, IFunc3d fy, IFunc3d fz) |
Generates coordinates of a 3D structured grid for a parametric volume from a reference grid according to functions specifying x, y, and z coordinates in terms of three scalar functions of 3 variables that map reference coordinates to components of the mapped coordinates of the grid. Target field can be the same as the reference field (in this case coordinates of the reference field are overwritten one by one).Function can be used for transformation of any nodal vector values of a grid, not just for transformation of coordinates.This is plain version of the method that does not check consistency of dimension or existence of objects. | |
static void | MapCoordinates (StructuredField3d< vec3 > referenceField, StructuredField3d< vec3 > targetField, IFunc3d fx, IFunc3d fy, IFunc3d fz) |
Generates coordinates of a 3D structured grid for a parametric volume from a reference grid according to functions specifying x, y, and z coordinates in terms of three scalar functions of 3 variables that map reference coordinates to components of the mapped coordinates of the grid. Target field can be the same as the reference field (in this case coordinates of the reference field are overwritten one by one).Function can be used for transformation of any nodal vector values of a grid, not just for transformation of coordinates.Consistency of dimensions and existence of objects are checked and exceptions are thrown when checks fail. | |
static void | MapCoordinatesToScalarsPlain (StructuredField3d< vec3 > referenceField, StructuredField3d< double > targetScalarField, IFunc3d scalarMap) |
Generates scalar values for a 3D structured grid from the specified field of grid coordinates by a specified scalar function of 3 variables that maps reference coordinates to scalar values. Function can be used for any mapping of nodal vector values to nodal scalar values of a grid, not just for mapping of coordinates.This is plain version of the method that does not check consistency of dimension or existence of objects. | |
static void | MapCoordinatesToScalars (StructuredField3d< vec3 > referenceField, StructuredField3d< double > targetScalarField, IFunc3d scalarMap) |
Generates scalar values for a 3D structured grid from the specified field of grid coordinates by a specified scalar function of 3 variables that maps reference coordinates to scalar values. Function can be used for any mapping of nodal vector values to nodal scalar values of a grid, not just for mapping of coordinates.Consistency of dimensions and existence of objects are checked and exceptions are thrown when checks fail. | |
static void | GenerateCoordinatesPlain (StructuredField3d< vec3 > field, double minxRef, double maxxRef, double minyRef, double maxyRef, double minzRef, double maxzRef) |
Generates coordinates (unconnected) unstructured grid based on a 3D regular grid with grid directions parallel to coordinate axes and equidistantly arranged nodes in all directions. Numbers of nodes in each grid directions are specified by current dimensions of the grid.This is plain version of the method that does not check consistency of dimension or existence of objects. | |
static void | GenerateCoordinates (StructuredField3d< vec3 > field, double minxRef, double maxxRef, double minyRef, double maxyRef, double minzRef, double maxzRef) |
Generates coordinates of unstructured grid based on a 3D regular grid with grid directions parallel to coordinate axes and equidistantly arranged nodes in all directions. Numbers of nodes in each grid directions are specified by current dimensions of the grid.Consistency of dimensions and existence of objects are checked and exceptions are thrown when checks fail. | |
static void | GenerateCoordinatesPlain (StructuredField3d< vec3 > field, double minxRef, double maxxRef, double minyRef, double maxyRef, double minzRef, double maxzRef, IFunc3d fx, IFunc3d fy, IFunc3d fz) |
Generates coordinates of unstructured grid based on a 3D structured grid of a parametric volume according to functions specifying the x, y, and z coordinates in terms of three scalar functions of 3 variables. Coordinates are obtained by transforming individual coordinates of a regular equidistant grid from the reference system.. Numbers of nodes in each grid directions are specified by current dimensions of the grid.This is plain version of the method that does not check consistency of dimension or existence of objects. | |
static void | GenerateCoordinates (StructuredField3d< vec3 > field, double minxRef, double maxxRef, double minyRef, double maxyRef, double minzRef, double maxzRef, IFunc3d fx, IFunc3d fy, IFunc3d fz) |
Generates coordinates of a 3D structured grid of a parametric volume according to functions specifying the x, y, and z coordinates in terms of three scalar functions of 3 variables. Coordinates are obtained by transforming individual coordinates of a regular equidistant grid from the reference system.. Numbers of nodes in each grid directions are specified by current dimensions of the grid.Consistency of dimensions and existence of objects are checked and exceptions are thrown when checks fail. | |
Properties | |
TElement | this [int i1, int i2, int i3] [get, set] |
Returns element of the field at specified indices. | |
int | Dim1 [get, set] |
Returns the first dimenson of the structured mesh (number of mesh points in the first direction). Dependencies are handled by a call to the SetDimensions method when the property is set. | |
int | Dim2 [get, set] |
Returns the second dimenson of the structured mesh (number of mesh points in the second direction). Dependencies are handled by a call to the SetDimensions method when the property is set. | |
int | Dim3 [get, set] |
Gets or sets the second dimenson of the structured mesh (number of mesh points in the second direction). Dependencies are handled by a call to the SetDimensions method when the property is set. | |
Private Attributes | |
int | _d1 |
int | _d2 |
int | _d3 |
Field where field elements are arranged in a 3 dimensional array. Usually represents a field over a structured 3D mesh.
Elements can be accessed either through a single index running over all elements of the array, or by 3 indices indexing elements in 3 basic directions of the grid. The first index ("x direction") ie least significant and the last index is most significant.
TElement | Type of elements in the field. |
Indexing of elements of the structured 3D field has changed in 2011. Now the first index (in x direction) is least significant and the last one is most signifivant, opposite to notation in matrices. $A Igor Jan08 Mar09;
IG::Num::StructuredField3d< TElement >::StructuredField3d | ( | ) | [inline] |
Constructs a new empty 3D field (no elements contained) with no name and no description.
IG::Num::StructuredField3d< TElement >::StructuredField3d | ( | int | dim1, |
int | dim2, | ||
int | dim3 | ||
) | [inline] |
Constructs a new 3D field with the specified dimensions, name and description. Table of elements is allocated. Elements of the field are arranged in a 3D structured grid.
numElements |
IG::Num::StructuredField3d< TElement >::StructuredField3d | ( | int | dim1, |
int | dim2, | ||
int | dim3, | ||
string | fieldName | ||
) | [inline] |
Constructs a new 3D field with the specified dimensions, name and description. Table of elements is allocated. Elements of the field are arranged in a 3D structured grid.
numElements | Number of elements. |
fieldName | Name of the field. |
IG::Num::StructuredField3d< TElement >::StructuredField3d | ( | int | dim1, |
int | dim2, | ||
int | dim3, | ||
string | fieldName, | ||
string | fieldDescription | ||
) | [inline] |
Constructs a new 3D field with the specified dimensions, name and description. Table of elements is allocated. Elements of the field are arranged in a 3D structured grid.
dim1 | First dimension of the field (number of grid nodes in the first direction). |
dim2 | Second dimension of the field (number of grid nodes in the second direction). |
dim3 | Third dimension of the field (number of grid nodes in the third direction). |
fieldName | Name of the field. |
fieldDescription | Field description. |
int IG::Num::StructuredField3d< TElement >::GetIndex | ( | int | i1, |
int | i2, | ||
int | i3 | ||
) | [inline] |
Returns the linear index of the component that is identified by 3 separate indices. Field elements are stored in one dimensional array but they can be accesses by 3 indices as they were part of 3 dimensional array.The last index (for "z direction") is most significant and the first one (in "x direction") is least significant.
i1 | The first index of an element in a 3D array (least significant). |
i2 | The second index of an element in a 3D array. |
i3 | The third index of an element in a 3D array (most significant). |
Indexing of elements of the structured 3D field has changed in 2011. Now the first index (in x direction) is least significant and the last one is most signifivant, opposite to notation in matrices. $A Igor Jan08 Oct11;
void IG::Num::StructuredField3d< TElement >::getIndices | ( | int | index, |
out int | i1, | ||
out int | i2, | ||
out int | i3 | ||
) | [inline] |
Converts linear (contiguous) index to 3 separate indices for 3 dimensions. The last index (for "z direction") is most significant and the first one (in "x direction") is least significant.
index | Overall contiguous index. |
i1 | The first index of an element in a 3D array (least significant) |
i2 | The second index of an element in a 3D array. |
i3 | The third index of an element in a 3D array (most significant). |
Indexing of elements of the structured 3D field has changed in 2011. Now the first index (in x direction) is least significant and the last one is most signifivant, opposite to notation in matrices. $A Igor Jan08 Oct11;
virtual void IG::Num::StructuredField3d< TElement >::SetDimensions | ( | int | d1, |
int | d2, | ||
int | d3 | ||
) | [inline, virtual] |
Sets all three dimensions of the current 3D structured field.
d1 | First dimension. |
d2 | Second dimension. |
d3 | Third dimension. |
static void IG::Num::StructuredField3d< TElement >::MapCoordinatesPlain | ( | StructuredField3d< vec3 > | referenceField, |
StructuredField3d< vec3 > | targetField, | ||
IFunc3d | fx, | ||
IFunc3d | fy, | ||
IFunc3d | fz | ||
) | [inline, static] |
Generates coordinates of a 3D structured grid for a parametric volume from a reference grid according to functions specifying x, y, and z coordinates in terms of three scalar functions of 3 variables that map reference coordinates to components of the mapped coordinates of the grid. Target field can be the same as the reference field (in this case coordinates of the reference field are overwritten one by one).Function can be used for transformation of any nodal vector values of a grid, not just for transformation of coordinates.This is plain version of the method that does not check consistency of dimension or existence of objects.
referenceField | Field containing reference coordinates that will be mapped to actual coordinates. |
Dimensions must be set and array of vector values (coordinates) must be allocated before the function is called.
targetField | Field for which coordinates are generated. |
Dimensions must be set and consistent with dimensions of the reference field, and array of vector values must be allocated before the function is called.
This parameter can be the same field as referenceField .
fx | Function that maps node coordinates of the reference grid to the first node coordinates of the actual grid. |
fy | Function that maps node coordinates of the reference grid to the second node coordinates of the actual grid. |
fz | Function that maps node coordinates of the reference grid to the third node coordinates of the actual grid. |
static void IG::Num::StructuredField3d< TElement >::MapCoordinates | ( | StructuredField3d< vec3 > | referenceField, |
StructuredField3d< vec3 > | targetField, | ||
IFunc3d | fx, | ||
IFunc3d | fy, | ||
IFunc3d | fz | ||
) | [inline, static] |
Generates coordinates of a 3D structured grid for a parametric volume from a reference grid according to functions specifying x, y, and z coordinates in terms of three scalar functions of 3 variables that map reference coordinates to components of the mapped coordinates of the grid. Target field can be the same as the reference field (in this case coordinates of the reference field are overwritten one by one).Function can be used for transformation of any nodal vector values of a grid, not just for transformation of coordinates.Consistency of dimensions and existence of objects are checked and exceptions are thrown when checks fail.
referenceField | Field containing reference coordinates that will be mapped to actual coordinates. |
Dimensions must be set and array of vector values (coordinates) must be allocated before the function is called.
targetField | Field for which coordinates are generated. |
Dimensions must be set and consistent with dimensions of the reference field, and array of vector values must be allocated before the function is called.
This parameter can be the same field as referenceField .
fx | Function that maps node coordinates of the reference grid to the first node coordinates of the actual grid. |
fy | Function that maps node coordinates of the reference grid to the second node coordinates of the actual grid. |
fz | Function that maps node coordinates of the reference grid to the third node coordinates of the actual grid. |
static void IG::Num::StructuredField3d< TElement >::MapCoordinatesToScalarsPlain | ( | StructuredField3d< vec3 > | referenceField, |
StructuredField3d< double > | targetScalarField, | ||
IFunc3d | scalarMap | ||
) | [inline, static] |
Generates scalar values for a 3D structured grid from the specified field of grid coordinates by a specified scalar function of 3 variables that maps reference coordinates to scalar values. Function can be used for any mapping of nodal vector values to nodal scalar values of a grid, not just for mapping of coordinates.This is plain version of the method that does not check consistency of dimension or existence of objects.
referenceField | Field containing coordinates that will be mapped to scalar values. |
Dimensions must be set and array of vector values (coordinates) must be allocated before the function is called.
targetField | Field in which the mapped scalars are stored. |
Dimensions must be set and consistent with dimensions of the reference field, and array of values must be allocated before the function is called.
scalarMap | Function that maps node coordinates of the reference grid to scalar values of the target grid. |
static void IG::Num::StructuredField3d< TElement >::MapCoordinatesToScalars | ( | StructuredField3d< vec3 > | referenceField, |
StructuredField3d< double > | targetScalarField, | ||
IFunc3d | scalarMap | ||
) | [inline, static] |
Generates scalar values for a 3D structured grid from the specified field of grid coordinates by a specified scalar function of 3 variables that maps reference coordinates to scalar values. Function can be used for any mapping of nodal vector values to nodal scalar values of a grid, not just for mapping of coordinates.Consistency of dimensions and existence of objects are checked and exceptions are thrown when checks fail.
referenceField | Field containing coordinates that will be mapped to scalar values. |
Dimensions must be set and array of vector values (coordinates) must be allocated before the function is called.
targetField | Field in which the mapped scalars are stored. |
Dimensions must be set and consistent with dimensions of the reference field, and array of values must be allocated before the function is called.
scalarMap | Function that maps node coordinates of the reference grid to scalar values of the target grid. |
static void IG::Num::StructuredField3d< TElement >::GenerateCoordinatesPlain | ( | StructuredField3d< vec3 > | field, |
double | minxRef, | ||
double | maxxRef, | ||
double | minyRef, | ||
double | maxyRef, | ||
double | minzRef, | ||
double | maxzRef | ||
) | [inline, static] |
Generates coordinates (unconnected) unstructured grid based on a 3D regular grid with grid directions parallel to coordinate axes and equidistantly arranged nodes in all directions. Numbers of nodes in each grid directions are specified by current dimensions of the grid.This is plain version of the method that does not check consistency of dimension or existence of objects.
field | Field for which coordinates are generated. Dimensions must be set and array of vector values allocated before this function is called. |
minxRef | Minimal value of x coordinate of the generated grid. |
maxxRef | Maximal value of x coordinate of the generated grid. |
minyRef | Minimal value of y coordinate of the generated grid. |
maxyRef | Maximal value of y coordinate of the generated grid. |
minzRef | Minimal value of z coordinate of the generated grid. |
maxzRef | Maximal value of z coordinate of the generated grid. |
static void IG::Num::StructuredField3d< TElement >::GenerateCoordinates | ( | StructuredField3d< vec3 > | field, |
double | minxRef, | ||
double | maxxRef, | ||
double | minyRef, | ||
double | maxyRef, | ||
double | minzRef, | ||
double | maxzRef | ||
) | [inline, static] |
Generates coordinates of unstructured grid based on a 3D regular grid with grid directions parallel to coordinate axes and equidistantly arranged nodes in all directions. Numbers of nodes in each grid directions are specified by current dimensions of the grid.Consistency of dimensions and existence of objects are checked and exceptions are thrown when checks fail.
field | Field for which coordinates are generated. Dimensions must be set and array of vector values allocated before this function is called. |
minxRef | Minimal value of x coordinate of the generated grid. |
maxxRef | Maximal value of x coordinate of the generated grid. |
minyRef | Minimal value of y coordinate of the generated grid. |
maxyRef | Maximal value of y coordinate of the generated grid. |
minzRef | Minimal value of z coordinate of the generated grid. |
maxzRef | Maximal value of z coordinate of the generated grid. |
static void IG::Num::StructuredField3d< TElement >::GenerateCoordinatesPlain | ( | StructuredField3d< vec3 > | field, |
double | minxRef, | ||
double | maxxRef, | ||
double | minyRef, | ||
double | maxyRef, | ||
double | minzRef, | ||
double | maxzRef, | ||
IFunc3d | fx, | ||
IFunc3d | fy, | ||
IFunc3d | fz | ||
) | [inline, static] |
Generates coordinates of unstructured grid based on a 3D structured grid of a parametric volume according to functions specifying the x, y, and z coordinates in terms of three scalar functions of 3 variables. Coordinates are obtained by transforming individual coordinates of a regular equidistant grid from the reference system.. Numbers of nodes in each grid directions are specified by current dimensions of the grid.This is plain version of the method that does not check consistency of dimension or existence of objects.
field | Field for which coordinates are generated. Dimensions must be set and array of vector values allocated before this function is called. |
minxRef | Lower bound for the first parameter in the reference coordinate system. |
maxxRef | Upper bound for the first parameter in the reference coordinate system. |
minyRef | Lower bound for the second parameter in the reference coordinate system. |
maxyRef | Upper bound for the second parameter in the reference coordinate system. |
minzRef | Lower bound for the third parameter in the reference coordinate system. |
maxzRef | Upper bound for the third parameter in the reference coordinate system. |
fx | Function that maps node coordinates of the reference grid to the first node coordinates' component of the actual grid. |
fy | Function that maps node coordinates of the reference grid to the second node coordinates' component of the actual grid. |
fz | Function that maps node coordinates of the reference grid to the third node coordinates' component of the actual grid. |
static void IG::Num::StructuredField3d< TElement >::GenerateCoordinates | ( | StructuredField3d< vec3 > | field, |
double | minxRef, | ||
double | maxxRef, | ||
double | minyRef, | ||
double | maxyRef, | ||
double | minzRef, | ||
double | maxzRef, | ||
IFunc3d | fx, | ||
IFunc3d | fy, | ||
IFunc3d | fz | ||
) | [inline, static] |
Generates coordinates of a 3D structured grid of a parametric volume according to functions specifying the x, y, and z coordinates in terms of three scalar functions of 3 variables. Coordinates are obtained by transforming individual coordinates of a regular equidistant grid from the reference system.. Numbers of nodes in each grid directions are specified by current dimensions of the grid.Consistency of dimensions and existence of objects are checked and exceptions are thrown when checks fail.
field | Field for which coordinates are generated. Dimensions must be set and array of vector values allocated before this function is called. |
minxRef | Lower bound for the first parameter in the reference coordinate system. |
maxxRef | Upper bound for the first parameter in the reference coordinate system. |
minyRef | Lower bound for the second parameter in the reference coordinate system. |
maxyRef | Upper bound for the second parameter in the reference coordinate system. |
minzRef | Lower bound for the third parameter in the reference coordinate system. |
maxzRef | Upper bound for the third parameter in the reference coordinate system. |
fx | Function that maps node coordinates of the reference grid to the first node coordinates' component of the actual grid. |
fy | Function that maps node coordinates of the reference grid to the second node coordinates' component of the actual grid. |
fz | Function that maps node coordinates of the reference grid to the third node coordinates' component of the actual grid. |
int IG::Num::StructuredField3d< TElement >::_d1 [private] |
int IG::Num::StructuredField3d< TElement >::_d2 [private] |
int IG::Num::StructuredField3d< TElement >::_d3 [private] |
TElement IG::Num::StructuredField3d< TElement >::this[int i1, int i2, int i3] [get, set] |
Returns element of the field at specified indices.
i1 | The first index of an element in a 3D array (least significant). |
i2 | The second index of an element in a 3D array. |
i3 | The third index of an element in a 3D array (most significant). |
Indexing of elements of the structured 3D field has changed in 2011. Now the first index (in x direction) is least significant and the last one is most signifivant, opposite to notation in matrices. $A Igor Jan08 Oct11;
Reimplemented from IG::Num::Field< TElement >.
int IG::Num::StructuredField3d< TElement >::Dim1 [get, set] |
Returns the first dimenson of the structured mesh (number of mesh points in the first direction). Dependencies are handled by a call to the SetDimensions method when the property is set.
int IG::Num::StructuredField3d< TElement >::Dim2 [get, set] |
Returns the second dimenson of the structured mesh (number of mesh points in the second direction). Dependencies are handled by a call to the SetDimensions method when the property is set.
int IG::Num::StructuredField3d< TElement >::Dim3 [get, set] |
Gets or sets the second dimenson of the structured mesh (number of mesh points in the second direction). Dependencies are handled by a call to the SetDimensions method when the property is set.