Commit d3a727bc authored by Alain O' Miniussi's avatar Alain O' Miniussi
Browse files

simplify factory method

parent 83dc89ad
......@@ -46,7 +46,7 @@ namespace fargOCA {
/// \brief Load from file.
static shptr<Disk> make(fmpi::communicator const& comm, H5::Group const& root);
/// \brief Make a disk in it's initial user specified state.
static shptr<Disk> makeInitial(DiskPhysic const& physic, const GridDispatch& grid);
static shptr<Disk> make(DiskPhysic const& physic, const GridDispatch& grid);
virtual ~Disk();
shptr<Disk> shared() { return shared_from_this(); }
......
......@@ -87,7 +87,7 @@ buildStartPoint(fmpi::communicator world, po::variables_map const& vm, std::ostr
shptr<DiskPhysic> physic = loader.extractPhysic();
shptr<GridDispatch const> grid = GridDispatch::make(world, loader.extractGridCoords());
reportUnusedConfig(loader.unused(), log);
shptr<Disk> disk = Disk::makeInitial(*physic, *grid);
shptr<Disk> disk = Disk::make(*physic, *grid);
if (restartOutput) {
disk->addPhysicalTime(vm["restart-time"].as<real>());
......
......@@ -88,7 +88,7 @@ namespace fargOCA {
}
shptr<Disk>
Disk::makeInitial(DiskPhysic const& physic,
Disk::make(DiskPhysic const& physic,
GridDispatch const& grid) {
return shptr<Disk>(new Disk(PlanetarySystem::make(physic), physic.shared(), grid.shared()));
}
......@@ -651,7 +651,7 @@ namespace fargOCA {
if (profilesGroup) {
myProfiles.reset(new DiskProfiles(grid(), *profilesGroup));
} else {
auto initial = Disk::makeInitial(physic(), grid());
auto initial = Disk::make(physic(), grid());
myProfiles.reset(new DiskProfiles(initial->profiles()));
grid().log() << "No profiles found in HDF5 file.\n"
<< "Consider using 'disk_profiles_update'.\n";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment