21 #include "libmesh/direct_solution_transfer.h" 23 #include "libmesh/system.h" 24 #include "libmesh/numeric_vector.h" 38 libmesh_experimental();
48 unsigned int from_vn = from_var.
number();
49 std::set<dof_id_type> from_var_indices;
53 unsigned int to_vn = to_var.
number();
54 std::set<dof_id_type> to_var_indices;
58 std::set<dof_id_type>::iterator from_it = from_var_indices.begin();
59 std::set<dof_id_type>::iterator from_it_end = from_var_indices.end();
60 std::set<dof_id_type>::iterator to_it = to_var_indices.begin();
64 for (; from_it != from_it_end; ++from_it, ++to_it)
65 to_sys->
solution->set(*to_it, from_solution(*from_it));
void local_dof_indices(const unsigned int var, std::set< dof_id_type > &var_indices) const
Fills the std::set with the degrees of freedom on the local processor corresponding the the variable ...
const EquationSystems & get_equation_systems() const
The libMesh namespace provides an interface to certain functionality in the library.
DirectSolutionTransfer(const Parallel::Communicator &comm_in)
This class defines the notion of a variable in the system.
Manages consistently variables, degrees of freedom, and coefficient vectors.
std::unique_ptr< NumericVector< Number > > solution
Data structure to hold solution values.
virtual void update()
Update the local values to reflect the solution on neighboring processors.
const MeshBase & get_mesh() const
Base class for objects that allow transferring variable values between different systems with differe...
unsigned int number() const
virtual void transfer(const Variable &from_var, const Variable &to_var) override
Transfer the values of a variable to another.
virtual ~DirectSolutionTransfer()
virtual dof_id_type n_nodes() const =0
const FEType & type() const