18 #ifndef SOLUTION_FUNCTION_H 19 #define SOLUTION_FUNCTION_H 22 #include "libmesh/function_base.h" 25 #include "curl_curl_exact_solution.h" 42 { libmesh_not_implemented(); }
44 virtual void operator() (
const Point & p,
49 const Real x=p(0), y=p(1), z=p(2);
52 output(_u_var) = soln(x, y, z)(0);
53 output(_u_var+1) = soln(x, y, z)(1);
54 output(_u_var+2) = soln(x, y, z)(2);
61 const Real x=p(0), y=p(1), z=p(2);
62 return soln(x, y, z)(component_in);
65 virtual std::unique_ptr<FunctionBase<Number>>
clone()
const 66 {
return std::make_unique<SolutionFunction>(_u_var); }
70 const unsigned int _u_var;
84 { libmesh_not_implemented(); }
86 virtual void operator() (
const Point & p,
91 const Real x=p(0), y=p(1), z=p(2);
92 output(_u_var) = soln.grad(x, y, z).row(0);
93 output(_u_var+1) = soln.grad(x, y, z).row(1);
94 output(_u_var+2) = soln.grad(x, y, z).row(2);
101 const Real x=p(0), y=p(1), z=p(2);
102 return soln.grad(x, y, z).row(component_in);
105 virtual std::unique_ptr<FunctionBase<Gradient>>
clone()
const 106 {
return std::make_unique<SolutionGradient>(_u_var); }
110 const unsigned int _u_var;
114 #endif // SOLUTION_FUNCTION_H virtual std::unique_ptr< FunctionBase< Gradient > > clone() const
virtual void zero() override final
Set every element in the vector to 0.
virtual std::unique_ptr< FunctionBase< Number > > clone() const
SolutionFunction(const unsigned int u_var)
This class defines a vector in LIBMESH_DIM dimensional Real or Complex space.
The libMesh namespace provides an interface to certain functionality in the library.
SolutionGradient(const unsigned int u_var)
virtual Number component(unsigned int component_in, const Point &p, const Real)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual Gradient component(unsigned int component_in, const Point &p, const Real)
Base class for functors that can be evaluated at a point and (optionally) time.
A Point defines a location in LIBMESH_DIM dimensional Real space.