Skip to content

Commit

Permalink
Minor extended documentation updates (#1176)
Browse files Browse the repository at this point in the history
  • Loading branch information
gregnordin authored Oct 27, 2024
1 parent cf47d03 commit b0fb65a
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions docs/extended.rst
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,8 @@ more descriptive and readable.

.. sourcecode::

dof_subset_right_edge = basis_p1.get_dofs(facets=lambda x: x[1] > 0.9)
fe_approximation[dof_subset_right_edge] = 2
dof_subset_top_edge = basis_p1.get_dofs(facets=lambda x: x[1] > 0.9)
fe_approximation[dof_subset_top_edge] = 2
plt.subplots(figsize=(6,5))
skfem.visuals.matplotlib.plot(basis_p1, fe_approximation, vmin=0, vmax=2, ax=plt.gca(), colorbar=True, shading='gouraud')
skfem.visuals.matplotlib.draw(mesh, ax=plt.gca())
Expand All @@ -263,8 +263,8 @@ more descriptive and readable.
return x[0] < 0.1
dof_subset_left_edge = basis_p1.get_dofs(facets=is_on_left_edge)
fe_approximation[dof_subset_left_edge] = 0
dof_subset_right_edge = basis_p1.get_dofs(facets=lambda x: x[1] > 0.9)
fe_approximation[dof_subset_right_edge] = 2
dof_subset_top_edge = basis_p1.get_dofs(facets=lambda x: x[1] > 0.9)
fe_approximation[dof_subset_top_edge] = 2
plt.subplots(figsize=(6,5))
skfem.visuals.matplotlib.plot(basis_p1, fe_approximation, vmin=0, vmax=2, ax=plt.gca(), colorbar=True, shading='gouraud')
skfem.visuals.matplotlib.draw(mesh, ax=plt.gca())
Expand Down Expand Up @@ -298,8 +298,8 @@ In a directly analogous manner, we can specify values over entire elements inste
return x[0] < 0.1
dof_subset_left_edge = basis_p1.get_dofs(facets=is_on_left_edge)
fe_approximation[dof_subset_left_edge] = 0
dof_subset_right_edge = basis_p1.get_dofs(facets=lambda x: x[1] > 0.9)
fe_approximation[dof_subset_right_edge] = 2
dof_subset_top_edge = basis_p1.get_dofs(facets=lambda x: x[1] > 0.9)
fe_approximation[dof_subset_top_edge] = 2
# reset the function to be 1 everywhere
fe_approximation[:] = 1
dof_subset_bottom_left = basis_p1.get_dofs(elements=lambda x: np.logical_and(x[0]<.3, x[1]<.3))
Expand Down Expand Up @@ -392,8 +392,8 @@ labelling facets and elements during mesh construction.)
return x[0] < 0.1
dof_subset_left_edge = basis_p1.get_dofs(facets=is_on_left_edge)
fe_approximation[dof_subset_left_edge] = 0
dof_subset_right_edge = basis_p1.get_dofs(facets=lambda x: x[1] > 0.9)
fe_approximation[dof_subset_right_edge] = 2
dof_subset_top_edge = basis_p1.get_dofs(facets=lambda x: x[1] > 0.9)
fe_approximation[dof_subset_top_edge] = 2
# reset the function to be 1 everywhere
fe_approximation[:] = 1
dof_subset_bottom_left = basis_p1.get_dofs(elements=lambda x: np.logical_and(x[0]<.3, x[1]<.3))
Expand Down Expand Up @@ -439,8 +439,8 @@ function values at those points.
return x[0] < 0.1
dof_subset_left_edge = basis_p1.get_dofs(facets=is_on_left_edge)
fe_approximation[dof_subset_left_edge] = 0
dof_subset_right_edge = basis_p1.get_dofs(facets=lambda x: x[1] > 0.9)
fe_approximation[dof_subset_right_edge] = 2
dof_subset_top_edge = basis_p1.get_dofs(facets=lambda x: x[1] > 0.9)
fe_approximation[dof_subset_top_edge] = 2
# reset the function to be 1 everywhere
fe_approximation[:] = 1
dof_subset_bottom_left = basis_p1.get_dofs(elements=lambda x: np.logical_and(x[0]<.3, x[1]<.3))
Expand Down Expand Up @@ -475,7 +475,7 @@ important to understand their relationship with the projections we've
been constructing. To start this discussion, however, it is important
to distinguish between "local" coordinates and "global"
coordinates. In this triangulation we've been working in, the local,
or reference, triangle is on with vertexes and (0, 0), (1, 0), and (0, 1).
or reference, triangle is within the unit square with vertexes and (0, 0), (1, 0), and (0, 1).

.. sourcecode::

Expand Down

0 comments on commit b0fb65a

Please sign in to comment.