2507 LOG_SCOPE (
"project_sides",
"GenericProjector");
2511 for (
const auto & s_pair : range)
2513 const Elem & elem = *std::get<0>(s_pair.second);
2517 #ifdef LIBMESH_ENABLE_AMR 2518 if (
f.is_grid_projection() &&
2524 #endif // LIBMESH_ENABLE_AMR 2526 const Node & side_node = *s_pair.first;
2527 const int dim = elem.dim();
2528 const var_set & side_vars = std::get<2>(s_pair.second);
2530 const unsigned int side_num = std::get<1>(s_pair.second);
2531 unsigned short node_num = elem.n_vertices()+side_num;
2536 if (!elem.is_face(n))
2539 if (elem.is_node_on_side(n, side_num))
2553 for (
const auto & var : side_vars)
2556 const FEType & base_fe_type = variable.
type();
2557 const unsigned int var_component =
2560 if (base_fe_type.family ==
SCALAR)
2563 FEType fe_type = base_fe_type;
2568 fe_type.order = fe_type.order + add_p_level*elem.p_level();
2580 if (fe_type.order > 1 &&
2581 side_node.n_comp(sys_num, var))
2584 side_node.processor_id();
2585 FValue fval =
f.eval_at_point
2594 const dof_id_type dof_id = side_node.dof_number(sys_num, var, i);
2598 const auto insert_val =
2599 raw_value<typename ProjectionAction::InsertInput>(fval, i);
2607 side_node.dof_number(sys_num, var, 0);
2614 #ifdef LIBMESH_ENABLE_AMR 2622 #endif // LIBMESH_ENABLE_AMR 2625 FEGenericBase<typename FFunctor::RealType> * fe =
nullptr;
2627 FEGenericBase<typename FFunctor::RealType> * side_fe =
nullptr;
2632 const FEGenericBase<typename FFunctor::RealType> & proj_fe =
2633 #ifdef LIBMESH_ENABLE_AMR 2639 #ifdef LIBMESH_ENABLE_AMR 2642 std::vector<Point> fine_points;
2644 std::unique_ptr<FEGenericBase<typename FFunctor::RealType>> fine_fe
2647 std::unique_ptr<QBase> qrule
2648 (base_fe_type.default_quadrature_rule(1));
2649 fine_fe->attach_quadrature_rule(qrule.get());
2651 const std::vector<Point> & child_xyz =
2654 for (
unsigned int c = 0, nc = elem.n_children();
2661 fine_points.insert(fine_points.end(),
2666 std::vector<Point> fine_qp;
2672 #endif // LIBMESH_ENABLE_AMR 2675 const std::vector<dof_id_type> & dof_indices =
2678 std::vector<unsigned int> side_dofs;
2683 (dof_indices, side_dofs, var_component,
2684 &side_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.
void get_side_fe(unsigned int var, FEGenericBase< OutputShape > *&fe) const
Accessor for edge/face (2D/3D) finite element object for variable var for the largest dimension in th...
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)
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)
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.
bool should_p_refine_var(unsigned int var) const
Whether the given variable should be p-refined.
uint8_t processor_id_type
unsigned int number() const
virtual void side_fe_reinit()
Reinitializes side FE objects on the current geometric element.
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.
void find_dofs_to_send(const Node &node, const Elem &elem, unsigned short node_num, const var_set &vars)
unsigned char side
Current side for side_* to examine.
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 DofMap & get_dof_map() const
static void dofs_on_side(const Elem *const elem, const unsigned int dim, const FEType &fe_t, unsigned int s, std::vector< unsigned int > &di, const bool add_p_level=true)
Fills the vector di with the local degree of freedom indices associated with side s of element elem A...
const FEType & type() const