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
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
22#include "cell_sediment.h"
23
40
57
60{
61 // This copies all fields from one object to another
62 m_dFine = OtherSediment.m_dFine;
63 m_dNotchFineLost = OtherSediment.m_dNotchFineLost;
64 m_dSand = OtherSediment.m_dSand;
65 m_dNotchSandLost = OtherSediment.m_dNotchSandLost;
66 m_dCoarse = OtherSediment.m_dCoarse;
74 return (*this);
75}
76
78void CRWCellSediment::SetFineDepth(double const dNewSedDepth)
79{
80 m_dFine = dNewSedDepth;
81}
82
85{
86 return m_dFine;
87}
88
89// //! Adds fine sediment (depth equivalent) to this sediment layer object's fine sediment
90// void CRWCellSediment::AddFineDepth(double const dSedDepthToAdd)
91// {
92// m_dFine += dSedDepthToAdd;
93// }
94
96void CRWCellSediment::SetSandDepth(double const dNewSedDepth)
97{
98 m_dSand = dNewSedDepth;
99 // assert(m_dSand >= 0);
100}
101
104{
105 return m_dSand;
106}
107
109void CRWCellSediment::AddSandDepth(double const dSedDepthToAdd)
110{
111 m_dSand += dSedDepthToAdd;
112}
113
115void CRWCellSediment::SetCoarseDepth(double const dNewSedDepth)
116{
117 m_dCoarse = dNewSedDepth;
118}
119
122{
123 return m_dCoarse;
124}
125
127void CRWCellSediment::AddCoarseDepth(double const dSedDepthToAdd)
128{
129 m_dCoarse += dSedDepthToAdd;
130}
131
133void CRWCellSediment::SetNotchFineLost(double const dDepthIn)
134{
135 m_dNotchFineLost = dDepthIn;
136}
137
138// //! Increments the depth equivalent of fine sediment lost by notch incision
139// void CRWCellSediment::IncrNotchFineLost(double const dDepthIn)
140// {
141// m_dNotchFineLost += dDepthIn;
142// // assert(m_dNotchFineLost <= m_dFine);
143// }
144
147{
148 return m_dNotchFineLost;
149}
150
152void CRWCellSediment::SetNotchSandLost(double const dDepthIn)
153{
154 m_dNotchSandLost = dDepthIn;
155}
156
157// //! Increments the depth equivalent of sand sediment lost by notch incision
158// void CRWCellSediment::IncrNotchSandLost(double const dDepthIn)
159// {
160// m_dNotchSandLost += dDepthIn;
161// // assert(m_dNotchSandLost <= m_dSand);
162// }
163
166{
167 return m_dNotchSandLost;
168}
169
171void CRWCellSediment::SetNotchCoarseLost(double const dDepthIn)
172{
173 m_dNotchCoarseLost = dDepthIn;
174}
175
176// //! Increments the depth equivalent of coarse sediment lost by notch incision
177// void CRWCellSediment::IncrNotchCoarseLost(double const dDepthIn)
178// {
179// m_dNotchCoarseLost += dDepthIn;
180// // assert(m_dNotchCoarseLost <= m_dCoarse);
181// }
182
185{
186 return m_dNotchCoarseLost;
187}
188
191{
192 m_dFine += dDepth;
193
195 m_dTotFineSedimentInput += dDepth;
196}
197
200{
201 m_dSand += dDepth;
202
204 m_dTotSandSedimentInput += dDepth;
205}
206
209{
210 m_dCoarse += dDepth;
211
214}
215
221
227
233
239
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.
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, initialisation 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.