Package sfc :: Package symbolic_utils :: Module symbolic_utils
[hide private]
[frames] | no frames]

Module symbolic_utils

source code

This module contains utility functions for symbolic computations, mostly a thin layer on top of swiginac.

Functions [hide private]
 
is_indexed_type(A)
Checks if the argument is a matrix or lst.
source code
 
is_scalar(e) source code
 
as_matrix(A)
Convert A to a swiginac.matrix from a lst or list.
source code
 
zeros(m, n)
Returns a m x n matrix with zeros.
source code
 
ones(m, n)
Returns a m x n matrix with ones.
source code
 
Id(n)
Returns the n x n identity matrix.
source code
 
add(A, B)
Adds two swiginac expressions and calls evalm() on the result before returning.
source code
 
sub(A, B)
Subtracts two swiginac expressions and calls evalm() on the result before returning.
source code
 
mul(A, B)
Multiplies two swiginac expressions and calls evalm() on the result before returning.
source code
 
cross(a, b)
Takes the cross product of two vectors.
source code
 
inner(A, B)
Takes the inner product of A and B: multiplication for scalars, dot product for vectors and lsts, contraction for matrices.
source code
 
dot(a, b) source code
 
contract(A, B)
See inner(A,B).
source code
 
det(A)
Returns the determinant of the argument.
source code
 
abs(x)
Returns the absolute value of the argument.
source code
 
transpose(A)
Returns the transpose of the argument.
source code
 
trace(A)
Returns the trace of the argument.
source code
 
inverse(A)
Returns the inverse of the argument.
source code
 
rank(x) source code
 
shape(x) source code
 
diff(f, x)
Returns df/dx, where x is a symbol or symbolic matrix.
source code
 
ddx(f, i, GinvT=None)
Returns df/dx_i, where i is the number of the coordinate.
source code
 
grad(u, GinvT=None)
Returns the gradient of u w.r.t.
source code
 
div(u, GinvT=None) source code
 
curl(u, GinvT=None) source code
 
laplace(u, GinvT=None) source code
Variables [hide private]
  _p = symbols(["x", "y", "z"])
Function Details [hide private]

ddx(f, i, GinvT=None)

source code 

Returns df/dx_i, where i is the number of the coordinate. GinvT is an optional geometry mapping.

grad(u, GinvT=None)

source code 

Returns the gradient of u w.r.t. the spacial variables x,y[,z], depending on the dimension specified by SyFi.initSyFi(nsd).