21 #ifndef __DOLFIN_FUNCTION_ASSIGNER_H 22 #define __DOLFIN_FUNCTION_ASSIGNER_H 54 std::shared_ptr<const FunctionSpace> assigning_space);
68 FunctionAssigner(std::vector<std::shared_ptr<const FunctionSpace>> receiving_spaces,
69 std::shared_ptr<const FunctionSpace> assigning_space);
84 std::vector<std::shared_ptr<const FunctionSpace>> assigning_spaces);
93 void assign(std::shared_ptr<Function> receiving_func,
94 std::shared_ptr<const Function> assigning_func)
const;
104 void assign(std::shared_ptr<Function> receiving_func,
105 std::vector<std::shared_ptr<const Function>> assigning_funcs)
const;
115 void assign(std::vector<std::shared_ptr<Function>> receiving_funcs,
116 std::shared_ptr<const Function> assigning_func)
const;
123 {
return _assigning_spaces.size(); }
127 {
return _receiving_spaces.size(); }
132 void _assign(std::vector<std::shared_ptr<Function>> receiving_funcs,
133 std::vector<std::shared_ptr<const Function>> assigning_funcs)
const;
137 const Mesh& _get_mesh()
const;
141 void _check_and_build_indices(
const Mesh& mesh,
142 const std::vector<std::shared_ptr<const FunctionSpace> >& receiving_spaces,
143 const std::vector<std::shared_ptr<const FunctionSpace> >& assigning_spaces);
146 std::vector<std::shared_ptr<const FunctionSpace>> _receiving_spaces;
147 std::vector<std::shared_ptr<const FunctionSpace>> _assigning_spaces;
150 std::vector<std::vector<la_index>> _receiving_indices;
153 std::vector<std::vector<la_index>> _assigning_indices;
156 mutable std::vector<std::vector<double> > _transfer;
FunctionAssigner(std::shared_ptr< const FunctionSpace > receiving_space, std::shared_ptr< const FunctionSpace > assigning_space)
Definition: FunctionAssigner.cpp:36
std::size_t num_receiving_functions() const
Return the number of receiving functions.
Definition: FunctionAssigner.h:126
void assign(std::shared_ptr< Function > receiving_func, std::shared_ptr< const Function > assigning_func) const
Definition: FunctionAssigner.cpp:119
~FunctionAssigner()
Destructor.
Definition: FunctionAssigner.cpp:113
Definition: FunctionAssigner.h:40
std::size_t num_assigning_functions() const
Return the number of assigning functions.
Definition: FunctionAssigner.h:122