22 #ifdef LIBMESH_ENABLE_DIRICHLET 35 const std::vector<unsigned int> & variables_in,
39 variables(variables_in),
40 f(f_in ? f_in->clone() : nullptr),
41 g(g_in ? g_in->clone() : nullptr),
53 const std::vector<unsigned int> & variables_in,
57 variables(variables_in),
62 auto c = libmesh_make_unique<CompositeFunction<Number>>();
63 c->attach_subfunction(f_in, variables_in);
75 const std::vector<unsigned int> & variables_in,
80 variables(variables_in),
85 auto cf = libmesh_make_unique<CompositeFunction<Number>>();
86 cf->attach_subfunction(f_in, variables_in);
89 auto cg = libmesh_make_unique<CompositeFunction<Gradient>>();
90 cg->attach_subfunction(g_in, variables_in);
106 const std::vector<unsigned int> & variables_in,
111 variables(variables_in),
112 f_fem(f_in ? f_in->clone() : nullptr),
113 g_fem(g_in ? g_in->clone() : nullptr),
116 libmesh_assert(
f_fem);
122 const std::vector<unsigned int> & variables_in,
127 variables(variables_in),
132 auto c = libmesh_make_unique<CompositeFEMFunction<Number>>();
133 c->attach_subfunction(f_in, variables_in);
134 f_fem = std::move(c);
143 const std::vector<unsigned int> & variables_in,
149 variables(variables_in),
154 auto cf = libmesh_make_unique<CompositeFEMFunction<Number>>();
155 cf->attach_subfunction(f_in, variables_in);
156 f_fem = std::move(cf);
158 auto cg = libmesh_make_unique<CompositeFEMFunction<Gradient>>();
159 cg->attach_subfunction(g_in, variables_in);
160 g_fem = std::move(cg);
173 variables(d_in.variables),
174 f(d_in.f ? d_in.f->clone() : nullptr),
175 g(d_in.g ? d_in.g->clone() : nullptr),
176 f_fem(d_in.f_fem ? d_in.f_fem->clone() : nullptr),
177 g_fem(d_in.g_fem ? d_in.g_fem->clone() : nullptr),
178 f_system(d_in.f_system)
180 libmesh_assert(
f ||
f_fem);
181 libmesh_assert(!(
f &&
f_fem));
182 libmesh_assert(!(
f &&
g_fem));
183 libmesh_assert(!(
f_fem &&
g));
196 #endif // LIBMESH_ENABLE_DIRICHLET std::unique_ptr< FEMFunctionBase< Gradient > > g_fem
std::unique_ptr< FunctionBase< Number > > f
Class for specifying Dirichlet boundary conditions as constraints.
std::unique_ptr< FEMFunctionBase< Number > > f_fem
Manages consistently variables, degrees of freedom, and coefficient vectors.
DirichletBoundary(const std::set< boundary_id_type > &b_in, const std::vector< unsigned int > &variables_in, const FunctionBase< Number > *f_in, const FunctionBase< Gradient > *g_in=nullptr)
std::unique_ptr< FunctionBase< Gradient > > g
virtual std::unique_ptr< FunctionBase< Output > > clone() const =0
virtual std::unique_ptr< FEMFunctionBase< Output > > clone() const =0