MAST
Multidisciplinary-design Adaptation and Sensitivity Toolkit (MAST)
mesh_coupling_base.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__mesh_couplings__
21 #define __mast__mesh_couplings__
22 
23 // C++ includes
24 #include <set>
25 
26 // MAST includes
27 #include "base/mast_data_types.h"
28 
29 // libMesh includes
30 #include "libmesh/elem.h"
31 #include "libmesh/node.h"
32 
33 
34 namespace MAST {
35 
36  // Forward declerations
37  class SystemInitialization;
38 
39 
41 
42  public:
43 
45 
46 
47  virtual ~MeshCouplingBase();
48 
49 
50  void
51  add_master_and_slave_boundary_coupling(unsigned int master_b_id,
52  unsigned int slave_b_id,
53  Real tol);
54 
55 
56  void
58  unsigned int slave_b_id,
59  Real tol);
60 
66  const std::vector<std::pair<const libMesh::Node*, std::set<const libMesh::Node*>>>&
68 
69  return _node_couplings;
70  }
71 
72 
73  protected:
74 
75  bool
76  _check_if_side_on_boundary(libMesh::MeshBase& mesh,
77  const libMesh::Elem& elem,
78  unsigned int side,
79  unsigned int b_id);
80 
81 
83 
84  std::vector<std::pair<const libMesh::Node*, std::set<const libMesh::Node*>>> _node_couplings;
85 
86  };
87 
88 }
89 
90 
91 #endif // __mast__mesh_couplings__
void add_slave_boundary_and_master_subdomain_coupling(unsigned int master_id, unsigned int slave_b_id, Real tol)
bool _check_if_side_on_boundary(libMesh::MeshBase &mesh, const libMesh::Elem &elem, unsigned int side, unsigned int b_id)
libMesh::Real Real
MAST::SystemInitialization & _sys_init
std::vector< std::pair< const libMesh::Node *, std::set< const libMesh::Node * > > > _node_couplings
void add_master_and_slave_boundary_coupling(unsigned int master_b_id, unsigned int slave_b_id, Real tol)
MeshCouplingBase(MAST::SystemInitialization &sys_init)
const std::vector< std::pair< const libMesh::Node *, std::set< const libMesh::Node * > > > & get_node_couplings() const