crazy_mesh_hybrid.py

In this script, we define a mesh in a unit cube,

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

class crazy_mesh_hybrid.CrazyMeshHybrid(c, K)[source]

The hybrid version of class CrazyMesh.

surface_CT_of_element_index(surface_name, i, j, k)[source]

For the surface_name side of element \Omega_{i,j,k}.

Parameters:
  • surface_name – ‘N’ (\xi^-), ‘S’ (\xi^+), ‘W’(\eta^-), ‘E’ (\eta^+), ‘B’ (\varsigma^-) or ‘F’ (\varsigma^+)?

  • i – Element index i.

  • j – Element index j.

  • k – Element index k.

Returns:

surface_CT_of_element_number(surface_name, m)[source]

For the surface_name side of element \Omega_{m}.

Parameters:
  • surface_name – ‘N’ (\xi^-), ‘S’ (\xi^+), ‘W’(\eta^-), ‘E’ (\eta^+), ‘B’ (\varsigma^-) or ‘F’ (\varsigma^+)?

  • m – Element \Omega_{m}.

Returns:

class crazy_mesh_hybrid.CrazyMeshHybridGlobalBoundaryDOFs(K, N)[source]

The hybrid version of class CrazyMeshGlobalBoundaryDOFs.

property TE

Find the dofs of an element in \text{TE}_{N-1}(\partial\Omega) which are on boundary of the crazy mesh of K^3 elements.

Returns:

A dict whose keys are ‘x_minus’, ‘x_plus’, ‘y_minus’, ‘y_plus’, ‘z_minus’, ‘z_plus’, and whose values are the global numbering of the dofs on the boundaries indicated by the keys.

property TF

Find the dofs of an element in \text{TF}_{N-1}(\partial\Omega) which are on boundary of the crazy mesh of K^3 elements.

Returns:

A dict whose keys are ‘x_minus’, ‘x_plus’, ‘y_minus’, ‘y_plus’, ‘z_minus’, ‘z_plus’, and whose values are the global numbering of the dofs on the boundaries indicated by the keys.

property TN

Find the dofs of an element in \text{TN}_{N}(\partial\Omega) which are on boundary of the crazy mesh of K^3 elements.

Returns:

A dict whose keys are ‘x_minus’, ‘x_plus’, ‘y_minus’, ‘y_plus’, ‘z_minus’, ‘z_plus’, and whose values are the global numbering of the dofs on the boundaries indicated by the keys.

class crazy_mesh_hybrid.CrazyMeshHybridGlobalNumbering(K, N)[source]

The hybrid version of class CrazyMeshGlobalNumbering.

property EP

Generate a global numbering for the dofs of an element in \text{EP}_{N-1}(\Omega) on a hybrid crazy mesh of K^3 elements.

property FP

Generate a global numbering for the dofs of an element in \text{FP}_{N-1}(\Omega) on a hybrid crazy mesh of K^3 elements.

property NP

Generate a global numbering for the dofs of an element in \text{NP}_{N}(\Omega) on a crazy mesh of K^3 elements.

property TE

Generate a global numbering for a discrete trace variable in \text{TE}_{N-1}(\partial\Omega) on a hybrid crazy mesh of K^3 elements.

property TF

Generate a global numbering for a discrete trace variable in \text{TF}_{N-1}(\partial\Omega) on a hybrid crazy mesh of K^3 elements.

property TN

Generate a global numbering for a discrete trace variable in \text{TN}_{N}(\partial\Omega) on a hybrid crazy mesh of K^3 elements.

property VP

Generate a global numbering for the dofs of an element in \text{VP}_{N-1}(\Omega) on a hybrid crazy mesh of K^3 elements.

Note that for \text{VP}_{N-1}(\Omega), we obviously can use the numbering for the non-hybrid crazy mesh such it is discontinuous any way.

class crazy_mesh_hybrid.CrazyMeshHybridLocalBoundaryDOFs(K, N)[source]

Like the CrazyMeshHybridGlobalBoundaryDOFs, but we now return the local numbering on each boundary.

Parameters:
  • K (int) – The crazy mesh is of K^3 elements.

  • N (int) – The degree N. of the to be used mimetic polynomial basis functions.

property EP

Find the dofs of an element in \text{EP}_{N-1}(\Omega) which are on boundary of the crazy mesh of K^3 elements.

Returns:

A dict whose keys are ‘x_minus’, ‘x_plus’, ‘y_minus’, ‘y_plus’, ‘z_minus’, ‘z_plus’, and whose values are the global numbering of the dofs on the boundaries indicated by the keys.

property FP

Find the dofs of an element in \text{FP}_{N-1}(\Omega) which are on boundary of the crazy mesh of K^3 elements.

Returns:

A dict whose keys are ‘x_minus’, ‘x_plus’, ‘y_minus’, ‘y_plus’, ‘z_minus’, ‘z_plus’, and whose values are the global numbering of the dofs on the boundaries indicated by the keys.

property NP

Find the dofs of an element in \text{NP}_{N}(\Omega) which are on boundary of the crazy mesh of K^3 elements.

Returns:

A dict whose keys are ‘x_minus’, ‘x_plus’, ‘y_minus’, ‘y_plus’, ‘z_minus’, ‘z_plus’, and whose values are the global numbering of the dofs on the boundaries indicated by the keys.

property TE

Find the dofs of an element in \text{TE}_{N-1}(\partial\Omega) which are on boundary of the crazy mesh of K^3 elements.

Returns:

A dict whose keys are ‘x_minus’, ‘x_plus’, ‘y_minus’, ‘y_plus’, ‘z_minus’, ‘z_plus’, and whose values are the global numbering of the dofs on the boundaries indicated by the keys.

property TF

Find the dofs of an element in \text{TF}_{N-1}(\partial\Omega) which are on boundary of the crazy mesh of K^3 elements.

Returns:

A dict whose keys are ‘x_minus’, ‘x_plus’, ‘y_minus’, ‘y_plus’, ‘z_minus’, ‘z_plus’, and whose values are the global numbering of the dofs on the boundaries indicated by the keys.

property TN

Find the dofs of an element in \text{TN}_{N}(\partial\Omega) which are on boundary of the crazy mesh of K^3 elements.

Returns:

A dict whose keys are ‘x_minus’, ‘x_plus’, ‘y_minus’, ‘y_plus’, ‘z_minus’, ‘z_plus’, and whose values are the global numbering of the dofs on the boundaries indicated by the keys.

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