15#include "libmesh/system.h"
16#include "libmesh/enum_norm_type.h"
17#include "libmesh/petsc_vector.h"
47 Number
interpolate(
const Node * node_in,
const Node * node_out, Real weight)
const;
51 Number
old(
const Node * node)
const
60 void set(
const Node * node, Number val)
83 for (
const auto elem_id : libmesh_map_find(
mesh.nodeToElemMap(), node_in->id()))
85 const auto & elem = *
mesh.elemPtr(elem_id);
90 const auto value_out = system.point_value(
_var.
number(), *node_out, elem, &
_soln);
92 return (1 - weight) * value_in + weight * value_out;
94 mooseError(
"Nodes ", node_in->id(),
" and ", node_out->id(),
" do not share an element.");
void mooseError(Args &&... args)
unsigned int number() const
Provide a simple RAII interface for linear lagrange solution variables.
MooseVariableFieldBase & _var
Number interpolate(const Node *node_in, const Node *node_out, Real weight) const
Get the value at the fraction weight of the way from node_in to node_out, two nodes of the same axial...
Number old(const Node *node) const
Get a value from the old solution vector.
Number operator()(const Node *node) const
Get a value from the solution vector.
SolutionHandle(const MooseVariableFieldBase &variable)
NumericVector< Number > & _soln
void set(const Node *node, Number val)
Set a value in the solution vector.
const NumericVector< Number > & _soln_old
unsigned int number() const
virtual libMesh::System & system()=0
virtual void set(const numeric_index_type i, const T value)=0
Number point_value(unsigned int var, const Point &p, const bool insist_on_success=true, const NumericVector< Number > *sol=nullptr) const
Real calculate_norm(const NumericVector< Number > &v, unsigned int var, FEMNormType norm_type, std::set< unsigned int > *skip_dimensions=nullptr) const
const unsigned int invalid_uint