Skip to content

Commit 93718ac

Browse files
committed
CHG: compilation on new mac
1 parent 0dc0143 commit 93718ac

File tree

2 files changed

+13
-14
lines changed

2 files changed

+13
-14
lines changed

src/c/classes/Elements/Element.cpp

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4514,7 +4514,7 @@ void Element::RignotMeltParameterization(){/*{{{*/
45144514
this->FindParam(&yts, ConstantsYtsEnum);
45154515
this->parameters->FindParam(&numbasins,FrontalForcingsNumberofBasinsEnum);
45164516
this->parameters->FindParam(&basin_icefront_area,&numbasins,FrontalForcingsBasinIcefrontAreaEnum);
4517-
IssmDouble meltrates[numvertices];
4517+
IssmDouble meltrates[MAXVERTICES];
45184518

45194519
/* Start looping on the number of vertices: */
45204520
Gauss* gauss=this->NewGauss();
@@ -5880,13 +5880,12 @@ void Element::SmbGemb(IssmDouble timeinputs, int count, int steps){/*{{{*/
58805880
/*}}}*/
58815881
void Element::SubglacialWaterPressure(int output_enum){/*{{{*/
58825882

5883-
bool ispwHydroArma;
5884-
int M;
5885-
int numvertices = this->GetNumberOfVertices();
5886-
IssmDouble p_water[numvertices];
5887-
IssmDouble* perturbationvalues = xNew<IssmDouble>(numvertices);
5888-
Gauss* gauss=this->NewGauss();
5889-
Friction* friction = new Friction(this);
5883+
bool ispwHydroArma;
5884+
int numvertices = this->GetNumberOfVertices();
5885+
IssmDouble p_water[MAXVERTICES];
5886+
IssmDouble *perturbationvalues = xNew<IssmDouble>(numvertices);
5887+
Gauss *gauss = this->NewGauss();
5888+
Friction *friction = new Friction(this);
58905889
/*Calculate subglacial water pressure*/
58915890
for(int i=0;i<numvertices;i++){
58925891
gauss->GaussVertex(i);

src/c/modules/StochasticForcingx/StochasticForcingx.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ void StochasticForcingx(FemModel* femmodel){/*{{{*/
139139
Element* element = xDynamicCast<Element*>(object);
140140
int numvertices = element->GetNumberOfVertices();
141141
IssmDouble baselinedeepwatermelt;
142-
IssmDouble deepwatermelt_tot[numvertices];
142+
IssmDouble deepwatermelt_tot[10]; _assert_(numvertices<10);
143143
Input* baselinedeepwatermelt_input = NULL;
144144
baselinedeepwatermelt_input = element->GetInput(BaselineBasalforcingsSpatialDeepwaterMeltingRateEnum); _assert_(baselinedeepwatermelt_input);
145145
element->GetInputValue(&dimensionid,StochasticForcingDefaultIdEnum);
@@ -160,7 +160,7 @@ void StochasticForcingx(FemModel* femmodel){/*{{{*/
160160
Element* element = xDynamicCast<Element*>(object);
161161
int numvertices = element->GetNumberOfVertices();
162162
IssmDouble baselinecalvingrate;
163-
IssmDouble calvingrate_tot[numvertices];
163+
IssmDouble calvingrate_tot[10]; _assert_(numvertices<10);
164164
Input* baselinecalvingrate_input = NULL;
165165
baselinecalvingrate_input = element->GetInput(BaselineCalvingCalvingrateEnum); _assert_(baselinecalvingrate_input);
166166
element->GetInputValue(&dimensionid,StochasticForcingDefaultIdEnum);
@@ -181,7 +181,7 @@ void StochasticForcingx(FemModel* femmodel){/*{{{*/
181181
Element* element = xDynamicCast<Element*>(object);
182182
int numvertices = element->GetNumberOfVertices();
183183
IssmDouble baselinefloatingicemeltrate;
184-
IssmDouble floatingicemeltrate_tot[numvertices];
184+
IssmDouble floatingicemeltrate_tot[10]; _assert_(numvertices<10);
185185
Input* baselinefloatingicemeltrate_input = NULL;
186186
baselinefloatingicemeltrate_input = element->GetInput(BaselineBasalforcingsFloatingiceMeltingRateEnum); _assert_(baselinefloatingicemeltrate_input);
187187
element->GetInputValue(&dimensionid,StochasticForcingDefaultIdEnum);
@@ -203,7 +203,7 @@ void StochasticForcingx(FemModel* femmodel){/*{{{*/
203203
Element* element = xDynamicCast<Element*>(object);
204204
int numvertices = element->GetNumberOfVertices();
205205
IssmDouble baselinesmb;
206-
IssmDouble smb_tot[numvertices];
206+
IssmDouble smb_tot[10]; _assert_(numvertices<10);
207207
Input* baselinesmb_input = NULL;
208208
baselinesmb_input = element->GetInput(BaselineSmbMassBalanceEnum); _assert_(baselinesmb_input);
209209
element->GetInputValue(&dimensionid,StochasticForcingDefaultIdEnum);
@@ -223,8 +223,8 @@ void StochasticForcingx(FemModel* femmodel){/*{{{*/
223223
for(Object* &object:femmodel->elements->objects){
224224
Element* element = xDynamicCast<Element*>(object);
225225
int numvertices = element->GetNumberOfVertices();
226-
IssmDouble p_water_deterministic[numvertices];
227-
IssmDouble p_water[numvertices];
226+
IssmDouble p_water_deterministic[10]; _assert_(numvertices<10);
227+
IssmDouble p_water[10];
228228
element->GetInputValue(&dimensionid,StochasticForcingDefaultIdEnum);
229229
element->SubglacialWaterPressure(FrictionWaterPressureEnum);
230230
element->GetInputListOnVertices(&p_water_deterministic[0],FrictionWaterPressureEnum);

0 commit comments

Comments
 (0)