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
14
15#ifndef COAST_H
16#define COAST_H
17/* ===============================================================================================================================
18
19 This file is part of CoastalME, the Coastal Modelling Environment.
20
21 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.
22
23 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.
24
25 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.
26
27===============================================================================================================================*/
28#include "simulation.h"
29#include "profile.h"
30#include "cell.h"
31#include "coast_landform.h"
32#include "coast_polygon.h"
33#include "line.h"
34#include "i_line.h"
35#include "2d_point.h"
36#include "2di_point.h"
37
38class CGeomProfile; // Forward declarations
39class CACoastLandform;
41
43{
44 private:
47
50
53
56
59
62
65
68
71
74
77
80
81 // The following have the same length as m_LCoastlineExtCRS (which may be different each timestep)
82
85
88
90 vector<int> m_VnPolygonNode;
91
93 vector<double> m_VdCurvatureDetailed;
94
96 vector<double> m_VdCurvatureSmooth;
97
100
103
106
109
111 vector<double> m_VdWaveSetupSurge;
112
113 // The storm surge on a normal drawn from each point on m_LCoastlineExtCRS
114 // vector<double> m_VdStormSurge;
115
117 vector<double> m_VdRunUp;
118
120 vector<double> m_VdCoastWaveHeight;
121
123 vector<double> m_VdBreakingWaveAngle;
124
126 vector<double> m_VdDepthOfBreaking;
127
129 vector<double> m_VdFluxOrientation;
130
133
135 vector<CACoastLandform*> m_pVLandform;
136
139
140 // These do not have the same length as m_LCoastlineExtCRS
141
143 vector<CGeomProfile*> m_pVProfile;
144
146 vector<CGeomProfile*> m_pVProfileDownCoastSeq;
147
149 vector<CGeomLine> m_LShadowBoundary;
150
152 vector<CGeomLine> m_LShadowDowndriftBoundary;
153
154 protected:
155 public:
156 explicit CRWCoast(CSimulation*);
157 ~CRWCoast(void);
158
159 CSimulation* pGetSim(void) const;
160
161 void SetSeaHandedness(int const);
162 int nGetSeaHandedness(void) const;
163
164 void SetStartEdge(int const);
165 int nGetStartEdge(void) const;
166
167 void SetEndEdge(int const);
168 int nGetEndEdge(void) const;
169
170 void SetCoastlineExtCRS(CGeomLine const*);
172 // CGeomLine* pLGetFloodWaveSetupExtCRS(void);
173 // void SetFloodWaveSetupPointExtCRS(CGeomLine const*);
174 // void SetFloodWaveSetupSurgePointExtCRS(CGeomLine const*);
175 // void SetFloodWaveSetupSurgeRunupPointExtCRS(CGeomLine const*);
177 // CGeom2DPoint* pPtGetFloodWaveSetupPointExtCRS(int const);
178 // CGeom2DPoint* pPtGetFloodWaveSetupSurgePointExtCRS(int const);
179 // CGeom2DPoint* pPtGetFloodWaveSetupSurgeRunupPointExtCRS(int const);
180
181 int nGetCoastlineSize(void) const;
182 // double dGetCoastlineSegmentLength(int const, int const);
183 // double dGetCoastlineLengthSoFar(int const);
184 // void DisplayCoastline(void);
185
186 void SetCoastlineGridCRS(CGeomILine const*);
187 // void AppendCellMarkedAsCoastline(CGeom2DIPoint const*);
188 // void AppendCellMarkedAsCoastline(int const, int const);
190 // int nGetNCellsMarkedAsCoastline(void) const;
192
193 double dGetDetailedCurvature(int const) const;
194 void SetDetailedCurvature(int const, double const);
195 vector<double>* pVGetDetailedCurvature(void);
196 double dGetSmoothCurvature(int const) const;
197 void SetSmoothCurvature(int const, double const);
198 vector<double>* pVGetSmoothCurvature(void);
199 void SetDetailedCurvatureMean(double const);
200 // double dGetDetailedCurvatureMean(void) const;
201 void SetDetailedCurvatureSTD(double const);
202 // double dGetDetailedCurvatureSTD(void) const;
203 void SetSmoothCurvatureMean(double const);
204 double dGetSmoothCurvatureMean(void) const;
205 void SetSmoothCurvatureSTD(double const);
206 double dGetSmoothCurvatureSTD(void) const;
207
209 CGeomProfile* pGetProfile(int const);
211 // void ReplaceProfile(int const, vector<CGeom2DPoint> const*);
212 int nGetNumProfiles(void) const;
215
219
221 void SetProfileAtCoastPoint(int const, CGeomProfile* const);
222 bool bIsProfileAtCoastPoint(int const) const;
223 CGeomProfile* pGetProfileAtCoastPoint(int const) const;
225 CGeomProfile* pGetProfileWithUpCoastSeq(int const) const;
226
227 void SetCoastDeepWaterWaveHeight(int const, double const);
228 // double dGetCoastDeepWaterWaveHeight(int const) const;
229
230 void SetCoastDeepWaterWaveAngle(int const, double const);
231 double dGetCoastDeepWaterWaveAngle(int const) const;
232
233 void SetCoastDeepWaterWavePeriod(int const, double const);
234 double dGetCoastDeepWaterWavePeriod(int const) const;
235
236 void SetBreakingWaveHeight(int const, double const);
237 double dGetBreakingWaveHeight(int const) const;
238
239 void SetCoastWaveHeight(int const, double const);
240 double dGetCoastWaveHeight(int const) const;
241
242 void SetBreakingWaveAngle(int const, double const);
243 double dGetBreakingWaveAngle(int const) const;
244
245 void SetWaveSetupSurge(int const, double const);
246 double dGetWaveSetupSurge(int const) const;
247
248 // void SetStormSurge(int const, double const);
249 // double dGetStormSurge(int const) const;
250
251 void SetRunUp(int const, double const);
252 double dGetRunUp(int const) const;
253
254 double dGetLevel(int const, int const) const;
255
256 void SetDepthOfBreaking(int const, double const);
257 double dGetDepthOfBreaking(int const) const;
258
259 void SetBreakingDistance(int const, int const);
260 int nGetBreakingDistance(int const) const;
261
262 void SetFluxOrientation(int const, double const);
263 double dGetFluxOrientation(int const) const;
264
265 void SetWaveEnergyAtBreaking(int const, double const);
266 double dGetWaveEnergyAtBreaking(int const) const;
267
270
271 void SetPolygonNode(int const, int const);
272 int nGetPolygonNode(int const) const;
273 CGeomCoastPolygon* pPolyCreatePolygon(int const, int const, CGeom2DIPoint const*, CGeom2DIPoint const*, int const, int const, vector<CGeom2DPoint> const*, int const, int const, bool const, bool const);
274 int nGetNumPolygons(void) const;
275 CGeomCoastPolygon* pGetPolygon(int const) const;
276
277 // void AppendPolygonLength(const double);
278 // double dGetPolygonLength(int const) const;
279
280 int nGetNumShadowBoundaries(void) const;
281 void AppendShadowBoundary(CGeomLine const*);
282 CGeomLine* pGetShadowBoundary(int const);
283
284 int nGetNumShadowDowndriftBoundaries(void) const;
287};
288#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:29
Geometry class used to represent 2D point objects with floating-point coordinates.
Definition 2d_point.h:27
Geometry class used for coast polygon objects.
Geometry class used to represent 2D vector integer line objects.
Definition i_line.h:31
Geometry class used to represent 2D vector line objects.
Definition line.h:32
Geometry class used to represent coast profile objects.
Definition profile.h:37
void SetStartEdge(int const)
Sets the coast's start edge.
Definition coast.cpp:82
double dGetBreakingWaveAngle(int const) const
Gets the breaking wave angle for this coast point.
Definition coast.cpp:619
void AppendShadowBoundary(CGeomLine const *)
Appends a shadow boundary to this coast.
Definition coast.cpp:793
vector< CGeomProfile * > m_pVProfile
Coast-normal profile objects, in sequence of creation (which is the same as nGetProfileID() sequence)
Definition coast.h:143
void SetCoastDeepWaterWavePeriod(int const, double const)
Sets the deep water wave period for this coast point.
Definition coast.cpp:520
void SetCoastDeepWaterWaveAngle(int const, double const)
Sets the deep water wave angle for this coast point.
Definition coast.cpp:506
int nGetNumShadowDowndriftBoundaries(void) const
Returns the number of shadow zone downdrift boundaries on this coast.
Definition coast.cpp:806
CGeomLine m_LFloodWaveSetupSurgeRunupExtCRS
Line of points (external CRS) giving the plan view of the vector flood of wave setup + surge + runup.
Definition coast.h:79
CGeom2DIPoint * pPtiGetCellMarkedAsCoastline(int const)
Returns the coordinates (grid CRS) of the cells marked as coastline.
Definition coast.cpp:216
vector< double > m_VdBreakingWaveHeight
The breaking wave height on a normal drawn from each point on m_LCoastlineExtCRS.
Definition coast.h:108
void SetBreakingDistance(int const, int const)
Sets the breaking distance for this coast point.
Definition coast.cpp:640
vector< double > m_VdRunUp
The run-up on a normal drawn from each point on m_LCoastlineExtCRS.
Definition coast.h:117
double dGetDetailedCurvature(int const) const
Returns the detailed curvature for a coast point.
Definition coast.cpp:324
double dGetSmoothCurvatureMean(void) const
Gets the mean of the coast's smoothed curvature.
Definition coast.cpp:394
CRWCoast(CSimulation *)
Constructor with initialization list.
Definition coast.cpp:41
bool bIsProfileAtCoastPoint(int const) const
Returns true if there is a coastline-normal profile at this coast point, false otherwise.
Definition coast.cpp:709
void SetSmoothCurvatureSTD(double const)
Sets the standard deviation of the coast's smoothed curvature.
Definition coast.cpp:400
vector< double > m_VdWaveSetupSurge
The wave setup on a normal drawn from each point on m_LCoastlineExtCRS.
Definition coast.h:111
double dGetSmoothCurvatureSTD(void) const
Gets the standard deviation of the coast's smoothed curvature.
Definition coast.cpp:406
int nGetEndEdge(void) const
Gets the coast's end edge.
Definition coast.cpp:100
CGeomProfile * pGetDownCoastProfile(CGeomProfile const *pProfile)
Returns a pointer to the profile which is adjacent to and down-coast from the given profile pointer....
Definition coast.cpp:469
void SetDepthOfBreaking(int const, double const)
Sets the depth of breaking for this coast point.
Definition coast.cpp:626
void SetSmoothCurvatureMean(double const)
Sets the mean of the coast's smoothed curvature.
Definition coast.cpp:388
vector< int > m_VnBreakingDistance
Distance of breaking (in cells), at each point on m_LCoastlineExtCRS.
Definition coast.h:87
double dGetBreakingWaveHeight(int const) const
Gets the breaking wave height for this coast point.
Definition coast.cpp:539
CSimulation * pGetSim(void) const
Returns a pointer to the simulation object.
Definition coast.cpp:64
void SetFluxOrientation(int const, double const)
Sets the flux orientation for this coast point.
Definition coast.cpp:654
CGeomCoastPolygon * pGetPolygon(int const) const
Returns a pointer to a coast polygon, specified by down-coast (i.e. along the coast in the direction ...
Definition coast.cpp:767
CGeomLine m_LCoastlineExtCRS
Smoothed line of points (external CRS) giving the plan view of the vector coast.
Definition coast.h:70
void AppendProfile(CGeomProfile *)
Appends a coastline-normal profile.
Definition coast.cpp:426
int m_nEndEdge
The edge at which the coast ends.
Definition coast.h:52
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:730
double m_dCurvatureSmoothSTD
The standard deviaton of the coast's smoothed curvature.
Definition coast.h:64
void SetWaveSetupSurge(int const, double const)
Sets the wave setup surge for this coast point.
Definition coast.cpp:546
vector< double > m_VdWaveEnergyAtBreaking
Wave energy at each point on m_LCoastlineExtCRS.
Definition coast.h:132
CGeomLine * pGetShadowDowndriftBoundary(int const)
Returns a pointer to a shadow zone downdrift boundary.
Definition coast.cpp:818
int m_nStartEdge
The edge from which the coast starts.
Definition coast.h:49
CGeomProfile * pGetUpCoastProfile(CGeomProfile const *pProfile)
Returns a pointer to the profile which is adjacent to and up-coast from the specified profile....
Definition coast.cpp:486
CGeomLine * pLGetCoastlineExtCRS(void)
Returns the coastline (external CRS)
Definition coast.cpp:153
vector< CACoastLandform * > m_pVLandform
Pointer to a coastal landform object, at each point on the coastline.
Definition coast.h:135
void SetCoastlineGridCRS(CGeomILine const *)
Sets the coordinates (grid CRS) of the cells marked as coastline.
Definition coast.cpp:200
double dGetWaveEnergyAtBreaking(int const) const
Gets the wave energy at breaking for this coast point.
Definition coast.cpp:676
double dGetDepthOfBreaking(int const) const
Gets the depth of breaking for this coast point.
Definition coast.cpp:633
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:246
int nGetNumShadowBoundaries(void) const
Returns the number of shadow boundaries on this coast.
Definition coast.cpp:787
int nGetSeaHandedness(void) const
Gers the handedness of the coast.
Definition coast.cpp:76
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:102
vector< CGeomLine > m_LShadowBoundary
Lines which comprise the edge of a shadow zone, ext CRS.
Definition coast.h:149
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:105
CSimulation * m_pSim
A pointer to the CSimulation object.
Definition coast.h:67
vector< CGeomProfile * > m_pVProfileDownCoastSeq
Pointers to coastline-normal objects, in along-coastline sequence.
Definition coast.h:146
int nGetNumProfiles(void) const
Returns the number of profiles on this coast.
Definition coast.cpp:438
double dGetRunUp(int const) const
Gets the wave runup for this coast point.
Definition coast.cpp:574
CGeomProfile * pGetProfile(int const)
Returns a pointer to a profile, in polygon-ID number sequence.
Definition coast.cpp:412
CGeomLine * pGetShadowBoundary(int const)
Returns a pointer to a shadow boundary.
Definition coast.cpp:799
int nGetCoastlineSize(void) const
Gets the size of the coastline.
Definition coast.cpp:189
~CRWCoast(void)
Destructor.
Definition coast.cpp:54
void SetCoastlineExtCRS(CGeomLine const *)
Given the vector line of a coast, this initializes coastline values (curvature, breaking wave height,...
Definition coast.cpp:106
void SetRunUp(int const, double const)
Sets the wave runup for this coast point.
Definition coast.cpp:568
vector< double > m_VdBreakingWaveAngle
The breaking wave orientation on a normal drawn from each point on m_LCoastlineExtCRS.
Definition coast.h:123
CGeomProfile * pGetProfileWithUpCoastSeq(int const) const
Returns a pointer to a coastline-normal profile in up-coast sequence.
Definition coast.cpp:461
vector< double > m_VdCurvatureDetailed
Detailed curvature at each point on m_LCoastlineExtCRS.
Definition coast.h:93
void SetDetailedCurvatureMean(double const)
Sets the mean of the coast's detailed curvature.
Definition coast.cpp:364
void SetBreakingWaveHeight(int const, double const)
Sets the breaking wave height for this coast point.
Definition coast.cpp:532
CGeomCoastPolygon * pPolyCreatePolygon(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:753
int nGetStartEdge(void) const
Gets the coast's start edge.
Definition coast.cpp:88
void SetPolygonNode(int const, int const)
Sets a coast polygon node.
Definition coast.cpp:739
void SetDetailedCurvatureSTD(double const)
Sets the standard deviation of the coast's detailed curvature.
Definition coast.cpp:376
CGeom2DPoint * pPtGetCoastlinePointExtCRS(int const)
Returns a given coast point in external CRS.
Definition coast.cpp:159
int nGetPolygonNode(int const) const
Gets a coast polygon node.
Definition coast.cpp:746
double m_dCurvatureSmoothMean
The mean of the coast's smoothed curvature.
Definition coast.h:61
void SetBreakingWaveAngle(int const, double const)
Sets the breaking wave angle for this coast point.
Definition coast.cpp:612
vector< double > m_VdCoastWaveHeight
The wave height at coast point on a normal drawn from each point on m_LCoastlineExtCRS.
Definition coast.h:120
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:99
void SetProfileAtCoastPoint(int const, CGeomProfile *const)
Sets a pointer to a coast-normal profile at a given coastline point.
Definition coast.cpp:702
int nGetBreakingDistance(int const) const
Gets the breaking distance for this coast point.
Definition coast.cpp:647
void SetSmoothCurvature(int const, double const)
Sets the smoothed curvature for a coast point.
Definition coast.cpp:351
vector< double > m_VdDepthOfBreaking
The depth of breaking on a normal drawn from each point on m_LCoastlineExtCRS.
Definition coast.h:126
void AppendCoastLandform(CACoastLandform *)
Appends a coastal landform to this coast.
Definition coast.cpp:724
double m_dCurvatureDetailedSTD
The standard deviation of the coast's detailed curvature.
Definition coast.h:58
vector< double > * pVGetSmoothCurvature(void)
Returns a pointer to a vector of smoothed curvature for all coast points.
Definition coast.cpp:358
void InsertProfilesInProfileCoastPointIndex(void)
Inserts profiles at coastline points in the profile-coastline-point index.
Definition coast.cpp:690
void AppendShadowDowndriftBoundary(CGeomLine const *)
Appends a shadow zone downdrift boundary.
Definition coast.cpp:812
double dGetFluxOrientation(int const) const
Gets the flux orientation for this coast point.
Definition coast.cpp:661
double dGetCoastDeepWaterWavePeriod(int const) const
Gets the deep water wave period for this coast point.
Definition coast.cpp:526
void SetCoastDeepWaterWaveHeight(int const, double const)
Sets the deep water wave height for this coast point.
Definition coast.cpp:492
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:138
void SetSeaHandedness(int const)
Sets the handedness of the coast.
Definition coast.cpp:70
vector< double > m_VdCurvatureSmooth
Smoothed curvature at each point on m_LCoastlineExtCRS.
Definition coast.h:96
int m_nSeaHandedness
Direction of the sea from the coastline, travelling down-coast (i.e. in direction of increasing coast...
Definition coast.h:46
CGeomProfile * pGetLastProfile(void)
Returns a pointer to the last profile, in polygon-ID number sequence.
Definition coast.cpp:419
double dGetSmoothCurvature(int const) const
Returns the smoothed curvature for a coast point.
Definition coast.cpp:344
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:84
vector< double > * pVGetDetailedCurvature(void)
Returns a pointer to a vector of detailed curvature for all coast points.
Definition coast.cpp:338
vector< int > m_VnPolygonNode
At every point on m_LCoastlineExtCRS: INT_NODATA if no nodepoint there, otherwise the node (point of ...
Definition coast.h:90
void SetWaveEnergyAtBreaking(int const, double const)
Sets the wave energy at breaking for this coast point.
Definition coast.cpp:668
double m_dCurvatureDetailedMean
The mean of the coast's detailed curvature.
Definition coast.h:55
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:454
double dGetCoastWaveHeight(int const) const
Gets the coast wave height for this coast point.
Definition coast.cpp:605
CGeomProfile * pGetProfileAtCoastPoint(int const) const
Returns a pointer to the coastline-normal profile at this coast point.
Definition coast.cpp:718
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:444
CGeomLine m_LFloodWaveSetupExtCRS
Line of points (external CRS) giving the plan view of the vector flood of wave setup.
Definition coast.h:73
void CreateProfilesAtCoastPoints(void)
Creates a vector which holds, for each coastline point, a null pointer to a coastline-normal profile ...
Definition coast.cpp:684
void SetEndEdge(int const)
Sets the coast's end edge.
Definition coast.cpp:94
CGeomLine m_LFloodWaveSetupSurgeExtCRS
Line of points (external CRS) giving the plan view of the vector flood of wave setup + surge.
Definition coast.h:76
double dGetWaveSetupSurge(int const) const
Gets the wave setup surge for this coast point.
Definition coast.cpp:552
CGeomProfile * pGetDownCoastProfileNotIncLastProfile(CGeomProfile const *pProfile)
Returns a pointer to the profile which is adjacent to and down-coast from the specified profile; howe...
Definition coast.cpp:475
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:129
int nGetNumPolygons(void) const
Returns the number of coast polygons.
Definition coast.cpp:761
void SetCoastWaveHeight(int const, double const)
Sets the coast wave height for this coast point.
Definition coast.cpp:598
void SetDetailedCurvature(int const, double const)
Sets the detailed curvature for a coast point.
Definition coast.cpp:331
double dGetLevel(int const, int const) const
Sets the wave level for this coast point.
Definition coast.cpp:580
vector< CGeomLine > m_LShadowDowndriftBoundary
Lines which comprise the edge of a downdrift zone, ext CRS.
Definition coast.h:152
double dGetCoastDeepWaterWaveAngle(int const) const
Gets the deep water wave angle for this coast point.
Definition coast.cpp:513
This class runs CoastalME simulations.
Definition simulation.h:79
Contains CACoastLandform definitions.
Contains CGeomCoastPolygon definitions.
Contains CGeomILine definitions.
Contains CGeomLine definitions.
Contains CGeomProfile definitions.
Contains CSimulation definitions.