30 #include "libmesh/elem.h" 36 _intersection (intersection) {
50 const std::vector<libMesh::Point>* pts) {
87 for (
unsigned int i=1; i != nv; ++i)
100 std::unique_ptr<libMesh::QBase>
101 subcell_qrule(fe_type.default_quadrature_rule
110 linear_fetype(libMesh::FIRST, libMesh::LAGRANGE);
111 std::unique_ptr<libMesh::FEBase>
112 local_fe (libMesh::FEBase::build(q_elem->dim(), linear_fetype).release()),
113 subcell_fe(libMesh::FEBase::build(q_elem->dim(), linear_fetype).release());
122 subcell_fe->get_JxW();
125 _fe = libMesh::FEBase::build(q_elem->dim(), fe_type).release();
133 _fe->get_dphidzeta();
141 std::vector<libMesh::Node*>
142 local_nodes(q_elem->n_nodes(),
nullptr);
144 std::unique_ptr<libMesh::Elem>
145 local_coord_elem(libMesh::Elem::build(q_elem->type()).release());
146 local_coord_elem->set_id(q_elem->id());
157 for (
unsigned int i=0; i<q_elem->n_nodes(); i++) {
159 *n = q_elem->node_ptr(i);
162 local_nodes[i] =
new libMesh::Node(p);
165 local_nodes[i]->set_id(n->id());
166 local_coord_elem->set_node(i) = local_nodes[i];
170 local_fe->attach_quadrature_rule(subcell_qrule.get());
171 local_fe->reinit(local_coord_elem.get());
178 _fe->reinit(ref_elem, &local_fe->get_xyz());
183 subcell_fe->attach_quadrature_rule(subcell_qrule.get());
184 subcell_fe->reinit(q_elem);
192 const std::vector<libMesh::Point>
193 &local_xyz =
_fe->get_xyz();
196 n = (
unsigned int) local_xyz.size();
199 for (
unsigned int i=0; i<n; i++)
206 for (
unsigned int i=0; i<q_elem->n_nodes(); i++)
207 delete local_nodes[i];
217 bool if_calculate_dphi) {
265 for (
unsigned int i=1; i != nv; ++i)
270 std::unique_ptr<libMesh::QBase>
271 subcell_qrule(fe_type.default_quadrature_rule
281 linear_fetype(libMesh::FIRST, libMesh::LAGRANGE);
283 std::unique_ptr<libMesh::FEBase>
284 local_fe (libMesh::FEBase::build(q_elem->dim(), linear_fetype).release()),
285 subcell_fe(libMesh::FEBase::build(q_elem->dim(), linear_fetype).release());
294 subcell_fe->get_JxW();
295 subcell_fe->get_normals();
297 _fe = libMesh::FEBase::build(q_elem->dim(), fe_type).release();
301 if (if_calculate_dphi)
308 std::vector<libMesh::Node*>
309 local_nodes(q_elem->n_nodes(),
nullptr);
311 std::unique_ptr<libMesh::Elem>
312 local_coord_elem(libMesh::Elem::build(q_elem->type()).release());
313 local_coord_elem->set_id(q_elem->id());
315 for (
unsigned int i=0; i<q_elem->n_nodes(); i++) {
318 *n = q_elem->node_ptr(i);
321 local_nodes[i] =
new libMesh::Node(p);
324 local_nodes[i]->set_id(n->id());
325 local_coord_elem->set_node(i) = local_nodes[i];
329 local_fe->attach_quadrature_rule(subcell_qrule.get());
330 local_fe->reinit(local_coord_elem.get(), s);
336 _fe->reinit(ref_elem, &local_fe->get_xyz());
341 subcell_fe->attach_quadrature_rule(subcell_qrule.get());
343 subcell_fe->reinit(q_elem, s);
350 unsigned int npts = subcell_qrule->n_points();
360 const std::vector<libMesh::Point>
361 &local_xyz =
_fe->get_xyz();
364 n = (
unsigned int) local_xyz.size();
368 for (
unsigned int i=0; i<n; i++) {
380 for (
unsigned int i=0; i<q_elem->n_nodes(); i++)
381 delete local_nodes[i];
403 const std::vector<libMesh::Point>&
bool use_local_elem() const
Vector and matrix quantities defined on one- and two-dimensional elements that are oriented in two or...
MAST::NonlinearSystem & system()
std::vector< libMesh::Point > _global_normals
std::vector< Real > _subcell_JxW
virtual const std::vector< Real > & get_JxW() const
const MAST::LevelSetIntersection & _intersection
bool _init_second_order_derivatives
SubCellFE(const MAST::SystemInitialization &sys, const MAST::LevelSetIntersection &intersection)
virtual const std::vector< libMesh::Point > & get_qpoints() const
const libMesh::Point & get_nondimensional_coordinate_for_node(const libMesh::Node &n) const
unsigned int n_vars() const
std::vector< libMesh::Point > _local_normals
std::vector< libMesh::Point > _qpoints
bool if_intersection_through_elem() const
virtual const libMesh::Elem & get_reference_elem() const
virtual void init_for_side(const MAST::GeomElem &elem, unsigned int s, bool if_calculate_dphi)
Initializes the quadrature and finite element for element side integration.
const libMesh::FEType & fetype(unsigned int i) const
const MAST::SystemInitialization & _sys
virtual const libMesh::Elem & get_reference_local_elem() const
virtual const std::vector< Real > & get_JxW() const
virtual const std::vector< libMesh::Point > & get_qpoints() const
std::vector< libMesh::Point > _global_xyz
void transform_point_to_global_coordinate(const libMesh::Point &local_pt, libMesh::Point &global_pt) const
This class acts as a wrapper around libMesh::Elem for the purpose of providing a uniform interface fo...
virtual void init(const MAST::GeomElem &elem, bool init_grads, const std::vector< libMesh::Point > *pts=nullptr)
Initializes the quadrature and finite element for element volume integration.
virtual void init(const MAST::GeomElem &elem, bool init_grads, const std::vector< libMesh::Point > *pts=nullptr)
This assumes that elem is the sub-cell and that the original element will be available as the parent ...
virtual const libMesh::Elem & get_quadrature_elem() const
virtual const libMesh::Elem & get_quadrature_local_elem() const
void transform_vector_to_global_coordinate(const libMesh::Point &local_vec, libMesh::Point &global_vec) const
const MAST::GeomElem * _elem
virtual void init_for_side(const MAST::GeomElem &elem, unsigned int s, bool if_calculate_dphi)
This assumes that elem is the sub-cell and that the original element will be available as the parent ...
unsigned int _extra_quadrature_order