Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement general 2D forest meshes #1047

Merged
merged 106 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from 81 commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
994a262
start rethreading orientation
lroberts36 Apr 10, 2024
5dd2c0e
missing header
lroberts36 Apr 10, 2024
676043c
Rearrange headers to pass through relative orientation information fr…
lroberts36 Apr 10, 2024
44391aa
finish pass through
lroberts36 Apr 10, 2024
327ff04
perform identity transformations
lroberts36 Apr 11, 2024
404102c
flippity floppity
lroberts36 Apr 11, 2024
dd5b25e
format
lroberts36 Apr 11, 2024
7e6b596
remove structured binding
lroberts36 Apr 11, 2024
8f1c8ca
continue fix
lroberts36 Apr 11, 2024
02f949c
actually fix the issue
lroberts36 Apr 11, 2024
549e5df
Make sure orientation is correctly set
lroberts36 Apr 11, 2024
d20ffde
fix error
lroberts36 Apr 11, 2024
bbb5a26
Merge branch 'lroberts36/add-forest-block-orientation' into lroberts3…
lroberts36 Apr 11, 2024
fce776c
rename relative orientation to be more clear it is just a logical coo…
lroberts36 Apr 11, 2024
9776cc7
Merge branch 'lroberts36/refactor-mesh-constructors' into lroberts36/…
lroberts36 Apr 17, 2024
5b2b2ad
Merge branch 'lroberts36/refactor-mesh-constructors' into lroberts36/…
lroberts36 Apr 17, 2024
2c342b0
Add back old mesh test stuff
lroberts36 Apr 17, 2024
1631d60
correct orientation naming
lroberts36 Apr 17, 2024
4fb5dea
small
lroberts36 Apr 17, 2024
3bc7932
don't overwrite with hyperrectangular mesh
lroberts36 Apr 17, 2024
de140b2
move forest topology to src
lroberts36 Apr 17, 2024
923eb8c
rename
lroberts36 Apr 17, 2024
8cdca59
update include
lroberts36 Apr 17, 2024
98396a6
get includes working
lroberts36 Apr 17, 2024
f62c163
Add node based 2D forest constructor
lroberts36 Apr 17, 2024
852e035
format
lroberts36 Apr 17, 2024
27280be
small
lroberts36 Apr 18, 2024
93cdc69
Merge branch 'lroberts36/refactor-mesh-constructors' into lroberts36/…
lroberts36 Apr 18, 2024
918a88d
add untested constructor
lroberts36 Apr 18, 2024
1344db2
port back boundary exchange test
lroberts36 Apr 18, 2024
dc3bbf6
format
lroberts36 Apr 18, 2024
957bc8d
Allow mesh construction via faces
lroberts36 Apr 18, 2024
5cc9d71
Merge branch 'lroberts36/refactor-mesh-constructors' into lroberts36/…
lroberts36 Apr 24, 2024
25b6b10
Merge branch 'lroberts36/refactor-mesh-constructors' into lroberts36/…
lroberts36 Apr 25, 2024
7263ff3
fix Tree constructor bug
lroberts36 Apr 25, 2024
d3b6bfb
start on corner transformations
lroberts36 Apr 25, 2024
eb75e57
use offsets, other stuff
lroberts36 Apr 26, 2024
f6e3e17
Merge branch 'lroberts36/refactor-mesh-constructors' into lroberts36/…
lroberts36 Apr 26, 2024
73c099c
more work
lroberts36 Apr 26, 2024
3ad4836
closer...
lroberts36 Apr 26, 2024
d104b7f
giving up for today
lroberts36 Apr 26, 2024
8302d6f
close to switching to simple coord transform scheme
lroberts36 Apr 29, 2024
381d1ff
new neighbor finding working
lroberts36 Apr 29, 2024
4045d1b
blah
lroberts36 Apr 29, 2024
9ee2612
Remove old attempt at neighbor finding
lroberts36 Apr 29, 2024
c957a3c
Working corner neighbor transformations
lroberts36 Apr 30, 2024
320992b
Make this example little more complex
lroberts36 Apr 30, 2024
55c67d8
remove debug output
lroberts36 Apr 30, 2024
f4c513f
test for arbitrary valence meshes
lroberts36 Apr 30, 2024
089e6f5
format and lint
lroberts36 Apr 30, 2024
5621f2a
allow for testing all valences
lroberts36 Apr 30, 2024
82f4612
pretty close, but some bc related segfault
lroberts36 Apr 30, 2024
e857f41
seemingly working boundary communication
lroberts36 May 1, 2024
6d3343d
Remove unecessary Coordinate enum
lroberts36 May 1, 2024
c0e78c6
Move to cpp file
lroberts36 May 1, 2024
0a3c5e9
pass in user boundary functions jankily to fix gmg
lroberts36 May 1, 2024
c343938
correct kokkos markings
lroberts36 May 1, 2024
2506523
remove unecessary defines
lroberts36 May 1, 2024
7ff51ac
remove unused variable
lroberts36 May 1, 2024
ade1520
format and lint
lroberts36 May 1, 2024
a2dce37
format
lroberts36 May 1, 2024
06a1d32
set mesh_bcs and UserBoundaryFunctions to prevent segfaults
lroberts36 May 6, 2024
ca2e599
store neighbor block location in the origin tree
lroberts36 May 6, 2024
1d226cf
add more to forest definition
lroberts36 May 6, 2024
ae1c999
cleanup forest definition
lroberts36 May 6, 2024
162842c
Add non-trivial forest tests
lroberts36 May 6, 2024
b9b46dd
remove print statements
lroberts36 May 6, 2024
a325af6
format and lint
lroberts36 May 6, 2024
2f18ce5
Add a boundary exchange regression test
lroberts36 May 6, 2024
e580cb7
Remove forest mesh example
lroberts36 May 6, 2024
cefe800
Merge branch 'lroberts36/refactor-mesh-constructors' into lroberts36/…
lroberts36 May 14, 2024
fbfc31b
make things compile
lroberts36 May 14, 2024
f66c3c1
format
lroberts36 May 14, 2024
7e6fa47
Move swarm boundary conditions to forest
lroberts36 May 14, 2024
7b82e8e
remove boundary conditions from mesh
lroberts36 May 14, 2024
24bd71d
changelog
lroberts36 May 14, 2024
9de45fa
finish thought on comment
lroberts36 May 14, 2024
5dca440
Merge branch 'lroberts36/refactor-mesh-constructors' into lroberts36/…
lroberts36 May 29, 2024
c164ffe
Merge branch 'lroberts36/refactor-mesh-constructors' into lroberts36/…
lroberts36 Jun 10, 2024
7ae50f6
Add latex documentation
lroberts36 Jun 10, 2024
bd7b6c3
maybe link the notes
lroberts36 Jun 10, 2024
832bf0e
comment
lroberts36 Jun 11, 2024
cfaa525
Remove unused parameters
lroberts36 Jun 11, 2024
f96f661
remove printfs
lroberts36 Jun 11, 2024
2806f9b
format
lroberts36 Jun 11, 2024
370dd6f
update notes
lroberts36 Jun 11, 2024
ee235a9
Merge branch 'develop' into lroberts36/add-forest-orientation-2
lroberts36 Jun 12, 2024
12af9ec
Merge branch 'develop' into lroberts36/add-forest-orientation-2
lroberts36 Jun 12, 2024
e8670b6
Merge branch 'develop' into lroberts36/add-forest-orientation-2
lroberts36 Jun 18, 2024
ce0ccbd
format
lroberts36 Jun 18, 2024
492697c
Merge branch 'develop' into lroberts36/add-forest-orientation-2
lroberts36 Jun 18, 2024
6738291
Merge branch 'develop' into lroberts36/add-forest-orientation-2
lroberts36 Jun 25, 2024
95d526b
Merge branch 'develop' into lroberts36/add-forest-orientation-2
lroberts36 Jun 26, 2024
145a44d
remove possibility of dereferencing unset optional
lroberts36 Jun 27, 2024
fa51a6d
Merge branch 'develop' into lroberts36/add-forest-orientation-2
lroberts36 Jul 2, 2024
5ef0822
defaulted function declarations
lroberts36 Jul 3, 2024
6457021
remove warning
lroberts36 Jul 3, 2024
47e27b6
remove unused
lroberts36 Jul 3, 2024
292cfd2
Merge branch 'develop' into lroberts36/add-forest-orientation-2
lroberts36 Jul 8, 2024
d241d65
Point to new gold files
lroberts36 Jul 8, 2024
d2d73d7
clean up the boundary exchange example
lroberts36 Jul 8, 2024
40fa0bc
update hash
lroberts36 Jul 8, 2024
9cf8717
format
lroberts36 Jul 8, 2024
c1316b0
fix mpi tag bug for non-trivial orientations
lroberts36 Jul 9, 2024
1398a5c
set the correct defaults
lroberts36 Jul 9, 2024
a2c89bf
fix initialization
lroberts36 Jul 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Current develop

