Commit 81b87b6f authored by Alain O' Miniussi's avatar Alain O' Miniussi
Browse files

fix debug build

parent 371b96f5
......@@ -65,7 +65,7 @@ namespace fargOCA {
opt<ScalarField>& radiativeEnergyDerivative() { return myRadiativeEnergyDerivative; }
opt<ScalarField> const& radiativeEnergyDerivative() const { return myRadiativeEnergyDerivative; }
public:
protected:
void computeSoundSpeed();
void computePressure();
void computeViscosity();
......@@ -82,7 +82,12 @@ namespace fargOCA {
void trashTemperature();
void trashDeadDensity();
void trashDerivedFields();
static void abortOnGasCheck(bool v);
static bool abortOnGasCheck();
bool checkPhysicalQuantities() const;
protected:
shptr<PlanetarySystem> mySystem;
......@@ -166,8 +171,6 @@ namespace fargOCA {
void setGhosts();
bool checkPhysicalQuantities() const;
ScalarField const& soundSpeed() const { return base::soundSpeed(); }
ScalarField const& pressure() const { return base::pressure(); }
ScalarField const& viscosity() const { return base::viscosity(); }
......@@ -267,9 +270,9 @@ namespace fargOCA {
/// \brief A read only name->field container
NamedFields namedFields() const;
static void abortOnGasCheck(bool v);
static bool abortOnGasCheck();
using base::checkPhysicalQuantities;
using base::abortOnGasCheck;
private:
struct NoInit {};
......
......@@ -141,15 +141,16 @@ namespace fargOCA {
namespace {
bool abortOnFailedGasCheck = false;
}
void
Disk::abortOnGasCheck(bool v) {
void
DiskPrivate::abortOnGasCheck(bool v) {
if (!debug && v) {
std::cerr << "Warning: not in debug mode, Disk::abortOnGasCheck(true) is ignored.\n";
}
abortOnFailedGasCheck = v;
}
bool
Disk::abortOnGasCheck() {
DiskPrivate::abortOnGasCheck() {
return abortOnFailedGasCheck;
}
......@@ -198,7 +199,7 @@ namespace fargOCA {
}
bool
Disk::checkPhysicalQuantities() const {
DiskPrivate::checkPhysicalQuantities() const {
bool abrt = abortOnGasCheck();
bool status = (checkPositive(energy(), abrt)
&& checkPositive(density(), abrt)
......
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