Fluid structure interaction suite
proxy.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2022 by Luca Heltai
4 //
5 // This file is part of the FSI-suite platform, based on the deal.II library.
6 //
7 // The FSI-suite platform is free software; you can use it, redistribute it,
8 // and/or modify it under the terms of the GNU Lesser General Public License as
9 // published by the Free Software Foundation; either version 3.0 of the License,
10 // or (at your option) any later version. The full text of the license can be
11 // found in the file LICENSE at the top level of the FSI-suite platform
12 // distribution.
13 //
14 // ---------------------------------------------------------------------
15 
16 #ifndef parsed_tools_proxy_h
17 #define parsed_tools_proxy_h
18 
19 #include <deal.II/base/config.h>
20 
23 
24 namespace ParsedTools
25 {
31  template <class SourceClass>
32  class Proxy : public dealii::ParameterAcceptor, public SourceClass
33  {
34  public:
40  template <typename... Args>
41  Proxy(const std::string &section_name, Args... args);
42  };
43 
44  template <class SourceClass>
45  template <typename... Args>
46  Proxy<SourceClass>::Proxy(const std::string &section_name, Args... args)
47  : dealii::ParameterAcceptor(section_name)
48  , SourceClass(args...)
49  {
50  enter_my_subsection(this->prm);
51  SourceClass::add_parameters(this->prm);
52  leave_my_subsection(this->prm);
53  }
54 } // namespace ParsedTools
55 #endif
const std::string section_name
static ParameterHandler prm
void leave_my_subsection(ParameterHandler &prm)
void enter_my_subsection(ParameterHandler &prm)
A proxy ParameterAcceptor wrapper for classes that have a member function add_parameters,...
Definition: proxy.h:33
Proxy(const std::string &section_name, Args... args)
Default constructor.
Definition: proxy.h:46
We collect in this namespace some wrappers around commonly used deal.II classes, derived from the Par...