20#include "libmesh/dirichlet_boundaries.h"
22#ifdef LIBMESH_ENABLE_DIRICHLET
25#include "libmesh/composite_fem_function.h"
26#include "libmesh/composite_function.h"
27#include "libmesh/vector_value.h"
37 std::vector<unsigned int> variables_in,
41 variables(
std::move(variables_in)),
42 f(f_in ? f_in->clone() : nullptr),
43 g(g_in ? g_in->clone() : nullptr),
45 jacobian_tolerance(0.)
56 std::vector<unsigned int> variables_in,
60 variables(
std::move(variables_in)),
62 jacobian_tolerance(0.)
66 auto c = std::make_unique<CompositeFunction<Number>>();
79 std::vector<unsigned int> variables_in,
84 variables(
std::move(variables_in)),
86 jacobian_tolerance(0.)
90 auto cf = std::make_unique<CompositeFunction<Number>>();
94 auto cg = std::make_unique<CompositeFunction<Gradient>>();
111 std::vector<unsigned int> variables_in,
116 variables(
std::move(variables_in)),
117 f_fem(f_in ? f_in->clone() : nullptr),
118 g_fem(g_in ? g_in->clone() : nullptr),
120 jacobian_tolerance(0.)
128 std::vector<unsigned int> variables_in,
133 variables(
std::move(variables_in)),
135 jacobian_tolerance(0.)
139 auto c = std::make_unique<CompositeFEMFunction<Number>>();
141 f_fem = std::move(c);
150 std::vector<unsigned int> variables_in,
156 variables(
std::move(variables_in)),
158 jacobian_tolerance(0.)
162 auto cf = std::make_unique<CompositeFEMFunction<Number>>();
164 f_fem = std::move(cf);
166 auto cg = std::make_unique<CompositeFEMFunction<Gradient>>();
168 g_fem = std::move(cg);
181 variables(d_in.variables),
182 f(d_in.f ? d_in.f->clone() : nullptr),
183 g(d_in.g ? d_in.g->clone() : nullptr),
184 f_fem(d_in.f_fem ? d_in.f_fem->clone() : nullptr),
185 g_fem(d_in.g_fem ? d_in.g_fem->clone() : nullptr),
186 f_system(d_in.f_system),
187 jacobian_tolerance(d_in.jacobian_tolerance)
205 std::swap(tmp, *
this);
This class allows one to associate Dirichlet boundary values with a given set of mesh boundary ids an...
std::vector< unsigned int > variables
DirichletBoundary(std::set< boundary_id_type > b_in, std::vector< unsigned int > variables_in, const FunctionBase< Number > *f_in, const FunctionBase< Gradient > *g_in=nullptr)
Constructor for a system-variable-order boundary using pointers-to-functors.
~DirichletBoundary()
Standard destructor.
DirichletBoundary & operator=(const DirichletBoundary &)
std::unique_ptr< FunctionBase< Number > > f
std::unique_ptr< FunctionBase< Gradient > > g
std::unique_ptr< FEMFunctionBase< Number > > f_fem
std::unique_ptr< FEMFunctionBase< Gradient > > g_fem
FEMFunctionBase is a base class from which users can derive in order to define "function-like" object...
virtual std::unique_ptr< FEMFunctionBase< Output > > clone() const =0
Base class for functors that can be evaluated at a point and (optionally) time.
virtual std::unique_ptr< FunctionBase< Output > > clone() const =0
Manages consistently variables, degrees of freedom, and coefficient vectors.
The libMesh namespace provides an interface to certain functionality in the library.
VariableIndexing
Dirichlet functions may be indexed either by "system variable order" or "local variable order",...