Skip to content

Commit

Permalink
Merge pull request #150 from autotwin/resmooth
Browse files Browse the repository at this point in the history
refactored figure
  • Loading branch information
hovey authored Oct 18, 2024
2 parents f2b7561 + d3a8acc commit 9080daf
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 3 deletions.
Binary file added book/theory/hierarchy_sets_refactored.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 22 additions & 3 deletions book/theory/smoothing.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ Some `INTERIOR` and `BOUNDARY` nodes may be recategorized as `PRESCRIBED` nodes.

![prescribed_nodes.png](prescribed_nodes.png)

## The `Hierarchy` enum
### The `Hierarchy` enum

These three categories, `INTERIOR`, `BOUNDARY`, and `PRESCRIBED`, compose the hierarchical structure of hierarchical smoothing. Nodes are classified in code with the following `enum`,

Expand All @@ -150,10 +150,29 @@ class Hierarchy(Enum):
PRESCRIBED = 2
```

### Hierarchical Control

Hierarchical control classifies all nodes in a mesh as belonging to a interior $\mathbb{A}$, boundary $\mathbb{B}$, or prescribed $\mathbb{C}$. These categories are mutually exclusive. Any and all nodes must belong to one, and only one, of these three categories. For a given node $\boldsymbol{p}$, let

* the set of *interior* neighbors be denoted $\boldsymbol{q}_{\mathbb{A}}$,
* the set of *boundary* neighbors be denoted $\boldsymbol{q}_{\mathbb{B}}$, and
* the set of *prescribed* neighbors be denoted $\boldsymbol{q}_{\mathbb{C}}$.

Hierarchical control redefines a node's neighborhood according to the following hierarchical rules:

* for any *interior* node $\boldsymbol{p} \in \mathbb{A}$, nodes $\boldsymbol{q}_{\mathbb{A}}$, $\boldsymbol{q}_{\mathbb{B}}$, and $\boldsymbol{q}_{\mathbb{C}}$ are neighbors; there is no change in the neighborhood,
* for any *boundary* node $\boldsymbol{p} \in \mathbb{B}$, only boundary nodes $\boldsymbol{q}_{\mathbb{B}}$ and prescribed nodes $\boldsymbol{q}_{\mathbb{C}}$ are neighbors; a boundary node neighborhood exludes interior nodes, and
* for any *prescribed* node $\boldsymbol{p} \in \mathbb{C}$, all neighbors of any category are excluded; the prescribed node's position does not change during smoothing.

The following figure shows this concept:

![hierarchy_sets_refactored](hierarchy_sets_refactored.png)

Figure: Classification of nodes into categories of interior nodes $\mathbb{A}$, boundary nodes $\mathbb{B}$, and prescribed nodes $\mathbb{C}$. Hierarchical relationship: prescribed nodes have no smoothing neighbors, a boundary node's smoothing neighbors are other other boundary nodes or prescribed nodes, and an interface node's smoothing neighbors are nodes of any category.

### Relationship to a `SideSet`

A `SideSet` is a set of nodes, tyically on the exterior of a domain, used to prescribe a boundary condition
on the finite element mesh.
A `SideSet` is a set of nodes on the boundary of a domain, used to prescribe a boundary condition on the finite element mesh.

* A subset of nodes on the boundary nodes is classified as **exterior nodes**.
* A different subset of nodes on the boundary is classified as **interface nodes**.
Expand Down
42 changes: 42 additions & 0 deletions book/theory/smoothing_laplace.tex
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,48 @@
\label{fig:hierarchy} % label must come after caption
\end{figure}



\begin{figure}[htb]
\begin{center}

\begin{tikzpicture}
\node[shape=circle,draw=black] (a) at (-6,0) {$\vp \in \mathbb{A}$};
\node[shape=circle,draw=black] (b) at (-4,1) {$\vq_{\mathbb{A}}$};
\node[shape=circle,draw=black] (c) at (-3.576,0) {$\vq_{\mathbb{B}}$};
\node[shape=circle,draw=black] (d) at (-4,-1) {$\vq_{\mathbb{C}}$};

\node[shape=circle,draw=black] (e) at (-1,0) {$\vp \in \mathbb{B}$};
\node[shape=circle,draw=darkgray, dashed, fill=lightgray] (f) at (1,1) {$\vq_{\mathbb{A}}$};
\node[shape=circle,draw=black] (g) at (1.424,0) {$\vq_{\mathbb{B}}$};
\node[shape=circle,draw=black] (h) at (1,-1) {$\vq_{\mathbb{C}}$};

\node[shape=circle,draw=black] (i) at (4,0) {$\vp \in \mathbb{C}$};
\node[shape=circle,draw=darkgray, dashed, fill=lightgray] (j) at (6,1) {$\vq_{\mathbb{A}}$};
\node[shape=circle,draw=darkgray, dashed, fill=lightgray] (k) at (6.424,0) {$\vq_{\mathbb{B}}$};
\node[shape=circle,draw=darkgray, dashed, fill=lightgray] (l) at (6,-1) {$\vq_{\mathbb{C}}$};

\path (a) edge (b);
\path (a) edge (c);
\path (a) edge (d);

\path [dashed](e) edge node[align=center]{$\otimes$} (f);
\path (e) edge (g);
\path (e) edge (h);

\path [dashed](i) edge node[align=center] {$\otimes$} (j);
\path [dashed](i) edge node[align=center] {$\otimes$} (k);
\path [dashed](i) edge node[align=center] {$\otimes$} (l);
\end{tikzpicture}

\end{center}

\caption{Refactored hierarchical classification of nodes based on categories of surface $\mathbb{A}$, interface $\mathbb{B}$, and interior $\mathbb{C}$.}
\label{fig:hierarchy} % label must come after caption
\end{figure}



% \begin{figure}[htb]
% \begin{center}
%
Expand Down

0 comments on commit 9080daf

Please sign in to comment.