Forked from
agnumpde / dune-tectonic
62 commits behind the upstream repository.
-
Elias Pipping authored
(1) Determine distance from patch properly (also in general polygon cases) (2) Move refine() (3) Rewrite the logic of the patch (allow it to be a polygon)
Elias Pipping authored(1) Determine distance from patch properly (also in general polygon cases) (2) Move refine() (3) Rewrite the logic of the patch (allow it to be a polygon)
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
weakpatch.hh 693 B
#ifndef SRC_SAND_WEDGE_DATA_WEAKPATCH_HH
#define SRC_SAND_WEDGE_DATA_WEAKPATCH_HH
template <class LocalVector> ConvexPolyhedron<LocalVector> getWeakPatch() {
ConvexPolyhedron<LocalVector> weakPatch;
#if MY_DIM == 3
weakPatch.vertices.resize(4);
weakPatch.vertices[0] = weakPatch.vertices[2] = MyGeometry::X;
weakPatch.vertices[1] = weakPatch.vertices[3] = MyGeometry::Y;
for (size_t k = 0; k < 2; ++k) {
weakPatch.vertices[k][2] = -MyGeometry::depth / 2.0;
weakPatch.vertices[k + 2][2] = MyGeometry::depth / 2.0;
}
#else
weakPatch.vertices.resize(2);
weakPatch.vertices[0] = MyGeometry::X;
weakPatch.vertices[1] = MyGeometry::Y;
#endif
return weakPatch;
};
#endif