26 #include "libmesh/libmesh_common.h" 27 #include "libmesh/fe.h" 28 #include "libmesh/quadrature.h" 29 #include "libmesh/elem.h" 30 #include "libmesh/libmesh_logging.h" 44 const std::vector<Point> *
const,
45 const std::vector<Real> *
const)
47 libmesh_error_msg(
"ERROR: This method only makes sense for 2D/3D elements!");
57 const std::vector<Point> *
const,
58 const std::vector<Real> *
const)
60 libmesh_error_msg(
"ERROR: This method only makes sense for 2D/3D elements!");
66 template <
unsigned int Dim>
70 const std::vector<Point> *
const pts,
71 const std::vector<Real> *
const weights)
76 libmesh_assert_not_equal_to (Dim, 1);
83 unsigned int side_p_level = elem->
p_level();
93 this->shapes_on_quadrature =
false;
97 this->_elem_type = elem->
type();
100 this->_fe_map->template init_face_shape_functions<Dim>(*pts, side.get());
101 if (weights !=
nullptr)
103 this->compute_face_values (elem, side.get(), *weights);
107 std::vector<Real> dummy_weights (pts->size(), 1.);
109 this->compute_face_values (elem, side.get(), dummy_weights);
115 this->qrule->init(*side, side_p_level);
120 this->_elem_type = elem->
type();
123 this->_fe_map->template init_face_shape_functions<Dim>(this->qrule->get_points(), side.get());
127 this->shapes_on_quadrature =
false;
129 this->compute_face_values (elem, side.get(), this->qrule->get_weights());
135 template <
unsigned int Dim>
138 const std::vector<Real> & qw)
143 LOG_SCOPE(
"compute_face_values()",
"FEXYZ");
146 const std::size_t n_qp = qw.size();
150 const unsigned int n_approx_shape_functions =
151 this->n_dofs(elem, this->get_order());
154 this->phi.resize (n_approx_shape_functions);
155 this->dphi.resize (n_approx_shape_functions);
156 this->dphidx.resize (n_approx_shape_functions);
157 this->dphidy.resize (n_approx_shape_functions);
158 this->dphidz.resize (n_approx_shape_functions);
160 for (
unsigned int i=0; i<n_approx_shape_functions; i++)
162 this->phi[i].resize (n_qp);
163 this->dphi[i].resize (n_qp);
164 this->dphidx[i].resize (n_qp);
165 this->dphidy[i].resize (n_qp);
166 this->dphidz[i].resize (n_qp);
169 this->_fe_map->compute_face_map(this->
dim, qw, side);
171 const std::vector<libMesh::Point> & xyz = this->_fe_map->get_xyz();
181 for (
unsigned int i=0; i<n_approx_shape_functions; i++)
182 for (std::size_t p=0; p<n_qp; p++)
186 this->dphi[i][p](0) =
189 this->dphi[i][p](1) =
193 this->dphi[i][p](2) =
195 this->dphidz[i][p] = 0.;
206 for (
unsigned int i=0; i<n_approx_shape_functions; i++)
207 for (std::size_t p=0; p<n_qp; p++)
211 this->dphi[i][p](0) =
214 this->dphi[i][p](1) =
217 this->dphi[i][p](2) =
226 libmesh_error_msg(
"Invalid dim " << this->
dim);
static OutputShape shape(const ElemType t, const Order o, const unsigned int i, const Point &p)
void compute_face_values(const Elem *elem, const Elem *side, const std::vector< Real > &weights)
Compute the map & shape functions for this face.
virtual std::unique_ptr< Elem > build_side_ptr(const unsigned int i)=0
This is the base class from which all geometric element types are derived.
unsigned int p_level() const
The libMesh namespace provides an interface to certain functionality in the library.
A specific instantiation of the FEBase class.
const Elem * neighbor_ptr(unsigned int i) const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual ElemType type() const =0
virtual void reinit(const Elem *elem, const std::vector< Point > *const pts=nullptr, const std::vector< Real > *const weights=nullptr) override
Explicitly call base class method.