Reference documentation for deal.II version 8.5.1
parsed_function.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2007 - 2016 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 at
12 // the top level of the deal.II distribution.
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 declare_parameters(ParameterHandler &prm,
109  const unsigned int n_components = 1);
110 
181 
186  virtual void vector_value (const Point<dim> &p,
187  Vector<double> &values) const;
188 
195  virtual double value (const Point< dim > &p,
196  const unsigned int component = 0) const;
197 
204  virtual void set_time(const double newtime);
205 
206  private:
211  };
212 }
213 
214 DEAL_II_NAMESPACE_CLOSE
215 
216 #endif
virtual double value(const Point< dim > &p, const unsigned int component=0) const
static void declare_parameters(ParameterHandler &prm, const unsigned int n_components=1)
const unsigned int n_components
Definition: function.h:144
virtual void vector_value(const Point< dim > &p, Vector< double > &values) const
void parse_parameters(ParameterHandler &prm)
ParsedFunction(const unsigned int n_components=1, const double h=1e-8)
FunctionParser< dim > function_object
virtual void set_time(const double newtime)