dirichlet_boundaries.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2018 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
3 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License, or (at your option) any later version.
8 
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
13 
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 
18 
19 
20 #ifndef LIBMESH_DIRICHLET_BOUNDARIES_H
21 #define LIBMESH_DIRICHLET_BOUNDARIES_H
22 
23 #include "libmesh/libmesh_config.h"
24 
25 #ifdef LIBMESH_ENABLE_DIRICHLET
26 
27 // Local Includes
28 #include "libmesh/auto_ptr.h" // deprecated
29 #include "libmesh/id_types.h"
30 #include "libmesh/vector_value.h"
31 
32 // C++ Includes
33 #include <cstddef>
34 #include <set>
35 #include <vector>
36 #include <memory>
37 
38 namespace libMesh
39 {
40 
41 // Forward declarations
42 class System;
43 
44 template <typename Output> class FEMFunctionBase;
45 template <typename Output> class FunctionBase;
46 
64 
90 {
91 public:
92 
97  DirichletBoundary(const std::set<boundary_id_type> & b_in,
98  const std::vector<unsigned int> & variables_in,
99  const FunctionBase<Number> * f_in,
100  const FunctionBase<Gradient> * g_in = libmesh_nullptr);
101 
108  DirichletBoundary(const std::set<boundary_id_type> & b_in,
109  const std::vector<unsigned int> & variables_in,
110  const FunctionBase<Number> & f_in,
112 
120  DirichletBoundary(const std::set<boundary_id_type> & b_in,
121  const std::vector<unsigned int> & variables_in,
122  const FunctionBase<Number> & f_in,
123  const FunctionBase<Gradient> & g_in,
125 
130  DirichletBoundary(const std::set<boundary_id_type> & b_in,
131  const std::vector<unsigned int> & variables_in,
132  const System & f_sys_in,
133  const FEMFunctionBase<Number> * f_in,
135 
143  DirichletBoundary(const std::set<boundary_id_type> & b_in,
144  const std::vector<unsigned int> & variables_in,
145  const System & f_sys_in,
146  const FEMFunctionBase<Number> & f_in,
148 
156  DirichletBoundary(const std::set<boundary_id_type> & b_in,
157  const std::vector<unsigned int> & variables_in,
158  const System & f_sys_in,
159  const FEMFunctionBase<Number> & f_in,
160  const FEMFunctionBase<Gradient> & g_in,
162 
167  DirichletBoundary (const DirichletBoundary & dirichlet_in);
168 
173 
174  std::set<boundary_id_type> b;
175  std::vector<unsigned int> variables;
176 
177  std::unique_ptr<FunctionBase<Number>> f;
178  std::unique_ptr<FunctionBase<Gradient>> g;
179 
180  std::unique_ptr<FEMFunctionBase<Number>> f_fem;
181  std::unique_ptr<FEMFunctionBase<Gradient>> g_fem;
182 
183  const System * f_system;
184 };
185 
186 
194 class DirichletBoundaries : public std::vector<DirichletBoundary *>
195 {
196 public:
198 
200 };
201 
202 } // namespace libMesh
203 
204 #endif // LIBMESH_ENABLE_DIRICHLET
205 
206 #endif // LIBMESH_DIRICHLET_BOUNDARIES_H
std::unique_ptr< FEMFunctionBase< Gradient > > g_fem
std::unique_ptr< FunctionBase< Number > > f
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=libmesh_nullptr)
const class libmesh_nullptr_t libmesh_nullptr
Class for specifying Dirichlet boundary conditions as constraints.
std::vector< unsigned int > variables
std::unique_ptr< FEMFunctionBase< Number > > f_fem
std::unique_ptr< FunctionBase< Gradient > > g
std::set< boundary_id_type > b