diff --git a/src/field/initialprofiles.cxx b/src/field/initialprofiles.cxx index 2c34caa6e1..6a437dbe02 100644 --- a/src/field/initialprofiles.cxx +++ b/src/field/initialprofiles.cxx @@ -1,23 +1,10 @@ /************************************************************************** * Sets initial profiles * - * ChangeLog - * ========= - * - * 2011-02-12 Ben Dudson - * * Changed to use new options system. For now the structure of the - * options is the same, but this could be modified more easily in future - * - * 2010-05-12 Ben Dudson - * - * * Changed random numbers to use a hash of the parameters - * so that the phase doesn't vary with number of processors or grid size - * User can vary phase to give a different random sequence - * ************************************************************************** - * Copyright 2010 B.D.Dudson, S.Farley, M.V.Umansky, X.Q.Xu + * Copyright 2010 - 2026 BOUT++ contributors * - * Contact: Ben Dudson, bd512@york.ac.uk + * Contact: Ben Dudson, dudson2@llnl.gov * * This file is part of BOUT++. * @@ -49,12 +36,10 @@ void initial_profile(const std::string& name, Field3D& var) { Options* varOpts = Options::getRoot()->getSection(name); - FieldFactory f(localmesh); - std::string function; VAROPTION(varOpts, function, "0.0"); - var = f.create3D(function, varOpts, nullptr, var.getLocation()); + var = FieldFactory::get()->create3D(function, varOpts, localmesh, var.getLocation()); // Optionally scale the variable BoutReal scale; @@ -68,12 +53,10 @@ void initial_profile(const std::string& name, Field2D& var) { Options* varOpts = Options::getRoot()->getSection(name); - FieldFactory f(localmesh); - std::string function; VAROPTION(varOpts, function, "0.0"); - var = f.create2D(function, varOpts, nullptr, var.getLocation()); + var = FieldFactory::get()->create2D(function, varOpts, localmesh, var.getLocation()); // Optionally scale the variable BoutReal scale;