GRINS-0.6.0
dbc_container.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // GRINS - General Reacting Incompressible Navier-Stokes
5 //
6 // Copyright (C) 2014-2015 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 
26 #ifndef GRINS_DBC_CONTAINER_H
27 #define GRINS_DBC_CONTAINER_H
28 
29 #include <vector>
30 #include <set>
31 
32 #include "boost/tr1/memory.hpp"
33 
34 // libMesh
35 #include "libmesh/fem_function_base.h"
36 #include "libmesh/function_base.h"
37 
38 // GRINS
39 #include "grins/var_typedefs.h"
40 
41 namespace GRINS
42 {
44 
50  {
51  public:
52 
53  DBCContainer();
54  ~DBCContainer();
55 
57  void add_var_name( const GRINS::VariableName& var );
58 
60  void add_bc_id( const GRINS::BoundaryID bc_id );
61 
63 
64  void set_func( std::tr1::shared_ptr<libMesh::FunctionBase<libMesh::Number> > func );
65 
66  void set_fem_func_string( const std::string& s );
67 
68  std::vector<GRINS::VariableName> get_var_names() const;
69  std::set<GRINS::BoundaryID> get_bc_ids() const;
70 
71  std::tr1::shared_ptr<libMesh::FunctionBase<libMesh::Number> >
72  get_func() const;
73 
74  const std::string&
75  get_fem_func_string() const;
76 
77  private:
78 
79  std::vector<GRINS::VariableName> _var_names;
80  std::set<GRINS::BoundaryID> _bc_ids;
81  std::tr1::shared_ptr<libMesh::FunctionBase<libMesh::Number> > _func;
83 
84  };
85 }
86 #endif // GRINS_DBC_CONTAINER_H
std::vector< GRINS::VariableName > _var_names
Definition: dbc_container.h:79
Simple helper class to setup general Dirichlet boundary conditions.
Definition: dbc_container.h:49
libMesh::boundary_id_type BoundaryID
More descriptive name of the type used for boundary ids.
Definition: var_typedefs.h:54
std::tr1::shared_ptr< libMesh::FunctionBase< libMesh::Number > > _func
Definition: dbc_container.h:81
void set_fem_func_string(const std::string &s)
Definition: dbc_container.C:64
std::set< GRINS::BoundaryID > _bc_ids
Definition: dbc_container.h:80
std::string VariableName
Definition: var_typedefs.h:50
std::tr1::shared_ptr< libMesh::FunctionBase< libMesh::Number > > get_func() const
Definition: dbc_container.C:86
std::vector< GRINS::VariableName > get_var_names() const
Definition: dbc_container.C:70
std::set< GRINS::BoundaryID > get_bc_ids() const
Definition: dbc_container.C:75
void add_var_name(const GRINS::VariableName &var)
Add variables that are constrained by the Dirichlet bc.
Definition: dbc_container.C:46
std::string _parsed_fem_func_string
Definition: dbc_container.h:82
GRINS namespace.
const std::string & get_fem_func_string() const
Definition: dbc_container.C:81
void add_bc_id(const GRINS::BoundaryID bc_id)
Add boundary id's for which this Dirichlet bc is to be applied.
Definition: dbc_container.C:52
void set_func(std::tr1::shared_ptr< libMesh::FunctionBase< libMesh::Number > > func)
Add the Dirichlet bc functor.
Definition: dbc_container.C:58

Generated on Mon Jun 22 2015 21:32:19 for GRINS-0.6.0 by  doxygen 1.8.9.1