A deal2lkit wrapper for dealii::Functions::ParsedFunction. More...
#include <parsed_function.h>
Public Member Functions | |
ParsedFunction (const std::string &name="", const unsigned int &n_components=1, const std::string &default_exp="", const std::string &default_const="") | |
Constructor: takes an optional name for the section. More... | |
virtual void | declare_parameters (ParameterHandler &prm) |
Calls the underlying function of ParsedFunction. More... | |
virtual void | parse_parameters (ParameterHandler &prm) |
Calls the underlying function of ParsedFunction. More... | |
Public Member Functions inherited from ParameterAcceptor | |
ParameterAcceptor (const std::string section_name="") | |
The constructor adds derived classes to the list of acceptors. More... | |
virtual | ~ParameterAcceptor () |
The destructor sets to zero the pointer relative to this index, so that it is safe to destroy the mother class. More... | |
virtual void | parse_parameters_call_back () |
Parse parameter call back. More... | |
std::string | get_section_name () const |
Return the section name of this class. More... | |
std::vector< std::string > | get_section_path () const |
Travers all registered classes, and figure out what subsections we need to enter. More... | |
template<class T > | |
void | add_parameter (ParameterHandler &prm, T *parameter, const std::string &entry, const std::string &default_value, const Patterns::PatternBase &pattern=Patterns::Anything(), const std::string &documentation=std::string()) |
Add a parameter the given parameter list. More... | |
template<class T > | |
void | add_parameter (T ¶meter, const std::string &entry, const std::string &documentation=std::string(), ParameterHandler &prm=ParameterAcceptor::prm) |
Add a parameter to the global parameter handler ParameterAcceptor::prm. More... | |
void | enter_my_subsection (ParameterHandler &prm) |
Make sure we enter the right subsection of the global parameter file. More... | |
void | leave_my_subsection (ParameterHandler &prm) |
This function undoes what the enter_my_subsection() function did. More... | |
template<> | |
std_cxx11::shared_ptr< Patterns::PatternBase > | to_pattern (const double &) |
double More... | |
template<> | |
std::string | to_string (const double &entry) |
template<> | |
double | to_type (const std::string ¶meter) |
template<> | |
std_cxx11::shared_ptr< Patterns::PatternBase > | to_pattern (const int &) |
int More... | |
template<> | |
std::string | to_string (const int &entry) |
template<> | |
int | to_type (const std::string ¶meter) |
template<> | |
std_cxx11::shared_ptr< Patterns::PatternBase > | to_pattern (const unsigned int &) |
unsigned int More... | |
template<> | |
std::string | to_string (const unsigned int &entry) |
template<> | |
unsigned int | to_type (const std::string ¶meter) |
template<> | |
std_cxx11::shared_ptr< Patterns::PatternBase > | to_pattern (const bool &) |
bool More... | |
template<> | |
std::string | to_string (const bool &entry) |
template<> | |
bool | to_type (const std::string ¶meter) |
Public Member Functions inherited from Subscriptor | |
Subscriptor () | |
Subscriptor (const Subscriptor &) | |
Subscriptor (Subscriptor &&) | |
virtual | ~Subscriptor () |
Subscriptor & | operator= (const Subscriptor &) |
Subscriptor & | operator= (Subscriptor &&) |
void | subscribe (const char *identifier=0) const |
void | unsubscribe (const char *identifier=0) const |
unsigned int | n_subscriptions () const |
void | list_subscribers () const |
void | serialize (Archive &ar, const unsigned int version) |
Public Member Functions inherited from Functions::ParsedFunction< dim > | |
ParsedFunction (const unsigned int n_components=1, const double h=1e-8) | |
void | parse_parameters (ParameterHandler &prm) |
virtual void | vector_value (const Point< dim > &p, Vector< double > &values) const |
virtual double | value (const Point< dim > &p, const unsigned int component=0) const |
virtual void | set_time (const double newtime) |
Public Member Functions inherited from AutoDerivativeFunction< dim > | |
AutoDerivativeFunction (const double h, const unsigned int n_components=1, const double initial_time=0.0) | |
virtual | ~AutoDerivativeFunction () |
void | set_formula (const DifferenceFormula formula=Euler) |
void | set_h (const double h) |
virtual Tensor< 1, dim > | gradient (const Point< dim > &p, const unsigned int component=0) const |
virtual void | vector_gradient (const Point< dim > &p, std::vector< Tensor< 1, dim > > &gradients) const |
virtual void | gradient_list (const std::vector< Point< dim > > &points, std::vector< Tensor< 1, dim > > &gradients, const unsigned int component=0) const |
virtual void | vector_gradient_list (const std::vector< Point< dim > > &points, std::vector< std::vector< Tensor< 1, dim > > > &gradients) const |
Public Member Functions inherited from Function< dim > | |
Function (const unsigned int n_components=1, const doubleinitial_time=0.0) | |
virtual | ~Function ()=0 |
Function & | operator= (const Function &f) |
virtual void | value_list (const std::vector< Point< dim > > &points, std::vector< double > &values, const unsigned int component=0) const |
virtual void | vector_value_list (const std::vector< Point< dim > > &points, std::vector< Vector< double > > &values) const |
virtual void | vector_values (const std::vector< Point< dim > > &points, std::vector< std::vector< double > > &values) const |
virtual void | vector_gradient (const Point< dim > &p, std::vector< Tensor< 1, dim, double > > &gradients) const |
virtual void | gradient_list (const std::vector< Point< dim > > &points, std::vector< Tensor< 1, dim, double > > &gradients, const unsigned int component=0) const |
virtual void | vector_gradients (const std::vector< Point< dim > > &points, std::vector< std::vector< Tensor< 1, dim, double > > > &gradients) const |
virtual void | vector_gradient_list (const std::vector< Point< dim > > &points, std::vector< std::vector< Tensor< 1, dim, double > > > &gradients) const |
virtual double | laplacian (const Point< dim > &p, const unsigned int component=0) const |
virtual void | vector_laplacian (const Point< dim > &p, Vector< double > &values) const |
virtual void | laplacian_list (const std::vector< Point< dim > > &points, std::vector< double > &values, const unsigned int component=0) const |
virtual void | vector_laplacian_list (const std::vector< Point< dim > > &points, std::vector< Vector< double > > &values) const |
virtual SymmetricTensor< 2, dim, double > | hessian (const Point< dim > &p, const unsigned int component=0) const |
virtual void | vector_hessian (const Point< dim > &p, std::vector< SymmetricTensor< 2, dim, double > > &values) const |
virtual void | hessian_list (const std::vector< Point< dim > > &points, std::vector< SymmetricTensor< 2, dim, double > > &values, const unsigned int component=0) const |
virtual void | vector_hessian_list (const std::vector< Point< dim > > &points, std::vector< std::vector< SymmetricTensor< 2, dim, double > > > &values) const |
std::size_t | memory_consumption () const |
Public Member Functions inherited from FunctionTime< class > | |
FunctionTime (const Number initial_time=Number(0.0)) | |
virtual | ~FunctionTime () |
Number | get_time () const |
virtual void | set_time (const Number new_time) |
virtual void | advance_time (const Number delta_t) |
Private Attributes | |
const std::string | default_exp |
Default expression of this function. More... | |
const std::string | default_const |
const unsigned int | n_components |
Additional Inherited Members | |
Public Types inherited from AutoDerivativeFunction< dim > | |
enum | DifferenceFormula |
Static Public Member Functions inherited from ParameterAcceptor | |
static void | initialize (const std::string filename="", const std::string outfilename="") |
Call declare_all_parameters(), read filename (if it is present as input parameter) and parse_all_parameters() on the static member prm. More... | |
static void | clear () |
Clear class list and global parameter file. More... | |
static void | parse_all_parameters (ParameterHandler &prm=ParameterAcceptor::prm) |
Parse the given ParameterHandler. More... | |
static void | log_info () |
Print information about all stored classes. More... | |
static void | declare_all_parameters (ParameterHandler &prm=ParameterAcceptor::prm) |
Initialize the ParameterHandler with all derived classes parameters.This function enters the subsection returned by get_section_name() for each derived class, and declares all parameters that were added using add_parameter(). More... | |
template<class T > | |
static std_cxx11::shared_ptr< Patterns::PatternBase > | to_pattern (const T &) |
Given a class T, construct its default pattern to be used when declaring parameters. More... | |
template<class T > | |
static T | to_type (const std::string &) |
Given a string, fill the value of the given parameter. More... | |
template<class T > | |
static std::string | to_string (const T &) |
Given a parameter, return a string containing the given parameter. More... | |
Static Public Member Functions inherited from Subscriptor | |
static::ExceptionBase & | ExcInUse (int arg1, char *arg2, std::string &arg3) |
static::ExceptionBase & | ExcNoSubscriber (char *arg1, char *arg2) |
Static Public Member Functions inherited from Functions::ParsedFunction< dim > | |
static void | declare_parameters (ParameterHandler &prm, const unsigned int n_components=1) |
Static Public Member Functions inherited from AutoDerivativeFunction< dim > | |
static DifferenceFormula | get_formula_of_order (const unsigned int ord) |
Public Attributes inherited from AutoDerivativeFunction< dim > | |
Euler | |
UpwindEuler | |
FourthOrder | |
Public Attributes inherited from Function< dim > | |
const unsigned int | n_components |
Static Public Attributes inherited from ParameterAcceptor | |
static ParameterHandler | prm |
Static parameter. More... | |
Static Public Attributes inherited from Function< dim > | |
static const unsigned int | dimension |
Protected Attributes inherited from ParameterAcceptor | |
const std::string | section_name |
The subsection name for this class. More... | |
A deal2lkit wrapper for dealii::Functions::ParsedFunction.
The template integer specify the dimension of points this function accepts.
Definition at line 33 of file parsed_function.h.
ParsedFunction< dim >::ParsedFunction | ( | const std::string & | name = "" , |
const unsigned int & | n_components = 1 , |
||
const std::string & | default_exp = "" , |
||
const std::string & | default_const = "" |
||
) |
Constructor: takes an optional name for the section.
If the optional expression string is given, than it is used to set the expression as soon as the parameters are declared.
The n_components parameter is used to determine the number of components of this function. It defaults to one, and once it is set in the constructor, it cannot be changed by parameter file. The default_expression, instead, can be changed by acting on the parameter file. An exception will be thrown if the number of components of the expression does not coincide with the parameter passed at construction time to this function.
Definition at line 23 of file parsed_function.cc.
|
virtual |
Calls the underlying function of ParsedFunction.
Reimplemented from ParameterAcceptor.
Definition at line 36 of file parsed_function.cc.
|
virtual |
Calls the underlying function of ParsedFunction.
Reimplemented from ParameterAcceptor.
Definition at line 47 of file parsed_function.cc.
|
private |
Definition at line 70 of file parsed_function.h.
|
private |
|
private |
Definition at line 71 of file parsed_function.h.