#include <generic_projector.h>
 | 
|   | ProjectEdges (GenericProjector &p) | 
|   | 
|   | ProjectEdges (ProjectEdges &p_e, Threads::split) | 
|   | 
| void  | operator() (const node_range &range) | 
|   | 
| void  | insert_id (dof_id_type id, const FValue &val, processor_id_type pid) | 
|   | 
| void  | insert_ids (const std::vector< dof_id_type > &ids, const std::vector< FValue > &vals, processor_id_type pid) | 
|   | 
| 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 FEBase &fe) | 
|   | 
| void  | insert_id (dof_id_type id, const FValue &val, processor_id_type pid) | 
|   | 
| void  | insert_ids (const std::vector< dof_id_type > &ids, const std::vector< FValue > &vals, processor_id_type pid) | 
|   | 
| void  | find_dofs_to_send (const Node &node, const Elem &elem, unsigned short node_num, const var_set &vars) | 
|   | 
| void  | join (const SubFunctor &other) | 
|   | 
template<typename FFunctor, typename GFunctor, typename FValue, typename ProjectionAction>
struct libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::ProjectEdges
Definition at line 287 of file generic_projector.h.
 
◆ ProjectEdges() [1/2]
template<typename FFunctor , typename GFunctor , typename FValue , typename ProjectionAction > 
 
 
◆ ProjectEdges() [2/2]
template<typename FFunctor , typename GFunctor , typename FValue , typename ProjectionAction > 
 
 
◆ construct_projection() [1/2]
template<typename FFunctor , typename GFunctor , typename FValue , typename ProjectionAction > 
  
  
      
        
          | void libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::SubProjector::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 FEBase &  | 
          fe  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
protectedinherited   | 
  
 
Definition at line 2501 of file generic_projector.h.
 2507   const std::vector<Real> & JxW = fe.get_JxW();
 
 2508   const std::vector<std::vector<Real>> & phi = fe.get_phi();
 
 2509   const std::vector<std::vector<RealGradient>> * dphi = 
nullptr;
 
 2510   const std::vector<Point> & xyz_values = fe.get_xyz();
 
 2512   const std::unordered_map<dof_id_type, FValue> & 
ids_to_save =
 
 2516     dphi = &(fe.get_dphi());
 
 2518   const unsigned int n_involved_dofs =
 
 2519     cast_int<unsigned int>(involved_dofs.size());
 
 2521   std::vector<dof_id_type> free_dof_ids;
 
 2522   DenseVector<FValue> Uinvolved(n_involved_dofs);
 
 2523   std::vector<char> dof_is_fixed(n_involved_dofs, 
false); 
 
 2525   for (
auto i : IntRange<unsigned int>(0, n_involved_dofs))
 
 2527       const dof_id_type id = dof_indices_var[involved_dofs[i]];
 
 2530         free_dof_ids.push_back(
id);
 
 2533           dof_is_fixed[i] = 
true;
 
 2534           Uinvolved(i) = iter->second;
 
 2538   const unsigned int free_dofs = free_dof_ids.size();
 
 2548   DenseMatrix<Real> Ke(free_dofs, free_dofs);
 
 2549   DenseVector<FValue> Fe(free_dofs);
 
 2551   DenseVector<FValue> Ufree(free_dofs);
 
 2553   const unsigned int n_qp =
 
 2554     cast_int<unsigned int>(xyz_values.size());
 
 2557   for (
unsigned int qp=0; qp<n_qp; qp++)
 
 2560       FValue fineval = 
