16 #ifndef _d2k_parsed_mapped_function_h 17 #define _d2k_parsed_mapped_function_h 19 #include <deal2lkit/config.h> 70 template <
int spacedim>
94 const unsigned int &n_components=1,
95 const std::string &component_names =
"",
96 const std::string &default_id_components =
"0=ALL",
97 const std::string &default_id_functions =
"",
98 const std::string &default_constants =
"");
103 shared_ptr<dealii::Functions::ParsedFunction<spacedim> > get_mapped_function (
const unsigned int &
id)
const;
110 shared_ptr<dealii::Functions::ParsedFunction<spacedim> > get_mapped_normal_function (
const unsigned int &
id,
111 const unsigned int &fcv)
const;
116 ComponentMask get_mapped_mask (
const unsigned int &
id)
const;
121 std::vector<unsigned int> get_mapped_ids()
const;
126 std::vector<unsigned int> get_mapped_normal_ids()
const;
137 virtual void parse_parameters_call_back ();
142 bool acts_on_id (
unsigned int &
id)
const;
147 void set_time (
const double &t);
153 <<
"The number of ids specified in the field " 154 <<
"'IDs and component masks' (" << arg1 <<
") " 155 <<
"must match the number of ids " 156 <<
"set in the field 'IDs and expressions' (" << arg2 <<
").");
160 <<
"No entry with the id " << arg1 <<
" exists.");
164 <<
"No component mask associated to the id " << arg1 <<
" are defined.");
167 DeclException3(ExcWrongComponent,
unsigned int,
unsigned int,
unsigned int,
169 <<
", wrong component number has been used: " 170 << arg2 <<
" is not in the range [0, " 173 DeclException3(ExcWrongVariable,
unsigned int, std::string, std::vector<std::string>,
175 <<
", wrong variabile name has been used: " 176 << arg2 <<
" does not belong to the knwon variables: " 181 void split_id_components(
const std::string &parsed_idcomponents);
182 void split_id_functions(
const std::string &parsed_idfunctions,
183 const std::string &constants);
184 void add_normal_components();
186 void set_normal_functions();
196 std::vector<unsigned int>
ids;
199 std::map<unsigned int, shared_ptr<dealii::Functions::ParsedFunction<spacedim> > >
id_functions;
200 std::map<unsigned int, std::pair<ComponentMask, shared_ptr<dealii::Functions::ParsedFunction<spacedim> > > >
mapped_functions;
204 std::map<std::pair<unsigned int, unsigned int>, shared_ptr<dealii::Functions::ParsedFunction<spacedim> > >
_normal_functions;
#define DeclException2(Exception2, type1, type2, outsequence)
A parameter acceptor base class.
const unsigned int n_components
std::vector< std::pair< unsigned int, std::string > > normal_components
std::map< unsigned int, std::string > id_str_functions
std::string str_id_functions
std::vector< unsigned int > ids
DeclException1(ExcCannottExecuteCommand, std::string,<< "Cannot execute command "<< arg1<< "\Please verify you have "<< "the needed permissions.")
Cannot execute std::system(command)
std::vector< unsigned int > normal_ids
ParsedMappedFunctions object.
std::vector< std::string > _component_names
std::map< unsigned int, shared_ptr< dealii::Functions::ParsedFunction< spacedim > > > id_functions
std::string str_id_components
std::map< std::string, std::pair< std::vector< unsigned int >, unsigned int > > mapped_normal_components
std::string str_constants
std::string str_component_names
std::map< std::pair< unsigned int, unsigned int >, shared_ptr< dealii::Functions::ParsedFunction< spacedim > > > _normal_functions
std::map< unsigned int, std::pair< ComponentMask, shared_ptr< dealii::Functions::ParsedFunction< spacedim > > > > mapped_functions
std::string print(const std::vector< Type > &list, const std::string sep=",")
Return a string containing the content of the vector, with elements separated by the @ sep parameter...
std::vector< std::string > _normal_components
std::vector< T > unique(const std::vector< T > &myvector)
A simple function that accepts a vector as an input and returns a second vector containing only the u...
#define DeclException3(Exception3, type1, type2, type3, outsequence)
std::map< unsigned int, ComponentMask > id_components
std::vector< std::string > _all_components