You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -46,12 +46,12 @@ This means the "boundary" cells are at a height of 1 and a depth equal to the ma
46
46
Conventional numbering (left) with vertices and cells numbered independently and `DMPlex` numbering (right) with cells, vertices, edges, (and faces), numbered sequentially.
47
47
:::
48
48
49
-
(sec-developer-petsc-section)=
50
-
## `PetscSection` and `PetscVec`
49
+
(sec-developer-pylith-field)=
50
+
## `pylith::topology::Field`, `PetscSection`, and `PetscVec`
51
+
52
+
A PyLith `Field` (`pylith::topology::Field`) is composed of a `PetscSection`, which associates the points (vertices, edges, faces, and cells) with the finite-element coefficients, and a `PetscVec`, which is a vector storing the finite-element coefficients.
53
+
A `Field` may hold a single subfield, such as displacement, or it may hold several subfields, such as the density, shear modulus, and bulk modulus for an isotropic, linear elastic material.
51
54
52
-
We store a field over the mesh in a vector (PETSc `Vec` object, called `PetscVec` in PyLith).
53
-
The `PetscSection` object describes the layout of the vector over the DMPlex object.
54
-
The vector may hold multiple subfields, each with its own discretization.
55
55
The chart of the `PetscSection` defines the range of points (minimum and maximum) over which the section is defined.
56
56
For each point in the chart, the section holds the number of degrees of freedom a point has and the offset in the `PetscVec` for its first degree of freedom.
57
57
The section also holds the number of degrees of freedom and offset for each individual subfield within the section for each point in the chart.
@@ -69,84 +69,287 @@ Constraints often arise from Dirichlet boundary conditions, which change the bas
69
69
A local vector is used for assembly of the residual vector and Jacobian matrix, because we need the boundary values in order to compute those integrals.
70
70
Global vectors are used for the algebraic solver because we do not want solution values fixed by constraints to participate in the solve.
71
71
72
+
The `Field::view()` method will print the `Field` metadata and the `PetscSection` in a more useful format compared to the corresponding PETSc viewer functions.
caption: Output from `pylith::topology::Field::view()` for a solution field with two subfields showing only the sections (layout of the field). The displacement subfield has degrees of freedom on the vertices of the bulk cells. The lagrange_multiplier_fault subfield has degrees of freedom on the edges of the cohesive cells. The order of the values (offsets in the PetscVec) follows the ordering of the points (cells, vertices, edges, and faces). The local section includes the constrained degrees of freedom, whereas the global section does not. The sections list the point and then the degree of freedom associated with the components of the fields.
78
+
---
79
+
Viewing field 'DM_0x84000000_1 solution' Solution field.
0 commit comments