CoastalME (Coastal Modelling Environment)
Simulates the long-term behaviour of complex coastlines
Loading...
Searching...
No Matches
cell_sediment.cpp
Go to the documentation of this file.
1
12
13/* ===============================================================================================================================
14
15 This file is part of CoastalME, the Coastal Modelling Environment.
16
17 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.
18
19 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.
20
21 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.
22
23===============================================================================================================================*/
24#include <assert.h>
25
26#include "cell_sediment.h"
27
44
61
64{
65 // This copies all fields from one object to another
66 m_dFine = OtherSediment.m_dFine;
67 m_dNotchFineLost = OtherSediment.m_dNotchFineLost;
68 m_dSand = OtherSediment.m_dSand;
69 m_dNotchSandLost = OtherSediment.m_dNotchSandLost;
70 m_dCoarse = OtherSediment.m_dCoarse;
78 return (*this);
79}
80
82void CRWCellSediment::SetFineDepth(double const dNewSedDepth)
83{
84 m_dFine = dNewSedDepth;
85}
86
89{
90 return m_dFine;
91}
92
94void CRWCellSediment::AddFineDepth(double const dSedDepthToAdd)
95{
96 m_dFine += dSedDepthToAdd;
97}
98
100void CRWCellSediment::SetSandDepth(double const dNewSedDepth)
101{
102 m_dSand = dNewSedDepth;
103 // assert(m_dSand >= 0);
104}
105
108{
109 return m_dSand;
110}
111
113void CRWCellSediment::AddSandDepth(double const dSedDepthToAdd)
114{
115 m_dSand += dSedDepthToAdd;
116}
117
119void CRWCellSediment::SetCoarseDepth(double const dNewSedDepth)
120{
121 m_dCoarse = dNewSedDepth;
122}
123
126{
127 return m_dCoarse;
128}
129
131void CRWCellSediment::AddCoarseDepth(double const dSedDepthToAdd)
132{
133 m_dCoarse += dSedDepthToAdd;
134}
135
137void CRWCellSediment::SetNotchFineLost(double const dDepthIn)
138{
139 m_dNotchFineLost = dDepthIn;
140}
141
142// //! Increments the depth equivalent of fine sediment lost by notch incision
143// void CRWCellSediment::IncrNotchFineLost(double const dDepthIn)
144// {
145// m_dNotchFineLost += dDepthIn;
146// // assert(m_dNotchFineLost <= m_dFine);
147// }
148
151{
152 return m_dNotchFineLost;
153}
154
156void CRWCellSediment::SetNotchSandLost(double const dDepthIn)
157{
158 m_dNotchSandLost = dDepthIn;
159}
160
161// //! Increments the depth equivalent of sand sediment lost by notch incision
162// void CRWCellSediment::IncrNotchSandLost(double const dDepthIn)
163// {
164// m_dNotchSandLost += dDepthIn;
165// // assert(m_dNotchSandLost <= m_dSand);
166// }
167
170{
171 return m_dNotchSandLost;
172}
173
175void CRWCellSediment::SetNotchCoarseLost(double const dDepthIn)
176{
177 m_dNotchCoarseLost = dDepthIn;
178}
179
180// //! Increments the depth equivalent of coarse sediment lost by notch incision
181// void CRWCellSediment::IncrNotchCoarseLost(double const dDepthIn)
182// {
183// m_dNotchCoarseLost += dDepthIn;
184// // assert(m_dNotchCoarseLost <= m_dCoarse);
185// }
186
189{
190 return m_dNotchCoarseLost;
191}
192
195{
196 m_dFine += dDepth;
197
199 m_dTotFineSedimentInput += dDepth;
200}
201
204{
205 m_dSand += dDepth;
206
208 m_dTotSandSedimentInput += dDepth;
209}
210
213{
214 m_dCoarse += dDepth;
215
218}
219
225
231
237
243
Contains CRWCellSediment definitions.
void SetNotchFineLost(double const)
Sets the depth equivalent of fine sediment lost by notch incision.
double dGetSandSedimentInputDepth(void) const
Returns the this-iteration total depth of sand sediment input (m)
double dGetCoarseDepth(void) const
Returns the coarse sediment depth equivalent for this sediment layer object.
double m_dNotchSandLost
Depth equivalent (m) of sand sediment lost via notch incision.
double m_dNotchFineLost
Depth equivalent (m) of fine sediment lost via notch incision.
double dGetNotchFineLost(void) const
Gets the depth equivalent of fine sediment lost by notch incision.
double m_dCoarseSedimentInputThisIter
Depth equivalent (m) of coarse sediment added via sediment input events, this iteration.
void AddCoarseSedimentInputDepth(double const)
Adds to the this-iteration total depth of coarse sediment input, and to the since-start-of-simulation...
double m_dTotCoarseSedimentInput
Depth equivalent (m) of coarse sediment added via sediment input events, since start of simulation.
void AddFineDepth(double const)
Adds fine sediment (depth equivalent) to this sediment layer object's fine sediment.
double dGetFineDepth(void) const
Returns the fine sediment depth equivalent for this sediment layer object.
double dGetNotchSandLost(void) const
Gets the depth equivalent of sand sediment lost by notch incision.
void AddFineSedimentInputDepth(double const)
Adds to the this-iteration total depth of fine sediment input, and to the since-start-of-simulation t...
double m_dTotFineSedimentInput
Depth equivalent (m) of fine sediment added via sediment input events, since start of simulation.
double m_dFine
Depth equivalent of fine sediment in m.
CRWCellSediment(void)
CRWCellSediment constructor, initialization list sets all internal values to zero.
void SetNotchCoarseLost(double const)
Sets the depth equivalent of coarse sediment lost by notch incision.
void SetNotchSandLost(double const)
Sets the depth equivalent of sand sediment lost by notch incision.
double m_dFineSedimentInputThisIter
Depth equivalent (m) of fine sediment added via sediment input events, this iteration.
void InitThisIterSedimentInputAll(void)
Intializes the this-iteration total depth of sediment input for all size classes (m)
void SetFineDepth(double const)
Sets this sediment layer object's fine sediment depth equivalent. Note no checks here to see if new e...
void AddSandSedimentInputDepth(double const)
Adds to the this-iteration total depth of sand sediment input, and to the since-start-of-simulation t...
double dGetTotAllSedimentInputDepth(void) const
Returns the total (since the start of simulation) depth of sediment input (m, all size classes)
double m_dNotchCoarseLost
Depth equivalent (m) of coarse sediment lost via notch incision.
void SetSandDepth(double const)
Sets this sediment layer object's sand sediment depth equivalent. Note no checks here to see if new e...
double m_dSand
Depth equivalent of sand sediment in m.
double dGetFineSedimentInputDepth(void) const
Returns the this-iteration total depth of fine sediment input (m)
double dGetCoarseSedimentInputDepth(void) const
Returns the this-iteration total depth of coarse sediment input (m)
void AddSandDepth(double const)
Adds sand sediment (depth equivalent) to this sediment layer object's sand sediment.
void SetCoarseDepth(double const)
Sets this sediment layer object's coarse sediment depth equivalent. Note no checks here to see if new...
double dGetNotchCoarseLost(void) const
Gets the depth equivalent of coarse sediment lost by notch incision.
double m_dCoarse
Depth equivalent of coarse sediment in m.
void AddCoarseDepth(double const)
Adds coarse sediment (depth equivalent) to this sediment layer object's coarse sediment.
double m_dTotSandSedimentInput
Depth equivalent (m) of sand sediment added via sediment input events, since start of simulation.
CRWCellSediment & operator=(const CRWCellSediment &)
Sets one CRWCellSediment object equal to another.
double dGetSandDepth(void) const
Returns the sand sediment depth equivalent for this sediment layer.
double m_dSandSedimentInputThisIter
Depth equivalent (m) of sand sediment added via sediment input events, this iteration.