GRINS-0.7.0
default_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_DEFAULT_BC_BUILDER_H
26 #define GRINS_DEFAULT_BC_BUILDER_H
27 
28 // GRINS
29 #include "grins/bc_builder.h"
30 
31 // libMesh foward declarations
32 namespace libMesh
33 {
34  class System;
35 }
36 
37 namespace GRINS
38 {
40 
46  class DefaultBCBuilder : public BCBuilder
47  {
48  public:
49 
51  : BCBuilder()
52  {};
53 
55 
56  protected:
57 
58  virtual void build_bcs( const GetPot& input, MultiphysicsSystem& system,
59  std::vector<SharedPtr<NeumannBCContainer> >& neumann_bcs );
60 
62 
63  void build_type_based_bcs( const GetPot& input,
64  MultiphysicsSystem& system,
65  const std::set<BoundaryID>& bc_ids,
66  libMesh::DofMap& dof_map,
67  const std::string& type_input_section,
68  std::set<std::string>& var_sections,
69  std::vector<SharedPtr<NeumannBCContainer> >& neumann_bcs );
70 
71  void build_axisymmetric_bcs( const GetPot& input,
72  MultiphysicsSystem& system,
73  const std::set<BoundaryID>& bc_ids,
74  libMesh::DofMap& dof_map,
75  const std::string& bc_type,
76  std::set<std::string>& var_sections,
77  std::vector<SharedPtr<NeumannBCContainer> >& neumann_bcs );
78 
80 
83  void build_bcs_by_var_section(const GetPot& input,
84  MultiphysicsSystem& system,
85  const std::string& bc_name,
86  const std::set<BoundaryID>& bc_ids,
87  libMesh::DofMap& dof_map,
88  std::set<std::string>& var_sections,
89  std::vector<SharedPtr<NeumannBCContainer> >& neumann_bcs);
90 
91  void parse_and_build_bc_id_map( const GetPot& input,
92  std::map<std::string,std::set<BoundaryID> >& bc_id_map );
93 
94  void verify_bc_ids_with_mesh( const MultiphysicsSystem& system,
95  const std::map<std::string,std::set<BoundaryID> >& bc_id_map ) const;
96 
97  void parse_var_sections( const GetPot& input, std::set<std::string>& sections );
98 
99  void build_periodic_bc( const GetPot& input,
100  libMesh::System& system,
101  const std::set<BoundaryID>& bc_ids,
102  const std::string& section );
103 
104  void parse_periodic_master_slave_ids( const GetPot& input,
105  const std::string& section,
106  libMesh::boundary_id_type& master_id,
107  libMesh::boundary_id_type& slave_id ) const;
108 
109  libMesh::RealVectorValue parse_periodic_offset(const GetPot& input,
110  const std::string& section) const;
111  };
112 } // end namespace GRINS
113 
114 #endif // GRINS_DEFAULT_BC_BUILDER_H
void parse_and_build_bc_id_map(const GetPot &input, std::map< std::string, std::set< BoundaryID > > &bc_id_map)
void build_periodic_bc(const GetPot &input, libMesh::System &system, const std::set< BoundaryID > &bc_ids, const std::string &section)
void build_type_based_bcs(const GetPot &input, MultiphysicsSystem &system, const std::set< BoundaryID > &bc_ids, libMesh::DofMap &dof_map, const std::string &type_input_section, std::set< std::string > &var_sections, std::vector< SharedPtr< NeumannBCContainer > > &neumann_bcs)
Helper function to build boundary conditions specified by a single type.
void parse_var_sections(const GetPot &input, std::set< std::string > &sections)
void parse_periodic_master_slave_ids(const GetPot &input, const std::string &section, libMesh::boundary_id_type &master_id, libMesh::boundary_id_type &slave_id) const
void verify_bc_ids_with_mesh(const MultiphysicsSystem &system, const std::map< std::string, std::set< BoundaryID > > &bc_id_map) const
GRINS namespace.
libMesh::RealVectorValue parse_periodic_offset(const GetPot &input, const std::string &section) const
Manages runtime construction of Dirichlet boundary conditions.
Definition: bc_builder.h:60
void build_bcs_by_var_section(const GetPot &input, MultiphysicsSystem &system, const std::string &bc_name, const std::set< BoundaryID > &bc_ids, libMesh::DofMap &dof_map, std::set< std::string > &var_sections, std::vector< SharedPtr< NeumannBCContainer > > &neumann_bcs)
Helper function to build boundary conditions using Variable sections.
Manages runtime construction of Dirichlet boundary conditions.
Interface with libMesh for solving Multiphysics problems.
virtual void build_bcs(const GetPot &input, MultiphysicsSystem &system, std::vector< SharedPtr< NeumannBCContainer > > &neumann_bcs)
void build_axisymmetric_bcs(const GetPot &input, MultiphysicsSystem &system, const std::set< BoundaryID > &bc_ids, libMesh::DofMap &dof_map, const std::string &bc_type, std::set< std::string > &var_sections, std::vector< SharedPtr< NeumannBCContainer > > &neumann_bcs)

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