Removed obsolete functions

parent 57a437ee
...@@ -125,20 +125,6 @@ void SWE_Block::initScenario( float _offsetX, float _offsetY, ...@@ -125,20 +125,6 @@ void SWE_Block::initScenario( float _offsetX, float _offsetY,
} }
/**
* set water height h in all interior grid cells (i.e. except ghost layer)
* to a uniform value
*/
void SWE_Block::setWaterHeight(float _h) {
for(int i=1; i<=nx; i++)
for(int j=1; j<=ny; j++) {
h[i][j] = _h;
};
synchWaterHeightAfterWrite();
}
/** /**
* set water height h in all interior grid cells (i.e. except ghost layer) * set water height h in all interior grid cells (i.e. except ghost layer)
* to values specified by parameter function _h * to values specified by parameter function _h
...@@ -153,23 +139,6 @@ void SWE_Block::setWaterHeight(float (*_h)(float, float)) { ...@@ -153,23 +139,6 @@ void SWE_Block::setWaterHeight(float (*_h)(float, float)) {
synchWaterHeightAfterWrite(); synchWaterHeightAfterWrite();
} }
/**
* set discharge unknowns in all interior grid cells (i.e. except ghost layer)
* to a uniform value
* Note: unknowns hu and hv represent momentum, while parameters u and v are velocities!
* (_u and _v are multiplied with the resp. cell-local value of h)
*/
void SWE_Block::setDischarge(float _u, float _v) {
for(int i=1; i<=nx; i++)
for(int j=1; j<=ny; j++) {
hu[i][j] = h[i][j] * _u;
hv[i][j] = h[i][j] * _v;
};
synchDischargeAfterWrite();
}
/** /**
* set discharge in all interior grid cells (i.e. except ghost layer) * set discharge in all interior grid cells (i.e. except ghost layer)
* to values specified by parameter functions * to values specified by parameter functions
...@@ -216,31 +185,6 @@ void SWE_Block::setBathymetry(float (*_b)(float, float)) { ...@@ -216,31 +185,6 @@ void SWE_Block::setBathymetry(float (*_b)(float, float)) {
synchBathymetryAfterWrite(); synchBathymetryAfterWrite();
} }
// /**
// Restores values for h, v, and u from file data
// @param _h array holding h-values in sequence
// @param _v array holding v-values in sequence
// @param _u array holding u-values in sequence
// */
// void SWE_Block::setInitValues(float* _h, float* _u, float* _v) {
// /* Corresponding output code
// for (int j=1; j<ny+1;j++)
// for (int i=1;i<nx+1;i++)
// Vtk_file <<(h[i][j]+b[i][j])<<endl;
// */
// int i, j;
// for(int k=0; k<nx*ny; k++) {
// i = (k % ny) + 1;
// j = (k / ny) + 1;
// h[i][j] = _h[k];
// hu[i][j] = _h[k] * _u[k];
// hv[i][j] = _h[k] * _v[k];
// };
//
// synchWaterHeightAfterWrite();
// synchDischargeAfterWrite();
// }
// /** // /**
// Restores values for h, v, and u from file data // Restores values for h, v, and u from file data
// @param _b array holding b-values in sequence // @param _b array holding b-values in sequence
...@@ -355,20 +299,6 @@ void SWE_Block::setBoundaryBathymetry() ...@@ -355,20 +299,6 @@ void SWE_Block::setBoundaryBathymetry()
synchBathymetryAfterWrite(); synchBathymetryAfterWrite();
} }
// /**
// * define a CONNECT boundary:
// * the block boundary with index egde (see method setBoundaryType())
// * is connect to the boundary neighEdge of block neighBlock
// */
// void SWE_Block::connectBoundaries(BoundaryEdge edge, SWE_Block &neighBlock, BoundaryEdge neighEdge) {
//
// boundary[edge] = CONNECT;
// neighBlock.boundary[neighEdge] = CONNECT;
//
// neighbour[edge] = &neighBlock;
// neighBlock.neighbour[neighEdge] = this;
// }
//
/** /**
* register the row or column layer next to a boundary as a "copy layer", * register the row or column layer next to a boundary as a "copy layer",
* from which values will be copied into the ghost layer or a neighbour; * from which values will be copied into the ghost layer or a neighbour;
......
...@@ -121,12 +121,8 @@ class SWE_Block { ...@@ -121,12 +121,8 @@ class SWE_Block {
void initScenario(float _offsetX, float _offsetY, void initScenario(float _offsetX, float _offsetY,
SWE_Scenario &i_scenario, const bool i_multipleBlocks = false ); SWE_Scenario &i_scenario, const bool i_multipleBlocks = false );
// set unknowns // set unknowns
/// set the water height to a uniform value
void setWaterHeight(float _h);
/// set the water height according to a given function /// set the water height according to a given function
void setWaterHeight(float (*_h)(float, float)); void setWaterHeight(float (*_h)(float, float));
/// set the momentum/discharge to a uniform value
void setDischarge(float _u, float _v);
/// set the momentum/discharge according to the provided functions /// set the momentum/discharge according to the provided functions
void setDischarge(float (*_u)(float, float), float (*_v)(float, float)); void setDischarge(float (*_u)(float, float), float (*_v)(float, float));
/// set the bathymetry to a uniform value /// set the bathymetry to a uniform value
......
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