### Added (new features/APIs/variables/...)
- [[PR 1047]](https://github.com/parthenon-hpc-lab/parthenon/pull/1047) General three- and four-valent 2D forests w/ arbitrary orientations.
- [[PR 1100]](https://github.com/parthenon-hpc-lab/parthenon/pull/1100) Custom refinement ops propagated to fluxes
- [[PR 1090]](https://github.com/parthenon-hpc-lab/parthenon/pull/1090) SMR with swarms
- [[PR 1079]](https://github.com/parthenon-hpc-lab/parthenon/pull/1079) Address XDMF/Visit Issues
Expand Down
Binary file added MG_grid_hierarchy.pdf
Binary file not shown.
Binary file added convergence.pdf
Binary file not shown.
Binary file added doc/latex/MG_grid_hierarchy.pdf
Binary file not shown.
Binary file added doc/latex/convergence.pdf
Binary file not shown.
37 changes: 37 additions & 0 deletions doc/latex/coordinate_transform.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
\begin{tikzpicture}
\begin{axis}[grid=both,
ymin=0,
ymax=4.5,
xmax=4.5,
xmin=0,
xticklabel=\empty,
yticklabel=\empty,
minor tick num=1,
axis lines = middle,
xlabel=$x_1$,
ylabel=$x_2$,
label style = {at={(ticklabel cs:1.1)}},
axis equal=true, width=6cm, height=6cm]

\coordinate (t1ll) at (1, 1);
\pic at (t1ll) {ig_tree={t1, $\Omega_1$}};
\pic at (t1ll) {ig_tree_region={{0.8, 0.8}, {1.0, 1.0}, green}};

\coordinate (t2ll) at (3, 1);
\pic at (t2ll) {ig_tree={t2, $\Omega_2$}};
\pic at (t2ll) {ig_tree_region={{-0.2, 0.8}, {0.0, 1.0}, green}};

\coordinate (t3ll) at (3, 3);
\pic at (t3ll) {ig_tree={t3, $\Omega_3$}};
\pic at (t3ll) {ig_tree_region={{-0.2, -0.2}, {0.0, 0.0}, green}};

\path[thick, ->] ([shift={(0.9, 0.85)}]t1ll) edge[bend right] node [below]
{$\tau_{1 \rightarrow 2}$} ([shift={(-0.15, 0.85)}]t2ll);

\path[thick, ->] ([shift={(-0.05, 0.95)}]t2ll) edge[bend right] node [right]
{$\tau_{2 \rightarrow 3}$} ([shift={(-0.05, -0.15)}]t3ll);

\path[thick, ->] ([shift={(0.9, 0.95)}]t1ll) edge node [left]
{$\tau_{1 \rightarrow 3}$} ([shift={(-0.15, -0.05)}]t3ll);
\end{axis}
\end{tikzpicture}
28 changes: 28 additions & 0 deletions doc/latex/indexed_cube.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
\begin{tikzpicture}
\newcommand{\Depth}{2}
\newcommand{\Height}{2}
\newcommand{\Width}{2}
\coordinate (O) at (0,0,0);
\coordinate (A) at (0,\Width,0);
\coordinate (B) at (0,\Width,\Height);
\coordinate (C) at (0,0,\Height);
\coordinate (D) at (\Depth,0,0);
\coordinate (E) at (\Depth,\Width,0);
\coordinate (F) at (\Depth,\Width,\Height);
\coordinate (G) at (\Depth,0,\Height);

\draw[black] (O) node [left]{2} -- (C) node [left]{0} -- (G) node [right]{1} -- (D) node [right]{3} -- cycle;% Bottom Face
\draw[black] (O) -- (A) -- (E) -- (D) -- cycle;% Back Face
\draw[black] (O) -- (A) -- (B) -- (C) -- cycle;% Left Face
\draw[black] (D) -- (E) -- (F) -- (G) -- cycle;% Right Face
\draw[black] (C) -- (B) -- (F) -- (G) -- cycle;% Front Face
\draw[black] (A) node [left]{6} -- (B) node [left]{4} -- (F) node [right]{5}-- (E) node [right]{7} -- cycle;% Top Face

\path[->] ([shift={(0,0,0)}]C) edge node [below] {$x_1$} ([shift={(-1.0, 0, 0)}]G);
\path[->] ([shift={(0,0,0)}]C) edge node [right] {$x_2$} ([shift={(0, 0, 1.0)}]O);
\path[->] ([shift={(0,0,0)}]C) edge node [left] {$x_3$} ([shift={(0, -1.0, 0)}]B);
%\draw[blue, fill=black] (1.0, 2.0, 1.0) circle (0.05) node[above] {$(0, 0, 1)$};
%\draw[blue, fill=black] (1.0, 0.0, 1.0) circle (0.05) node[below] {$(0, 0, -1)$};
%\draw[blue, fill=black] (2.0, 1.0, 1.0) circle (0.05) node[right] {$(1, 0, 0)$};
%\draw[blue, fill=black] (0.0, 1.0, 1.0) circle (0.05) node[left] {$(-1, 0, 0)$};
\end{tikzpicture}
Binary file added doc/latex/main.pdf
Binary file not shown.
363 changes: 363 additions & 0 deletions doc/latex/main.tex

Large diffs are not rendered by default.

68 changes: 68 additions & 0 deletions doc/latex/mesh_overview.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
\begin{tikzpicture}[line/.style={red, very thick}]
\coordinate (m2) (10.0, 0.0);

\coordinate (n1) at (0,0);
\coordinate (n2) at (5,0);
\coordinate (n3) at (2.5,4);
\coordinate (n4) at (2.5,1.5);

\fill[fill=red!5] (n1) to[out=-10,in=190] (n2) to[out=140,in=-35] (n3) to[out=-135,in=80] cycle;
\shade[ball color=blue!10!white,opacity=0.20] (n1) to[out=-10,in=190] (n2) to[out=140,in=-35] (n3) to[out=-135,in=80] cycle;

\draw[line] (n1) to[out=-10,in=190] coordinate[pos=.45] (m12) (n2);
\draw[line] (n2) to[out=140,in=-35] coordinate[pos=.6] (m23) (n3);
\draw[line] (n3) to[out=-135,in=80] coordinate[pos=.5] (m31) (n1);

\draw[line] (n4) to[out=-85,in=85] (m12);
\draw[line] (n4) to[out=45,in=225] (m23);
\draw[line] (n4) to[out=140,in=-45] (m31);

\node (m1) at ($0.25*(n1) + 0.25*(m12) + 0.25*(n4) + 0.25*(m31)$) {$\mathcal{M}_1$};
\node (m2) at ($0.25*(m12) + 0.25*(n2) + 0.25*(m23) + 0.25*(n4)$) {$\mathcal{M}_2$};
\node (m3) at ($0.25*(n4) + 0.25*(m23) + 0.25*(n3) + 0.25*(m31)$) {$\mathcal{M}_3$};

\begin{axis}[grid=both,
ymin=0,
ymax=5.5,
xmax=5.5,
xmin=0,
xticklabel=\empty,
yticklabel=\empty,
minor tick num=1,
axis lines = middle,
xlabel=$x_1$,
ylabel=$x_2$,
label style = {at={(ticklabel cs:1.1)}},
axis equal=true,
at={(6cm, 0)},
width=6.0cm, height=6.0cm]

\coordinate (t1ll) at (1, 1);
\pic at (t1ll) {ig_tree={t1, $\Omega_1$}};

\coordinate (t2ll) at (4, 1);
\pic at (t2ll) {ig_tree={t2, $\Omega_2$}};

\coordinate (t3ll) at (1, 4);
\pic at (t3ll) {ig_tree={t3, $\Omega_3$}};

\path[thick, ->, black!40] ([shift={(0.9,0.4)}]t1ll) edge[bend right]
node [above] {$\tau_{1 \rightarrow 2}$} ([shift={(-0.1,0.4)}]t2ll);
\path[thick, ->, black!40] ([shift={(0.1,0.6)}]t2ll) edge[bend right]
node [above] {$\tau_{2 \rightarrow 1}$} ([shift={(1.1,0.6)}]t1ll);

\path[thick, ->, black!40] ([shift={(0.6,0.9)}]t2ll) edge[bend right]
node [right] {$\tau_{2 \rightarrow 3}$} ([shift={(1.1,0.6)}]t3ll);
\path[thick, ->, black!40] ([shift={(0.9,0.4)}]t3ll) edge[bend right]
node [right] {$\tau_{3 \rightarrow 2}$} ([shift={(0.4, 1.1)}]t2ll);

\path[thick, ->, black!40] ([shift={(0.4,0.1)}]t3ll) edge[bend right]
node [] {$\tau_{3 \rightarrow 1}$} ([shift={(0.4, 1.1)}]t1ll);
\path[thick, ->, black!40] ([shift={(0.6,0.9)}]t1ll) edge[bend right]
node [] {$\tau_{1 \rightarrow 3}$} ([shift={(0.6, -0.1)}]t3ll);
\end{axis}

\path[thick, ->] (m1.south) edge[bend right = 60] node [below] {$g_1^{-1}$} (t1.south);
\path[thick, ->] (m2.south) edge[bend right = 50] node [below] {$g_2^{-1}$} (t2.south);
\path[thick, ->] (m3.north) edge[bend left] node [above] {$g_3^{-1}$} (t3.west);
\end{tikzpicture}
51 changes: 51 additions & 0 deletions doc/latex/node_valence.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
\begin{tikzpicture}
\coordinate (v3) at (3, 0);
\draw[thick] (v3) -- ([shift={(0, 1)}]v3) -- ([shift={(1, 1)}]v3) -- ([shift={(1, 0)}]v3) -- cycle;
\draw[thick] ([shift={(0, 1)}]v3) -- ([shift={(1, 1)}]v3) -- ([shift={(2, 2)}]v3) -- ([shift={(0, 2)}]v3) -- cycle;
\draw[thick] ([shift={(1, 0)}]v3) -- ([shift={(2, 0)}]v3) -- ([shift={(2, 2)}]v3) -- ([shift={(1, 1)}]v3) -- cycle;
\draw[blue, fill=blue] ([shift={(1, 1)}]v3) circle (0.05);
\draw[red] ([shift={(1, 1)}]v3) circle (0.2) node[shift={(-0.25, -0.25)}] {$n_3$};

\coordinate (v4) at (6, 0);
\draw[thick] (v4) -- ([shift={(0, 1)}]v4) -- ([shift={(1, 1)}]v4) -- ([shift={(1, 0)}]v4) -- cycle;
\draw[thick] ([shift={(0, 1)}]v4) -- ([shift={(1, 1)}]v4) -- ([shift={(1, 2)}]v4) -- ([shift={(0, 2)}]v4) -- cycle;
\draw[thick] ([shift={(1, 0)}]v4) -- ([shift={(2, 0)}]v4) -- ([shift={(2, 1)}]v4) -- ([shift={(1, 1)}]v4) -- cycle;
\draw[thick] ([shift={(1, 1)}]v4) -- ([shift={(2, 1)}]v4) -- ([shift={(2, 2)}]v4) -- ([shift={(1, 2)}]v4) -- cycle;
\draw[blue, fill=blue] ([shift={(1, 1)}]v4) circle (0.05);
\draw[black] ([shift={(1, 1)}]v4) circle (0.2) node[shift={(-0.25, -0.25)}] {$n_4$};

\coordinate (v5) at (9, 0);
\draw[thick] (v5) -- ([shift={(0, 1)}]v5) -- ([shift={(1, 1)}]v5) -- ([shift={(1, 0)}]v5) -- cycle;
\draw[thick] ([shift={(0, 1)}]v5) -- ([shift={(1, 1)}]v5) -- ([shift={(1, 2)}]v5) -- ([shift={(0, 2)}]v5) -- cycle;
\draw[thick] ([shift={(1, 0)}]v5) -- ([shift={(2, 0)}]v5) -- ([shift={(2, 1)}]v5) -- ([shift={(1, 1)}]v5) -- cycle;
\draw[thick] ([shift={(1, 1)}]v5) -- ([shift={(2, 1)}]v5) -- ([shift={(2.5, 1.5)}]v5) -- ([shift={(1.75, 1.75)}]v5) -- cycle;
\draw[thick] ([shift={(1, 1)}]v5) -- ([shift={(1, 2)}]v5) -- ([shift={(1.5, 2.5)}]v5) -- ([shift={(1.75, 1.75)}]v5) -- cycle;
\draw[blue, fill=blue] ([shift={(1, 1)}]v5) circle (0.05);
\draw[red] ([shift={(1, 1)}]v5) circle (0.2) node[shift={(-0.25, -0.25)}] {$n_5$};

\coordinate (v1edge) at (0, -3);
\draw[thick] (v1edge) -- ([shift={(0, 1)}]v1edge) [red]-- ([shift={(1, 1)}]v1edge) [red]-- ([shift={(1, 0)}]v1edge) [black]-- cycle;
\draw[blue, fill=blue] ([shift={(1, 1)}]v1edge) circle (0.05);
\draw[black] ([shift={(1, 1)}]v1edge) circle (0.2) node[shift={(-0.25, -0.25)}] {$n_{2b}$};

\coordinate (v2edge) at (3, -3);
\draw[thick] (v2edge) -- ([shift={(0, 1)}]v2edge) [red]-- ([shift={(1, 1)}]v2edge) [black]-- ([shift={(1, 0)}]v2edge) -- cycle;
\draw[thick] ([shift={(0, 1)}]v2edge) -- ([shift={(1, 1)}]v2edge) [red]-- ([shift={(1, 2)}]v2edge) [black]-- ([shift={(0, 2)}]v2edge) -- cycle;
\draw[blue, fill=blue] ([shift={(1, 1)}]v2edge) circle (0.05);
\draw[black] ([shift={(1, 1)}]v2edge) circle (0.2) node[shift={(-0.25, -0.25)}] {$n_{3b}$};

\coordinate (v3edge) at (6, -3);
\draw[thick] (v3edge) -- ([shift={(0, 1)}]v3edge) [red]-- ([shift={(1, 1)}]v3edge) [black]-- ([shift={(1, 0)}]v3edge) -- cycle;
\draw[thick] ([shift={(0, 1)}]v3edge) -- ([shift={(1, 1)}]v3edge) [red]-- ([shift={(1, 2)}]v3edge) [black]-- ([shift={(0, 2)}]v3edge) -- cycle;
\draw[thick] ([shift={(1, 0)}]v3edge) -- ([shift={(2, 0)}]v3edge) -- ([shift={(2, 1)}]v3edge) [red]-- ([shift={(1, 1)}]v3edge) [black]-- cycle;
\draw[blue, fill=blue] ([shift={(1, 1)}]v3edge) circle (0.05);
\draw[black] ([shift={(1, 1)}]v3edge) circle (0.2) node[shift={(-0.25, -0.25)}] {$n_{4b}$};

\coordinate (v4edge) at (9, -3);
\draw[thick] (v4edge) -- ([shift={(0, 1)}]v4edge) -- ([shift={(1, 1)}]v4edge) -- ([shift={(1, 0)}]v4edge) -- cycle;
\draw[thick] ([shift={(0, 1)}]v4edge) -- ([shift={(1, 1)}]v4edge) [red]-- ([shift={(0.9, 2)}]v4edge) [black]-- ([shift={(0, 2)}]v4edge) -- cycle;
\draw[thick] ([shift={(1, 0)}]v4edge) -- ([shift={(2, 0)}]v4edge) -- ([shift={(2, 1)}]v4edge) -- ([shift={(1, 1)}]v4edge) -- cycle;
\draw[thick] ([shift={(1, 1)}]v4edge) -- ([shift={(2, 1)}]v4edge) -- ([shift={(2, 2)}]v4edge) -- ([shift={(1.1, 2)}]v4edge) [red]-- cycle;
\draw[blue, fill=blue] ([shift={(1, 1)}]v4edge) circle (0.05);
\draw[black] ([shift={(1, 1)}]v4edge) circle (0.2) node[shift={(-0.25, -0.25)}] {$n_{5b}$};
\end{tikzpicture}
41 changes: 41 additions & 0 deletions doc/latex/offset_cube.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
\begin{tikzpicture}
\newcommand{\Depth}{2}
\newcommand{\Height}{2}
\newcommand{\Width}{2}
\coordinate (O) at (0,0,0);
\coordinate (A) at (0,\Width,0);
\coordinate (B) at (0,\Width,\Height);
\coordinate (C) at (0,0,\Height);
\coordinate (D) at (\Depth,0,0);
\coordinate (E) at (\Depth,\Width,0);
\coordinate (F) at (\Depth,\Width,\Height);
\coordinate (G) at (\Depth,0,\Height);

\draw[black] (O) node [left]{} -- (C) node [left]{} -- (G) node [right]{} -- (D) node [right]{} -- cycle;% Bottom Face
\draw[black] (O) -- (A) -- (E) -- (D) -- cycle;% Back Face
\draw[black] (O) -- (A) -- (B) -- (C) -- cycle;% Left Face
\draw[black] (D) -- (E) -- (F) -- (G) -- cycle;% Right Face
\draw[black] (C) -- (B) -- (F) -- (G) -- cycle;% Front Face
\draw[black] (A) node [left]{} -- (B) node [left]{} -- (F) node [right]{}-- (E) node [right]{} -- cycle;% Top Face

\draw[blue, fill=blue] (1.0, 2.0, 1.0) circle (0.05) node[above] {$(0, 0, 1)$};
\draw[blue, fill=blue] (1.0, 0.0, 1.0) circle (0.05) node[below] {$(0, 0, -1)$};
\draw[blue, fill=blue] (2.0, 1.0, 1.0) circle (0.05) node[right] {$(1, 0, 0)$};
\draw[blue, fill=blue] (0.0, 1.0, 1.0) circle (0.05) node[left] {$(-1, 0, 0)$};
%\draw[blue, fill=black] (1.0, 1.0, 2.0) circle (0.05) node[right] {$(0, 1, 0)$};
%\draw[blue, fill=black] (1.0, 1.0, 0.0) circle (0.05) node[left] {$(0, -1, 0)$};

\draw[green, fill=green] (1.0, 2.0, 2.0) circle (0.05) node[above] {$(0, -1, 1)$};
\draw[green, fill=green] (1.0, 0.0, 2.0) circle (0.05) node[below] {$(0, -1, -1)$};
\draw[green, fill=green] (2.0, 1.0, 2.0) circle (0.05) node[right] {$(1, -1, 0)$};
\draw[green, fill=green] (0.0, 1.0, 2.0) circle (0.05) node[left] {$(-1, -1, 0)$};

\draw[red, fill=red] (2.0, 2.0, 0.0) circle (0.05) node[above] {$(1, 1, 1)$};
\draw[red, fill=red] (2.0, 0.0, 0.0) circle (0.05) node[below] {$(1, 1, -1)$};
\draw[red, fill=red] (0.0, 2.0, 0.0) circle (0.05) node[left] {$(-1, 1, 1)$};
\draw[red, fill=red] (0.0, 0.0, 0.0) circle (0.05) node[left] {$(-1, 1, -1)$};

\path[->] ([shift={(0,0,0)}]C) edge node [below] {$x_1$} ([shift={(-1.0, 0, 0)}]G);
\path[->] ([shift={(0,0,0)}]C) edge node [right] {$x_2$} ([shift={(0, 0, 1.0)}]O);
\path[->] ([shift={(0,0,0)}]C) edge node [left] {$x_3$} ([shift={(0, -1.0, 0)}]B);
\end{tikzpicture}
Loading
Loading