20#include "libmesh/meshfree_solution_transfer.h"
22#include "libmesh/mesh.h"
23#include "libmesh/system.h"
24#include "libmesh/numeric_vector.h"
25#include "libmesh/threads.h"
26#include "libmesh/meshfree_interpolation.h"
27#include "libmesh/function_base.h"
28#include "libmesh/node.h"
29#include "libmesh/variable.h"
45 libmesh_experimental();
55 (from_mesh.
comm(), 4, 2);
60 std::vector<std::string> field_vars;
61 field_vars.push_back(from_var.
name());
66 for (
const auto & node : from_mesh.local_node_ptr_range())
68 src_pts.push_back(*node);
69 src_vals.push_back((*from_sys->
solution)(node->dof_number(from_sys->
number(),from_var.
number(),0)));
This is the EquationSystems class.
const MeshBase & get_mesh() const
Inverse distance interpolation.
This is the MeshBase class.
std::vector< Point > & get_source_points()
void set_field_variables(std::vector< std::string > names)
Defines the field variable(s) we are responsible for, and importantly their assumed ordering.
std::vector< Number > & get_source_vals()
virtual void prepare_for_use()
Prepares data structures for use.
virtual void transfer(const Variable &from_var, const Variable &to_var) override
Transfer the values of a variable to another.
const Parallel::Communicator & comm() const
Manages consistently variables, degrees of freedom, and coefficient vectors.
void project_solution(FunctionBase< Number > *f, FunctionBase< Gradient > *g=nullptr, std::optional< ConstElemRange > active_local_range=std::nullopt, std::optional< std::vector< unsigned int > > variable_numbers=std::nullopt) const
Projects arbitrary functions onto the current solution.
std::unique_ptr< NumericVector< Number > > solution
Data structure to hold solution values.
unsigned int number() const
const EquationSystems & get_equation_systems() const
This class defines the notion of a variable in the system.
const std::string & name() const
unsigned int number() const
The libMesh namespace provides an interface to certain functionality in the library.