CoastalME (Coastal Modelling Environment)
Simulates the long-term behaviour of complex coastlines
Loading...
Searching...
No Matches
coast.h
Go to the documentation of this file.
1
12
13#ifndef COAST_H
14#define COAST_H
15/* ===============================================================================================================================
16 This file is part of CoastalME, the Coastal Modelling Environment.
17
18 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.
19
20 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.
21
22 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.
23===============================================================================================================================*/
24#include "simulation.h"
25#include "profile.h"
26#include "cell.h"
27#include "coast_landform.h"
28#include "coast_polygon.h"
29#include "line.h"
30#include "i_line.h"
31#include "2d_point.h"
32#include "2di_point.h"
33
34class CGeomProfile; // Forward declarations
35class CACoastLandform;
37
39{
40 private:
43
46
49
52
55
58
61
64
67
70
73
76
79
82
84 vector<int> m_VnPolygonNode;
85
87 vector<double> m_VdCurvatureDetailed;
88
90 vector<double> m_VdCurvatureSmooth;
91
94
96 vector<double> m_VdDeepWaterWaveAngle;
97
100
103
105 vector<double> m_VdWaveSetupSurge;
106
107 // The storm surge on a normal drawn from each point on m_LCoastlineExtCRS
108 // vector<double> m_VdStormSurge;
109
111 vector<double> m_VdRunUp;
112
114 vector<double> m_VdCoastWaveHeight;
115
117 vector<double> m_VdBreakingWaveAngle;
118
120 vector<double> m_VdDepthOfBreaking;
121
123 vector<double> m_VdFluxOrientation;
124
127
129 vector<CACoastLandform*> m_pVLandform;
130
133
134 // These do not have the same length as m_LCoastlineExtCRS
135
137 vector<CGeomProfile*> m_pVProfile;
138
140 vector<CGeomProfile*> m_pVProfileDownCoastSeq;
141
143 vector<CGeomCoastPolygon*> m_pVCoastPolygon;
144
146 vector<CGeomLine> m_LShadowBoundary;
147
149 vector<CGeomLine> m_LShadowDowndriftBoundary;
150
151 protected:
152 public:
153 explicit CRWCoast(CSimulation*);
154 ~CRWCoast(void);
155
156 // CSimulation* pGetSim(void) const;
157
158 void SetSeaHandedness(int const);
159 int nGetSeaHandedness(void) const;
160
161 void SetStartEdge(int const);
162 int nGetStartEdge(void) const;
163
164 void SetEndEdge(int const);
165 int nGetEndEdge(void) const;
166
167 void SetCoastlineExtCRS(CGeomLine const*);
169 // CGeomLine* pLGetFloodWaveSetupExtCRS(void);
170 // void SetFloodWaveSetupPointExtCRS(CGeomLine const*);
171 // void SetFloodWaveSetupSurgePointExtCRS(CGeomLine const*);
172 // void SetFloodWaveSetupSurgeRunupPointExtCRS(CGeomLine const*);
174 // CGeom2DPoint* pPtGetFloodWaveSetupPointExtCRS(int const);
175 // CGeom2DPoint* pPtGetFloodWaveSetupSurgePointExtCRS(int const);
176 // CGeom2DPoint* pPtGetFloodWaveSetupSurgeRunupPointExtCRS(int const);
177
178 int nGetCoastlineSize(void) const;
179 // double dGetCoastlineSegmentLength(int const, int const);
180 // double dGetCoastlineLengthSoFar(int const);
181 // void DisplayCoastline(void);
182
183 void SetCoastlineGridCRS(CGeomILine const*);
185 // void AppendCellMarkedAsCoastline(CGeom2DIPoint const*);
186 // void AppendCellMarkedAsCoastline(int const, int const);
188 // int nGetNCellsMarkedAsCoastline(void) const;
190
191 double dGetDetailedCurvature(int const) const;
192 void SetDetailedCurvature(int const, double const);
193 vector<double>* pVGetDetailedCurvature(void);
194 double dGetSmoothCurvature(int const) const;
195 void SetSmoothCurvature(int const, double const);
196 vector<double>* pVGetSmoothCurvature(void);
197 void SetDetailedCurvatureMean(double const);
198 // double dGetDetailedCurvatureMean(void) const;
199 void SetDetailedCurvatureSTD(double const);
200 // double dGetDetailedCurvatureSTD(void) const;
201 void SetSmoothCurvatureMean(double const);
202 // double dGetSmoothCurvatureMean(void) const;
203 void SetSmoothCurvatureSTD(double const);
204 // double dGetSmoothCurvatureSTD(void) const;
205
207 CGeomProfile* pGetProfile(int const);
208 // CGeomProfile* pGetLastProfile(void);
209 // void ReplaceProfile(int const, vector<CGeom2DPoint> const*);
210 int nGetNumProfiles(void) const;
213
214 // CGeomProfile* pGetDownCoastProfile(CGeomProfile const* pProfile);
215 // CGeomProfile* pGetDownCoastProfileNotIncLastProfile(CGeomProfile const* pProfile);
216 // CGeomProfile* pGetUpCoastProfile(CGeomProfile const* pProfile);
217
219 void SetProfileAtCoastPoint(int const, CGeomProfile* const);
220 bool bIsProfileAtCoastPoint(int const) const;
221 CGeomProfile* pGetProfileAtCoastPoint(int const) const;
223 CGeomProfile* pGetProfileWithUpCoastSeq(int const) const;
224
225 CGeomCoastPolygon* pPolyCreateAndAppendPolygon(int const, int const, CGeom2DIPoint const*, CGeom2DIPoint const*, int const, int const, vector<CGeom2DPoint> const*, int const, int const, bool const, bool const);
226 int nGetNumPolygons(void) const;
227 CGeomCoastPolygon* pGetPolygon(int const);
228
229 void SetPolygonNode(int const, int const);
230 int nGetPolygonNode(int const) const;
231
232 void SetCoastDeepWaterWaveHeight(int const, double const);
233 // double dGetCoastDeepWaterWaveHeight(int const) const;
234
235 void SetCoastDeepWaterWaveAngle(int const, double const);
236 double dGetCoastDeepWaterWaveAngle(int const) const;
237
238 void SetCoastDeepWaterWavePeriod(int const, double const);
239 double dGetCoastDeepWaterWavePeriod(int const) const;
240
241 void SetBreakingWaveHeight(int const, double const);
242 double dGetBreakingWaveHeight(int const) const;
243
244 void SetCoastWaveHeight(int const, double const);
245 double dGetCoastWaveHeight(int const) const;
246
247 void SetBreakingWaveAngle(int const, double const);
248 double dGetBreakingWaveAngle(int const) const;
249
250 void SetWaveSetupSurge(int const, double const);
251 double dGetWaveSetupSurge(int const) const;
252
253 // void SetStormSurge(int const, double const);
254 // double dGetStormSurge(int const) const;
255
256 void SetRunUp(int const, double const);
257 double dGetRunUp(int const) const;
258
259 double dGetLevel(int const, int const) const;
260
261 void SetDepthOfBreaking(int const, double const);
262 double dGetDepthOfBreaking(int const) const;
263
264 void SetBreakingDistance(int const, int const);
265 int nGetBreakingDistance(int const) const;
266
267 void SetFluxOrientation(int const, double const);
268 double dGetFluxOrientation(int const) const;
269
270 void SetWaveEnergyAtBreaking(int const, double const);
271 double dGetWaveEnergyAtBreaking(int const) const;
272
275
276 // void AppendPolygonLength(const double);
277 // double dGetPolygonLength(int const) const;
278
279 int nGetNumShadowBoundaries(void) const;
280 void AppendShadowBoundary(CGeomLine const*);
281 CGeomLine* pGetShadowBoundary(int const);
282
283 int nGetNumShadowDowndriftBoundaries(void) const;
286};
287#endif // COAST_H
Contains CGeom2DPoint definitions.
Contains CGeom2DIPoint definitions.
Contains CGeomCell definitions.
Abstract class, used as a base class for landform objects on the coastline.
Geometry class used to represent 2D point objects with integer coordinates.
Definition 2di_point.h:25
Geometry class used to represent 2D point objects with floating-point coordinates.
Definition 2d_point.h:25
Geometry class used for coast polygon objects.
Geometry class used to represent 2D vector integer line objects.
Definition i_line.h:27
Geometry class used to represent 2D vector line objects.
Definition line.h:28
Geometry class used to represent coast profile objects.
Definition profile.h:33
void SetStartEdge(int const)
Sets the coast's start edge.
Definition coast.cpp:81
double dGetBreakingWaveAngle(int const) const
Gets the breaking wave angle for this coast point.
Definition coast.cpp:661
void AppendShadowBoundary(CGeomLine const *)
Appends a shadow boundary to this coast.
Definition coast.cpp:787
vector< CGeomProfile * > m_pVProfile
Coast-normal profile objects, in sequence of creation (which is the same as nGetProfileID() sequence)
Definition coast.h:137
CGeomCoastPolygon * pPolyCreateAndAppendPolygon(int const, int const, CGeom2DIPoint const *, CGeom2DIPoint const *, int const, int const, vector< CGeom2DPoint > const *, int const, int const, bool const, bool const)
Creates a coast polygon and returns a pointer to it.
Definition coast.cpp:497
vector< CGeomCoastPolygon * > m_pVCoastPolygon
This coast's polygon objects, in down-coast sequence.
Definition coast.h:143
void SetCoastDeepWaterWavePeriod(int const, double const)
Sets the deep water wave period for this coast point.
Definition coast.cpp:562
void SetCoastDeepWaterWaveAngle(int const, double const)
Sets the deep water wave angle for this coast point.
Definition coast.cpp:548
int nGetNumShadowDowndriftBoundaries(void) const
Returns the number of shadow zone downdrift boundaries on this coast.
Definition coast.cpp:800
CGeomLine m_LFloodWaveSetupSurgeRunupExtCRS
Line of points (external CRS) giving the plan view of the vector flood of wave setup + surge + runup.
Definition coast.h:75
CGeom2DIPoint * pPtiGetCellMarkedAsCoastline(int const)
Returns the coordinates (grid CRS) of the cell marked as coastline.
Definition coast.cpp:221
vector< double > m_VdBreakingWaveHeight
The breaking wave height on a normal drawn from each point on m_LCoastlineExtCRS.
Definition coast.h:102
void SetBreakingDistance(int const, int const)
Sets the breaking distance for this coast point.
Definition coast.cpp:682
vector< double > m_VdRunUp
The run-up on a normal drawn from each point on m_LCoastlineExtCRS.
Definition coast.h:111
double dGetDetailedCurvature(int const) const
Returns the detailed curvature for a coast point.
Definition coast.cpp:329
CRWCoast(CSimulation *)
Constructor with (partial) initialisation list.
Definition coast.cpp:37
bool bIsProfileAtCoastPoint(int const) const
Returns true if there is a coastline-normal profile at this coast point, false otherwise.
Definition coast.cpp:751
void SetSmoothCurvatureSTD(double const)
Sets the standard deviation of the coast's smoothed curvature.
Definition coast.cpp:405
vector< double > m_VdWaveSetupSurge
The wave setup on a normal drawn from each point on m_LCoastlineExtCRS.
Definition coast.h:105
int nGetEndEdge(void) const
Gets the coast's end edge.
Definition coast.cpp:99
void SetDepthOfBreaking(int const, double const)
Sets the depth of breaking for this coast point.
Definition coast.cpp:668
void SetSmoothCurvatureMean(double const)
Sets the mean of the coast's smoothed curvature.
Definition coast.cpp:393
vector< int > m_VnBreakingDistance
Distance of breaking (in cells), at each point on m_LCoastlineExtCRS.
Definition coast.h:81
double dGetBreakingWaveHeight(int const) const
Gets the breaking wave height for this coast point.
Definition coast.cpp:581
void SetFluxOrientation(int const, double const)
Sets the flux orientation for this coast point.
Definition coast.cpp:696
CGeomLine m_LCoastlineExtCRS
Smoothed line of points (external CRS) giving the plan view of the vector coast.
Definition coast.h:66
void AppendProfile(CGeomProfile *)
Appends a coastline-normal profile.
Definition coast.cpp:431
int m_nEndEdge
The edge at which the coast ends.
Definition coast.h:48
CACoastLandform * pGetCoastLandform(int const)
Returns the coastal landform for a given coast point, or NULL if there is no coast landform here.
Definition coast.cpp:772
double m_dCurvatureSmoothSTD
The standard deviaton of the coast's smoothed curvature.
Definition coast.h:60
void SetWaveSetupSurge(int const, double const)
Sets the wave setup surge for this coast point.
Definition coast.cpp:588
vector< double > m_VdWaveEnergyAtBreaking
Wave energy at each point on m_LCoastlineExtCRS.
Definition coast.h:126
CGeomLine * pGetShadowDowndriftBoundary(int const)
Returns a pointer to a shadow zone downdrift boundary.
Definition coast.cpp:812
int m_nStartEdge
The edge from which the coast starts.
Definition coast.h:45
CGeomLine * pLGetCoastlineExtCRS(void)
Returns the coastline (external CRS)
Definition coast.cpp:152
vector< CACoastLandform * > m_pVLandform
Pointer to a coast landform object, at each point on the coastline.
Definition coast.h:129
void SetCoastlineGridCRS(CGeomILine const *)
Sets the coordinates (grid CRS) of the cells marked as coastline.
Definition coast.cpp:199
double dGetWaveEnergyAtBreaking(int const) const
Gets the wave energy at breaking for this coast point.
Definition coast.cpp:718
double dGetDepthOfBreaking(int const) const
Gets the depth of breaking for this coast point.
Definition coast.cpp:675
int nGetCoastPointGivenCell(CGeom2DIPoint *)
Returns the coastline number given a cell, or INT_NODATA if neither this cell or any of its neighbour...
Definition coast.cpp:251
int nGetNumShadowBoundaries(void) const
Returns the number of shadow boundaries on this coast.
Definition coast.cpp:781
int nGetSeaHandedness(void) const
Gers the handedness of the coast.
Definition coast.cpp:75
vector< double > m_VdDeepWaterWaveAngle
The deep water wave orientation at the end of a normal drawn from each point on m_LCoastlineExtCRS.
Definition coast.h:96
CGeomILine * pILGetCoastlineGridCRS(void)
Returns a pointer to the cells marked as coastline (grid CRS)
Definition coast.cpp:205
vector< CGeomLine > m_LShadowBoundary
Lines which comprise the edge of a shadow zone, ext CRS.
Definition coast.h:146
vector< double > m_VdDeepWaterWavePeriod
The deep water wave period at the end of a normal drawn from each point on m_LCoastlineExtCRS.
Definition coast.h:99
CSimulation * m_pSim
A pointer to the CSimulation object.
Definition coast.h:63
vector< CGeomProfile * > m_pVProfileDownCoastSeq
Pointers to coastline-normal profile objects, in along-coastline sequence.
Definition coast.h:140
int nGetNumProfiles(void) const
Returns the number of profiles on this coast.
Definition coast.cpp:443
double dGetRunUp(int const) const
Gets the wave runup for this coast point.
Definition coast.cpp:616
CGeomProfile * pGetProfile(int const)
Returns a pointer to a profile, in polygon-ID number sequence.
Definition coast.cpp:417
CGeomCoastPolygon * pGetPolygon(int const)
Returns a pointer to a coast polygon, specified by down-coast (i.e. along the coast in the direction ...
Definition coast.cpp:513
CGeomLine * pGetShadowBoundary(int const)
Returns a pointer to a shadow boundary.
Definition coast.cpp:793
int nGetCoastlineSize(void) const
Gets the size of the coastline.
Definition coast.cpp:188
~CRWCoast(void)
Destructor.
Definition coast.cpp:50
void SetCoastlineExtCRS(CGeomLine const *)
Given the vector line of a coast, this initialises coastline values (curvature, breaking wave height,...
Definition coast.cpp:105
void SetRunUp(int const, double const)
Sets the wave runup for this coast point.
Definition coast.cpp:610
vector< double > m_VdBreakingWaveAngle
The breaking wave orientation on a normal drawn from each point on m_LCoastlineExtCRS.
Definition coast.h:117
CGeomProfile * pGetProfileWithUpCoastSeq(int const) const
Returns a pointer to a coastline-normal profile in up-coast sequence.
Definition coast.cpp:466
vector< double > m_VdCurvatureDetailed
Detailed curvature at each point on m_LCoastlineExtCRS.
Definition coast.h:87
void SetDetailedCurvatureMean(double const)
Sets the mean of the coast's detailed curvature.
Definition coast.cpp:369
void SetBreakingWaveHeight(int const, double const)
Sets the breaking wave height for this coast point.
Definition coast.cpp:574
int nGetStartEdge(void) const
Gets the coast's start edge.
Definition coast.cpp:87
void SetPolygonNode(int const, int const)
Sets a coast polygon node.
Definition coast.cpp:520
void SetDetailedCurvatureSTD(double const)
Sets the standard deviation of the coast's detailed curvature.
Definition coast.cpp:381
CGeom2DPoint * pPtGetCoastlinePointExtCRS(int const)
Returns a given coast point in external CRS.
Definition coast.cpp:158
int nGetPolygonNode(int const) const
Gets a coast polygon node.
Definition coast.cpp:527
double m_dCurvatureSmoothMean
The mean of the coast's smoothed curvature.
Definition coast.h:57
void SetBreakingWaveAngle(int const, double const)
Sets the breaking wave angle for this coast point.
Definition coast.cpp:654
vector< double > m_VdCoastWaveHeight
The wave height at coast point on a normal drawn from each point on m_LCoastlineExtCRS.
Definition coast.h:114
vector< double > m_VdDeepWaterWaveHeight
The deep water wave height at the end of a normal drawn from each point on m_LCoastlineExtCRS.
Definition coast.h:93
void SetProfileAtCoastPoint(int const, CGeomProfile *const)
Sets a pointer to a coast-normal profile at a given coastline point.
Definition coast.cpp:744
int nGetBreakingDistance(int const) const
Gets the breaking distance for this coast point.
Definition coast.cpp:689
void SetSmoothCurvature(int const, double const)
Sets the smoothed curvature for a coast point.
Definition coast.cpp:356
vector< double > m_VdDepthOfBreaking
The depth of breaking on a normal drawn from each point on m_LCoastlineExtCRS.
Definition coast.h:120
void AppendCoastLandform(CACoastLandform *)
Appends a coastal landform to the vector of coast landform objects.
Definition coast.cpp:766
double m_dCurvatureDetailedSTD
The standard deviation of the coast's detailed curvature.
Definition coast.h:54
vector< double > * pVGetSmoothCurvature(void)
Returns a pointer to a vector of smoothed curvature for all coast points.
Definition coast.cpp:363
void InsertProfilesInProfileCoastPointIndex(void)
Inserts profiles at coastline points in the profile-coastline-point index.
Definition coast.cpp:732
void AppendShadowDowndriftBoundary(CGeomLine const *)
Appends a shadow zone downdrift boundary.
Definition coast.cpp:806
double dGetFluxOrientation(int const) const
Gets the flux orientation for this coast point.
Definition coast.cpp:703
double dGetCoastDeepWaterWavePeriod(int const) const
Gets the deep water wave period for this coast point.
Definition coast.cpp:568
void SetCoastDeepWaterWaveHeight(int const, double const)
Sets the deep water wave height for this coast point.
Definition coast.cpp:534
vector< CGeomProfile * > m_pVNormalProfileDownAllCoastpointSeq
Pointers to coast-normal profile objects, one for each point on the coastline (is null for most coast...
Definition coast.h:132
void SetSeaHandedness(int const)
Sets the handedness of the coast.
Definition coast.cpp:69
vector< double > m_VdCurvatureSmooth
Smoothed curvature at each point on m_LCoastlineExtCRS.
Definition coast.h:90
int m_nSeaHandedness
Direction of the sea from the coastline, travelling down-coast (i.e. in direction of increasing coast...
Definition coast.h:42
double dGetSmoothCurvature(int const) const
Returns the smoothed curvature for a coast point.
Definition coast.cpp:349
CGeomILine m_ILCellsMarkedAsCoastline
Unsmoothed integer x-y coordinates (grid CRS) of the cell marked as coastline for each point on the v...
Definition coast.h:78
vector< double > * pVGetDetailedCurvature(void)
Returns a pointer to a vector of detailed curvature for all coast points.
Definition coast.cpp:343
vector< int > m_VnPolygonNode
At every point on m_LCoastlineExtCRS: INT_NODATA if no nodepoint there, otherwise the node (point of ...
Definition coast.h:84
void SetWaveEnergyAtBreaking(int const, double const)
Sets the wave energy at breaking for this coast point.
Definition coast.cpp:710
double m_dCurvatureDetailedMean
The mean of the coast's detailed curvature.
Definition coast.h:51
CGeomProfile * pGetProfileWithDownCoastSeq(int const) const
Returns a pointer to a coastline-normal profile in down-coast (i.e. along the coast in the direction ...
Definition coast.cpp:459
double dGetCoastWaveHeight(int const) const
Gets the coast wave height for this coast point.
Definition coast.cpp:647
CGeomProfile * pGetProfileAtCoastPoint(int const) const
Returns a pointer to the coastline-normal profile at this coast point.
Definition coast.cpp:760
void CreateProfileDownCoastIndex(void)
Creates an index to profiles in down-coast (i.e. along the coast in the direction of increasing coast...
Definition coast.cpp:449
CGeomLine m_LFloodWaveSetupExtCRS
Line of points (external CRS) giving the plan view of the vector flood of wave setup.
Definition coast.h:69
void CreateProfilesAtCoastPoints(void)
Creates a vector which holds, for each coastline point, a null pointer to a coastline-normal profile ...
Definition coast.cpp:726
void SetEndEdge(int const)
Sets the coast's end edge.
Definition coast.cpp:93
CGeomLine m_LFloodWaveSetupSurgeExtCRS
Line of points (external CRS) giving the plan view of the vector flood of wave setup + surge.
Definition coast.h:72
double dGetWaveSetupSurge(int const) const
Gets the wave setup surge for this coast point.
Definition coast.cpp:594
vector< double > m_VdFluxOrientation
As in the COVE model, this is the orientation alongshore energy/sediment movement; a +ve flux is in d...
Definition coast.h:123
int nGetNumPolygons(void) const
Returns the number of coast polygons.
Definition coast.cpp:507
void SetCoastWaveHeight(int const, double const)
Sets the coast wave height for this coast point.
Definition coast.cpp:640
void SetDetailedCurvature(int const, double const)
Sets the detailed curvature for a coast point.
Definition coast.cpp:336
double dGetLevel(int const, int const) const
Sets the wave level for this coast point.
Definition coast.cpp:622
vector< CGeomLine > m_LShadowDowndriftBoundary
Lines which comprise the edge of a downdrift zone, ext CRS.
Definition coast.h:149
double dGetCoastDeepWaterWaveAngle(int const) const
Gets the deep water wave angle for this coast point.
Definition coast.cpp:555
This class runs CoastalME simulations.
Definition simulation.h:69
Contains CACoastLandform definitions.
Contains CGeomCoastPolygon definitions.
Contains CGeomILine definitions.
Contains CGeomLine definitions.
Contains CGeomProfile definitions.
Contains CSimulation definitions.