Skip to content
Snippets Groups Projects
Commit 9eac7877 authored by Elias Pipping's avatar Elias Pipping
Browse files

[Algorit] Grid: Start from a single cell again

parent 6edb4492
No related branches found
No related tags found
No related merge requests found
......@@ -48,24 +48,7 @@ template <class Grid> GridConstructor<Grid>::GridConstructor() {
auto const &B = MyGeometry::B;
auto const &C = MyGeometry::C;
auto const AB = midPoint(A, B);
auto const AC = midPoint(A, C);
auto const BC = midPoint(B, C);
auto const AAB = midPoint(A, AB);
auto const ABB = midPoint(AB, B);
auto const AAC = midPoint(A, AC);
auto const ACC = midPoint(AC, C);
auto const BBC = midPoint(B, BC);
auto const BCC = midPoint(BC, C);
auto const ABAC = midPoint(AB, AC);
auto const ABBC = midPoint(AB, BC);
auto const ACBC = midPoint(AC, BC);
unsigned int const vc = 15;
unsigned int const vc = 3;
#if MY_DIM == 3
Dune::FieldMatrix<double, 2 * vc, MY_DIM> vertices;
......@@ -81,19 +64,7 @@ template <class Grid> GridConstructor<Grid>::GridConstructor() {
size_t k = 0;
for (size_t j = 1; j <= numXYplanes; ++j) {
vertices[k++][i] = A[i];
vertices[k++][i] = AAB[i];
vertices[k++][i] = AB[i];
vertices[k++][i] = ABB[i];
vertices[k++][i] = B[i];
vertices[k++][i] = AAC[i];
vertices[k++][i] = ABAC[i];
vertices[k++][i] = ABBC[i];
vertices[k++][i] = BBC[i];
vertices[k++][i] = AC[i];
vertices[k++][i] = ACBC[i];
vertices[k++][i] = BC[i];
vertices[k++][i] = ACC[i];
vertices[k++][i] = BCC[i];
vertices[k++][i] = C[i];
assert(k == j * vc);
}
......@@ -121,28 +92,7 @@ template <class Grid> GridConstructor<Grid>::GridConstructor() {
#else
SimplexManager sm;
#endif
// bottom row
sm.addFromVerticesFFB(1, 5, 0);
sm.addFromVerticesFFB(2, 6, 1);
sm.addFromVerticesFFB(3, 7, 2);
sm.addFromVerticesFFB(4, 8, 3);
sm.addFromVerticesFBB(6, 5, 1);
sm.addFromVerticesFBB(7, 6, 2);
sm.addFromVerticesFBB(8, 7, 3);
// the wheel
sm.addFromVerticesFBB(10, 9, 6);
sm.addFromVerticesFBB(10, 12, 9);
sm.addFromVerticesFBB(10, 13, 12);
sm.addFromVerticesFBB(10, 11, 13);
sm.addFromVerticesFBB(10, 7, 11);
sm.addFromVerticesFBB(10, 6, 7);
// the three surrounders
sm.addFromVerticesFBB(6, 9, 5);
sm.addFromVerticesFBB(11, 7, 8);
sm.addFromVerticesFBB(12, 13, 14);
sm.addFromVerticesFFB(1, 2, 0);
auto const &simplices = sm.getSimplices();
// sanity-check choices of simplices
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment