Go to the documentation of this file.
21 #include "libmesh/direct_solution_transfer.h"
23 #include "libmesh/system.h"
24 #include "libmesh/numeric_vector.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));
Manages consistently variables, degrees of freedom, and coefficient vectors.
const EquationSystems & get_equation_systems() const
const MeshBase & get_mesh() const
unsigned int number() const
Base class for objects that allow transferring variable values between different systems with differe...
The libMesh namespace provides an interface to certain functionality in the library.
virtual ~DirectSolutionTransfer()
virtual void transfer(const Variable &from_var, const Variable &to_var) override
Transfer the values of a variable to another.
const FEType & type() const
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 ...
DirectSolutionTransfer(const Parallel::Communicator &comm_in)
This class defines the notion of a variable in the system.
virtual dof_id_type n_nodes() const =0
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.