CoastalME (Coastal Modelling Environment)
Simulates the long-term behaviour of complex coastlines
Loading...
Searching...
No Matches
cell.cpp
Go to the documentation of this file.
1
12
13/* ===============================================================================================================================
14
15 This file is part of CoastalME, the Coastal Modelling Environment.
16
17 CoastalME is free software; you can redistribute it and/or modify it under
18the terms of the GNU General Public License as published by the Free Software
19Foundation; either version 3 of the License, or (at your option) any later
20version.
21
22 This program is distributed in the hope that it will be useful, but WITHOUT
23ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
24FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
25
26 You should have received a copy of the GNU General Public License along with
27this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave,
28Cambridge, MA 02139, USA.
29
30===============================================================================================================================*/
31#include <vector>
32using std::vector;
33
34#include <assert.h>
35
36#include "cell.h"
37#include "cme.h"
38#include "simulation.h"
39
43 m_bIsInActiveZone(false), m_bCoastline(false), m_bCliff(false),
44 m_bFloodLine(false), m_bWaveFlood(false),
45 // m_bCheckCell(false),
67 m_Landform.SetLFCategory(LF_NONE);
68}
69
72
74void CGeomCell::SetBoundingBoxEdge(int const nDirection) {
75 m_nBoundingBoxEdge = nDirection;
76}
77
80
84}
85
88
91
94
97
100
104}
105
110
115
119}
120
122void CGeomCell::SetInActiveZone(bool const bFlag) { m_bIsInActiveZone = bFlag; }
123
126
129
132
138
144
150
156
161
162// bool CGeomCell::bActualPlatformErosion(void) const
163// {
164// return (m_dActualPlatformErosionThisIter > 0);
165// }
166
168void CGeomCell::SetAsCoastline(bool const bNewFlag) { m_bCoastline = bNewFlag; }
169
171bool CGeomCell::bIsCoastline(void) const { return m_bCoastline; }
172
174void CGeomCell::SetAsCliff(bool const bNewFlag) { m_bCliff = bNewFlag; }
175
177bool CGeomCell::bIsCliff(void) const { return m_bCliff; }
178
180void CGeomCell::SetAsFloodLine(bool const bNewFlag) { m_bFloodLine = bNewFlag; }
181
183bool CGeomCell::bIsFloodLine(void) const { return m_bFloodLine; }
184
186void CGeomCell::SetProfileID(int const nNormal) {
187 m_nCoastlineNormal = nNormal;
188}
189
193
195bool CGeomCell::bIsProfile(void) const {
197 return false;
198
199 return true;
200}
201
203void CGeomCell::SetPolygonID(int const nPolyID) { m_nPolygonID = nPolyID; }
204
207int CGeomCell::nGetPolygonID(void) const { return m_nPolygonID; }
208
210void CGeomCell::SetPolygonCoastID(int const nPolyCoastID) {
211 m_nPolygonCoastID = nPolyCoastID;
212}
213
217
220void CGeomCell::SetCoastAndPolygonID(int const nPolyCoastID,
221 int const nPolyID) {
222 m_nPolygonCoastID = nPolyCoastID;
223 m_nPolygonID = nPolyID;
224}
225
227void CGeomCell::SetShadowZoneNumber(int const nCode) {
228 m_nShadowZoneNumber = nCode;
229}
230
233
236bool CGeomCell::bIsinThisShadowZone(int const nZone) const {
237 if (m_nShadowZoneNumber == nZone)
238 return true;
239
240 return false;
241}
242
245 if (m_nShadowZoneNumber != 0)
246 return true;
247
248 return false;
249}
250
253
254// void CGeomCell::SetWaveSetup(int const dWaveSetup)
255// {
256// m_dWaveSetup = dWaveSetup;
257// }
258
259// void CGeomCell::SetStormSurge(int const dStormSurge)
260// {
261// m_dStormSurge = dStormSurge;
262// }
263
264// void CGeomCell::SetRunUp(int const dRunUp)
265// {
266// m_dRunUp = dRunUp;
267// }
268
269// void CGeomCell::SetTotLevel(void) const
270// {
271// m_dTotLevel = m_dWaveSetup + m_dStormSurge + m_dRunUp +
272// m_pGrid->pGetSim()->CSimulation::dGetThisIterSWL();
273// }
274
275// int CGeomCell::nGetTotLevel(void) const
276// {
277// return m_dTotLevel;
278// }
279
284 (m_pGrid->pGetSim()->dGetThisIterTotWaterLevel() +
285 m_pGrid->pGetSim()->dGetThisIterSWL()));
286}
287
288// //! Set this cell as checked TODO What is this used for?
289// void CGeomCell::SetCheckCell(void)
290// {
291// m_bCheckCell = true;
292// }
293
294// //! Returns true if this cell is checked, false otherwise TODO 007 What is
295// this used for? bool CGeomCell::bIsCellCheck(void) const
296// {
297// return m_bCheckCell;
298// }
299
302
305
308
312}
313
318
321
323void CGeomCell::SetLocalConsSlope(double const dNewSlope) {
324 m_dLocalConsSlope = dNewSlope;
325}
326
329
331void CGeomCell::SetBasementElev(double const dNewElev) {
332 m_dBasementElevation = dNewElev;
333}
334
336double CGeomCell::dGetBasementElev(void) const {
337 return (m_dBasementElevation);
338}
339
341void CGeomCell::SetSlope(double const dNewSlope) { m_dSlope = dNewSlope; }
342
344double CGeomCell::dGetSlope(void) const { return (m_dSlope); }
345
350 m_pGrid->pGetSim()->CSimulation::dGetMissingValue(),
351 TOLERANCE))
352 return true;
353
354 return false;
355}
356
358double CGeomCell::dGetSeaDepth(void) const { return (m_dSeaDepth); }
359
361double CGeomCell::dGetTotSeaDepth(void) const { return (m_dTotSeaDepth); }
362
365void CGeomCell::SetSuspendedSediment(double const dNewSedDepth) {
366 // Note no checks here to see if new equiv depth is sensible (e.g.
367 // non-negative)
368 m_dSuspendedSediment = dNewSedDepth;
369 m_dTotSuspendedSediment += dNewSedDepth;
370}
371
374void CGeomCell::AddSuspendedSediment(double const dIncSedDepth) {
375 // Note no checks here to see if increment equiv depth is sensible (e.g.
376 // non-negative)
377 m_dSuspendedSediment += dIncSedDepth;
378 m_dTotSuspendedSediment += dIncSedDepth;
379}
380
383 return (m_dSuspendedSediment);
384}
385
389}
390
395 if (m_VLayerAboveBasement.empty())
396 return INT_NODATA;
397
398 int nTop = static_cast<int>(m_VLayerAboveBasement.size()) - 1;
399
400 while (m_VLayerAboveBasement[nTop].dGetTotalThickness() <= 0) {
401 if (--nTop < 0)
403 }
404
405 return nTop;
406}
407
411 if (m_VLayerAboveBasement.empty())
412 return INT_NODATA;
413
414 return static_cast<int>(m_VLayerAboveBasement.size()) - 1;
415}
416
420 // Note no check to see if nLayer < m_VLayerAboveBasement.size()
421 double dTopElev = m_dBasementElevation;
422
423 for (int n = 0; n < nLayer; n++) {
424 dTopElev += m_VLayerAboveBasement[n].dGetUnconsolidatedThickness();
425 dTopElev += m_VLayerAboveBasement[n].dGetConsolidatedThickness();
426 }
427
428 dTopElev += m_VLayerAboveBasement[nLayer].dGetConsolidatedThickness();
429
430 return dTopElev;
431}
432
436 // TODO 055 No check that nLayer < size()
437 return &m_VLayerAboveBasement[nLayer];
438}
439
440// //! Returns the volume-equivalent elevation of the sediment's top surface for
441// this cell (i.e. if there is a cliff notch, then lower the elevation by the
442// notch's volume) double CGeomCell::dGetVolEquivSedTopElev(void) const
443// {
444// double dTopElev = m_dBasementElevation;
445// for (unsigned int n = 0; n < m_VLayerAboveBasement.size(); n++)
446// {
447// dTopElev += (m_VLayerAboveBasement[n].dGetUnconsolidatedThickness() -
448// m_VLayerAboveBasement[n].dGetNotchUnconsolidatedLost()); dTopElev +=
449// (m_VLayerAboveBasement[n].dGetConsolidatedThickness() -
450// m_VLayerAboveBasement[n].dGetNotchConsolidatedLost());
451// }
452//
453// return dTopElev;
454// }
455
459 return m_VdAllHorizonTopElev.back();
460}
461
468
474
478bool CGeomCell::bIsInundated(void) const {
480 m_pGrid->pGetSim()->CSimulation::dGetThisIterSWL());
481}
482
484double CGeomCell::dGetThisIterSWL(void) const {
485 return m_pGrid->pGetSim()->CSimulation::dGetThisIterSWL();
486}
487
490 return m_pGrid->pGetSim()->CSimulation::dGetThisIterTotWaterLevel();
491}
492
493// //! Returns true if the elevation of the sediment top surface for this cell
494// is greater than or equal to the grid's this-timestep still water elevation.
495// Also returns true if the cell has unconsolidated sediment on it and the
496// elevation of the sediment top surface, minus a tolerance value, is less than
497// the grid's this-timestep still water elevation bool
498// CGeomCell::bIsSeaIncBeach(void) const
499// {
500// if (m_bInContiguousSea)
501// // Sea
502// return true;
503//
504// double
505// dWaterLevel = m_pGrid->pGetSim()->CSimulation::dGetThisIterSWL(),
506// dSedTop = m_VdAllHorizonTopElev.back();
507//
508// // Beach
509// if ((m_VLayerAboveBasement.back().dGetUnconsolidatedThickness() > 0) &&
510// ((dSedTop - m_pGrid->pGetSim()->CSimulation::dGetMaxBeachElevAboveSWL()) <
511// dWaterLevel)) return true;
512//
513// return false;
514// }
515
519 double dTotThick = 0;
520
521 for (unsigned int n = 0; n < m_VLayerAboveBasement.size(); n++) {
523 double dLayerThick = m_Layer.dGetFineConsolidatedThickness();
524 double dNotchEquiv =
526
527 dTotThick += (dLayerThick - dNotchEquiv);
528 }
529
530 return dTotThick;
531}
532
535 double dTotThick = 0;
536
537 for (unsigned int n = 0; n < m_VLayerAboveBasement.size(); n++)
538 dTotThick += m_VLayerAboveBasement[n].dGetFineUnconsolidatedThickness();
539
540 return dTotThick;
541}
542
546 double dTotThick = 0;
547
548 for (unsigned int n = 0; n < m_VLayerAboveBasement.size(); n++) {
550 double dLayerThick = m_Layer.dGetSandConsolidatedThickness();
551 double dNotchEquiv =
553
554 dTotThick += (dLayerThick - dNotchEquiv);
555 }
556
557 return dTotThick;
558}
559
563 double dTotThick = 0;
564
565 for (unsigned int n = 0; n < m_VLayerAboveBasement.size(); n++)
566 dTotThick += m_VLayerAboveBasement[n].dGetSandUnconsolidatedThickness();
567
568 return dTotThick;
569}
570
574 double dTotThick = 0;
575
576 for (unsigned int n = 0; n < m_VLayerAboveBasement.size(); n++) {
578 double dLayerThick = m_Layer.dGetCoarseConsolidatedThickness();
579 double dNotchEquiv =
581
582 dTotThick += (dLayerThick - dNotchEquiv);
583 }
584
585 return dTotThick;
586}
587
590 double dTotThick = 0;
591
592 for (unsigned int n = 0; n < m_VLayerAboveBasement.size(); n++)
593 dTotThick += m_VLayerAboveBasement[n].dGetCoarseUnconsolidatedThickness();
594
595 return dTotThick;
596}
597
601 double dTotThick = 0;
602
603 for (unsigned int n = 0; n < m_VLayerAboveBasement.size(); n++)
604 dTotThick += m_VLayerAboveBasement[n].dGetConsolidatedThickness();
605
606 return dTotThick;
607}
608
612 double dTotThick = 0;
613
614 for (unsigned int n = 0; n < m_VLayerAboveBasement.size(); n++)
615 dTotThick += m_VLayerAboveBasement[n].dGetUnconsolidatedThickness();
616
617 return dTotThick;
618}
619
622 return (this->dGetTotUnconsThickness() + this->dGetTotConsThickness());
623}
624
626void CGeomCell::AppendLayers(int const nLayer) {
627 for (int i = 0; i < nLayer; i++)
629}
630
634 m_VdAllHorizonTopElev.clear();
635 m_VdAllHorizonTopElev.push_back(
636 m_dBasementElevation); // Elevation of top of the basement
637
638 // Calculate the elevation of the top of all other layers
639 int m = 0;
640
641 for (unsigned int n = 0; n < m_VLayerAboveBasement.size(); n++)
642 m_VdAllHorizonTopElev.push_back(
643 m_VLayerAboveBasement[n].dGetTotalThickness() +
644 m_VdAllHorizonTopElev[m++]); // Elevation of top of layer n
645
646 // Now calculate the d50 of the topmost unconsolidated sediment layer with
647 // non-zero thickness. If there is no unconsolidated sediment, m_dUnconsD50 is
648 // set to DBL_NODATA
650
651 for (int n = static_cast<int>(m_VLayerAboveBasement.size()) - 1; n >= 0;
652 n--) {
653 double dUnconsThick =
654 m_VLayerAboveBasement[n].dGetUnconsolidatedThickness();
655
656 if (dUnconsThick > 0) {
657 // This is a layer with non-zero thickness of unconsolidated sediment
658 CRWCellSediment const *pUnconsSedLayer =
659 m_VLayerAboveBasement[n].pGetUnconsolidatedSediment();
660 double dFineProp = pUnconsSedLayer->dGetFineDepth() / dUnconsThick;
661 double dSandProp = pUnconsSedLayer->dGetSandDepth() / dUnconsThick;
662 double dCoarseProp = pUnconsSedLayer->dGetCoarseDepth() / dUnconsThick;
663
664 // Calculate d50 for the unconsolidated sediment
665 m_dUnconsD50 = (dFineProp * m_pGrid->pGetSim()->dGetD50Fine()) +
666 (dSandProp * m_pGrid->pGetSim()->dGetD50Sand()) +
667 (dCoarseProp * m_pGrid->pGetSim()->dGetD50Coarse());
668
669 break;
670 }
671 }
672}
673
679int CGeomCell::nGetLayerAtElev(double const dElev) const {
682 if (dElev < m_VdAllHorizonTopElev[0])
683 return ELEV_IN_BASEMENT;
684
685 for (unsigned int nLayer = 1; nLayer < m_VdAllHorizonTopElev.size();
686 nLayer++) {
687 if ((m_VLayerAboveBasement[nLayer - 1].dGetTotalThickness() > 0) &&
688 (dElev >= m_VdAllHorizonTopElev[nLayer - 1]) &&
689 (dElev <= m_VdAllHorizonTopElev[nLayer]))
690 return (nLayer - 1);
691 }
692
694}
695
697double CGeomCell::dCalcLayerElev(const int nLayer) {
698 // Note no check to see if nLayer < m_VLayerAboveBasement.size()
699 double dTopElev = m_dBasementElevation;
700
701 for (int n = 0; n <= nLayer; n++)
702 dTopElev += m_VLayerAboveBasement[n].dGetTotalThickness();
703
704 return dTopElev;
705}
706
709void CGeomCell::SetPotentialPlatformErosion(double const dPotentialIn) {
711 m_dTotPotentialPlatformErosion += dPotentialIn;
712}
713
718
723
726void CGeomCell::SetActualPlatformErosion(double const dThisActualErosion) {
727 m_dActualPlatformErosionThisIter = dThisActualErosion;
728 m_dTotActualPlatformErosion += dThisActualErosion;
729}
730
735
740
744 m_dSeaDepth = tMax(m_pGrid->pGetSim()->CSimulation::dGetThisIterSWL() -
746 0.0);
747}
748
753 // m_bEstimated =
756 // m_bCheckCell =
757 m_bCheckFloodCell = false;
758
760
762
772
774
775 // Initialize this-iteration sediment input event values
776 int nThisLayer = this->nGetTopNonZeroLayerAboveBasement();
777
778 // Safety check
779 if ((nThisLayer == NO_NONZERO_THICKNESS_LAYERS) ||
780 (nThisLayer == INT_NODATA)) {
781 // Uh-oh, problem. So just return TODO 021
782 return;
783 }
784
785 m_VLayerAboveBasement[nThisLayer]
786 .pGetUnconsolidatedSediment()
787 ->InitThisIterSedimentInputAll();
788}
789
791void CGeomCell::SetWaveHeight(double const dWaveHeight) {
792 m_dWaveHeight = dWaveHeight;
793 m_dTotWaveHeight += dWaveHeight;
794
795 // if (m_dWaveHeight != DBL_NODATA)
796 // assert(m_dWaveHeight >= 0);
797}
798
800double CGeomCell::dGetWaveHeight(void) const { return m_dWaveHeight; }
801
803double CGeomCell::dGetTotWaveHeight(void) const { return m_dTotWaveHeight; }
804
807void CGeomCell::SetWaveAngle(double const dWaveAngle) {
808 m_dWaveAngle = dWaveAngle;
809 m_dTotWaveAngle += dWaveAngle;
810}
811
813double CGeomCell::dGetWaveAngle(void) const { return m_dWaveAngle; }
814
816double CGeomCell::dGetTotWaveAngle(void) const { return m_dTotWaveAngle; }
817
819void CGeomCell::SetCellDeepWaterWaveHeight(double const dWaveHeight) {
820 m_dDeepWaterWaveHeight = dWaveHeight;
821}
822
827
829void CGeomCell::SetCellDeepWaterWaveAngle(double const dWaveAngle) {
830 m_dDeepWaterWaveAngle = dWaveAngle;
831}
832
837
839void CGeomCell::SetCellDeepWaterWavePeriod(double const dWavePeriod) {
840 m_dDeepWaterWavePeriod = dWavePeriod;
841}
842
847
855
856// Sets this cell's beach protection factor
857void CGeomCell::SetBeachProtectionFactor(double const dFactor) {
858 m_dBeachProtectionFactor = dFactor;
859}
860
865
868void CGeomCell::IncrCliffCollapseErosion(double const dFineDepth,
869 double const dSandDepth,
870 double const dCoarseDepth) {
871 m_dCliffCollapseFineThisIter += dFineDepth;
872 m_dCliffCollapseSandThisIter += dSandDepth;
873 m_dCliffCollapseCoarseThisIter += dCoarseDepth;
874
875 m_dTotFineCliffCollapse += dFineDepth;
876 m_dTotSandCliffCollapse += dSandDepth;
877 m_dTotCoarseCliffCollapse += dCoarseDepth;
878}
879
885
891
897
903
909
915
918void CGeomCell::AddSandTalusDeposition(double const dDepth) {
921}
922
925void CGeomCell::AddCoarseTalusDeposition(double const dDepth) {
928}
929
935
941
947
953
956void CGeomCell::SetPotentialBeachErosion(double const dPotentialIn) {
958 m_dTotPotentialBeachErosion += dPotentialIn;
959}
960
965
970
973void CGeomCell::SetActualBeachErosion(double const dThisActualErosion) {
974 m_dActualBeachErosionThisIter = dThisActualErosion;
975 m_dTotActualBeachErosion += dThisActualErosion;
976}
977
982
987
988// //! Returns true if there has been actual beach erosion this timestep
989// bool CGeomCell::bActualBeachErosionThisIter(void) const
990// {
991// return (m_dActualBeachErosionThisIter > 0 ? true : false);
992// }
993
996void CGeomCell::IncrBeachDeposition(double const dThisDeposition) {
997 m_dBeachDepositionThisIter += dThisDeposition;
998 m_dTotBeachDeposition += dThisDeposition;
999}
1000
1004}
1005
1008 return m_dTotBeachDeposition;
1009}
1010
1011// //! Returns true if there has been beach deposition this timestep
1012// bool CGeomCell::bBeachDepositionThisIter(void) const
1013// {
1014// return (m_dBeachDepositionThisIter > 0 ? true : false);
1015// }
1016
1021 return true;
1022
1023 return false;
1024}
1025
1027double CGeomCell::dGetUnconsD50(void) const { return m_dUnconsD50; }
1028
1030void CGeomCell::SetInterventionClass(int const nSubCatCode) {
1031 if (nSubCatCode != LF_NONE) {
1032 this->m_Landform.SetLFCategory(LF_CAT_INTERVENTION);
1033
1034 if (nSubCatCode == IO_INTERVENTION_STRUCT)
1035 this->m_Landform.SetLFSubCategory(LF_SUBCAT_INTERVENTION_STRUCT);
1036
1037 else if (nSubCatCode == IO_INTERVENTION_NON_STRUCT)
1038 this->m_Landform.SetLFSubCategory(LF_SUBCAT_INTERVENTION_NON_STRUCT);
1039 }
1040}
1041
1044 int nTmp = INT_NODATA;
1045
1046 if (this->m_Landform.nGetLFCategory() == LF_CAT_INTERVENTION) {
1047 if (this->m_Landform.nGetLFSubCategory() == LF_SUBCAT_INTERVENTION_STRUCT)
1049
1050 else if (this->m_Landform.nGetLFSubCategory() ==
1053 }
1054
1055 return nTmp;
1056}
1057
1059void CGeomCell::SetInterventionHeight(double const dHeight) {
1060 m_dInterventionHeight = dHeight;
1061}
1062
1065 return m_dInterventionHeight;
1066}
1067
Contains CGeomCell definitions.
double m_dTotActualPlatformErosion
Total depth of sediment actually eroded from the shore platform.
Definition cell.h:174
double dGetTotCliffCollapseFine(void) const
Definition cell.cpp:900
void SetCellDeepWaterWavePeriod(double const)
Sets the deep water wave Period on this cell.
Definition cell.cpp:839
double dGetTotWaveHeight(void) const
Returns the total wave height on this cell.
Definition cell.cpp:803
void SetInContiguousFlood(void)
Set this cell as in the contiguous runup flood area.
Definition cell.cpp:93
double dGetThisIterCliffCollapseErosionFine(void) const
Definition cell.cpp:882
double m_dTotTalusCoarseDeposition
Definition cell.h:214
double dGetTotCoarseTalusDeposition(void) const
Definition cell.cpp:950
double m_dTotPotentialPlatformErosion
Definition cell.h:168
int m_nBoundingBoxEdge
If this cell is an edge (or bounding box) cell, this specifies the edge.
Definition cell.h:91
double m_dWaveAngle
Wave orientation.
Definition cell.h:134
double dGetTotPotentialPlatformErosion(void) const
Get total potential (unconstrained) shore platform erosion.
Definition cell.cpp:720
bool bIsinAnyShadowZone(void) const
Returns true if this cell is in any shadow zone, false otherwise.
Definition cell.cpp:244
double dGetTotConsFineThickConsiderNotch(void) const
Definition cell.cpp:518
bool bIsFloodBySetupSurge(void) const
Is this cell flooded by setup surge?
Definition cell.cpp:102
bool m_bCheckFloodCell
TODO 007 What is this used for?
Definition cell.h:73
void CalcAllLayerElevsAndD50(void)
Definition cell.cpp:633
bool m_bCliff
Is this cell a cliff.
Definition cell.h:61
int nGetTopLayerAboveBasement(void) const
Definition cell.cpp:410
double dCalcLayerElev(const int)
For this cell, calculates the elevation of the top of a given layer.
Definition cell.cpp:697
int nGetShadowZoneNumber(void) const
Gets the number of the shadow zone that this cell is in.
Definition cell.cpp:232
void SetWaveHeight(double const)
Sets the wave height on this cell, also increments the total wave height.
Definition cell.cpp:791
bool bIsShadowZoneBoundary(void) const
Returns a flag which shows whether this cell is a shadow zone boundary.
Definition cell.cpp:131
double dGetCellDeepWaterWavePeriod(void) const
Returns the deep water wave period on this cell.
Definition cell.cpp:844
void InitCell(void)
Initialise values for this cell.
Definition cell.cpp:750
double dGetCellDeepWaterWaveAngle(void) const
Returns the deep water wave orientation on this cell.
Definition cell.cpp:834
bool bBeachErosionOrDepositionThisIter(void) const
Definition cell.cpp:1019
double dGetTotPotentialBeachErosion(void) const
Get total potential (supply-unconstrained) beach erosion.
Definition cell.cpp:967
bool bIsFloodBySetupSurgeRunup(void) const
Is this cell flooded by setup surge runup?
Definition cell.cpp:112
void SetInActiveZone(bool const)
Sets a flag to show whether this cell is in the active zone.
Definition cell.cpp:122
double dGetPotentialBeachErosion(void) const
Get potential (unconstrained) beach erosion.
Definition cell.cpp:962
bool bIsInContiguousSea(void) const
Is this a sea cell?
Definition cell.cpp:90
double m_dBeachProtectionFactor
Definition cell.h:153
bool m_bInContiguousSea
Switch to indicate if this is a sea cell, contiguous with other sea cells.
Definition cell.h:49
int nGetPolygonCoastID(void) const
Definition cell.cpp:216
bool bIsBoundingBoxEdge(void) const
Is this an edge bounding-box cell?
Definition cell.cpp:82
double m_dTotActualBeachErosion
Total depth of unconsolidated beach sediment actually eroded.
Definition cell.h:228
double dGetTotBeachDeposition(void) const
Get beach erosion.
Definition cell.cpp:1007
void SetSuspendedSediment(double const)
Definition cell.cpp:365
double dGetTotWaveAngle(void) const
Returns the total wave orientation on this cell.
Definition cell.cpp:816
void IncrBeachDeposition(double const)
Definition cell.cpp:996
void SetActualPlatformErosion(double const)
Definition cell.cpp:726
double dGetSeaDepth(void) const
Returns the depth of seawater on this cell.
Definition cell.cpp:358
bool bPotentialPlatformErosion(void) const
Returns true if this cell has had potential erosion this timestep.
Definition cell.cpp:158
double dGetTotActualBeachErosion(void) const
Get total actual (supply-constrained) beach erosion.
Definition cell.cpp:984
double m_dBasementElevation
Elevation of basement surface (m)
Definition cell.h:115
int m_nCoastlineNormal
Definition cell.h:101
double dGetCellDeepWaterWaveHeight(void) const
Returns the deep water wave height on this cell.
Definition cell.cpp:824
double dGetInterventionTopElev(void) const
Definition cell.cpp:1070
double dGetOverallTopElev(void) const
Definition cell.cpp:471
double dGetTotUnconsFine(void) const
Returns the total thickness of fine unconsolidated sediment on this cell.
Definition cell.cpp:534
double m_dLocalConsSlope
Used in erosion calculations, stored here for display purposes.
Definition cell.h:112
int nGetTopNonZeroLayerAboveBasement(void) const
Definition cell.cpp:394
bool m_bFloodBySetupSurgeRunup
TODO 007 What is this used for?
Definition cell.h:88
double dGetTotConsSandThickConsiderNotch(void) const
Definition cell.cpp:545
double dGetTotSandTalusDeposition(void) const
Definition cell.cpp:944
double m_dBeachDepositionThisIter
Depth of unconsolidated beach sediment deposited this timestep.
Definition cell.h:231
bool m_bPossibleFloodStartCell
TODO 007 What is this used for?
Definition cell.h:82
double dGetTotCliffCollapseSand(void) const
Definition cell.cpp:906
double dGetBeachDeposition(void) const
Get beach deposition.
Definition cell.cpp:1002
bool bIsInundated(void) const
Definition cell.cpp:478
void AppendLayers(int const)
Appends sediment layers.
Definition cell.cpp:626
bool bIsPossibleCoastStartCell(void) const
Definition cell.cpp:141
int m_nPolygonCoastID
If this cell is within a polygon, this is the ID of the polygon's coast.
Definition cell.h:97
void SetActualBeachErosion(double const)
Definition cell.cpp:973
double dGetBeachProtectionFactor(void) const
Returns this cell's beach protection factor.
Definition cell.cpp:862
double m_dTalusSandDepositionThisIter
Definition cell.h:202
double m_dTalusCoarseDepositionThisIter
Definition cell.h:210
double dGetTotAllSedThickness(void) const
Returns the total thickness of all sediment (all size classes) on this cell.
Definition cell.cpp:621
double m_dTotBeachDeposition
Total depth of unconsolidated beach sediment deposited.
Definition cell.h:234
void AddCoarseTalusDeposition(double const)
Definition cell.cpp:925
void SetPotentialBeachErosion(double const)
Definition cell.cpp:956
double m_dTotWaveHeight
Total wave height (m) (used to calc average)
Definition cell.h:131
int nGetPolygonID(void) const
Definition cell.cpp:207
double dGetSedimentTopElev(void) const
Definition cell.cpp:458
~CGeomCell(void)
Destructor.
Definition cell.cpp:71
int nGetBoundingBoxEdge(void) const
Returns the number of the bounding-box edge, or NO_DIRECTION if it is not.
Definition cell.cpp:79
bool bIsInActiveZone(void) const
Returns a flag which shows whether this cell is in the active zone.
Definition cell.cpp:125
CRWCellLayer * pGetLayerAboveBasement(int const)
Definition cell.cpp:435
double m_dTotWaveAngle
Total wave orientation (used to calc average)
Definition cell.h:140
void SetInterventionHeight(double const)
Sets the intervention height.
Definition cell.cpp:1059
bool bIsFloodLine(void) const
Returns true if the cell is flood line.
Definition cell.cpp:183
int nGetProfileID(void) const
Definition cell.cpp:192
double m_dCliffCollapseSandThisIter
Definition cell.h:182
double dGetThisIterCliffCollapseCoarseTalusDeposition(void) const
Definition cell.cpp:938
double dGetSedimentPlusInterventionTopElev(void) const
Definition cell.cpp:465
double dGetSlope(void) const
Returns this cell's slope.
Definition cell.cpp:344
double dGetInterventionHeight(void) const
Returns the intervention height.
Definition cell.cpp:1064
void SetPolygonID(int const)
Sets the global ID number of the polygon which 'contains' this cell.
Definition cell.cpp:203
void SetAsCoastline(bool const)
Marks this cell as 'under' a coastline.
Definition cell.cpp:168
double m_dPotentialPlatformErosionThisIter
Definition cell.h:164
double m_dTotSandCliffCollapse
Definition cell.h:194
double dGetThisIterSWL(void) const
Returns the sea surface elevation at current iteration.
Definition cell.cpp:484
int nGetInterventionClass(void) const
Gets the intervention class.
Definition cell.cpp:1043
void SetLocalConsSlope(double const)
Sets the local slope of the consolidated sediment only.
Definition cell.cpp:323
double dGetThisIterCliffCollapseSandTalusDeposition(void) const
Definition cell.cpp:932
void SetDownDriftZoneNumber(int const)
Sets the down drift zone number.
Definition cell.cpp:310
static CGeomRasterGrid * m_pGrid
Definition cell.h:257
double dGetWaveHeight(void) const
Returns the wave height on this cell.
Definition cell.cpp:800
double dGetWaveAngle(void) const
Returns the wave orientation on this cell.
Definition cell.cpp:813
double dGetTotSeaDepth(void) const
Returns the total depth of seawater on this cell.
Definition cell.cpp:361
void SetSlope(double const)
Sets this cell's slope.
Definition cell.cpp:341
bool bIsCliff(void) const
Returns true if the cell is 'under' a coastline.
Definition cell.cpp:177
double m_dTotFineCliffCollapse
Definition cell.h:190
int nGetLayerAtElev(double const) const
Definition cell.cpp:679
double m_dTotCoarseCliffCollapse
Definition cell.h:198
CRWCellLandform m_Landform
This cell's landform data.
Definition cell.h:244
void SetCoastAndPolygonID(int const, int const)
Definition cell.cpp:220
double m_dCliffCollapseFineThisIter
Definition cell.h:178
double m_dDeepWaterWaveHeight
Wave height if this is a deep water cell.
Definition cell.h:143
double dGetLocalConsSlope(void) const
Returns the local slope of the consolidated sediment only.
Definition cell.cpp:328
double m_dActualBeachErosionThisIter
Depth of unconsolidated beach sediment actually eroded this timestep.
Definition cell.h:225
double m_dTotSuspendedSediment
Definition cell.h:160
void SetInterventionClass(int const)
Sets the landform category and subcategory for an intervention.
Definition cell.cpp:1030
bool m_bInContiguousFlood
Switch to indicate that this cell is in the contiguous runup flood area.
Definition cell.h:52
void SetWaveValuesToDeepWaterWaveValues(void)
Definition cell.cpp:850
void SetBoundingBoxEdge(int const)
Set the edge number if this cell is an edge bounding-box cell.
Definition cell.cpp:74
double dGetTotUnconsCoarse(void) const
Returns the total thickness of coarse unconsolidated sediment on this cell.
Definition cell.cpp:589
void SetFloodBySetupSurgeRunup(void)
Set this cell as flooded by setup surge runup.
Definition cell.cpp:107
void SetPotentialPlatformErosion(double const)
Definition cell.cpp:709
bool m_bIsInActiveZone
Switch to indicate that this cell is in the active zone.
Definition cell.h:55
void SetPossibleFloodStartCell(void)
Definition cell.cpp:147
void AddSuspendedSediment(double const)
Definition cell.cpp:374
bool m_bShadowBoundary
Switch to show this cell is 'under' a shadow boundaryu.
Definition cell.h:76
int nGetDownDriftZoneNumber(void) const
Gets the down drift zone number.
Definition cell.cpp:315
double dGetTotUnconsSand(void) const
Definition cell.cpp:562
void UnSetInContiguousFlood(void)
Set this cell as not in the contiguous runup flood area.
Definition cell.cpp:96
bool bIsInContiguousSeaArea(void) const
Is this cell in the contiguous sea area?
Definition cell.cpp:117
double dGetUnconsD50(void) const
Returns the D50 of unconsolidated sediment on this cell.
Definition cell.cpp:1027
double m_dPotentialBeachErosionThisIter
Definition cell.h:218
bool bIsCellFloodCheck(void) const
Returns true if this cell is checked, false otherwise (flood switch)
Definition cell.cpp:307
double dGetTotActualPlatformErosion(void) const
Get total actual (constrained) shore platform erosion.
Definition cell.cpp:737
bool bIsElevLessThanWaterLevel(void) const
Definition cell.cpp:282
vector< double > m_VdAllHorizonTopElev
Definition cell.h:253
double m_dWavePeriod
Wave period (s)
Definition cell.h:137
double m_dSeaDepth
Depth of still water (m), is zero if not inundated.
Definition cell.h:121
double dGetTotUnconsThickness(void) const
Definition cell.cpp:611
double dGetBasementElev(void) const
Returns this cell's basement elevation.
Definition cell.cpp:336
int m_nPolygonID
If this cell is within a polygon, this is the ID of the polygon.
Definition cell.h:94
bool bIsPossibleFloodStartCell(void) const
Definition cell.cpp:153
double m_dActualPlatformErosionThisIter
Depth of sediment actually eroded from the shore platform this timestep.
Definition cell.h:171
double dGetPotentialPlatformErosion(void) const
Get potential (unconstrained) shore platform erosion.
Definition cell.cpp:715
double dGetTotSuspendedSediment(void) const
Returns the total suspended sediment depth equivalent on this cell.
Definition cell.cpp:387
double m_dDeepWaterWaveAngle
Wave orientation if this is a deep water cell.
Definition cell.h:146
double dGetActualBeachErosion(void) const
Get actual (supply-constrained) beach erosion.
Definition cell.cpp:979
void SetSeaDepth(void)
Definition cell.cpp:743
void SetShadowZoneNumber(int const)
Set the number of the shadow zone that this cell is in.
Definition cell.cpp:227
double dGetTotConsCoarseThickConsiderNotch(void) const
Definition cell.cpp:573
void SetCellDeepWaterWaveAngle(double const)
Sets the deep water wave orientation on this cell.
Definition cell.cpp:829
bool m_bPossibleCoastStartCell
Switch to show that this cell could be the start of a coastline.
Definition cell.h:79
CGeomCell()
Constructor with initialization list.
Definition cell.cpp:41
double dGetActualPlatformErosion(void) const
Get actual (constrained) shore platform erosion.
Definition cell.cpp:732
void SetFloodBySetupSurge(void)
Set this cell as flooded by setup surge.
Definition cell.cpp:99
int m_nShadowZoneNumber
Definition cell.h:105
bool bIsinThisShadowZone(int const) const
Definition cell.cpp:236
double m_dDeepWaterWavePeriod
Wave period if this is a deep water cell.
Definition cell.h:149
double m_dTotPotentialBeachErosion
Definition cell.h:222
double m_dSuspendedSediment
Suspended sediment as depth equivalent (m)
Definition cell.h:156
double m_dTotTalusSandDeposition
Definition cell.h:206
double dGetTotConsThickness(void) const
Definition cell.cpp:600
void SetCheckFloodCell(void)
Set this cell as checked (flood switch)
Definition cell.cpp:301
void SetInContiguousSea(void)
Set this cell as a sea cell.
Definition cell.cpp:87
int m_nDownDriftZoneNumber
Definition cell.h:109
double m_dWaveHeight
Wave height (m)
Definition cell.h:128
void SetWaveAngle(double const)
Definition cell.cpp:807
void SetProfileID(int const)
Marks this cell as 'under' a coastline-normal profile.
Definition cell.cpp:186
void SetPossibleCoastStartCell(void)
Definition cell.cpp:135
double m_dSlope
Slope at this cell (degrees or unitless)
Definition cell.h:118
void SetShadowZoneBoundary(void)
Sets a flag to show that this cell is a shadow zone boundary.
Definition cell.cpp:128
double dGetThisIterCliffCollapseErosionCoarse(void) const
Definition cell.cpp:894
void SetBasementElev(double const)
Sets this cell's basement elevation.
Definition cell.cpp:331
void IncrCliffCollapseErosion(double const, double const, double const)
Definition cell.cpp:868
void AddSandTalusDeposition(double const)
Definition cell.cpp:918
double dGetSuspendedSediment(void) const
Returns the suspended sediment depth equivalent on this cell.
Definition cell.cpp:382
bool bIsProfile(void) const
Returns true if this cell is 'under' a coastline normal.
Definition cell.cpp:195
double m_dUnconsD50
Definition cell.h:238
double m_dInterventionHeight
Height of intervention structure.
Definition cell.h:241
vector< CRWCellLayer > m_VLayerAboveBasement
Number of layers NOT including the basement. Layer 0 is the lowest.
Definition cell.h:248
bool m_bFloodLine
Switch to indicate that this cell is 'under' a runup flood line.
Definition cell.h:64
bool bIsCoastline(void) const
Returns true if the cell is 'under' a coastline.
Definition cell.cpp:171
void SetPolygonCoastID(int const)
Sets the coast number of the polygon which 'contains' this cell.
Definition cell.cpp:210
void UnSetCheckFloodCell(void)
Set the cell as not checked (flood switch)
Definition cell.cpp:304
void SetAsCliff(bool const)
Marks this cell as 'under' a coastline.
Definition cell.cpp:174
void SetCellDeepWaterWaveHeight(double const)
Sets the deep water wave height on this cell.
Definition cell.cpp:819
double dGetThisIterCliffCollapseErosionSand(void) const
Definition cell.cpp:888
bool bBasementElevIsMissingValue(void) const
Definition cell.cpp:348
double dGetTotCliffCollapseCoarse(void) const
Definition cell.cpp:912
bool m_bWaveFlood
Switch to indicate that this cell is 'under' a runup wave flood line.
Definition cell.h:67
double m_dCliffCollapseCoarseThisIter
Definition cell.h:186
CRWCellLandform * pGetLandform(void)
Returns a pointer to this cell's CRWCellLandform object.
Definition cell.cpp:320
void SetBeachProtectionFactor(double const)
Definition cell.cpp:857
void SetWaveFlood(void)
Set this cell as flooded by swl + surge + setup + runup.
Definition cell.cpp:252
void SetAsFloodLine(bool const)
Marks this cell is flood line.
Definition cell.cpp:180
double m_dTotSeaDepth
Definition cell.h:125
double dGetConsSedTopForLayerAboveBasement(int const) const
Definition cell.cpp:419
bool m_bFloodBySetupSurge
TODO 007 What is this used for?
Definition cell.h:85
double dGetThisIterTotWaterLevel(void) const
Returns the total water level at current iteration.
Definition cell.cpp:489
bool m_bCoastline
Switch to indicate that this cell is 'under' a coastline.
Definition cell.h:58
Real-world class used to represent the landform of a cell.
Real-world class used to represent the sediment layers associated with a cell object.
Definition cell_layer.h:32
CRWCellSediment * pGetConsolidatedSediment(void)
Returns a pointer to the cell's consolidated sediment object.
double dGetCoarseConsolidatedThickness(void) const
Returns the thickness of this cell's coarse consolidated sediment.
double dGetFineConsolidatedThickness(void) const
Returns the thickness of this cell's fine consolidated sediment.
double dGetSandConsolidatedThickness(void) const
Returns the thickness of this cell's sand consolidated sediment.
Real-world class used to represent the sediment (either consolidated or unconsolidated) associated wi...
double dGetCoarseDepth(void) const
Returns the coarse sediment depth equivalent for this sediment layer object.
double dGetNotchFineLost(void) const
Gets the depth equivalent of fine sediment lost by notch incision.
double dGetFineDepth(void) const
Returns the fine sediment depth equivalent for this sediment layer object.
double dGetNotchSandLost(void) const
Gets the depth equivalent of sand sediment lost by notch incision.
double dGetNotchCoarseLost(void) const
Gets the depth equivalent of coarse sediment lost by notch incision.
double dGetSandDepth(void) const
Returns the sand sediment depth equivalent for this sediment layer.
This file contains global definitions for CoastalME.
int const NO_NONZERO_THICKNESS_LAYERS
Definition cme.h:767
int const INT_NODATA
Definition cme.h:474
double const TOLERANCE
Definition cme.h:811
int const ELEV_ABOVE_SEDIMENT_TOP
Definition cme.h:766
int const IO_INTERVENTION_STRUCT
Definition cme.h:526
bool bFPIsEqual(const T d1, const T d2, const T dEpsilon)
Definition cme.h:1284
T tMax(T a, T b)
Definition cme.h:1240
int const LF_SUBCAT_INTERVENTION_NON_STRUCT
Definition cme.h:558
int const NO_DIRECTION
Definition cme.h:494
int const IO_INTERVENTION_NON_STRUCT
Definition cme.h:527
double const DBL_NODATA
Definition cme.h:822
int const LF_NONE
Definition cme.h:530
int const ELEV_IN_BASEMENT
Definition cme.h:765
int const LF_SUBCAT_INTERVENTION_STRUCT
Definition cme.h:557
int const LF_CAT_INTERVENTION
Definition cme.h:543
Contains CSimulation definitions.