GRINS-0.8.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-2017 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 #include "grins/builder_helper.h"
31 
32 // libMesh foward declarations
33 namespace libMesh
34 {
35  class System;
36 }
37 
38 namespace GRINS
39 {
41 
47  class DefaultBCBuilder : public BCBuilder,
48  public BuilderHelper
49  {
50  public:
51 
53  : BCBuilder(),
55  {};
56 
58 
59  protected:
60 
61  virtual void build_bcs( const GetPot& input, MultiphysicsSystem& system,
62  std::vector<SharedPtr<NeumannBCContainer> >& neumann_bcs );
63 
65 
66  void build_type_based_bcs( const GetPot& input,
67  MultiphysicsSystem& system,
68  const std::set<BoundaryID>& bc_ids,
69  libMesh::DofMap& dof_map,
70  const std::string& type_input_section,
71  std::set<std::string>& var_sections,
72  std::vector<SharedPtr<NeumannBCContainer> >& neumann_bcs );
73 
74  void build_axisymmetric_bcs( const GetPot& input,
75  MultiphysicsSystem& system,
76  const std::set<BoundaryID>& bc_ids,
77  libMesh::DofMap& dof_map,
78  const std::string& bc_type,
79  std::set<std::string>& var_sections,
80  std::vector<SharedPtr<NeumannBCContainer> >& neumann_bcs );
81 
83 
86  void build_bcs_by_var_section(const GetPot& input,
87  MultiphysicsSystem& system,
88  const std::string& bc_name,
89  const std::set<BoundaryID>& bc_ids,
90  libMesh::DofMap& dof_map,
91  std::set<std::string>& var_sections,
92  const std::map<BoundaryID,std::vector<libMesh::subdomain_id_type> >& bc_id_to_subdomain_id_map,
93  std::vector<SharedPtr<NeumannBCContainer> >& neumann_bcs);
94 
95  void parse_and_build_bc_id_map( const GetPot& input,
96  std::map<std::string,std::set<BoundaryID> >& bc_id_map );
97 
98  void verify_bc_ids_with_mesh( const MultiphysicsSystem& system,
99  const std::map<std::string,std::set<BoundaryID> >& bc_id_map ) const;
100 
101  void build_periodic_bc( const GetPot& input,
102  libMesh::System& system,
103  const std::set<BoundaryID>& bc_ids,
104  const std::string& section );
105 
106  void parse_periodic_master_slave_ids( const GetPot& input,
107  const std::string& section,
108  libMesh::boundary_id_type& master_id,
109  libMesh::boundary_id_type& slave_id ) const;
110 
111  libMesh::RealVectorValue parse_periodic_offset(const GetPot& input,
112  const std::string& section) const;
113 
115 
118  ( const MultiphysicsSystem& system,
119  std::map<BoundaryID,std::vector<libMesh::subdomain_id_type> >& bc_id_to_subdomain_id_map ) const;
120 
122  bool is_var_active( const FEVariablesBase& var,
123  const std::vector<libMesh::subdomain_id_type>& subdomain_ids ) const;
124 
125  };
126 } // end namespace GRINS
127 
128 #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)
libMesh::boundary_id_type BoundaryID
More descriptive name of the type used for boundary ids.
Definition: var_typedefs.h:56
void build_periodic_bc(const GetPot &input, libMesh::System &system, const std::set< BoundaryID > &bc_ids, const std::string &section)
bool is_var_active(const FEVariablesBase &var, const std::vector< libMesh::subdomain_id_type > &subdomain_ids) const
Check if the Variable var is active on the given subdomain_id.
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_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.
This class contains common functions used by various Builders throughout GRINS.
libMesh::RealVectorValue parse_periodic_offset(const GetPot &input, const std::string &section) const
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, const std::map< BoundaryID, std::vector< libMesh::subdomain_id_type > > &bc_id_to_subdomain_id_map, std::vector< SharedPtr< NeumannBCContainer > > &neumann_bcs)
Helper function to build boundary conditions using Variable sections.
Manages runtime construction of Dirichlet boundary conditions.
Definition: bc_builder.h:60
void build_bc_to_subdomain_map_check_with_mesh(const MultiphysicsSystem &system, std::map< BoundaryID, std::vector< libMesh::subdomain_id_type > > &bc_id_to_subdomain_id_map) const
Build up bc_id to subdomain_id map.
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 Tue Dec 19 2017 12:47:27 for GRINS-0.8.0 by  doxygen 1.8.9.1