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

Class ScalarField

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

Scalar field (tensor field of rank 0)

A subclass of TensorField.

Instance Methods
 
__init__(self, axes, values, default=None, period=(None, None, None), check=True)
VectorField
gradient(self)
Returns: the gradient
 
laplacian(self)
Returns: the laplacian (gradient of divergence) @rtype ScalarField

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

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 3 dimensions) - an array containing the field values. The three dimensions correspond to the x, y, z directions and must have lengths compatible with the axis arrays.
  • default (number 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 tensor of the correct rank.
  • 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__

gradient(self)

 
Returns: VectorField
the gradient

laplacian(self)

 
Returns:
the laplacian (gradient of divergence) @rtype ScalarField