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

Class ScalarField



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

Scalar field (tensor field of rank 0)

A subclass of TensorField.

Nested Classes [hide private]
  _constructor
Scalar field (tensor field of rank 0)

Instance Methods [hide private]
  __init__(self, axes, values, default=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 TensorField (private): _checkCompatibility, _reduceAxis

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 [hide private]

__init__(self, axes, values, default=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.
Raises:
  • ValueError - if the arguments are not consistent
Overrides: TensorField.__init__

gradient(self)

 
Returns: VectorField
the gradient

laplacian(self)

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