Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
1c40f67
added berkhoff case
apengsigkarup Aug 22, 2015
87d6403
added berkhoff setup
apengsigkarup Aug 22, 2015
2bc23a3
added berkhoff config
apengsigkarup Aug 22, 2015
0f39695
Updated the Berkhoff test case to the main trunk version
Aug 23, 2015
65496d6
Numerical derivation of h is now implemented. -hbb
Aug 24, 2015
04fbbe7
Updated Berkhoff test case. -hbb
Aug 24, 2015
188c4cd
Definition of the Vincent and Briggs case (3D elliptical mound)
Sep 4, 2015
378ec1b
Fixed some bugs in the Vincent & Briggs case
Sep 5, 2015
acbba52
Added Ji's Cosine spreading for 3D linear wave generation, ispec=34. …
Oct 1, 2015
8261042
Removed some debugging output files from the cosine spreading utiliti…
Oct 1, 2015
627850c
Forgot to add the new subroutine. -hbb
Oct 1, 2015
1f64f91
Merge pull request #1 from hbbingham/master
Oct 1, 2015
04c0e0a
Added a qt based GUI for 2D computations
Oct 10, 2015
552f64c
Merge pull request #2 from boTerpPaulsen/master
apengsigkarup Oct 10, 2015
56529d0
small bug fixes for the GUI. Only for 3D
Nov 12, 2015
1727dfc
GUI:
Dec 23, 2015
79e2c4e
small bug fix
Dec 23, 2015
4256221
Silly debug statement was still in code
Dec 23, 2015
a85f943
Merge pull request #3 from boTerpPaulsen/master
Jan 20, 2016
0015e96
Extended the local smoothing breaking model to 3D and corrected some …
Jan 21, 2016
90ce236
committing
Jan 21, 2016
e1583ed
Fixed a last bug in the 3D irregular wave generation routines -hbb
Jan 21, 2016
33d1a9d
The log file 'LOG.txt' now contains the info that is written to the s…
Jan 24, 2016
173dfea
Added screen and log file output info on the flux boundary condition …
Jan 30, 2016
d8db718
Added a new matlab utility to read and plot the boundary flux. -hbb
Jan 30, 2016
df78ea5
The flux boundary wave generation feature has been modified so that: …
Feb 3, 2016
e12a3a0
Bug fix in irregular wave seed values -hbb
Feb 4, 2016
6a074f4
Added a check that seed values are negative. -hbb
Feb 4, 2016
bf588f1
Added the missing FromFile_IncidentWave file -hbb
Apr 11, 2016
6c3c48e
added submergedbar test
apengsigkarup Sep 4, 2016
0fc8d73
made it possible to change the depth in the submerged bar test
apengsigkarup Sep 8, 2016
06a101c
updated files
apengsigkarup Sep 8, 2016
84769a1
added python
apengsigkarup Oct 18, 2016
e61ca64
updated submergedbartest
apengsigkarup Oct 18, 2016
a1a138c
update
apengsigkarup Oct 18, 2016
935ad07
updated error info
apengsigkarup Nov 5, 2016
c1675e4
update to how kinematics data are stored.
apengsigkarup Nov 6, 2016
0b717c1
New options added for kinematics data output for easy sampling at spe…
apengsigkarup Nov 13, 2016
beb5b98
update
apengsigkarup Nov 14, 2016
39054fd
update related to kinematics storage
apengsigkarup Nov 15, 2016
8bed223
updated bathymetry handling
apengsigkarup Jan 21, 2017
cb8e5bd
Fixed some bugs in the multigrid preconditioning so it now seems to w…
Jan 9, 2018
90b33ed
resolving merge conflicts for ShowFreeSurface2D and OceanWave3DT0Setu…
Jan 9, 2018
cb1013d
No real changes. I just added a line to the screen but it seems to ha…
Jan 10, 2018
5ace11e
Got the old kinematics data working again. File was being closed. -hbb
Jan 10, 2018
53b0e25
Cosmetic changes -hbb
Jan 10, 2018
f10c855
Added uniform flux boundary currents as option IncWaveType=4. -hbb
Mar 19, 2019
cec08f5
Small bug fix... -hbb
Mar 19, 2019
13e022f
Added IncWaveType=5 for flux boundary wave generation combined with a…
Mar 20, 2019
55fd274
Bug fix on line 45 of PreprocessPDampingZones.f90 - hbb
Sep 14, 2019
2c7e9b7
Some cosmetic modification of the example input files plus a logic bu…
Feb 24, 2020
077eb84
Added the Matlab utility OW3D_LinearDispersionErrorsWith_kh.m to the …
Apr 19, 2020
f161a8e
Fixed a couple of logic bugs in order to get all example test cases t…
Jun 10, 2020
0e089c2
Example imput file updated
Jun 23, 2020
ba452e1
Example imput files updated
Jun 23, 2020
0cb5356
Added the StreamfunctionShoaling example
Jun 24, 2020
77051ea
Updated more example input files for the validation script
Jun 25, 2020
a61a1c2
Lost file re-established...
Jun 25, 2020
91979da
Added dw/dz to the kinematics output data and updated ReadKinematics.…
Sep 11, 2020
a021ad4
I've added all velocity derivatives to the kinematics output so that …
Aug 21, 2022
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
40 changes: 40 additions & 0 deletions GUI/MainWindow/aboutFunctions.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#include "mainwindow.h"
#include "ui_mainwindow.h"

