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 "cme.h"
27#include "cell_sediment.h"
28
45
62
65{
66 // This copies all fields from one object to another
67 m_dFine = OtherSediment.m_dFine;
68 m_dNotchFineLost = OtherSediment.m_dNotchFineLost;
69 m_dSand = OtherSediment.m_dSand;
70 m_dNotchSandLost = OtherSediment.m_dNotchSandLost;
71 m_dCoarse = OtherSediment.m_dCoarse;
79 return ( * this);
80}
81
83void CRWCellSediment::SetFineDepth(double const dNewSedDepth)
84{
85 m_dFine = dNewSedDepth;
86}
87
90{
91 return m_dFine;
92}
93
95void CRWCellSediment::AddFineDepth(double const dSedDepthToAdd)
96{
97 m_dFine += dSedDepthToAdd;
98}
99
101void CRWCellSediment::SetSandDepth(double const dNewSedDepth)
102{
103 m_dSand = dNewSedDepth;
104 // assert(m_dSand >= 0);
105}
106
109{
110 return m_dSand;
111}
112
114void CRWCellSediment::AddSandDepth(double const dSedDepthToAdd)
115{
116 m_dSand += dSedDepthToAdd;
117}
118
120void CRWCellSediment::SetCoarseDepth(double const dNewSedDepth)
121{
122 m_dCoarse = dNewSedDepth;
123}
124
127{
128 return m_dCoarse;
129}
130
132void CRWCellSediment::AddCoarseDepth(double const dSedDepthToAdd)
133{
134 m_dCoarse += dSedDepthToAdd;
135}
136
138void CRWCellSediment::SetNotchFineLost(double const dDepthIn)
139{
140 m_dNotchFineLost = dDepthIn;
141}
142
143// //! Increments the depth equivalent of fine sediment lost by notch incision
144// void CRWCellSediment::IncrNotchFineLost(double const dDepthIn)
145// {
146// m_dNotchFineLost += dDepthIn;
147// // assert(m_dNotchFineLost <= m_dFine);
148// }
149
152{
153 return m_dNotchFineLost;
154}
155
157void CRWCellSediment::SetNotchSandLost(double const dDepthIn)
158{
159 m_dNotchSandLost = dDepthIn;
160}
161
162// //! Increments the depth equivalent of sand sediment lost by notch incision
163// void CRWCellSediment::IncrNotchSandLost(double const dDepthIn)
164// {
165// m_dNotchSandLost += dDepthIn;
166// // assert(m_dNotchSandLost <= m_dSand);
167// }
168
171{
172 return m_dNotchSandLost;
173}
174
176void CRWCellSediment::SetNotchCoarseLost(double const dDepthIn)
177{
178 m_dNotchCoarseLost = dDepthIn;
179}
180
181// //! Increments the depth equivalent of coarse sediment lost by notch incision
182// void CRWCellSediment::IncrNotchCoarseLost(double const dDepthIn)
183// {
184// m_dNotchCoarseLost += dDepthIn;
185// // assert(m_dNotchCoarseLost <= m_dCoarse);
186// }
187
190{
191 return m_dNotchCoarseLost;
192}
193
196{
197 m_dFine += dDepth;
198
200 m_dTotFineSedimentInput += dDepth;
201}
202
205{
206 m_dSand += dDepth;
207
209 m_dTotSandSedimentInput += dDepth;
210}
211
214{
215 m_dCoarse += dDepth;
216
219}
220
226
232
238
244
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.