21#include "libmesh/direct_solution_transfer.h"
23#include "libmesh/system.h"
24#include "libmesh/numeric_vector.h"
25#include "libmesh/variable.h"
39 libmesh_experimental();
49 unsigned int from_vn = from_var.
number();
50 std::set<dof_id_type> from_var_indices;
54 unsigned int to_vn = to_var.
number();
55 std::set<dof_id_type> to_var_indices;
59 std::set<dof_id_type>::iterator from_it = from_var_indices.begin();
60 std::set<dof_id_type>::iterator from_it_end = from_var_indices.end();
61 std::set<dof_id_type>::iterator to_it = to_var_indices.begin();
65 for (; from_it != from_it_end; ++from_it, ++to_it)
66 to_sys->
solution->set(*to_it, from_solution(*from_it));
DirectSolutionTransfer(const Parallel::Communicator &comm_in)
virtual void transfer(const Variable &from_var, const Variable &to_var) override
Transfer the values of a variable to another.
virtual ~DirectSolutionTransfer()
const MeshBase & get_mesh() const
virtual dof_id_type n_nodes() const =0
Provides a uniform interface to vector storage schemes for different linear algebra libraries.
Base class for objects that allow transferring variable values between different systems with differe...
Manages consistently variables, degrees of freedom, and coefficient vectors.
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 ...
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 EquationSystems & get_equation_systems() const
This class defines the notion of a variable in the system.
unsigned int number() const
const FEType & type() const
The libMesh namespace provides an interface to certain functionality in the library.