deal2lkit: A ToolKit library for Deal.II
parsed_function.h
Go to the documentation of this file.
1 //-----------------------------------------------------------
2 //
3 // Copyright (C) 2015 by the deal2lkit authors
4 //
5 // This file is part of the deal2lkit library.
6 //
7 // The deal2lkit library is free software; you can use it, redistribute
8 // it, and/or modify it under the terms of the GNU Lesser General
9 // Public License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 // The full text of the license can be found in the file LICENSE at
12 // the top level of the deal2lkit distribution.
13 //
14 //-----------------------------------------------------------
15 
16 #ifndef _d2k_parsed_function_h
17 #define _d2k_parsed_function_h
18 
19 #include <deal2lkit/config.h>
22 
23 using namespace dealii;
24 
25 D2K_NAMESPACE_OPEN
26 
32 template<int dim>
34 {
35 public:
49  ParsedFunction(const std::string &name="",
50  const unsigned int &n_components=1,
51  const std::string &default_exp="",
52  const std::string &default_const="");
53 
57  virtual void declare_parameters(ParameterHandler &prm);
58 
62  virtual void parse_parameters(ParameterHandler &prm);
63 
64 
65 private:
69  const std::string default_exp;
70  const std::string default_const;
71  const unsigned int n_components;
72 };
73 
74 D2K_NAMESPACE_CLOSE
75 
76 #endif
77 
A parameter acceptor base class.
const std::string default_exp
Default expression of this function.
const unsigned int n_components
A deal2lkit wrapper for dealii::Functions::ParsedFunction.
const std::string default_const