f.eval_at_point(
context,
 
 2565       VectorValue<FValue> finegrad;
 
 2567         finegrad = 
g->eval_at_point(
context,
 
 2573       for (
unsigned int sidei=0, freei=0;
 
 2574            sidei != n_involved_dofs; ++sidei)
 
 2576           unsigned int i = involved_dofs[sidei];
 
 2578           if (dof_is_fixed[sidei])
 
 2580           for (
unsigned int sidej=0, freej=0;
 
 2581                sidej != n_involved_dofs; ++sidej)
 
 2583               unsigned int j = involved_dofs[sidej];
 
 2584               if (dof_is_fixed[sidej])
 
 2585                 Fe(freei) -= phi[i][qp] * phi[j][qp] *
 
 2586                   JxW[qp] * Uinvolved(sidej);
 
 2588                 Ke(freei,freej) += phi[i][qp] *
 
 2589                   phi[j][qp] * JxW[qp];
 
 2592                   if (dof_is_fixed[sidej])
 
 2593                     Fe(freei) -= ( (*dphi)[i][qp] *
 
 2595                       JxW[qp] * Uinvolved(sidej);
 
 2597                     Ke(freei,freej) += ( (*dphi)[i][qp] *
 
 2601               if (!dof_is_fixed[sidej])
 
 2604           Fe(freei) += phi[i][qp] * fineval * JxW[qp];
 
 2606             Fe(freei) += (finegrad * (*dphi)[i][qp] ) *
 
 2612   Ke.cholesky_solve(Fe, Ufree);
 
 2617   insert_ids(free_dof_ids, Ufree.get_values(), pid);
 
 
References libMesh::C_ONE, libMesh::DenseMatrix< T >::cholesky_solve(), libMesh::FEAbstract::get_continuity(), libMesh::FEGenericBase< OutputType >::get_dphi(), libMesh::FEAbstract::get_JxW(), libMesh::FEGenericBase< OutputType >::get_phi(), libMesh::DenseVector< T >::get_values(), libMesh::FEAbstract::get_xyz(), libMesh::DofObject::invalid_processor_id, libMesh::DofObject::processor_id(), and libMesh::DenseVector< T >::size().
 
 
◆ construct_projection() [2/2]
template<typename FFunctor , typename GFunctor , typename FValue , typename ProjectionAction > 
      
 
Definition at line 2501 of file generic_projector.h.
 2507   const std::vector<Real> & JxW = fe.get_JxW();
 
 2508   const std::vector<std::vector<Real>> & phi = fe.get_phi();
 
 2509   const std::vector<std::vector<RealGradient>> * dphi = 
nullptr;
 
 2510   const std::vector<Point> & xyz_values = fe.get_xyz();
 
 2512   const std::unordered_map<dof_id_type, FValue> & 
ids_to_save =
 
 2516     dphi = &(fe.get_dphi());
 
 2518   const unsigned int n_involved_dofs =
 
 2519     cast_int<unsigned int>(involved_dofs.size());
 
 2521   std::vector<dof_id_type> free_dof_ids;
 
 2522   DenseVector<FValue> Uinvolved(n_involved_dofs);
 
 2523   std::vector<char> dof_is_fixed(n_involved_dofs, 
false); 
 
 2525   for (
auto i : IntRange<unsigned int>(0, n_involved_dofs))
 
 2527       const dof_id_type id = dof_indices_var[involved_dofs[i]];
 
 2530         free_dof_ids.push_back(
id);
 
 2533           dof_is_fixed[i] = 
true;
 
 2534           Uinvolved(i) = iter->second;
 
 2538   const unsigned int free_dofs = free_dof_ids.size();
 
 2548   DenseMatrix<Real> Ke(free_dofs, free_dofs);
 
 2549   DenseVector<FValue> Fe(free_dofs);
 
 2551   DenseVector<FValue> Ufree(free_dofs);
 
 2553   const unsigned int n_qp =
 
 2554     cast_int<unsigned int>(xyz_values.size());
 
 2557   for (
unsigned int qp=0; qp<n_qp; qp++)
 
 2560       FValue fineval = 
f.eval_at_point(
context,
 
 2565       VectorValue<FValue> finegrad;
 
 2567         finegrad = 
g->eval_at_point(
context,
 
 2573       for (
unsigned int sidei=0, freei=0;
 
 2574            sidei != n_involved_dofs; ++sidei)
 
 2576           unsigned int i = involved_dofs[sidei];
 
 2578           if (dof_is_fixed[sidei])
 
 2580           for (
unsigned int sidej=0, freej=0;
 
 2581                sidej != n_involved_dofs; ++sidej)
 
 2583               unsigned int j = involved_dofs[sidej];
 
 2584               if (dof_is_fixed[sidej])
 
 2585                 Fe(freei) -= phi[i][qp] * phi[j][qp] *
 
 2586                   JxW[qp] * Uinvolved(sidej);
 
 2588                 Ke(freei,freej) += phi[i][qp] *
 
 2589                   phi[j][qp] * JxW[qp];
 
 2592                   if (dof_is_fixed[sidej])
 
 2593                     Fe(freei) -= ( (*dphi)[i][qp] *
 
 2595                       JxW[qp] * Uinvolved(sidej);
 
 2597                     Ke(freei,freej) += ( (*dphi)[i][qp] *
 
 2601               if (!dof_is_fixed[sidej])
 
 2604           Fe(freei) += phi[i][qp] * fineval * JxW[qp];
 
 2606             Fe(freei) += (finegrad * (*dphi)[i][qp] ) *
 
 2612   Ke.cholesky_solve(Fe, Ufree);
 
 2617   insert_ids(free_dof_ids, Ufree.get_values(), pid);
 
 
 
 
◆ find_dofs_to_send()
template<typename FFunctor , typename GFunctor , typename FValue , typename ProjectionAction > 
 
Definition at line 2345 of file generic_projector.h.
 2359       std::vector<dof_id_type> node_dof_ids, patch_dof_ids;
 
 2360       for (
const auto & var : vars)
 
 2364           if (!variable.active_on_subdomain(elem.subdomain_id()))
 
 2367           dof_map.dof_indices(elem, node_num, node_dof_ids, var);
 
 2370                                     node_dof_ids.end()));
 
 2371       const std::vector<dof_id_type> & patch =
 
 2373       for (
const auto & elem_id : patch)
 
 2375           const Elem & patch_elem = 
mesh.elem_ref(elem_id);
 
 2376           if (!patch_elem.active() || owner != patch_elem.processor_id())
 
 2378           dof_map.dof_indices(&patch_elem, patch_dof_ids);
 
 2379           std::sort(patch_dof_ids.begin(), patch_dof_ids.end());
 
 2383           std::vector<dof_id_type> diff_ids(node_dof_ids.size());
 
 2384           auto it = std::set_difference(node_dof_ids.begin(), node_dof_ids.end(),
 
 2385                                         patch_dof_ids.begin(), patch_dof_ids.end(), diff_ids.begin());
 
 2386           diff_ids.resize(it-diff_ids.begin());
 
 2387           node_dof_ids.swap(diff_ids);
 
 2388           if (node_dof_ids.empty())
 
 2393       for (
auto id : node_dof_ids)
 
 
References libMesh::Elem::active(), libMesh::Variable::active_on_subdomain(), libMesh::DofMap::dof_indices(), libMesh::MeshBase::elem_ref(), libMesh::DofObject::id(), libMesh::DofObject::invalid_processor_id, libMesh::Parallel::Utils::is_sorted(), libMesh::libmesh_assert(), mesh, libMesh::Elem::node_ptr(), libMesh::DofObject::processor_id(), and libMesh::Elem::subdomain_id().
 
 
◆ insert_id() [1/2]
template<typename FFunctor , typename GFunctor , typename FValue , typename ProjectionAction > 
 
 
◆ insert_id() [2/2]
template<typename FFunctor , typename GFunctor , typename FValue , typename ProjectionAction > 
      
 
 
◆ insert_ids() [1/2]
template<typename FFunctor , typename GFunctor , typename FValue , typename ProjectionAction > 
 
 
◆ insert_ids() [2/2]
template<typename FFunctor , typename GFunctor , typename FValue , typename ProjectionAction > 
      
 
Definition at line 1138 of file generic_projector.h.
 1140   libmesh_assert_equal_to(ids.size(), vals.size());
 
 1144       const FValue & val = vals[i];
 
 1152           iter->second = std::make_pair(val, pid);
 
 
 
 
◆ join()
template<typename FFunctor , typename GFunctor , typename FValue , typename ProjectionAction > 
 
 
◆ operator()()
template<typename FFunctor , typename GFunctor , typename FValue , typename ProjectionAction > 
      
 
Definition at line 1914 of file generic_projector.h.
 1916   LOG_SCOPE (
"project_edges",
"GenericProjector");
 
 1920   for (
const auto & e_pair : range)
 
 1922       const Elem & elem = *std::get<0>(e_pair.second);
 
 1926 #ifdef LIBMESH_ENABLE_AMR 
 1927       if (
f.is_grid_projection() &&
 
 1933 #endif // LIBMESH_ENABLE_AMR 
 1935       const Node & edge_node = *e_pair.first;
 
 1936       const int dim = elem.dim();
 
 1937       const var_set & edge_vars = std::get<2>(e_pair.second);
 
 1939       const unsigned short edge_num = std::get<1>(e_pair.second);
 
 1940       const unsigned short node_num = elem.n_vertices() + edge_num;
 
 1948       for (
const auto & var : edge_vars)
 
 1951           const FEType & base_fe_type = variable.
type();
 
 1952           const unsigned int var_component =
 
 1955           if (base_fe_type.family == 
SCALAR)
 
 1958           FEType fe_type = base_fe_type;
 
 1969               if (fe_type.order > 1)
 
 1972                     edge_node.dof_number(sys_num, var, 0);
 
 1974                     edge_node.processor_id();
 
 1975                   FValue fval = 
f.eval_at_point
 
 1982 #ifdef LIBMESH_ENABLE_AMR 
 1990 #endif // LIBMESH_ENABLE_AMR 
 1995           FEBase * edge_fe = 
nullptr;
 
 2001 #ifdef LIBMESH_ENABLE_AMR 
 2007 #ifdef LIBMESH_ENABLE_AMR 
 2010               std::vector<Point> fine_points;
 
 2012               std::unique_ptr<FEBase> fine_fe
 
 2015               std::unique_ptr<QBase> qrule
 
 2016                 (base_fe_type.default_quadrature_rule(1));
 
 2017               fine_fe->attach_quadrature_rule(qrule.get());
 
 2019               const std::vector<Point> & child_xyz =
 
 2022               for (
unsigned int c = 0, nc = elem.n_children();
 
 2028                   fine_fe->edge_reinit(elem.child_ptr(c), 
context.
edge);
 
 2029                   fine_points.insert(fine_points.end(),
 
 2034               std::vector<Point> fine_qp;
 
 2040 #endif // LIBMESH_ENABLE_AMR 
 2043           const std::vector<dof_id_type> & dof_indices =
 
 2046           std::vector<unsigned int> edge_dofs;
 
 2051             (dof_indices, edge_dofs, var_component,
 
 2052              &edge_node, proj_fe);
 
 
References libMesh::FEGenericBase< OutputType >::build(), libMesh::Elem::child_ptr(), libMesh::CONSTANT, libMesh::FEType::default_quadrature_rule(), dim, libMesh::Elem::dim(), libMesh::DofObject::dof_number(), libMesh::FEInterface::dofs_on_edge(), libMesh::FEType::family, libMesh::FEMap::inverse_map(), libMesh::Elem::is_child_on_edge(), libMesh::Elem::JUST_COARSENED, libMesh::Elem::JUST_REFINED, libMesh::LAGRANGE, libMesh::MONOMIAL, libMesh::Elem::n_children(), libMesh::Elem::n_vertices(), libMesh::FEType::order, libMesh::Elem::p_level(), libMesh::Elem::p_refinement_flag(), libMesh::DofObject::processor_id(), libMesh::Elem::refinement_flag(), libMesh::SCALAR, and libMesh::Variable::type().
 
 
◆ action
template<typename FFunctor , typename GFunctor , typename FValue , typename ProjectionAction > 
      
 
 
◆ context
template<typename FFunctor , typename GFunctor , typename FValue , typename ProjectionAction > 
      
 
 
◆ conts
template<typename FFunctor , typename GFunctor , typename FValue , typename ProjectionAction > 
      
 
 
template<typename FFunctor , typename GFunctor , typename FValue , typename ProjectionAction > 
      
 
 
template<typename FFunctor , typename GFunctor , typename FValue , typename ProjectionAction > 
      
 
 
◆ new_ids_to_push
template<typename FFunctor , typename GFunctor , typename FValue , typename ProjectionAction > 
 
 
◆ new_ids_to_save
template<typename FFunctor , typename GFunctor , typename FValue , typename ProjectionAction > 
 
 
◆ projector
template<typename FFunctor , typename GFunctor , typename FValue , typename ProjectionAction > 
 
 
◆ system
template<typename FFunctor , typename GFunctor , typename FValue , typename ProjectionAction > 
      
 
 
The documentation for this struct was generated from the following file:
 
std::unordered_map< dof_id_type, FValue > new_ids_to_save
 
std::set< unsigned int > var_set
 
const std::vector< dof_id_type > & get_dof_indices() const
Accessor for element dof indices.
 
void insert_id(dof_id_type id, const FValue &val, processor_id_type pid)
 
IntRange< std::size_t > index_range(const std::vector< T > &vec)
Helper function that returns an IntRange<std::size_t> representing all the indices of the passed-in v...
 
virtual void pre_fe_reinit(const System &, const Elem *e)
Reinitializes local data vectors/matrices on the current geometric element.
 
void get_edge_fe(unsigned int var, FEGenericBase< OutputShape > *&fe) const
Accessor for edge (3D only!) finite element object for variable var.
 
unsigned int number() const
 
const FEType & type() const
 
std::unordered_map< dof_id_type, std::pair< FValue, processor_id_type > > new_ids_to_push
 
const Variable & variable(unsigned int var) const
Return a constant reference to Variable var.
 
SubProjector(GenericProjector &p)
 
bool is_sorted(const std::vector< KeyType > &v)
 
void insert_ids(const std::vector< dof_id_type > &ids, const std::vector< FValue > &vals, processor_id_type pid)
 
void find_dofs_to_send(const Node &node, const Elem &elem, unsigned short node_num, const var_set &vars)
 
static Point inverse_map(const unsigned int dim, const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true)
 
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 FEBase &fe)
 
unsigned int variable_scalar_number(const std::string &var, unsigned int component) const
 
FEGenericBase< Real > FEBase
 
const MeshBase & get_mesh() const
 
processor_id_type processor_id() const
 
static std::unique_ptr< FEGenericBase > build(const unsigned int dim, const FEType &type)
Builds a specific finite element type.
 
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)
Fills the vector di with the local degree of freedom indices associated with edge e of element elem A...
 
uint8_t processor_id_type
 
unsigned char edge
Current edge for edge_* to examine.
 
std::unordered_map< dof_id_type, std::vector< dof_id_type > > * nodes_to_elem
 
Real time
For time-dependent problems, this is the time t at the beginning of the current timestep.
 
virtual void elem_fe_reinit(const std::vector< Point > *const pts=nullptr)
Reinitializes interior FE objects on the current geometric element.
 
virtual void edge_fe_reinit()
Reinitializes edge FE objects on the current geometric element.
 
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.
 
static const processor_id_type invalid_processor_id
An invalid processor_id to distinguish DoFs that have not been assigned to a processor.
 
GenericProjector & projector
 
std::unordered_map< dof_id_type, FValue > ids_to_save
 
const DofMap & get_dof_map() const
 
std::unique_ptr< GFunctor > g