Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 4 additions & 21 deletions src/field/initialprofiles.cxx
Original file line number Diff line number Diff line change
@@ -1,23 +1,10 @@
/**************************************************************************
* Sets initial profiles
*
* ChangeLog
* =========
*
* 2011-02-12 Ben Dudson <bd512@york.ac.uk>
* * 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 <bd512@york.ac.uk>
*
* * 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++.
*
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down
Loading