Reference documentation for deal.II version 8.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
parsed_function.h
1 // ---------------------------------------------------------------------
2 // @f$Id: parsed_function.h 31891 2013-12-05 00:34:40Z maier @f$
3 //
4 // Copyright (C) 2007 - 2013 by the deal.II authors
5 //
6 // This file is part of the deal.II library.
7 //
8 // The deal.II library is free software; you can use it, redistribute
9 // it, and/or modify it under the terms of the GNU Lesser General
10 // Public License as published by the Free Software Foundation; either
11 // version 2.1 of the License, or (at your option) any later version.
12 // The full text of the license can be found in the file LICENSE at
13 // the top level of the deal.II distribution.
14 //
15 // ---------------------------------------------------------------------
16 
17 
18 #ifndef __deal2__parsed_function_h
19 #define __deal2__parsed_function_h
20 
21 #include <deal.II/base/auto_derivative_function.h>
22 #include <deal.II/base/function_parser.h>
23 #include <deal.II/base/parameter_handler.h>
24 
26 
27 namespace Functions
28 {
80  template <int dim>
82  {
83  public:
96  ParsedFunction (const unsigned int n_components = 1, const double h=1e-8);
97 
126  static void declare_parameters(ParameterHandler &prm,
127  const unsigned int n_components = 1);
128 
222 
228  virtual void vector_value (const Point<dim> &p,
229  Vector<double> &values) const;
230 
242  virtual double value (const Point< dim > &p,
243  const unsigned int component = 0) const;
244 
255  virtual void set_time(const double newtime);
256 
257  private:
263  };
264 }
265 
266 DEAL_II_NAMESPACE_CLOSE
267 
268 #endif
virtual double value(const Point< dim > &p, const unsigned int component=0) const
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
const unsigned int n_components
Definition: function.h:130
static void declare_parameters(ParameterHandler &prm, const unsigned int n_components=1)
virtual void set_time(const double newtime)