// Update about tab
void MainWindow::about_changed(int i){

QRect pos = ui->aboutText_OCW3D->geometry();

if (i==0){
ui->aboutText_OCW3D->setVisible(true);
ui->aboutText_OCW3D_publications->setVisible(false);
ui->aboutText_OCW3dGUI->setVisible(false);
ui->aboutText_OCW3DVersion->setVisible(false);
}
if (i==1){
ui->aboutText_OCW3dGUI->setGeometry(pos);
ui->aboutText_OCW3D->setVisible(false);
ui->aboutText_OCW3D_publications->setVisible(false);
ui->aboutText_OCW3dGUI->setVisible(true);
ui->aboutText_OCW3DVersion->setVisible(false);
}

if (i==2){
ui->aboutText_OCW3D_publications->setGeometry(pos);
ui->aboutText_OCW3D->setVisible(false);
ui->aboutText_OCW3dGUI->setVisible(false);
ui->aboutText_OCW3D_publications->setVisible(true);
ui->aboutText_OCW3DVersion->setVisible(false);
}
if (i==3){
ui->aboutText_OCW3DVersion->setGeometry(pos);
ui->aboutText_OCW3D->setVisible(false);
ui->aboutText_OCW3dGUI->setVisible(false);
ui->aboutText_OCW3D_publications->setVisible(false);
ui->aboutText_OCW3DVersion->setVisible(true);
}



}
107 changes: 107 additions & 0 deletions GUI/MainWindow/check.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
#include "mainwindow.h"
#include "checkdialog.h"
#include "ui_mainwindow.h"
#include <QMessageBox>

bool MainWindow::checkCase()
{
bool finalCheck = true;
checkDialog *check = new checkDialog(this);
double L;
// Spatial resolution
//
bool irr;
// wave length
if (ui->waveType->currentIndex()==1){ // stream function wave

irr = false;

if (ui->LorP_ComboBox->currentIndex()==0){ // Wave length specified
L = ui->SF_T->value();
}
else { // wave period
if (ui->SF_h->value()==0){errorMsgSFhZero();return false;}
double k = dispersion_T(ui->SF_h->value(),ui->SF_T->value());
L = 2*M_PI/k;
}


} else if ((ui->waveType->currentIndex()==2) | (ui->waveType->currentIndex()==3)) { // JONSWAP & PM

irr = true;

L = 2*3.1415/ui->maxkh->value()*ui->h->value();

}
else {
errorMsgParameterCheck();
return false;

}

// dx
double dx = ui->length->value()/(ui->nx->value()-1);

// ppwl
double spatialResolution = L/dx+1;

check->spatialResolution(spatialResolution,irr) ? finalCheck=true : finalCheck = false;

// Temporal resolution
//
double T;
if (ui->waveType->currentIndex()==1){ // stream function wave

if (ui->LorP_ComboBox->currentIndex()==1){ // Wave period
T = ui->SF_T->value();
}
else { // wave length
if (ui->SF_h->value()==0){errorMsgSFhZero();return false;}
double omega = dispersion_L(ui->SF_h->value(),ui->SF_T->value());
T = 2*M_PI/omega;
}


} else if ((ui->waveType->currentIndex()==2) | (ui->waveType->currentIndex()==3)) { // JONSWAP & PM
L = 2*M_PI/ui->maxkh->value()*ui->depth->value();
double omega = dispersion_L(ui->h->value(),L);
T = 2*M_PI/omega;


}
else {
errorMsgParameterCheck();
return false;

}

check->temporalResolution(T/ui->dt->value(),irr) ? finalCheck=true : finalCheck=false;


// We don't want to base the relaxation zones on the sortest waves
// in the irregular spectrum - so we recompute based on the peak period
if ((ui->waveType->currentIndex()==2) | (ui->waveType->currentIndex()==3)){
L = 2*M_PI/dispersion_T(ui->h->value(),ui->Tp->value());
}
// Generation Zone
//
check->generationZone(ui->xGenStart->value(),ui->xGenEnd->value(),L) ? finalCheck=true : finalCheck=false;

// Generation Zone
//
check->relaxationZone(ui->xAbsorbStart->value(),ui->xAbsorbEnd->value(),L,ui->length->value()) ? finalCheck=true : finalCheck = false;

// depth
//
double depth;
irr ? depth = ui->h->value() : depth = ui->SF_h->value();

check->depth(ui->depth->value(),depth) ? finalCheck=true : finalCheck == false;

check->show();
if (finalCheck == false){
return false;
} else {
return true;
}
}
33 changes: 33 additions & 0 deletions GUI/MainWindow/errorMSG.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QMessageBox>
void MainWindow::error_grid_checkDomainLength()
{
QMessageBox msgBox;
msgBox.setText("Please check that the domain (length, width and depth) is consistent with grid file.\nNote; depth is the depth at the left boundary.");
msgBox.exec();
}

