# coordinate_transformation_surface.py¶

Compute the coordinate transformation related variables for a surface mapping, ,

We get an instance of class CoordinateTransformationSurface. The transformations are its methods.

⭕ To access the source code, click on the [source] button at the right side or click on [coordinate_transformation_surface.py]. Dependence may exist. In case of error, check import and install required packages or download required scripts. © mathischeap.com

class coordinate_transformation_surface.CoordinateTransformationSurface(Psi, d_Psi, iJM=None)[source]

The surface coordinate transformation class.

Parameters:
• Psi (function) –

The mapping . It should be a function which returns three components of the mapping, i.e.,

• d_Psi (function) –

The Jacobian matrix of , . It should be a function return the 6 (3*2) components of the Jacobian matrix, i.e.,

( , ), ( , ), ( , ).

• iJM – The inverse Jacobian matrix.

Example:

>>> ctS = CoordinateTransformationSurface(Psi, d_Psi)
>>> rho = np.linspace(-1,1,20)
>>> tau = np.linspace(-1,1,20)
>>> rho, tau = np.meshgrid(rho, tau, indexing='ij')
>>> x, y, z = ctS.mapping(rho, tau)
>>> J = ctS.Jacobian_matrix(rho, tau)
>>> np.shape(J)
(3, 2, 20, 20)
>>> G = ctS.metric_matrix(rho, tau)
>>> np.shape(G)
(2, 2, 20, 20)
>>> g = ctS.metric(rho, tau)
>>> np.shape(g)
(20, 20)

Jacobian_matrix(rho, tau)[source]

A wrap of the input Jacobian matrix, d_Psi, i.e., .

Returns:

Return the Jacobian matrix :

inverse_Jacobian_matrix(rho, tau)[source]

Compute the inverse Jacobian matrix, .

Returns:

Return the inverse Jacobian matrix :

mapping(rho, tau)[source]

A wrap of the input mapping, Psi, i.e., .

Parameters:
• rho.

• tau.

Returns:

a tuple .

metric(rho, tau)[source]

The metric .

metric_matrix(rho, tau)[source]

Compute the metric matrix .

Returns:

Return the metric matrix :

coordinate_transformation_surface.extract_surface_coordinate_transformations_of(ct, which_sides=None)[source]

We extract the six boundary coordinate transformations from a CoordinateTransformation instance representing a 3D mapping .

Parameters:
• ct (CoordinateTransformation) – A CoordinateTransformation instance that represents the mapping .

• which_sides – (default: None) We want to extract sub-mappings on which sides?

Returns:

A tuple of 6 CoordinateTransformationSurface instances representing the north (), south (), west (), east (), back () and front () boundaries.

↩️ Back to Ph.D. thesis complements (ptc).