MAST
Multidisciplinary-design Adaptation and Sensitivity Toolkit (MAST)
dirichlet_boundary_condition.h
Go to the documentation of this file.
1 /*
2  * MAST: Multidisciplinary-design Adaptation and Sensitivity Toolkit
3  * Copyright (C) 2013-2020 Manav Bhatia and MAST authors
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  */
19 
20 #ifndef __mast__dirichlet_boundary_condition__
21 #define __mast__dirichlet_boundary_condition__
22 
23 // C++ includes
24 #include <memory>
25 
26 // MAST includes
28 
29 
30 // libmesh includes
31 #include "libmesh/dirichlet_boundaries.h"
32 
33 
34 
35 namespace MAST {
36 
37  // Forward declerations
38  template <typename ValType> class FieldFunction;
39 
40 
43 
44  public:
47  { }
48 
50 
67  void init(const libMesh::boundary_id_type bid,
68  const std::vector<unsigned int>& constrained_vars,
69  MAST::FieldFunction<RealVectorX>* f_val = nullptr,
70  libMesh::VariableIndexing index = libMesh::SYSTEM_VARIABLE_ORDER,
71  unsigned int n_sys_vars = 0);
72 
73 
77  libMesh::DirichletBoundary& dirichlet_boundary() {
78  return *_dirichlet_boundary;
79  }
80 
81  protected:
82 
86  std::unique_ptr<libMesh::DirichletBoundary> _dirichlet_boundary;
87  };
88 }
89 
90 #endif // __mast__dirichlet_boundary_condition__
std::unique_ptr< libMesh::DirichletBoundary > _dirichlet_boundary
Dirichlet boundary function for this boundary.
libMesh::DirichletBoundary & dirichlet_boundary()
void init(const libMesh::boundary_id_type bid, const std::vector< unsigned int > &constrained_vars, MAST::FieldFunction< RealVectorX > *f_val=nullptr, libMesh::VariableIndexing index=libMesh::SYSTEM_VARIABLE_ORDER, unsigned int n_sys_vars=0)
initializes the object for the specified domain id (either boundary, or subdomain), for the displacement components initialized using a bitwise operator.