2341 LOG_SCOPE (
"project_edges",
"GenericProjector");
2345 for (
const auto & e_pair : range)
2347 const Elem & elem = *std::get<0>(e_pair.second);
2351 #ifdef LIBMESH_ENABLE_AMR 2352 if (
f.is_grid_projection() &&
2358 #endif // LIBMESH_ENABLE_AMR 2360 const Node & edge_node = *e_pair.first;
2361 const int dim = elem.dim();
2362 const var_set & edge_vars = std::get<2>(e_pair.second);
2364 const unsigned short edge_num = std::get<1>(e_pair.second);
2365 const unsigned short node_num = elem.n_vertices() + edge_num;
2373 for (
const auto & var : edge_vars)
2376 const FEType & base_fe_type = variable.
type();
2377 const unsigned int var_component =
2380 if (base_fe_type.family ==
SCALAR)
2383 FEType fe_type = base_fe_type;
2386 fe_type.order = fe_type.order + elem.p_level();
2393 if (fe_type.order > 1)
2396 edge_node.processor_id();
2397 FValue fval =
f.eval_at_point
2406 edge_node.dof_number(sys_num, var, i);
2410 const auto insert_val =
2411 raw_value<typename ProjectionAction::InsertInput>(fval, i);
2419 edge_node.dof_number(sys_num, var, 0);
2426 #ifdef LIBMESH_ENABLE_AMR 2434 #endif // LIBMESH_ENABLE_AMR 2437 FEGenericBase<typename FFunctor::RealType> * fe =
nullptr;
2439 FEGenericBase<typename FFunctor::RealType> * edge_fe =
nullptr;
2444 const FEGenericBase<typename FFunctor::RealType> & proj_fe =
2445 #ifdef LIBMESH_ENABLE_AMR 2451 #ifdef LIBMESH_ENABLE_AMR 2454 std::vector<Point> fine_points;
2456 std::unique_ptr<FEGenericBase<typename FFunctor::RealType>> fine_fe
2459 std::unique_ptr<QBase> qrule
2460 (base_fe_type.default_quadrature_rule(1));
2461 fine_fe->attach_quadrature_rule(qrule.get());
2463 const std::vector<Point> & child_xyz =
2466 for (
unsigned int c = 0, nc = elem.n_children();
2472 fine_fe->edge_reinit(elem.child_ptr(c),
context.
edge);
2473 fine_points.insert(fine_points.end(),
2478 std::vector<Point> fine_qp;
2484 #endif // LIBMESH_ENABLE_AMR 2487 const std::vector<dof_id_type> & dof_indices =
2490 std::vector<unsigned int> edge_dofs;
2495 (dof_indices, edge_dofs, var_component,
2496 &edge_node, proj_fe);
Real time
For time-dependent problems, this is the time t at the beginning of the current timestep.
unsigned int variable_scalar_number(std::string_view var, unsigned int component) const
const Variable & variable(unsigned int var) const
Return a constant reference to Variable var.
virtual void pre_fe_reinit(const System &, const Elem *e)
Reinitializes local data vectors/matrices on the current geometric element.
void construct_projection(const std::vector< dof_id_type > &dof_indices_var, const std::vector< unsigned int > &involved_dofs, unsigned int var_component, const Node *node, const FEGenericBase< typename FFunctor::RealType > &fe)
void get_edge_fe(unsigned int var, FEGenericBase< OutputShape > *&fe) const
Accessor for edge (3D only!) finite element object for variable var.
static Point inverse_map(const unsigned int dim, const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true, const bool extra_checks=true)
static void dofs_on_edge(const Elem *const elem, const unsigned int dim, const FEType &fe_t, unsigned int e, std::vector< unsigned int > &di, const bool add_p_level=true)
Fills the vector di with the local degree of freedom indices associated with edge e of element elem A...
void insert_id(dof_id_type id, const InsertInput &val, processor_id_type pid)
virtual void elem_fe_reinit(const std::vector< Point > *const pts=nullptr)
Reinitializes interior FE objects on the current geometric element.
unsigned char edge
Current edge for edge_* to examine.
uint8_t processor_id_type
unsigned int number() const
static std::unique_ptr< FEGenericBase > build(const unsigned int dim, const FEType &type)
Builds a specific finite element type.
const std::vector< dof_id_type > & get_dof_indices() const
Accessor for element dof indices.
virtual void edge_fe_reinit()
Reinitializes edge FE objects on the current geometric element.
void find_dofs_to_send(const Node &node, const Elem &elem, unsigned short node_num, const var_set &vars)
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...
std::set< unsigned int > var_set
void get_element_fe(unsigned int var, FEGenericBase< OutputShape > *&fe) const
Accessor for interior finite element object for variable var for the largest dimension in the mesh...
const FEType & type() const