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
19This file is part of CoastalME, the Coastal Modelling Environment.
20
21CoastalME 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
23This 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
25You 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 "cme.h"
29#include "profile.h"
30#include "cell.h"
31#include "coast_landform.h"
32#include "coast_polygon.h"
33
34class CGeomProfile;
35class CACoastLandform;
37
39{
40private:
43
46
49
52
55
58
61
64
67
70
73
76
77 // The following have the same length as m_LCoastlineExtCRS (which may be different each timestep)
78
81
84
86 vector<int> m_VnPolygonNode;
87
89 vector<double> m_VdCurvatureDetailed;
90
92 vector<double> m_VdCurvatureSmooth;
93
96
98 vector<double> m_VdDeepWaterWaveAngle;
99
102
105
107 vector<double> m_VdWaveSetupSurge;
108
109 // The storm surge on a normal drawn from each point on m_LCoastlineExtCRS
110// vector<double> m_VdStormSurge;
111
113 vector<double> m_VdRunUp;
114
116 vector<double> m_VdCoastWaveHeight;
117
119 vector<double> m_VdBreakingWaveAngle;
120
122 vector<double> m_VdDepthOfBreaking;
123
125 vector<double> m_VdFluxOrientation;
126
129
131 vector<CACoastLandform*> m_pVLandform;
132
135
136 // These do not have the same length as m_LCoastlineExtCRS
137
139 vector<CGeomProfile*> m_pVProfile;
140
142 vector<CGeomProfile*> m_pVProfileDownCoastSeq;
143
145 vector<CGeomLine> m_LShadowBoundary;
146
148 vector<CGeomLine> m_LShadowDowndriftBoundary;
149
150protected:
151
152public:
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*);
184// void AppendCellMarkedAsCoastline(CGeom2DIPoint const*);
185// void AppendCellMarkedAsCoastline(int const, int const);
187// int nGetNCellsMarkedAsCoastline(void) const;
189
190 double dGetDetailedCurvature(int const) const;
191 void SetDetailedCurvature(int const, double const);
192 vector<double>* pVGetDetailedCurvature(void);
193 double dGetSmoothCurvature(int const) const;
194 void SetSmoothCurvature(int const, double const);
195 vector<double>* pVGetSmoothCurvature(void);
196 void SetDetailedCurvatureMean(double const);
197 // double dGetDetailedCurvatureMean(void) const;
198 void SetDetailedCurvatureSTD(double const);
199 // double dGetDetailedCurvatureSTD(void) const;
200 void SetSmoothCurvatureMean(double const);
201 double dGetSmoothCurvatureMean(void) const;
202 void SetSmoothCurvatureSTD(double const);
203 double dGetSmoothCurvatureSTD(void) const;
204
206 CGeomProfile* pGetProfile(int const);
208// void ReplaceProfile(int const, vector<CGeom2DPoint> const*);
209 int nGetNumProfiles(void) const;
212
216
218 void SetProfileAtCoastPoint(int const, CGeomProfile* const);
219 bool bIsProfileAtCoastPoint(int const) const;
220 CGeomProfile* pGetProfileAtCoastPoint(int const) const;
222 CGeomProfile* pGetProfileWithUpCoastSeq(int const) const;
223
224 void SetCoastDeepWaterWaveHeight(int const, double const);
225 // double dGetCoastDeepWaterWaveHeight(int const) const;
226
227 void SetCoastDeepWaterWaveAngle(int const, double const);
228 double dGetCoastDeepWaterWaveAngle(int const) const;
229
230 void SetCoastDeepWaterWavePeriod(int const, double const);
231 double dGetCoastDeepWaterWavePeriod(int const) const;
232
233 void SetBreakingWaveHeight(int const, double const);
234 double dGetBreakingWaveHeight(int const) const;
235
236 void SetCoastWaveHeight(int const, double const);
237 double dGetCoastWaveHeight(int const) const;
238
239 void SetBreakingWaveAngle(int const, double const);
240 double dGetBreakingWaveAngle(int const) const;
241
242 void SetWaveSetupSurge(int const, double const);
243 double dGetWaveSetupSurge(int const) const;
244
245// void SetStormSurge(int const, double const);
246// double dGetStormSurge(int const) const;
247
248 void SetRunUp(int const, double const);
249 double dGetRunUp(int const) const;
250
251 double dGetLevel(int const, int const) const;
252
253 void SetDepthOfBreaking(int const, double const);
254 double dGetDepthOfBreaking(int const) const;
255
256 void SetBreakingDistance(int const, int const);
257 int nGetBreakingDistance(int const) const;
258
259 void SetFluxOrientation(int const, double const);
260 double dGetFluxOrientation(int const) const;
261
262 void SetWaveEnergyAtBreaking(int const, double const);
263 double dGetWaveEnergyAtBreaking(int const) const;
264
267
268 void SetPolygonNode(int const, int const);
269 int nGetPolygonNode(int const) const;
270 CGeomCoastPolygon* pPolyCreatePolygon(int const, int const, int const, CGeom2DIPoint const*, CGeom2DIPoint const*, int const, int const, vector<CGeom2DPoint> const*, int const, int const, bool const, bool const);
271 int nGetNumPolygons(void) const;
272 CGeomCoastPolygon* pGetPolygon(int const) const;
273
274 // void AppendPolygonLength(const double);
275 // double dGetPolygonLength(int const) const;
276
277 int nGetNumShadowBoundaries(void) const;
278 void AppendShadowBoundary(CGeomLine const*);
279 CGeomLine* pGetShadowBoundary(int const);
280
281 int nGetNumShadowDowndriftBoundaries(void) const;
284};
285#endif // COAST_H
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:31
Geometry class used to represent coast profile objects.
Definition profile.h:35
void SetStartEdge(int const)
Sets the coast's start edge.
Definition coast.cpp:77
double dGetBreakingWaveAngle(int const) const
Gets the breaking wave angle for this coast point.
Definition coast.cpp:604
void AppendShadowBoundary(CGeomLine const *)
Appends a shadow boundary to this coast.
Definition coast.cpp:778
vector< CGeomProfile * > m_pVProfile
Coast-normal profile objects, in sequence of creation (which is the same as nGetCoastID() sequence)
Definition coast.h:139
void SetCoastDeepWaterWavePeriod(int const, double const)
Sets the deep water wave period for this coast point.
Definition coast.cpp:507
void SetCoastDeepWaterWaveAngle(int const, double const)
Sets the deep water wave angle for this coast point.
Definition coast.cpp:493
int nGetNumShadowDowndriftBoundaries(void) const
Returns the number of shadow zone downdrift boundaries on this coast.
Definition coast.cpp:791
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 cells marked as coastline.
Definition coast.cpp:211
vector< double > m_VdBreakingWaveHeight
The breaking wave height on a normal drawn from each point on m_LCoastlineExtCRS.
Definition coast.h:104
void SetBreakingDistance(int const, int const)
Sets the breaking distance for this coast point.
Definition coast.cpp:625
vector< double > m_VdRunUp
The run-up on a normal drawn from each point on m_LCoastlineExtCRS.
Definition coast.h:113
double dGetDetailedCurvature(int const) const
Returns the detailed curvature for a coast point.
Definition coast.cpp:311
double dGetSmoothCurvatureMean(void) const
Gets the mean of the coast's smoothed curvature.
Definition coast.cpp:381
CRWCoast(CSimulation *)
Constructor with initialization list.
Definition coast.cpp:36
bool bIsProfileAtCoastPoint(int const) const
Returns true if there is a coastline-normal profile at this coast point, false otherwise.
Definition coast.cpp:694
void SetSmoothCurvatureSTD(double const)
Sets the standard deviation of the coast's smoothed curvature.
Definition coast.cpp:387
vector< double > m_VdWaveSetupSurge
The wave setup on a normal drawn from each point on m_LCoastlineExtCRS.
Definition coast.h:107
CGeomCoastPolygon * pPolyCreatePolygon(int const, 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:738
double dGetSmoothCurvatureSTD(void) const
Gets the standard deviation of the coast's smoothed curvature.
Definition coast.cpp:393
int nGetEndEdge(void) const
Gets the coast's end edge.
Definition coast.cpp:95
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:456
void SetDepthOfBreaking(int const, double const)
Sets the depth of breaking for this coast point.
Definition coast.cpp:611
void SetSmoothCurvatureMean(double const)
Sets the mean of the coast's smoothed curvature.
Definition coast.cpp:375
vector< int > m_VnBreakingDistance
Distance of breaking (in cells), at each point on m_LCoastlineExtCRS.
Definition coast.h:83
double dGetBreakingWaveHeight(int const) const
Gets the breaking wave height for this coast point.
Definition coast.cpp:526
CSimulation * pGetSim(void) const
Returns a pointer to the simulation object.
Definition coast.cpp:59
void SetFluxOrientation(int const, double const)
Sets the flux orientation for this coast point.
Definition coast.cpp:639
CGeomCoastPolygon * pGetPolygon(int const) const
Returns a pointer to a coast polygon, specified by down-coast sequence.
Definition coast.cpp:752
CGeomLine m_LCoastlineExtCRS
Smoothed line of points (external CRS) giving the plan view of the vector coast.
Definition coast.h:66
void AppendProfile(CGeomProfile *)
Appenda a coastline-normal profile.
Definition coast.cpp:413
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:715
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:533
vector< double > m_VdWaveEnergyAtBreaking
Wave energy at each point on m_LCoastlineExtCRS.
Definition coast.h:128
CGeomLine * pGetShadowDowndriftBoundary(int const)
Returns a pointer to a shadow zone downdrift boundary.
Definition coast.cpp:803
int m_nStartEdge
The edge from which the coast starts.
Definition coast.h:45
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:473
CGeomLine * pLGetCoastlineExtCRS(void)
Returns the coastline (external CRS)
Definition coast.cpp:148
vector< CACoastLandform * > m_pVLandform
Pointer to a coastal landform object, at each point on the coastline.
Definition coast.h:131
void SetCoastlineGridCRS(CGeomILine const *)
Sets the coordinates (grid CRS) of the cells marked as coastline.
Definition coast.cpp:195
double dGetWaveEnergyAtBreaking(int const) const
Gets the wave energy at breaking for this coast point.
Definition coast.cpp:661
double dGetDepthOfBreaking(int const) const
Gets the depth of breaking for this coast point.
Definition coast.cpp:618
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:241
int nGetNumShadowBoundaries(void) const
Returns the number of shadow boundaries on this coast.
Definition coast.cpp:772
int nGetSeaHandedness(void) const
Gers the handedness of the coast.
Definition coast.cpp:71
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:98
vector< CGeomLine > m_LShadowBoundary
Lines which comprise the edge of a shadow zone, ext CRS.
Definition coast.h:145
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:101
CSimulation * m_pSim
A pointer to the CSimulation object.
Definition coast.h:63
vector< CGeomProfile * > m_pVProfileDownCoastSeq
Pointers to coastline-normal objects, in along-coastline sequence.
Definition coast.h:142
int nGetNumProfiles(void) const
Returns the number of profiles on this coast.
Definition coast.cpp:425
double dGetRunUp(int const) const
Gets the wave runup for this coast point.
Definition coast.cpp:561
CGeomProfile * pGetProfile(int const)
Returns a pointer to a profile, in polygon-ID number sequence.
Definition coast.cpp:399
CGeomLine * pGetShadowBoundary(int const)
Returns a pointer to a shadow boundary.
Definition coast.cpp:784
int nGetCoastlineSize(void) const
Gets the size of the coastline.
Definition coast.cpp:184
~CRWCoast(void)
Destructor.
Definition coast.cpp:49
void SetCoastlineExtCRS(CGeomLine const *)
Given the vector line of a coast, this initializes coastline values (curvature, breaking wave height,...
Definition coast.cpp:101
void SetRunUp(int const, double const)
Sets the wave runup for this coast point.
Definition coast.cpp:555
vector< double > m_VdBreakingWaveAngle
The breaking wave orientation on a normal drawn from each point on m_LCoastlineExtCRS.
Definition coast.h:119
CGeomProfile * pGetProfileWithUpCoastSeq(int const) const
Returns a pointer to a coastline-normal profile in up-coast sequence.
Definition coast.cpp:448
vector< double > m_VdCurvatureDetailed
Detailed curvature at each point on m_LCoastlineExtCRS.
Definition coast.h:89
void SetDetailedCurvatureMean(double const)
Sets the mean of the coast's detailed curvature.
Definition coast.cpp:351
void SetBreakingWaveHeight(int const, double const)
Sets the breaking wave height for this coast point.
Definition coast.cpp:519
int nGetStartEdge(void) const
Gets the coast's start edge.
Definition coast.cpp:83
void SetPolygonNode(int const, int const)
Sets a coast polygon node.
Definition coast.cpp:724
void SetDetailedCurvatureSTD(double const)
Sets the standard deviation of the coast's detailed curvature.
Definition coast.cpp:363
CGeom2DPoint * pPtGetCoastlinePointExtCRS(int const)
Returns a given coast point in external CRS.
Definition coast.cpp:154
int nGetPolygonNode(int const) const
Gets a coast polygon node.
Definition coast.cpp:731
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:597
vector< double > m_VdCoastWaveHeight
The wave height at coast point on a normal drawn from each point on m_LCoastlineExtCRS.
Definition coast.h:116
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:95
void SetProfileAtCoastPoint(int const, CGeomProfile *const)
Sets a pointer to a coast-normal profile at a given coastline point.
Definition coast.cpp:687
int nGetBreakingDistance(int const) const
Gets the breaking distance for this coast point.
Definition coast.cpp:632
void SetSmoothCurvature(int const, double const)
Sets the smoothed curvature for a coast point.
Definition coast.cpp:338
vector< double > m_VdDepthOfBreaking
The depth of breaking on a normal drawn from each point on m_LCoastlineExtCRS.
Definition coast.h:122
void AppendCoastLandform(CACoastLandform *)
Appends a coastal landform to this coast.
Definition coast.cpp:709
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:345
void InsertProfilesInProfileCoastPointIndex(void)
Inserts profiles at coastline points in the profile-coastline-point index.
Definition coast.cpp:675
void AppendShadowDowndriftBoundary(CGeomLine const *)
Appends a shadow zone downdrift boundary.
Definition coast.cpp:797
double dGetFluxOrientation(int const) const
Gets the flux orientation for this coast point.
Definition coast.cpp:646
double dGetCoastDeepWaterWavePeriod(int const) const
Gets the deep water wave period for this coast point.
Definition coast.cpp:513
void SetCoastDeepWaterWaveHeight(int const, double const)
Sets the deep water wave height for this coast point.
Definition coast.cpp:479
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:134
void SetSeaHandedness(int const)
Sets the handedness of the coast.
Definition coast.cpp:65
vector< double > m_VdCurvatureSmooth
Smoothed curvature at each point on m_LCoastlineExtCRS.
Definition coast.h:92
int m_nSeaHandedness
Direction of the sea from the coastline, travelling down-coast (i.e. in direction of increasing coast...
Definition coast.h:42
CGeomProfile * pGetLastProfile(void)
Returns a pointer to the last profile, in polygon-ID number sequence.
Definition coast.cpp:406
double dGetSmoothCurvature(int const) const
Returns the smoothed curvature for a coast point.
Definition coast.cpp:331
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:80
vector< double > * pVGetDetailedCurvature(void)
Returns a pointer to a vector of detailed curvature for all coast points.
Definition coast.cpp:325
vector< int > m_VnPolygonNode
At every point on m_LCoastlineExtCRS: INT_NODATA if no nodepoint there, otherwise the node (point of ...
Definition coast.h:86
void SetWaveEnergyAtBreaking(int const, double const)
Sets the wave energy at breaking for this coast point.
Definition coast.cpp:653
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 sequence.
Definition coast.cpp:441
double dGetCoastWaveHeight(int const) const
Gets the coast wave height for this coast point.
Definition coast.cpp:590
CGeomProfile * pGetProfileAtCoastPoint(int const) const
Returns a pointer to the coastline-normal profile at this coast point.
Definition coast.cpp:703
void CreateProfileDownCoastIndex(void)
Creates an index to profiles in down-coastline sequence.
Definition coast.cpp:431
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:669
void SetEndEdge(int const)
Sets the coast's end edge.
Definition coast.cpp:89
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:539
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:462
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:125
int nGetNumPolygons(void) const
Returns the number of coast polygons.
Definition coast.cpp:746
void SetCoastWaveHeight(int const, double const)
Sets the coast wave height for this coast point.
Definition coast.cpp:583
void SetDetailedCurvature(int const, double const)
Sets the detailed curvature for a coast point.
Definition coast.cpp:318
double dGetLevel(int const, int const) const
Sets the wave level for this coast point.
Definition coast.cpp:567
vector< CGeomLine > m_LShadowDowndriftBoundary
Lines which comprise the edge of a downdrift zone, ext CRS.
Definition coast.h:148
double dGetCoastDeepWaterWaveAngle(int const) const
Gets the deep water wave angle for this coast point.
Definition coast.cpp:500
This class runs CoastalME simulations.
Definition simulation.h:68
This file contains global definitions for CoastalME.
Contains CACoastLandform definitions.
Contains CGeomCoastPolygon definitions.
Contains CGeomProfile definitions.