libMesh
|
The GenericProjector class implements the core of other projection operations, using two input functors to read values to be projected and an output functor to set degrees of freedom in the result. More...
#include <generic_projector.h>
Classes | |
struct | ProjectEdges |
struct | ProjectInteriors |
struct | ProjectSides |
struct | ProjectVertices |
struct | SortAndCopy |
struct | SubFunctor |
struct | SubProjector |
Public Types | |
typedef std::unordered_map< dof_id_type, std::vector< dof_id_type > > | NodesToElemMap |
Convenience typedef for the Node-to-attached-Elem mapping that may be passed in to the constructor. More... | |
typedef std::set< unsigned int > | var_set |
typedef std::pair< const Node *, std::tuple< const Elem *, unsigned short, var_set > > | node_projection |
typedef StoredRange< std::vector< node_projection >::const_iterator, node_projection > | node_range |
typedef StoredRange< std::vector< const Elem * >::const_iterator, const Elem * > | interior_range |
Public Member Functions | |
GenericProjector (const System &system_in, FFunctor &f_in, GFunctor *g_in, ProjectionAction &act_in, const std::vector< unsigned int > &variables_in, NodesToElemMap *nodes_to_elem_in=nullptr) | |
GenericProjector (const GenericProjector &in) | |
~GenericProjector ()=default | |
void | project (const ConstElemRange &range) |
Function definitions. More... | |
template<typename Value > | |
void | send_and_insert_dof_values (std::unordered_map< dof_id_type, std::pair< Value, processor_id_type >> &ids_to_push, ProjectionAction &action) const |
Public Attributes | |
std::unordered_map< dof_id_type, typename FFunctor::ValuePushType > | ids_to_save |
Private Attributes | |
const System & | system |
FFunctor & | master_f |
std::unique_ptr< GFunctor > | master_g_deepcopy |
Needed for C1 type elements only. More... | |
GFunctor * | master_g |
ProjectionAction & | master_action |
const std::vector< unsigned int > & | variables |
NodesToElemMap | nodes_to_elem_ourcopy |
nodes_to_elem is either a shallow copy of a map passed in to the constructor, or points to nodes_to_elem_ourcopy, if no such map was provided. More... | |
NodesToElemMap * | nodes_to_elem |
bool | done_saving_ids |
The GenericProjector class implements the core of other projection operations, using two input functors to read values to be projected and an output functor to set degrees of freedom in the result.
This may be executed in parallel on multiple threads.
Definition at line 83 of file generic_projector.h.
typedef StoredRange<std::vector<const Elem *>::const_iterator, const Elem *> libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::interior_range |
Definition at line 367 of file generic_projector.h.
typedef std::pair<const Node *, std::tuple<const Elem *, unsigned short, var_set> > libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::node_projection |
Definition at line 247 of file generic_projector.h.
typedef StoredRange<std::vector<node_projection>::const_iterator, node_projection> libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::node_range |
Definition at line 250 of file generic_projector.h.
typedef std::unordered_map<dof_id_type, std::vector<dof_id_type> > libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::NodesToElemMap |
Convenience typedef for the Node-to-attached-Elem mapping that may be passed in to the constructor.
Definition at line 90 of file generic_projector.h.
typedef std::set<unsigned int> libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::var_set |
Definition at line 165 of file generic_projector.h.
|
inline |
Definition at line 122 of file generic_projector.h.
References libMesh::MeshTools::build_nodes_to_elem_map(), libMesh::System::get_mesh(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::nodes_to_elem, libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::nodes_to_elem_ourcopy, and libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::system.
|
inline |
Definition at line 142 of file generic_projector.h.
|
default |
void libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::project | ( | const ConstElemRange & | range | ) |
Function definitions.
Definition at line 1214 of file generic_projector.h.
References libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::SortAndCopy::edges, libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::SortAndCopy::interiors, libMesh::libmesh_merge_move(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::SubFunctor::new_ids_to_push, libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::SubFunctor::new_ids_to_save, libMesh::Threads::parallel_reduce(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::SortAndCopy::sides, and libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::SortAndCopy::vertices.
void libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::send_and_insert_dof_values | ( | std::unordered_map< dof_id_type, std::pair< Value, processor_id_type >> & | ids_to_push, |
ProjectionAction & | action | ||
) | const |
Definition at line 2900 of file generic_projector.h.
References libMesh::ParallelObject::comm(), libMesh::convert_from_receive(), libMesh::convert_to_send(), libMesh::DofObject::invalid_processor_id, libMesh::libmesh_assert(), and libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::system.
|
private |
Definition at line 119 of file generic_projector.h.
std::unordered_map<dof_id_type, typename FFunctor::ValuePushType> libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::ids_to_save |
Definition at line 161 of file generic_projector.h.
Referenced by libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::SubProjector::construct_projection().
|
private |
Definition at line 108 of file generic_projector.h.
|
private |
Definition at line 97 of file generic_projector.h.
|
private |
Definition at line 106 of file generic_projector.h.
Referenced by libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::SubProjector::SubProjector().
|
private |
Needed for C1 type elements only.
master_g is either a shallow copy of a GFunctor pointer passed to the constructor, or to master_g_deepcopy.get(), depending on which constructor was called.
Definition at line 105 of file generic_projector.h.
|
private |
Definition at line 117 of file generic_projector.h.
Referenced by libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::GenericProjector().
|
private |
nodes_to_elem is either a shallow copy of a map passed in to the constructor, or points to nodes_to_elem_ourcopy, if no such map was provided.
Definition at line 116 of file generic_projector.h.
Referenced by libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::GenericProjector().
|
private |
Definition at line 93 of file generic_projector.h.
Referenced by libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::SubProjector::construct_projection(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::SubFunctor::find_dofs_to_send(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::GenericProjector(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::SortAndCopy::operator()(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::ProjectVertices::operator()(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::ProjectEdges::operator()(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::ProjectSides::operator()(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::ProjectInteriors::operator()(), and libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::send_and_insert_dof_values().
|
private |
Definition at line 109 of file generic_projector.h.