@@ -69,7 +69,7 @@ std::vector<int> indexToTriangleID,
6969std::vector<int > indexToVertexID, vertexToFCell, vertexProcIDs, triangleToFVertex, indexToEdgeID, edgeToFEdge,
7070 fVertexToTriangleID , fCellToVertex , iceMarginEdgesLIds, dirichletNodesIDs;
7171std::vector<double > dissipationHeatOnPrisms, velocityOnVertices, velocityOnCells,
72- elevationData, thicknessData, betaData, bedTopographyData, stiffnessFactorData, effecPressData, muFrictionData, bedRoughnessData, temperatureDataOnPrisms, smbData, thicknessOnCells, bodyForceOnBasalCell;
72+ elevationData, thicknessData, betaData, bedTopographyData, stiffnessFactorData, effecPressData, muFrictionData, bedRoughnessData, bulkFrictionData, basalDebrisData, temperatureDataOnPrisms, smbData, thicknessOnCells, bodyForceOnBasalCell;
7373std::vector<bool > isVertexBoundary, isBoundaryEdge;
7474
7575// only needed for creating ASCII mesh
@@ -241,7 +241,7 @@ void velocity_solver_solve_fo(double const* bedTopography_F, double const* lower
241241 double const * thickness_F, double * beta_F,
242242 double const * smb_F, double const * temperature_F, double const * stiffnessFactor_F,
243243 double * effecPress_F, double const * muFriction_F,
244- double const * bedRoughnessRC_F,
244+ double const * bedRoughnessRC_F, double const * bulkFriction_F, double const * basalDebris_F,
245245 double * const dirichletVelocityXValue, double * const dirichletVelocitYValue,
246246 double * u_normal_F, double * bodyForce_F, double * dissipation_heat_F,
247247 double * xVelocityOnCell, double * yVelocityOnCell, double const * deltat,
@@ -270,7 +270,7 @@ void velocity_solver_solve_fo(double const* bedTopography_F, double const* lower
270270 if (!isDomainEmpty) {
271271
272272 std::vector<std::pair<int , int > > marineBdyExtensionMap;
273- importFields (marineBdyExtensionMap, bedTopography_F, lowerSurface_F, thickness_F, beta_F, stiffnessFactor_F, effecPress_F, muFriction_F, bedRoughnessRC_F, temperature_F, smb_F, minThickness);
273+ importFields (marineBdyExtensionMap, bedTopography_F, lowerSurface_F, thickness_F, beta_F, stiffnessFactor_F, effecPress_F, muFriction_F, bedRoughnessRC_F, bulkFriction_F, basalDebris_F, temperature_F, smb_F, minThickness);
274274
275275 std::vector<double > regulThk (thicknessData);
276276 for (int index = 0 ; index < nVertices; index++)
@@ -287,7 +287,7 @@ void velocity_solver_solve_fo(double const* bedTopography_F, double const* lower
287287 Ordering, first_time_step, indexToVertexID, indexToTriangleID, minBeta,
288288 regulThk, levelsNormalizedThickness, elevationData, thicknessData,
289289 betaData, bedTopographyData, smbData,
290- stiffnessFactorData, effecPressData, muFrictionData, bedRoughnessData,
290+ stiffnessFactorData, effecPressData, muFrictionData, bedRoughnessData, bulkFrictionData, basalDebrisData,
291291 temperatureDataOnPrisms, bodyForceOnBasalCell, dissipationHeatOnPrisms, velocityOnVertices,
292292 albany_error, dt);
293293 *error=albany_error;
@@ -1120,7 +1120,7 @@ double signedTriangleAreaOnSphere(const double* x, const double* y,
11201120
11211121void importFields (std::vector<std::pair<int , int > >& marineBdyExtensionMap, double const * bedTopography_F, double const * lowerSurface_F, double const * thickness_F,
11221122 double const * beta_F, double const * stiffnessFactor_F, double const * effecPress_F, double const * muFriction_F,
1123- double const * bedRoughnessRC_F,
1123+ double const * bedRoughnessRC_F, double const * bulkFriction_F, double const * basalDebris_F,
11241124 double const * temperature_F, double const * smb_F, double eps) {
11251125
11261126 int vertexLayerShift = (Ordering == 0 ) ? 1 : nLayers + 1 ;
@@ -1137,6 +1137,10 @@ void importFields(std::vector<std::pair<int, int> >& marineBdyExtensionMap, dou
11371137 muFrictionData.assign (nVertices, 1e10 );
11381138 if (bedRoughnessRC_F!= 0 )
11391139 bedRoughnessData.assign (nVertices, 1e10 );
1140+ if (bulkFriction_F != 0 )
1141+ bulkFrictionData.assign (nVertices, 1e10 );
1142+ if (basalDebris_F != 0 )
1143+ basalDebrisData.assign (nVertices, 1e10 );
11401144 if (temperature_F != 0 )
11411145 temperatureDataOnPrisms.assign (nLayers * nTriangles, 1e10 );
11421146 if (smb_F != 0 )
@@ -1161,6 +1165,10 @@ void importFields(std::vector<std::pair<int, int> >& marineBdyExtensionMap, dou
11611165 muFrictionData[index] = muFriction_F[iCell];
11621166 if (bedRoughnessRC_F != 0 )
11631167 bedRoughnessData[index] = bedRoughnessRC_F[iCell] / unit_length;
1168+ if (bulkFriction_F != 0 )
1169+ bulkFrictionData[index] = bulkFriction_F[iCell];
1170+ if (basalDebris_F != 0 )
1171+ basalDebrisData[index] = basalDebris_F[iCell];
11641172 }
11651173
11661174 int lElemColumnShift = (Ordering == 1 ) ? 1 : nTriangles;
@@ -1650,7 +1658,7 @@ bool belongToTria(double const* x, double const* t, double bcoords[3], double ep
16501658 double const * surfaceAirTemperature_F, double const * basalHeatFlux_F,
16511659 double const * stiffnessFactor_F,
16521660 double const * effecPress_F, double const * muFriction_F,
1653- double const * bedRoughnessRC_F,
1661+ double const * bedRoughnessRC_F, double const * bulkFriction_F, double const * basalDebris_F,
16541662 double const * thickness_F, double const * thicknessUncertainty_F,
16551663 double const * smb_F, double const * smbUncertainty_F,
16561664 double const * bmb_F, double const * bmbUncertainty_F,
@@ -1736,7 +1744,7 @@ bool belongToTria(double const* x, double const* t, double bcoords[3], double ep
17361744
17371745 std::vector<std::pair<int , int > > marineBdyExtensionMap; // local map to be created by importFields
17381746 importFields (marineBdyExtensionMap, bedTopography_F, lowerSurface_F, thickness_F, beta_F,
1739- stiffnessFactor_F, effecPress_F, muFriction_F, bedRoughnessRC_F,
1747+ stiffnessFactor_F, effecPress_F, muFriction_F, bedRoughnessRC_F, bulkFriction_F, basalDebris_F,
17401748 temperature_F, smb_F, minThickness);
17411749
17421750 import2DFieldsObservations (marineBdyExtensionMap,
@@ -1803,6 +1811,7 @@ bool belongToTria(double const* x, double const* t, double bcoords[3], double ep
18031811
18041812 write_ascii_mesh_field (effecPressData, " effective_pressure" );
18051813
1814+
18061815 // These two fields are more complicated than the others so cannot use the function to write out
18071816
18081817 std::cout << " Writing temperature.ascii." << std::endl;
0 commit comments