void MainWindow::error_matlab()
{
QMessageBox msgBox;
msgBox.setText("Sorry, this version is compiled without support for MATLAB. \nFor MATLAB support please contact bo.paulsen@deltares.nl.\n\nNote; MATLAB scripts for post-processing are distributed with the source code.");
msgBox.exec();
}


void MainWindow::errorMsgParameterCheck(){

QMessageBox msgBox;
msgBox.setText("Error checks are only implemented for:\n\nStream function\nJONSWAP\nP-M");
msgBox.exec();

}

void MainWindow::errorMsgSFhZero(){

QMessageBox msgBox;
msgBox.setText("Incorrect water depth for stream function wave; h=0");
msgBox.exec();

}
14 changes: 14 additions & 0 deletions GUI/MainWindow/externaloutput.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include "externaloutput.h"
#include "ui_externaloutput.h"

externalOutput::externalOutput(const convert &data_, QWidget *parent) :
QWidget(parent),
ui(new Ui::externalOutput)
{
ui->setupUi(this);
}

externalOutput::~externalOutput()
{
delete ui;
}
23 changes: 23 additions & 0 deletions GUI/MainWindow/externaloutput.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#ifndef EXTERNALOUTPUT_H
#define EXTERNALOUTPUT_H

#include <QWidget>
#include "convert.h"

namespace Ui {
class externalOutput;
}

class externalOutput : public QWidget
{
Q_OBJECT

public:
explicit externalOutput(const convert& data_,QWidget *parent = 0);
~externalOutput();

private:
Ui::externalOutput *ui;
};

#endif // EXTERNALOUTPUT_H
19 changes: 19 additions & 0 deletions GUI/MainWindow/externaloutput.ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>externalOutput</class>
<widget class="QWidget" name="externalOutput">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>1028</width>
<height>318</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
</widget>
<resources/>
<connections/>
</ui>
106 changes: 106 additions & 0 deletions GUI/MainWindow/gridFunctions.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
#include "mainwindow.h"
#include "ui_mainwindow.h"


// Select grid file
//

void MainWindow::selectGridFile()
{
QString fileName = QFileInfo(QFileDialog::getOpenFileName(
this,
"Select file",
dir.currentPath(),
"All files (*.*);;"
)).fileName();

ui->selectedGridFile->setText(fileName);

}
// Change geometry type; Simple gometry, flat bed;Custom geometry (2D)
//
void MainWindow::geometryType_changed(int geometryType){

if (geometryType==0){ // simple geometry, flat bed
// ui->length->setEnabled(true);ui->width->setEnabled(true);ui->depth->setEnabled(true);
ui->customGridWidget->setVisible(false);

} else { // Advanced geometry type

// ui->length->setEnabled(false);ui->depth->setEnabled(false);ui->width->setEnabled(false);
ui->customGridWidget->setVisible(true);

int nGridPoints = ui->nGridPoints->value();
QDoubleSpinBox *sp;


if (nGridPoints>ui->geometry_table->columnCount()){
for (int i =ui->geometry_table->columnCount();i<nGridPoints;i++){

ui->geometry_table->insertColumn(i);

for (int j = 0; j < 2 ; j++) {
ui->geometry_table->setCellWidget(j,i,new QDoubleSpinBox(ui->geometry_table));
sp = (QDoubleSpinBox*)ui->geometry_table->cellWidget(j,i);
sp->setMaximum(9999999);
if ((j==0) & (i == 0)){sp->setEnabled(false);}

}
}
}

if (nGridPoints<ui->geometry_table->columnCount()){
for (int i=ui->geometry_table->columnCount();i>nGridPoints;i--){
ui->geometry_table->removeColumn(i-1);
}

}


}
}

// Call smooth functon CustomGrid::laplaceSmoothing
//
void MainWindow::smooth(){
grid.laplaceSmoothing();

// We always want a smooth grid, so we help the user a bit
//
for (int i=0;i<5;i++){
grid.laplaceSmoothing();
}

// We update the grid file
grid.writeGridToFile(ui->selectedGridFile->text());
}

// Read grid table and generate grid
//
void MainWindow::generateGrid(){
grid.readTabel(ui->geometry_table,ui->nx->value(),ui->nz->value(),ui->sz->isChecked());
grid.generateGrid();
grid.writeGridToFile(ui->selectedGridFile->text());
// Enable smooth and showGrid functions
ui->showGrid->setEnabled(true);
ui->smooth->setEnabled(true);
ui->length->setValue(grid.L);
ui->depth->setValue(grid.d);
}

void MainWindow::showGrid(){
int plotType = ui->geometryType->currentIndex();
if (plotType==0){
grid.showGrid(ui->depth->value(),ui->length->value(),ui->nx->value(),ui->nz->value(),ui->sz->isChecked());
} else if (plotType==1){
grid.showGrid();
}


}

void MainWindow::nGridPoints_changed(){

geometryType_changed(1);
}

Loading