Package Scientific :: Package Geometry :: Module TensorAnalysis :: Class VectorField
[frames] | no frames]

Class VectorField

Functions.Interpolation.InterpolatingFunction --+    
                                                |    
                                      TensorField --+
                                                    |
                                                   VectorField

Vector field (tensor field of rank 1)

A subclass of TensorField.

Instance Methods
 
__init__(self, axes, values, default=None, period=(None, None, None), check=True)
 
curl(self)
Returns: the curl @rtype VectorField
 
divergence(self)
Returns: the divergence @rtype ScalarField
 
divergenceCurlAndStrain(self)
Returns: all derivative fields: divergence, curl, and strain @rtype (ScalarField, VectorField, TensorField)
 
laplacian(self)
Returns: the laplacian @rtype VectorField
ScalarField
length(self)
Returns: a scalar field corresponding to the length (norm) of the vector field.
 
strain(self)
Returns: the strain @rtype TensorField of rank 2
Scientifc.Geometry.Tensor
zero(self)
Returns: a tensor of the same rank as the field values with all elements equal to zero

Inherited from TensorField: __add__, __call__, __getitem__, __sub__, allDerivatives, derivative

Inherited from Functions.Interpolation.InterpolatingFunction: __abs__, __getattr__, __getslice__, __len__, arccos, arcsin, arctan, cos, cosh, definiteIntegral, exp, fitPolynomial, integral, log, selectInterval, sin, sinh, sqrt, tan, tanh

Method Details

__init__(self, axes, values, default=None, period=(None, None, None), check=True)
(Constructor)

 
Parameters:
  • axes (sequence of Numeric.array of rank 1) - three arrays specifying the axis ticks for the three axes
  • values (Numeric.array of four dimensions) - an array containing the field values. Its first three dimensions correspond to the x, y, z directions and must have lengths compatible with the axis arrays. The fourth dimension must have length 3.
  • default (Scientific.Geometry.Vector or NoneType) - the value of the field for points outside the grid. A value of 'None' means that an exception will be raised for an attempt to evaluate the field outside the grid. Any other value must a vector
  • period (sequence of length three) - the period for each of the variables, or None for variables in which the function is not periodic.
Raises:
  • ValueError - if the arguments are not consistent
Overrides: Functions.Interpolation.InterpolatingFunction.__init__

curl(self)

 
Returns:
the curl @rtype VectorField

divergence(self)

 
Returns:
the divergence @rtype ScalarField

divergenceCurlAndStrain(self)

 
Returns:
all derivative fields: divergence, curl, and strain @rtype (ScalarField, VectorField, TensorField)

laplacian(self)

 
Returns:
the laplacian @rtype VectorField

length(self)

 
Returns: ScalarField
a scalar field corresponding to the length (norm) of the vector field.

strain(self)

 
Returns:
the strain @rtype TensorField of rank 2

zero(self)

 
Returns: Scientifc.Geometry.Tensor
a tensor of the same rank as the field values with all elements equal to zero
Overrides: TensorField.zero
(inherited documentation)