Reference documentation for deal.II version 9.1.0-pre
parsed_function.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2007 - 2017 by the deal.II authors
4 //
5 // This file is part of the deal.II library.
6 //
7 // The deal.II 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.md at
12 // the top level directory of deal.II.
13 //
14 // ---------------------------------------------------------------------
15 
16 
17 #ifndef dealii_parsed_function_h
18 #define dealii_parsed_function_h
19 
20 #include <deal.II/base/auto_derivative_function.h>
21 #include <deal.II/base/function_parser.h>
22 #include <deal.II/base/parameter_handler.h>
23 
24 DEAL_II_NAMESPACE_OPEN
25 
26 namespace Functions
27 {
78  template <int dim>
80  {
81  public:
88  ParsedFunction(const unsigned int n_components = 1, const double h = 1e-8);
89 
108  static void
110  const unsigned int n_components = 1);
111 
181  void
183 
188  virtual void
189  vector_value(const Point<dim> &p, Vector<double> &values) const override;
190 
197  virtual double
198  value(const Point<dim> &p, const unsigned int component = 0) const override;
199 
206  virtual void
207  set_time(const double newtime) override;
208 
209  private:
214  };
215 } // namespace Functions
216 
217 DEAL_II_NAMESPACE_CLOSE
218 
219 #endif
const unsigned int n_components
Definition: function.h:160
virtual void vector_value(const Point< dim > &p, Vector< double > &values) const override
virtual void set_time(const double newtime) override
static void declare_parameters(ParameterHandler &prm, const unsigned int n_components=1)
void parse_parameters(ParameterHandler &prm)
ParsedFunction(const unsigned int n_components=1, const double h=1e-8)
FunctionParser< dim > function_object
virtual double value(const Point< dim > &p, const unsigned int component=0) const override