puncturedfem.GlobalFunctionSpace
Global function space V_p(T) on a planar mesh T of degree p.
Attributes:
| Name | Type | Description |
|---|---|---|
mesh |
PlanarMesh
|
Planar mesh |
deg |
int
|
Degree of polynomial space |
quad_dict |
QuadDict
|
Dictionary of quadrature rules |
num_funs |
int
|
Number of functions in the space |
num_vert_funs |
int
|
Number of vertex functions |
num_edge_funs |
int
|
Number of edge functions |
num_bubb_funs |
int
|
Number of bubble functions |
edge_spaces |
list[EdgeSpace]
|
List of edge spaces |
edge_fun_cumsum |
list[int]
|
Cumulative sum of the number of edge functions |
cell_dofs |
list[list[GlobalKey]]
|
List of lists of global keys for each cell |
__init__(mesh, deg, quad_dict, verbose=True)
Initialize a GlobalFunctionSpace object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mesh |
PlanarMesh
|
Planar mesh |
required |
deg |
int
|
Degree of polynomial space |
required |
quad_dict |
dict[str, Quad]
|
Dictionary of quadrature rules |
required |
verbose |
bool, optional
|
If True, print progress bars, by default True |
True
|
__str__()
Return a string representation of the global function space.
build_edge_spaces(verbose=True)
Build the Edge spaces for each edge in the mesh.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
verbose |
bool, optional
|
If True, print progress bars, by default True |
True
|
build_local_function_space(cell_idx, verbose=True, compute_interior_values=True, compute_interior_gradient=True)
Build the local function space V_p(K) for a MeshCell K.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cell_idx |
int
|
Index of the cell K in the mesh |
required |
verbose |
bool, optional
|
If True, print progress bars, by default True |
True
|
compute_interior_values |
bool, optional
|
If True, compute the values of interior functions, by default True |
True
|
fun_is_on_boundary(key)
Return True if a global function is on the boundary.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key |
GlobalKey
|
Global key of the function |
required |
get_global_idx(key, abs_cell_idx)
Return the global index of a local function.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key |
GlobalKey
|
Local key of the function |
required |
abs_cell_idx |
int
|
Absolute cell index |
required |
Returns:
| Type | Description |
|---|---|
int
|
Global index of the function |
set_deg(deg)
Set the degree of the polynomial space.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
deg |
int
|
Degree of polynomial space |
required |