37 libmesh_error_msg(
"XYZ polynomials require the element \n because the centroid is needed.");
45 const Order libmesh_dbg_var(order),
47 const Point & point_in)
50 libmesh_assert_less_equal (i, order + elem->
p_level());
53 Real max_distance = 0.;
54 for (
unsigned int p = 0; p < elem->
n_nodes(); p++)
57 max_distance =
std::max(distance, max_distance);
60 const Real x = point_in(0);
61 const Real xc = centroid(0);
62 const Real dx = (x - xc)/max_distance;
84 for (
unsigned int index = 0; index != i; ++index)
99 libmesh_error_msg(
"XYZ polynomials require the element \nbecause the centroid is needed.");
107 const Order libmesh_dbg_var(order),
108 const unsigned int i,
109 const unsigned int libmesh_dbg_var(j),
110 const Point & point_in)
112 libmesh_assert(elem);
113 libmesh_assert_less_equal (i, order + elem->
p_level());
117 libmesh_assert_equal_to (j, 0);
120 Real max_distance = 0.;
121 for (
unsigned int p = 0; p < elem->
n_nodes(); p++)
124 max_distance =
std::max(distance, max_distance);
127 const Real x = point_in(0);
128 const Real xc = centroid(0);
129 const Real dx = (x - xc)/max_distance;
141 return 2.*dx/max_distance;
144 return 3.*dx*dx/max_distance;
147 return 4.*dx*dx*dx/max_distance;
151 for (
unsigned int index = 1; index != i; ++index)
153 return val/max_distance;
166 libmesh_error_msg(
"XYZ polynomials require the element \nbecause the centroid is needed.");
174 const Order libmesh_dbg_var(order),
175 const unsigned int i,
176 const unsigned int libmesh_dbg_var(j),
177 const Point & point_in)
179 libmesh_assert(elem);
180 libmesh_assert_less_equal (i, order + elem->
p_level());
184 libmesh_assert_equal_to (j, 0);
187 Real max_distance = 0.;
188 for (
unsigned int p = 0; p < elem->
n_nodes(); p++)
191 max_distance =
std::max(distance, max_distance);
194 const Real x = point_in(0);
195 const Real xc = centroid(0);
196 const Real dx = (x - xc)/max_distance;
197 const Real dist2 =
pow(max_distance,2.);
213 return 12.*dx*dx/dist2;
217 for (
unsigned int index = 2; index != i; ++index)
218 val *= (index+1) * dx;
static OutputShape shape(const ElemType t, const Order o, const unsigned int i, const Point &p)
The base class for all geometric element types.
static OutputShape shape_deriv(const ElemType t, const Order o, const unsigned int i, const unsigned int j, const Point &p)
unsigned int p_level() const
long double max(long double a, double b)
virtual unsigned int n_nodes() const =0
double pow(double a, int b)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
A geometric point in (x,y,z) space.
const Point & point(const unsigned int i) const
virtual Point centroid() const
static OutputShape shape_second_deriv(const ElemType t, const Order o, const unsigned int i, const unsigned int j, const Point &p)