GRINS-0.7.0
bc_builder.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // GRINS - General Reacting Incompressible Navier-Stokes
5 //
6 // Copyright (C) 2014-2016 Paul T. Bauman, Roy H. Stogner
7 // Copyright (C) 2010-2013 The PECOS Development Team
8 //
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the Version 2.1 GNU Lesser General
11 // Public License as published by the Free Software Foundation.
12 //
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
17 //
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc. 51 Franklin Street, Fifth Floor,
21 // Boston, MA 02110-1301 USA
22 //
23 //-----------------------------------------------------------------------el-
24 
25 #ifndef GRINS_BC_BUILDER_H
26 #define GRINS_BC_BUILDER_H
27 
28 // C++
29 #include <set>
30 #include <string>
31 #include <vector>
32 
33 // GRINS
34 #include "grins/var_typedefs.h"
36 
37 // libMesh
38 #include "libmesh/auto_ptr.h"
39 #include "libmesh/hp_coarsentest.h" // RealVectorValue
40 
41 // libMesh forward declarations
42 class GetPot;
43 namespace libMesh
44 {
45  class DofMap;
46 }
47 
48 namespace GRINS
49 {
50  // Forward declarations
51  class MultiphysicsSystem;
52 
54 
60  class BCBuilder
61  {
62  public:
63 
64  BCBuilder(){};
65 
66  virtual ~BCBuilder(){};
67 
68  static void build_boundary_conditions( const GetPot& input,
69  MultiphysicsSystem& system,
70  std::vector<SharedPtr<NeumannBCContainer> >& neumann_bcs );
71 
72  protected:
73 
74  virtual void build_bcs( const GetPot& input, MultiphysicsSystem& system,
75  std::vector<SharedPtr<NeumannBCContainer> >& neumann_bcs ) =0;
76 
77  void construct_dbc_core( const GetPot& input,
78  MultiphysicsSystem& system,
79  const std::set<BoundaryID>& bc_ids,
80  const FEVariablesBase& fe_var,
81  const std::string& section,
82  const std::string& bc_type,
83  libMesh::DofMap& dof_map );
84 
85  void construct_nbc_core( const GetPot& input,
86  MultiphysicsSystem& system,
87  const std::set<BoundaryID>& bc_ids,
88  const FEVariablesBase& fe_var,
89  const std::string& section,
90  const std::string& bc_type,
91  std::vector<SharedPtr<NeumannBCContainer> >& neumann_bcs );
92 
93  static bool is_new_bc_input_style( const GetPot& input );
94 
95  static libMesh::UniquePtr<BCBuilder> build_builder( const GetPot& input );
96 
97  bool is_dirichlet_bc_type( const std::string& bc_type );
98 
99  bool is_neumann_bc_type( const std::string& bc_type );
100 
101  void add_periodic_bc_to_dofmap( libMesh::boundary_id_type master_id,
102  libMesh::boundary_id_type slave_id,
103  const libMesh::RealVectorValue& offset_vector,
104  libMesh::DofMap& dof_map );
105 
106 
107 
108  };
109 } // end namespace GRINS
110 
111 #endif // GRINS_BC_BUILDER_H
void construct_dbc_core(const GetPot &input, MultiphysicsSystem &system, const std::set< BoundaryID > &bc_ids, const FEVariablesBase &fe_var, const std::string &section, const std::string &bc_type, libMesh::DofMap &dof_map)
Definition: bc_builder.C:76
void construct_nbc_core(const GetPot &input, MultiphysicsSystem &system, const std::set< BoundaryID > &bc_ids, const FEVariablesBase &fe_var, const std::string &section, const std::string &bc_type, std::vector< SharedPtr< NeumannBCContainer > > &neumann_bcs)
Definition: bc_builder.C:106
static void build_boundary_conditions(const GetPot &input, MultiphysicsSystem &system, std::vector< SharedPtr< NeumannBCContainer > > &neumann_bcs)
Definition: bc_builder.C:41
bool is_dirichlet_bc_type(const std::string &bc_type)
Definition: bc_builder.C:139
void add_periodic_bc_to_dofmap(libMesh::boundary_id_type master_id, libMesh::boundary_id_type slave_id, const libMesh::RealVectorValue &offset_vector, libMesh::DofMap &dof_map)
Definition: bc_builder.C:151
GRINS namespace.
Manages runtime construction of Dirichlet boundary conditions.
Definition: bc_builder.h:60
virtual ~BCBuilder()
Definition: bc_builder.h:66
Interface with libMesh for solving Multiphysics problems.
static bool is_new_bc_input_style(const GetPot &input)
Definition: bc_builder.C:66
static libMesh::UniquePtr< BCBuilder > build_builder(const GetPot &input)
Definition: bc_builder.C:51
virtual void build_bcs(const GetPot &input, MultiphysicsSystem &system, std::vector< SharedPtr< NeumannBCContainer > > &neumann_bcs)=0
bool is_neumann_bc_type(const std::string &bc_type)
Definition: bc_builder.C:145

Generated on Thu Jun 2 2016 21:52:27 for GRINS-0.7.0 by  doxygen 1.8.10