Skip to content

Commit

Permalink
update 3D
Browse files Browse the repository at this point in the history
  • Loading branch information
ftomei committed Jul 30, 2024
1 parent e2ecde6 commit 0963bb8
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 5 deletions.
1 change: 0 additions & 1 deletion bin/CRITERIA3D/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2214,7 +2214,6 @@ void MainWindow::on_actionCriteria3D_waterFluxes_settings_triggered()
}*/

// layer thickness
// lateral conductivity ratio
}
}

Expand Down
11 changes: 7 additions & 4 deletions bin/VINE3D/VINE3D.pro
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ CONFIG(debug, debug|release) {
}

SOURCES += \
../CRITERIA3D/shared/project3D.cpp \
../CRITERIA3D/shared/dialogWaterFluxesSettings.cpp \
atmosphere.cpp \
dataHandler.cpp \
disease.cpp \
Expand All @@ -93,20 +95,21 @@ SOURCES += \
vine3DShell.cpp \
waterBalance.cpp \
vine3DProject.cpp \
mainWindow.cpp \
../CRITERIA3D/shared/project3D.cpp
mainWindow.cpp


HEADERS += \
../CRITERIA3D/shared/project3D.h \
../CRITERIA3D/shared/dialogWaterFluxesSettings.h \
atmosphere.h \
dataHandler.h \
disease.h \
modelCore.h \
plant.h \
waterBalance.h \
vine3DProject.h \
mainWindow.h \
../CRITERIA3D/shared/project3D.h
mainWindow.h


FORMS += \
mainWindow.ui \
47 changes: 47 additions & 0 deletions bin/VINE3D/mainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "dialogSettings.h"
#include "dialogSelection.h"
#include "formTimePeriod.h"
#include "dialogWaterFluxesSettings.h"

#include "mainWindow.h"
#include "ui_mainWindow.h"
Expand Down Expand Up @@ -733,6 +734,52 @@ void MainWindow::on_actionShow_model_cases_map_triggered()

void MainWindow::on_actionCriteria3D_settings_triggered()
{
DialogWaterFluxesSettings dialogWaterFluxes;
dialogWaterFluxes.setInitialWaterPotential(myProject.waterFluxesParameters.initialWaterPotential);
dialogWaterFluxes.setInitialDegreeOfSaturation(myProject.waterFluxesParameters.initialDegreeOfSaturation);

dialogWaterFluxes.setConductivityHVRatio(myProject.waterFluxesParameters.conductivityHorizVertRatio);

dialogWaterFluxes.setImposedComputationDepth(myProject.waterFluxesParameters.imposedComputationDepth);

dialogWaterFluxes.accuracySlider->setValue(myProject.waterFluxesParameters.modelAccuracy);

if (myProject.waterFluxesParameters.computeOnlySurface)
dialogWaterFluxes.onlySurface->setChecked(true);
else if (myProject.waterFluxesParameters.computeAllSoilDepth)
dialogWaterFluxes.allSoilDepth->setChecked(true);
else
dialogWaterFluxes.imposedDepth->setChecked(true);

dialogWaterFluxes.useWaterRetentionFitting->setChecked(myProject.fittingOptions.useWaterRetentionData);

dialogWaterFluxes.exec();

if (dialogWaterFluxes.isUpdateAccuracy())
{
myProject.waterFluxesParameters.modelAccuracy = dialogWaterFluxes.accuracySlider->value();
}

if (dialogWaterFluxes.result() == QDialog::Accepted)
{
myProject.waterFluxesParameters.initialWaterPotential = dialogWaterFluxes.getInitialWaterPotential();
myProject.waterFluxesParameters.initialDegreeOfSaturation = dialogWaterFluxes.getInitialDegreeOfSaturation();
myProject.waterFluxesParameters.conductivityHorizVertRatio = dialogWaterFluxes.getConductivityHVRatio();

myProject.waterFluxesParameters.imposedComputationDepth = dialogWaterFluxes.getImposedComputationDepth();
myProject.waterFluxesParameters.computeOnlySurface = dialogWaterFluxes.onlySurface->isChecked();
myProject.waterFluxesParameters.computeAllSoilDepth = dialogWaterFluxes.allSoilDepth->isChecked();

myProject.waterFluxesParameters.modelAccuracy = dialogWaterFluxes.accuracySlider->value();

myProject.fittingOptions.useWaterRetentionData = dialogWaterFluxes.useWaterRetentionFitting->isChecked();

/*if (! myProject.writeCriteria3DParameters())
{
myProject.logError("Error writing soil fluxes parameters");
}*/

// layer thickness
}
}

0 comments on commit 0963bb8

Please sign in to comment.