CoastalME (Coastal Modelling Environment)
Simulates the long-term behaviour of complex coastlines
Loading...
Searching...
No Matches
cell_layer.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#include <cstddef>
22
23#include "cell_layer.h"
24#include "cell_sediment.h"
25#include "cell_talus.h"
26
29{
30 m_pTalus = NULL;
31}
32
35{
36 if (m_pTalus != NULL)
37 delete m_pTalus;
38}
39
45
51
54{
55 if (this->dGetAllUnconsDepth() > 0)
56 return true;
57
58 return false;
59}
60
63{
64 return m_UnconsolidatedSediment.dGetFineDepth();
65}
66
69{
70 return m_ConsolidatedSediment.dGetFineDepth();
71}
72
75{
76 return m_UnconsolidatedSediment.dGetSandDepth();
77}
78
81{
82 return m_ConsolidatedSediment.dGetSandDepth();
83}
84
87{
88 return m_UnconsolidatedSediment.dGetCoarseDepth();
89}
90
93{
94 return m_ConsolidatedSediment.dGetCoarseDepth();
95}
96
99{
100 return (m_UnconsolidatedSediment.dGetFineDepth() + m_UnconsolidatedSediment.dGetSandDepth() + m_UnconsolidatedSediment.dGetCoarseDepth());
101}
102
105{
106 return (m_ConsolidatedSediment.dGetFineDepth() + m_ConsolidatedSediment.dGetSandDepth() + m_ConsolidatedSediment.dGetCoarseDepth());
107}
108
111{
112 return (m_UnconsolidatedSediment.dGetFineDepth() + m_UnconsolidatedSediment.dGetSandDepth() + m_UnconsolidatedSediment.dGetCoarseDepth() + m_ConsolidatedSediment.dGetFineDepth() + m_ConsolidatedSediment.dGetSandDepth() + m_ConsolidatedSediment.dGetCoarseDepth());
113}
114
115// //! Returns the thickness of unconsolidated sediment lost due to notch incision (total for all size classes)
116// double CRWCellLayer::dGetNotchUnconsolidatedLost(void) const
117// {
118// return (m_UnconsolidatedSediment.dGetNotchFineLost() + m_UnconsolidatedSediment.dGetNotchSandLost() + m_UnconsolidatedSediment.dGetNotchCoarseLost());
119// }
120
121// //! Returns the thickness of consolidated sediment lost due to notch incision (total for all size classes)
122// double CRWCellLayer::dGetNotchConsolidatedLost(void) const
123// {
124// return (m_ConsolidatedSediment.dGetNotchFineLost() + m_ConsolidatedSediment.dGetNotchSandLost() + m_ConsolidatedSediment.dGetNotchCoarseLost());
125// }
126
127// double CRWCellLayer::dGetVolSedFraction(void) const
128// {
129// return m_VdolSedFraction;
130// }
131
132// void CRWCellLayer::SetVolSedFraction(double const dNewVolSedFraction)
133// {
134// m_VdolSedFraction = dNewVolSedFraction;
135// }
136//
137// double CRWCellLayer::dGetMechResistance(void) const
138// {
139// return m_dMechResistance;
140// }
141
142// void CRWCellLayer::SetMechResistance(double const dNewMechResistance)
143// {
144// m_dMechResistance = dNewMechResistance;
145// }
146
147// double CRWCellLayer::dGetConsolidationStatus(void) const
148// {
149// return m_dConsolidationStatus;
150// }
151
152// void CRWCellLayer::SetConsolidationStatus(double const dNewConsolidationStatus)
153// {
154// m_dConsolidationStatus = dNewConsolidationStatus;
155// }
156
159{
160 if (m_pTalus == NULL)
161 return false;
162
163 return true;
164}
165
168{
169 return m_pTalus;
170}
171
174{
175 if (m_pTalus == NULL)
176 {
177 // No talus object here, so create one
178 m_pTalus = new CRWCellTalus();
179 }
180
181 return m_pTalus;
182}
183
184// Deletes this layer's talus object and resets the pointer
186{
187 delete m_pTalus;
188 m_pTalus = NULL;
189}
190
Contains CRWCellLayer definitions.
Contains CRWCellSediment definitions.
CRWCellTalus * pGetTalus(void) const
Returns a pointer to the layer's talus object, or NULL if there is no talus object.
CRWCellSediment m_ConsolidatedSediment
This cell's consolidated sediment object.
Definition cell_layer.h:38
double dGetConsSandDepth(void) const
Returns the thickness of this cell's sand consolidated sediment.
bool bHasTalus(void)
Returns true if the layer has talus, false otherwise.
double dGetUnconsCoarseDepth(void) const
Returns the thickness of this cell's coarse unconsolidated sediment.
CRWCellSediment m_UnconsolidatedSediment
This cell's unconsolidated sediment object.
Definition cell_layer.h:35
CRWCellSediment * pGetConsolidatedSediment(void)
Returns a pointer to the cell's consolidated sediment object.
~CRWCellLayer(void)
Destructor.
void DeleteTalus(void)
double dGetUnconsFineDepth(void) const
Returns the thickness of this cell's fine unconsolidated sediment.
CRWCellLayer(void)
Constructor.
double dGetConsCoarseDepth(void) const
Returns the thickness of this cell's coarse consolidated sediment.
CRWCellSediment * pGetUnconsolidatedSediment(void)
Returns a pointer to the cell's unconsolidated sediment object.
CRWCellTalus * pGetOrCreateTalus(void)
Returns a pointer to the layer's talus object. If there is no talus object, then create one.
double dGetAllConsDepth(void) const
Returns the thickness of this cell's consolidated sediment (total for all size classes)
double dGetTotalThickness(void) const
Returns the thickness of this cell's sediment (total for all size classes, both consolidated and unco...
double dGetConsFineDepth(void) const
Returns the thickness of this cell's fine consolidated sediment.
double dGetAllUnconsDepth(void) const
Returns the thickness of this cell's unconsolidated sediment (total for all size classes)
bool bHasUncons(void)
Return true if the layer has unconsolidated sediment, false otherwise.
CRWCellTalus * m_pTalus
Pointer to this cell layer's talus (unconsolidated sediment derived from cliff collapse),...
Definition cell_layer.h:41
double dGetUnconsSandDepth(void) const
Returns the thickness of this cell's sand unconsolidated sediment.
Real-world class used to represent the sediment (either consolidated or unconsolidated) associated wi...
Real-world class used to represent the talus (unconsolidated sediment resulting from cliff collapse) ...
Definition cell_talus.h:25