12#ifndef MFEM_MESH_EXTRAS
13#define MFEM_MESH_EXTRAS
61 real_t epsz_ = 0.3,
int smooth_ = 1)
63 epsz(epsz_), smooth(smooth_)
65 MFEM_VERIFY(
dim > 1,
"Kershaw transformation only works for 2D and 3D"
67 MFEM_VERIFY(smooth >= 1 && smooth <= 3,
68 "Kershaw parameter smooth must be in [1, 3]");
69 MFEM_VERIFY(epsy > 0 && epsy <=1,
70 "Kershaw parameter epsy must be in (0, 1].");
73 MFEM_VERIFY(epsz > 0 && epsz <=1,
74 "Kershaw parameter epsz must be in (0, 1].");
81 return (x <= 0.5) ? (2-eps) * x : 1 + eps*(x-1);
87 return 1-
right(eps,1-x);
94 if (x <= 0) {
return a; }
95 if (x >= 1) {
return b; }
96 if (smooth == 1) {
return a + (
b-
a) * (x); }
97 else if (smooth == 2) {
return a + (
b-
a) * (x*x*(3-2*x)); }
98 else {
return a + (
b-
a) * (x*x*x*(x*(6*x-15)+10)); }
Type
Constants for the classes derived from Element.
Class for integration point with weight.
Base class for vector Coefficients that optionally depend on time and space.
virtual void Eval(Vector &V, ElementTransformation &T, const IntegrationPoint &ip)=0
Evaluate the vector coefficient in the element described by T at the point ip, storing the result in ...
ElementMeshStream(Element::Type e)
void MergeMeshNodes(Mesh *mesh, int logging)
Merges vertices which lie at the same location.
void AttrToMarker(int max_attr, const Array< int > &attrs, Array< int > &marker)
Convert a set of attribute numbers to a marker array.