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> 43 template <
int dim>
class Simulator;
44 template <
int dim>
class SimulatorAccess;
92 std::pair<std::string,std::string>
93 execute (TableHandler &statistics) = 0;
118 std::list<std::string>
119 required_other_postprocessors ()
const;
143 void save (std::map<std::string, std::string> &status_strings)
const;
157 void load (
const std::map<std::string, std::string> &status_strings);
186 std::list<std::pair<std::string,std::string>>
187 execute (TableHandler &statistics);
203 template <
typename PostprocessorType,
204 typename =
typename std::enable_if_t<std::is_base_of<Interface<dim>,PostprocessorType>::value>>
207 has_matching_postprocessor ()
const;
225 template <
typename PostprocessorType,
226 typename =
typename std::enable_if_t<std::is_base_of<Interface<dim>,PostprocessorType>::value>>
228 const PostprocessorType &
229 get_matching_postprocessor ()
const;
245 parse_parameters (ParameterHandler &prm)
override;
251 template <
class Archive>
252 void save (Archive &ar,
253 const unsigned int version)
const;
259 template <
class Archive>
260 void load (Archive &ar,
261 const unsigned int version);
263 BOOST_SERIALIZATION_SPLIT_MEMBER()
285 register_postprocessor (
const std::string &name,
286 const std::string &description,
287 void (*declare_parameters_function) (ParameterHandler &),
308 <<
"Could not find entry <" 310 <<
"> among the names of registered postprocessors.");
317 template <
class Archive>
319 const unsigned int)
const 323 std::map<std::string,std::string> saved_text;
324 for (
const auto &p : this->plugin_objects)
325 p->
save (saved_text);
332 template <
class Archive>
340 std::map<std::string,std::string> saved_text;
343 for (
auto &p : this->plugin_objects)
344 p->
load (saved_text);
350 template <
typename PostprocessorType,
typename>
355 return this->
template has_matching_active_plugin<PostprocessorType>();
361 template <
typename PostprocessorType,
typename>
363 const PostprocessorType &
366 return this->
template get_matching_active_plugin<PostprocessorType>();
377 #define ASPECT_REGISTER_POSTPROCESSOR(classname,name,description) \ 378 template class classname<2>; \ 379 template class classname<3>; \ 380 namespace ASPECT_REGISTER_POSTPROCESSOR_ ## classname \ 382 aspect::internal::Plugins::RegisterHelper<aspect::Postprocess::Interface<2>,classname<2>> \ 383 dummy_ ## classname ## _2d (&aspect::Postprocess::Manager<2>::register_postprocessor, \ 384 name, description); \ 385 aspect::internal::Plugins::RegisterHelper<aspect::Postprocess::Interface<3>,classname<3>> \ 386 dummy_ ## classname ## _3d (&aspect::Postprocess::Manager<3>::register_postprocessor, \ 387 name, description); \
void write_plugin_graph(std::ostream &output_stream)
void load(Archive &ar, const unsigned int version)
void save(Archive &ar, const unsigned int version) const
void declare_parameters(ParameterHandler &prm)
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.")