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
15This file is part of CoastalME, the Coastal Modelling Environment.
16
17CoastalME 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
19This 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
21You 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 "cme.h"
27#include "cell_sediment.h"
28
29
46
63
66{
67 // This copies all fields from one object to another
68 m_dFine = OtherSediment.m_dFine;
69 m_dNotchFineLost = OtherSediment.m_dNotchFineLost;
70 m_dSand = OtherSediment.m_dSand;
71 m_dNotchSandLost = OtherSediment.m_dNotchSandLost;
72 m_dCoarse = OtherSediment.m_dCoarse;
80 return (*this);
81}
82
84void CRWCellSediment::SetFineDepth(double const dNewSedDepth)
85{
86 m_dFine = dNewSedDepth;
87}
88
91{
92 return m_dFine;
93}
94
96void CRWCellSediment::AddFineDepth(double const dSedDepthToAdd)
97{
98 m_dFine += dSedDepthToAdd;
99}
100
102void CRWCellSediment::SetSandDepth(double const dNewSedDepth)
103{
104 m_dSand = dNewSedDepth;
105// assert(m_dSand >= 0);
106}
107
110{
111 return m_dSand;
112}
113
115void CRWCellSediment::AddSandDepth(double const dSedDepthToAdd)
116{
117 m_dSand += dSedDepthToAdd;
118}
119
121void CRWCellSediment::SetCoarseDepth(double const dNewSedDepth)
122{
123 m_dCoarse = dNewSedDepth;
124}
125
128{
129 return m_dCoarse;
130}
131
133void CRWCellSediment::AddCoarseDepth(double const dSedDepthToAdd)
134{
135 m_dCoarse += dSedDepthToAdd;
136}
137
139void CRWCellSediment::SetNotchFineLost(double const dDepthIn)
140{
141 m_dNotchFineLost = dDepthIn;
142}
143
144// //! Increments the depth equivalent of fine sediment lost by notch incision
145// void CRWCellSediment::IncrNotchFineLost(double const dDepthIn)
146// {
147// m_dNotchFineLost += dDepthIn;
148// // assert(m_dNotchFineLost <= m_dFine);
149// }
150
153{
154 return m_dNotchFineLost;
155}
156
158void CRWCellSediment::SetNotchSandLost(double const dDepthIn)
159{
160 m_dNotchSandLost = dDepthIn;
161}
162
163// //! Increments the depth equivalent of sand sediment lost by notch incision
164// void CRWCellSediment::IncrNotchSandLost(double const dDepthIn)
165// {
166// m_dNotchSandLost += dDepthIn;
167// // assert(m_dNotchSandLost <= m_dSand);
168// }
169
172{
173 return m_dNotchSandLost;
174}
175
177void CRWCellSediment::SetNotchCoarseLost(double const dDepthIn)
178{
179 m_dNotchCoarseLost = dDepthIn;
180}
181
182// //! Increments the depth equivalent of coarse sediment lost by notch incision
183// void CRWCellSediment::IncrNotchCoarseLost(double const dDepthIn)
184// {
185// m_dNotchCoarseLost += dDepthIn;
186// // assert(m_dNotchCoarseLost <= m_dCoarse);
187// }
188
191{
192 return m_dNotchCoarseLost;
193}
194
197{
198 m_dFine += dDepth;
199
201 m_dTotFineSedimentInput += dDepth;
202}
203
206{
207 m_dSand += dDepth;
208
210 m_dTotSandSedimentInput += dDepth;
211}
212
215{
216 m_dCoarse += dDepth;
217
220}
221
227
233
239
245
253
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.
This file contains global definitions for CoastalME.