22 #ifndef _aspect_postprocess_interface_h 23 #define _aspect_postprocess_interface_h 30 #include <deal.II/base/table_handler.h> 31 #include <deal.II/base/parameter_handler.h> 33 #include <boost/serialization/split_member.hpp> 34 #include <boost/core/demangle.hpp> 41 template <
int dim>
class Simulator;
42 template <
int dim>
class SimulatorAccess;
90 std::pair<std::string,std::string>
91 execute (TableHandler &statistics) = 0;
116 std::list<std::string>
141 void save (std::map<std::string, std::string> &status_strings)
const;
155 void load (
const std::map<std::string, std::string> &status_strings);
184 std::list<std::pair<std::string,std::string>>
185 execute (TableHandler &statistics);
201 template <
typename PostprocessorType,
202 typename =
typename std::enable_if_t<std::is_base_of<Interface<dim>,PostprocessorType>::value>>
205 has_matching_postprocessor ()
const;
223 template <
typename PostprocessorType,
224 typename =
typename std::enable_if_t<std::is_base_of<Interface<dim>,PostprocessorType>::value>>
226 const PostprocessorType &
227 get_matching_postprocessor ()
const;
249 template <
class Archive>
250 void save (Archive &ar,
251 const unsigned int version)
const;
257 template <
class Archive>
258 void load (Archive &ar,
259 const unsigned int version);
261 BOOST_SERIALIZATION_SPLIT_MEMBER()
283 register_postprocessor (
const std::string &name,
284 const std::string &description,
285 void (*declare_parameters_function) (ParameterHandler &),
306 <<
"Could not find entry <" 308 <<
"> among the names of registered postprocessors.");
315 template <
class Archive>
317 const unsigned int)
const 321 std::map<std::string,std::string> saved_text;
322 for (
const auto &p : this->plugin_objects)
323 p->save (saved_text);
330 template <
class Archive>
338 std::map<std::string,std::string> saved_text;
341 for (
auto &p : this->plugin_objects)
342 p->load (saved_text);
348 template <
typename PostprocessorType,
typename>
353 return this->
template has_matching_active_plugin<PostprocessorType>();
359 template <
typename PostprocessorType,
typename>
361 const PostprocessorType &
364 return this->
template get_matching_active_plugin<PostprocessorType>();
375 #define ASPECT_REGISTER_POSTPROCESSOR(classname,name,description) \ 376 template class classname<2>; \ 377 template class classname<3>; \ 378 namespace ASPECT_REGISTER_POSTPROCESSOR_ ## classname \ 380 aspect::internal::Plugins::RegisterHelper<aspect::Postprocess::Interface<2>,classname<2>> \ 381 dummy_ ## classname ## _2d (&aspect::Postprocess::Manager<2>::register_postprocessor, \ 382 name, description); \ 383 aspect::internal::Plugins::RegisterHelper<aspect::Postprocess::Interface<3>,classname<3>> \ 384 dummy_ ## classname ## _3d (&aspect::Postprocess::Manager<3>::register_postprocessor, \ 385 name, description); \ virtual void save(std::map< std::string, std::string > &status_strings) const
virtual void parse_parameters(ParameterHandler &prm)
void write_plugin_graph(std::ostream &output_stream)
DEAL_II_DEPRECATED const PostprocessorType & get_matching_postprocessor() const
virtual std::pair< std::string, std::string > execute(TableHandler &statistics)=0
void load(Archive &ar, const unsigned int version)
void save(Archive &ar, const unsigned int version) const
DEAL_II_DEPRECATED bool has_matching_postprocessor() const
virtual std::list< std::string > required_other_postprocessors() const
static void declare_parameters(ParameterHandler &prm)
virtual void load(const std::map< std::string, std::string > &status_strings)
DeclException1(ProbabilityFunctionNegative, Point< dim >,<< "Your probability density function in the particle generator " "returned a negative probability density for the following position: "<< arg1<< ". Please check your function expression.")