Skip to content
Snippets Groups Projects
Forked from agnumpde / dune-tectonic
62 commits behind the upstream repository.
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