GRINS-0.6.0
nbc_container.C
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 #include "grins/nbc_container.h"
27 
28 namespace GRINS
29 {
31  {
32  return;
33  }
34 
36  {
37  return;
38  }
39 
41  {
42  _bc_id = bc_id;
43  return;
44  }
45 
47  {
48  return _bc_id;
49  }
50 
52  std::tr1::shared_ptr<NeumannFuncObj> func )
53  {
54  if( _funcs.find(var) != _funcs.end() )
55  {
56  std::cerr << "Error: Can only specify one function per variable" << std::endl;
57  libmesh_error();
58  }
59 
60  _funcs.insert( std::make_pair( var, func ) );
61  return;
62  }
63 
64  std::tr1::shared_ptr<NeumannFuncObj> NBCContainer::get_func( VariableIndex var ) const
65  {
66  libmesh_assert( _funcs.find(var) != _funcs.end() );
67  return _funcs.find(var)->second;
68  }
69 
70 } // namespace GRINS
unsigned int VariableIndex
More descriptive name of the type used for variable indices.
Definition: var_typedefs.h:40
std::tr1::shared_ptr< NeumannFuncObj > get_func(VariableIndex var) const
Definition: nbc_container.C:64
libMesh::boundary_id_type BoundaryID
More descriptive name of the type used for boundary ids.
Definition: var_typedefs.h:54
GRINS namespace.
std::map< VariableIndex, std::tr1::shared_ptr< NeumannFuncObj > > _funcs
Definition: nbc_container.h:61
void add_var_func_pair(VariableIndex var, std::tr1::shared_ptr< NeumannFuncObj > func)
Add boundary id and corresponding functor object to be applied on that boundary.
Definition: nbc_container.C:51
BoundaryID get_bc_id() const
Definition: nbc_container.C:46
void set_bc_id(BoundaryID bc_id)
Add variable for which this boundary condition is to be applied.
Definition: nbc_container.C:40

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