19#include "libmesh/face.h"
20#include "libmesh/int_range.h"
21#include "libmesh/point.h"
27#include "libmesh/enforce_ieee754.h"
40 Point weighted_cc_sum;
47 const Point a = p1-p0;
51 const Real area = sqrt(norm2_axb)/2;
53 const Point cc_minus_p0 = ((a.
norm_sq() *
b -
b.norm_sq() * a).cross(axb)) / 2 / norm2_axb;
55 weighted_cc_sum += area*cc_minus_p0;
59 weighted_cc_sum /= total_area;
60 weighted_cc_sum += p0;
62 return weighted_cc_sum;
70#include "libmesh/restore_ieee754.h"
virtual unsigned int n_vertices() const =0
const Point & point(const unsigned int i) const
virtual Point quasicircumcenter() const override
A Point defines a location in LIBMESH_DIM dimensional Real space.
TypeVector< typename CompareTypes< T, T2 >::supertype > cross(const TypeVector< T2 > &v) const
The libMesh namespace provides an interface to certain functionality in the library.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
IntRange< T > make_range(T beg, T end)
The 2-parameter make_range() helper function returns an IntRange<T> when both input parameters are of...