X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/1703c9a9f5a27f040e38c51bb7801af8c6ad40c1..f2aaadd437ac30adad539d969164098b50cd2338:/src/surf/disk_s19.cpp diff --git a/src/surf/disk_s19.cpp b/src/surf/disk_s19.cpp index 0b12cab6e1..8e910fffd9 100644 --- a/src/surf/disk_s19.cpp +++ b/src/surf/disk_s19.cpp @@ -5,8 +5,10 @@ #include "disk_s19.hpp" #include "simgrid/kernel/routing/NetPoint.hpp" +#include "simgrid/kernel/routing/NetZoneImpl.hpp" #include "simgrid/s4u/Engine.hpp" #include "simgrid/s4u/Host.hpp" +#include "src/kernel/EngineImpl.hpp" #include "src/kernel/lmm/maxmin.hpp" #include "src/surf/xml/platf.hpp" #include "surf/surf.hpp" @@ -19,19 +21,16 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(res_disk); void surf_disk_model_init_default() { - surf_disk_model = new simgrid::kernel::resource::DiskS19Model(); + auto disk_model = std::make_shared(); + simgrid::kernel::EngineImpl::get_instance()->add_model(simgrid::kernel::resource::Model::Type::DISK, disk_model, + true); + simgrid::s4u::Engine::get_instance()->get_netzone_root()->get_impl()->set_disk_model(disk_model); } namespace simgrid { namespace kernel { namespace resource { -DiskS19Model::DiskS19Model() -{ - all_existing_models.push_back(this); - models_by_type[simgrid::kernel::resource::Model::Type::DISK].push_back(this); -} - DiskImpl* DiskS19Model::create_disk(const std::string& name, double read_bandwidth, double write_bandwidth) { return (new DiskS19(name, read_bandwidth, write_bandwidth))->set_model(this);