GRINS-0.8.0
dirichlet_bc_factory_function_base.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_DIRICHLET_BC_FACTORY_FUNCTION_BASE_H
26 #define GRINS_DIRICHLET_BC_FACTORY_FUNCTION_BASE_H
27 
28 // GRINS
30 #include "grins/multiphysics_sys.h"
31 
32 namespace GRINS
33 {
34  template<typename FunctionType>
36  {
37  public:
38 
39  DirichletBCFactoryFunctionBase( const std::string& bc_type_name )
40  : DirichletBCFactoryAbstract(bc_type_name)
41  {}
42 
44 
45  protected:
46 
48 
63  virtual libMesh::UniquePtr<FunctionType>
64  build_func( const GetPot& input,
65  MultiphysicsSystem& system,
66  std::vector<std::string>& var_names,
67  const std::string& section ) =0;
68 
70  libMesh::UniquePtr<libMesh::DirichletBoundary>
71  make_dirichlet_boundary( const std::set<BoundaryID>& bc_ids,
72  const libMesh::System& system,
73  libMesh::UniquePtr<FunctionType>& func,
74  const std::vector<VariableIndex>& var_indices );
75 
77 
78  virtual const std::vector<std::string>& get_var_names() const
79  { return this->_fe_var->active_var_names(); }
80 
81  private:
82 
83  virtual libMesh::UniquePtr<libMesh::DirichletBoundary> create();
84 
85  };
86 
87 } // end namespace GRINS
88 
89 #endif // GRINS_DIRICHLET_BC_FACTORY_FUNCTION_BASE_H
libMesh::UniquePtr< libMesh::DirichletBoundary > make_dirichlet_boundary(const std::set< BoundaryID > &bc_ids, const libMesh::System &system, libMesh::UniquePtr< FunctionType > &func, const std::vector< VariableIndex > &var_indices)
Dispatch, based on FunctionType, to the correct DirchletBoundary construction.
virtual libMesh::UniquePtr< FunctionType > build_func(const GetPot &input, MultiphysicsSystem &system, std::vector< std::string > &var_names, const std::string &section)=0
Builds the FunctionBase object for boundary condition.
GRINS namespace.
DirichletBCFactoryFunctionBase(const std::string &bc_type_name)
virtual libMesh::UniquePtr< libMesh::DirichletBoundary > create()
Subclasses implement the actual construction of the Base object in create().
Interface with libMesh for solving Multiphysics problems.
virtual const std::vector< std::string > & get_var_names() const
Helper function that can be overridded in subclasses.
const std::vector< std::string > & active_var_names() const
Return the var names that are active from this class.
static const FEVariablesBase * _fe_var
The FEVariablesBase class associated with the boundary condition being built.

Generated on Tue Dec 19 2017 12:47:27 for GRINS-0.8.0 by  doxygen 1.8.9.1