# trace_matrices.py¶

Here we compute the trace matrices , and .

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

trace_matrices.TE(N_xi, N_et, N_sg)[source]

The trace matrix for mimetic polynomials constructed on three sets of nodes, , and .

Parameters:
• N_xi (positive integer) – N_xi + 1 nodes in set .

• N_et (positive integer) – N_et + 1 nodes in set .

• N_sg (positive integer) – N_sg + 1 nodes in set .

Returns:

A csc_matrix .

Example:

trace_matrices.TF(N_xi, N_et, N_sg)[source]

The trace matrix for mimetic polynomials constructed on three sets of nodes, , and .

Parameters:
• N_xi (positive integer) – N_xi + 1 nodes in set .

• N_et (positive integer) – N_et + 1 nodes in set .

• N_sg (positive integer) – N_sg + 1 nodes in set .

Returns:

A csr_matrix .

Example:

>>> T = TF(2, 2, 2)
>>> T.indices
array([ 0,  3,  6,  9,  2,  5,  8, 11, 12, 13, 18, 19, 16, 17, 22, 23, 24,
25, 26, 27, 32, 33, 34, 35], dtype=int32)
>>> T.data
array([-1, -1, -1, -1,  1,  1,  1,  1, -1, -1, -1, -1,  1,  1,  1,  1, -1,
-1, -1, -1,  1,  1,  1,  1], dtype=int32)

trace_matrices.TN(N_xi, N_et, N_sg)[source]

The trace matrix for mimetic polynomials constructed on three sets of nodes, , and .

Parameters:
• N_xi (positive integer) – N_xi + 1 nodes in set .

• N_et (positive integer) – N_et + 1 nodes in set .

• N_sg (positive integer) – N_sg + 1 nodes in set .

Returns:

A csr_matrix .

Example:

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