CoastalME (Coastal Modelling Environment)
Simulates the long-term behaviour of complex coastlines
Loading...
Searching...
No Matches
cliff.cpp
Go to the documentation of this file.
1
10
11/* ===============================================================================================================================
12 This file is part of CoastalME, the Coastal Modelling Environment.
13
14 CoastalME is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
15
16 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19===============================================================================================================================*/
20#include <assert.h>
21
22#include <iostream>
23using std::ios;
24
25#include "cme.h"
26#include "cliff.h"
27#include "coast.h"
28
30CRWCliff::CRWCliff(CRWCoast* pCoastIn, int const nCoast, int const nPointOnCoast, double const dCellSide, double const dNotchIncisionIn, double const dNotchApexElevIn, double const dAccumWaveEnergyIn)
31{
33
34 pCoast = pCoastIn;
35
36 m_nCoast = nCoast;
37 m_nPointOnCoastline = nPointOnCoast;
39
40 m_dMaxNotchIncision = dCellSide;
41 m_dNotchIncision = dNotchIncisionIn;
42 m_dNotchApexElev = dNotchApexElevIn;
43 m_dTotAccumWaveEnergy = dAccumWaveEnergyIn;
44}
45
48{
49}
50
53{
55}
56
62
65{
66 return m_dNotchApexElev;
67}
68
70void CRWCliff::SetNotchApexElev(double const dNewElev)
71{
72 m_dNotchApexElev = dNewElev;
73}
74
76void CRWCliff::SetNotchIncision(double const dNewIncision)
77{
78 m_dNotchIncision = dNewIncision;
79}
80
83{
84 return m_dNotchIncision;
85}
86
88void CRWCliff::IncreaseNotchIncision(double const dLenIn)
89{
90 m_dNotchIncision += dLenIn;
91
92 // Constrain the notch incision, it cannot be greater than the max notch incision
94
95 // assert((m_dMaxNotchIncision - m_dNotchIncision) >=0);
96}
97
99bool CRWCliff::bReadyToCollapse(double const dThresholdNotchIncision) const
100{
101 if (m_dNotchIncision > dThresholdNotchIncision)
102 return true;
103 else
104 return false;
105}
106
109{
110}
CRWCoast * pCoast
Pointer to this landform's coast.
int m_nCategory
Landform category code.
int m_nCoast
The coast number on which this coast landform sits.
double m_dTotAccumWaveEnergy
Total accumulated wave energy since beginning of simulation.
int m_nPointOnCoastline
The point on the coast on which this coast landform sits.
bool bHasCollapsed(void) const
Returns the value of the cliff collapse switch.
Definition cliff.cpp:52
void SetNotchApexElev(double const)
Sets the elevation of the apex of the erosional notch (in external CRS units)
Definition cliff.cpp:70
double m_dMaxNotchIncision
The maximum horizontal incision (in external CRS units) of an erosional notch, this is equal to the g...
Definition cliff.h:34
double m_dNotchApexElev
Elevation (in external CRS units) of the apex of the notch (in CoastalME, the mid point between the t...
Definition cliff.h:40
double m_dNotchIncision
The horizontal depth (in external CRS units) of the erosional notch, measured inland from the side of...
Definition cliff.h:37
bool bReadyToCollapse(double const) const
Returns true if the horizontal incision of the erosional notch exceeds the critical notch incision.
Definition cliff.cpp:99
double dGetNotchIncision(void) const
Returns the horizontal incision (in external CRS units) of the cliff's erosional notch (the 'overhang...
Definition cliff.cpp:82
~CRWCliff(void) override
Destructor.
Definition cliff.cpp:47
void Display(void) override
Instantiates the pure virtual function in the abstract parent class, so that CRWCliff is not an abstr...
Definition cliff.cpp:108
CRWCliff(CRWCoast *, int const, int const, double const, double const, double const, double const)
Constructor with seven parameters and an initialization list.
Definition cliff.cpp:30
bool m_bCliffHasCollapsed
Switch to say whether the cliff has just collapsed, earlier in this timestep.
Definition cliff.h:31
void IncreaseNotchIncision(double const)
Increases the horizontal incision (in external CRS units) of the erosional notch, measured inland fro...
Definition cliff.cpp:88
void SetCliffCollapsed(void)
Flags the cliff as having collapsed.
Definition cliff.cpp:58
void SetNotchIncision(double const)
Sets the horizontal incision (in external CRS units) of the erosional notch, measured inland from the...
Definition cliff.cpp:76
double dGetNotchApexElev(void) const
Returns the elevation of the apex of the erosional notch (in external CRS units)
Definition cliff.cpp:64
Real-world class used to represent coastline objects.
Definition coast.h:39
Contains CRWCliff definitions.
This file contains global definitions for CoastalME.
T tMin(T a, T b)
Definition cme.h:1175
int const LF_CLIFF_ON_COASTLINE
Definition cme.h:437
Contains CRWCoast definitions.