Commit 633e89c8 authored by Alain O' Miniussi's avatar Alain O' Miniussi
Browse files

removed the config part and added error message if used.

refs #104


Former-commit-id: 962030ac19035e9fd5ec62e5014b3aa3fac58d6d
parent 9541d962
......@@ -176,7 +176,6 @@ namespace fargOCA {
friend void swap(Disk& g1, Disk& g2);
private:
void initLabel();
void initRadiativeEnergy();
void mapStateFields(std::function<void (ScalarField const&)> f) const;
......
......@@ -27,6 +27,16 @@ namespace pt = boost::property_tree;
namespace fargOCA {
namespace {
bool
CheckLabel(pt::ptree const& pt, std::ostream& log) {
if (pt.get_optional<std::string>("Disk.LabelAdvection")
|| pt.get_optional<std::string>("Label")) {
log << "Fatal: label configuration not supported, please use the add_tracer utilisty to add your label.\n";
return false;
}
return true;
}
bool
CheckReferentialRotation(pt::ptree const& pt, std::ostream& log) {
DiskReferentialType type = pt.get<DiskReferentialType>("Disk.Referential.Type");
......@@ -123,6 +133,7 @@ namespace fargOCA {
addCheck(CheckSystemRotate);
addCheck(CheckTorqueTracing);
addCheck(CheckRadialFlowTracing);
addCheck(CheckLabel);
}
boost::optional<ConfigLoader::ptree>
......
......@@ -76,9 +76,6 @@ namespace fargOCA {
}
}
}
if (physic.label.advected()) {
addTracer(ScalarField("default", grid));
}
}
Disk::Disk(std::string saved,
......@@ -103,7 +100,6 @@ namespace fargOCA {
computeTemperature();
}
}
initLabel();
mySoundSpeed.applyProfile(theoreticalProfiles().soundSpeed());
myPressure.applyProfile(theoreticalProfiles().pressure());
myViscosity.applyProfile(theoreticalProfiles().viscosity());
......@@ -844,24 +840,6 @@ namespace fargOCA {
}
}
void
Disk::initLabel() {
myTracers.clear();
switch(physic().label.advection) {
case LA_RADIUS:
addTracer(makeRadialTracer(physic(), grid(), "default", physic().label.radius.min, physic().label.radius.max));
break;
case LA_HILL:
addTracer(makeHillTracer(physic(), grid(), "default", system().planet(0), 0, 0.2));
break;
case LA_SHELL:
addTracer(makeHillTracer(physic(), grid(), "default", system().planet(0), 0.2, 0.5));
break;
case LA_NONE:
break;
}
}
// dev note: should go into plantearySystem eventually
void
Disk::accreteOnPlanets(real dt)
......
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