File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change 66#include " pfasst/interfaces.hpp"
77#include " pfasst/quadrature.hpp"
88#include " pfasst/sdc.hpp"
9+ #include " pfasst/encap/encap_sweeper.hpp"
910
1011namespace pfasst
1112{
1213 inline static void init (int argc, char ** argv)
1314 {
1415 SDC<>::enable_config_options (0 );
16+ encap::EncapSweeper<>::enable_config_options (0 );
1517 Quadrature::enable_config_options (0 );
1618 config::init_config ();
1719 log::start_log (argc, argv);
Original file line number Diff line number Diff line change 77
88#include < algorithm>
99#include < cstdlib>
10- #include < vector>
1110#include < memory>
11+ #include < vector>
12+ using namespace std ;
1213
1314#include " ../globals.hpp"
15+ #include " ../config.hpp"
1416#include " ../interfaces.hpp"
1517#include " ../quadrature.hpp"
1618#include " encapsulation.hpp"
@@ -25,6 +27,15 @@ namespace pfasst
2527 class EncapSweeper
2628 : public ISweeper<time>
2729 {
30+ private:
31+ static void init_config_options (po::options_description& opts)
32+ {
33+ opts.add_options ()
34+ (" abs_res_tol" , po::value<time>(), " absolute residual tolerance" )
35+ (" rel_res_tol" , po::value<time>(), " relative residual tolerance" )
36+ ;
37+ }
38+
2839 protected:
2940 // ! @{
3041 shared_ptr<IQuadrature<time>> quadrature;
@@ -289,6 +300,16 @@ namespace pfasst
289300 this ->start_state ->broadcast (comm);
290301 }
291302 // ! @}
303+
304+ // ! @{
305+ static void enable_config_options (size_t index = -1 )
306+ {
307+ pfasst::config::Options::get_instance ()
308+ .register_init_function (" Encapsulation Sweeper" ,
309+ std::function<void (po::options_description&)>(init_config_options),
310+ index);
311+ }
312+ // ! @}
292313 };
293314
294315
You can’t perform that action at this time.
0 commit comments