@@ -106,6 +106,8 @@ void velocity_solver_solve_fo(int nLayers, int globalVerticesStride,
106
106
std::vector<double >& effectivePressureData,
107
107
const std::vector<double >& muData,
108
108
const std::vector<double >& bedRoughnessData,
109
+ const std::vector<double >& bulkFrictionData,
110
+ const std::vector<double >& basalDebrisData,
109
111
const std::vector<double >& temperatureDataOnPrisms,
110
112
std::vector<double >& bodyForceMagnitudeOnBasalCell,
111
113
std::vector<double >& dissipationHeatOnPrisms,
@@ -154,6 +156,8 @@ void velocity_solver_solve_fo(int nLayers, int globalVerticesStride,
154
156
STKFieldType* dirichletField = meshStruct->metaData ->get_field <double > (stk::topology::NODE_RANK, " dirichlet_field" );
155
157
STKFieldType* muField = meshStruct->metaData ->get_field <double > (stk::topology::NODE_RANK, " mu" );
156
158
STKFieldType* bedRoughnessField = meshStruct->metaData ->get_field <double > (stk::topology::NODE_RANK, " bed_roughness" );
159
+ STKFieldType* bulkFrictionField = meshStruct->metaData ->get_field <double > (stk::topology::NODE_RANK, " bulk_friction_coefficient" );
160
+ STKFieldType* basalDebrisField = meshStruct->metaData ->get_field <double > (stk::topology::NODE_RANK, " basal_debris_factor" );
157
161
STKFieldType* stiffeningFactorLogField = meshStruct->metaData ->get_field <double > (stk::topology::NODE_RANK, " stiffening_factor_log" );
158
162
STKFieldType* effectivePressureField = meshStruct->metaData ->get_field <double > (stk::topology::NODE_RANK, " effective_pressure" );
159
163
STKFieldType* betaField;
@@ -229,6 +233,16 @@ void velocity_solver_solve_fo(int nLayers, int globalVerticesStride,
229
233
double * bedRoughnessVal = stk::mesh::field_data (*bedRoughnessField, node);
230
234
bedRoughnessVal[0 ] = bedRoughnessData[ib];
231
235
}
236
+
237
+ if ((il == 0 ) && !bulkFrictionData.empty () && (bulkFrictionField != nullptr )) {
238
+ double * bulkFrictionVal = stk::mesh::field_data (*bulkFrictionField, node);
239
+ bulkFrictionVal[0 ] = bulkFrictionData[ib];
240
+ }
241
+
242
+ if ((il == 0 ) && !basalDebrisData.empty () && (basalDebrisField != nullptr )) {
243
+ double * basalDebrisVal = stk::mesh::field_data (*basalDebrisField, node);
244
+ basalDebrisVal[0 ] = basalDebrisData[ib];
245
+ }
232
246
}
233
247
234
248
// In the following we import the temperature field temperatureDataOnPrisms from MPAS,
@@ -325,6 +339,7 @@ void velocity_solver_solve_fo(int nLayers, int globalVerticesStride,
325
339
try {
326
340
auto model = slvrfctry->createModel (albanyApp);
327
341
solver = slvrfctry->createSolver (model, Teuchos::null, true );
342
+ // solver = slvrfctry->createSolver(mpiComm, model, Teuchos::null, true);
328
343
329
344
Teuchos::ParameterList solveParams;
330
345
solveParams.set (" Compute Sensitivities" , false );
@@ -492,38 +507,6 @@ void velocity_solver_finalize() {
492
507
Kokkos::finalize ();
493
508
}
494
509
495
-
496
- // DEPRECATED
497
- void velocity_solver_solve_fo (int nLayers, int globalVerticesStride,
498
- int globalTrianglesStride, bool ordering, bool first_time_step,
499
- const std::vector<int >& indexToVertexID,
500
- const std::vector<int >& indexToTriangleID, double minBeta,
501
- const std::vector<double >& regulThk,
502
- const std::vector<double >& levelsNormalizedThickness,
503
- const std::vector<double >& elevationData,
504
- const std::vector<double >& thicknessData,
505
- std::vector<double >& betaData,
506
- const std::vector<double >& bedTopographyData,
507
- const std::vector<double >& smbData,
508
- const std::vector<double >& stiffeningFactorData,
509
- const std::vector<double >& effectivePressureData,
510
- const std::vector<double >& muData,
511
- const std::vector<double >& temperatureDataOnPrisms,
512
- std::vector<double >& bodyForceMagnitudeOnBasalCell,
513
- std::vector<double >& dissipationHeatOnPrisms,
514
- std::vector<double >& velocityOnVertices,
515
- int & error,
516
- const double & deltat) {
517
- std::vector<double > effectivePressureDataNonConst (effectivePressureData);
518
- const std::vector<double > bedRoughnessData;
519
- velocity_solver_solve_fo (nLayers, globalVerticesStride, globalTrianglesStride, ordering, first_time_step,
520
- indexToVertexID,indexToTriangleID, minBeta, regulThk, levelsNormalizedThickness,
521
- elevationData, thicknessData, betaData, bedTopographyData, smbData, stiffeningFactorData,
522
- effectivePressureDataNonConst, muData, bedRoughnessData, temperatureDataOnPrisms,
523
- bodyForceMagnitudeOnBasalCell,dissipationHeatOnPrisms, velocityOnVertices, error, deltat );
524
- }
525
-
526
-
527
510
/* duality:
528
511
*
529
512
* mpas(F) | albany
@@ -642,6 +625,8 @@ void velocity_solver_extrude_3d_grid(int nLayers, int globalTrianglesStride,
642
625
basalFrictionParams.set (" Mu Field Name" ,basalFrictionParams.get (" Mu Field Name" ," mu" ));
643
626
basalFrictionParams.set (" Bed Roughness Type" ,basalFrictionParams.get (" Bed Roughness Type" ," Field" ));
644
627
basalFrictionParams.set (" Effective Pressure Type" ,basalFrictionParams.get (" Effective Pressure Type" ," Field" ));
628
+ basalFrictionParams.set (" Bulk Friction Coefficient Type" ,basalFrictionParams.get (" Bulk Friction Coefficient Type" ," Field" ));
629
+ basalFrictionParams.set (" Basal Debris Factor Type" , basalFrictionParams.get (" Basal Debris Factor Type" ," Field" ));
645
630
basalFrictionParams.set <bool >(" Zero Beta On Floating Ice" , zeroBetaOnShelf);
646
631
basalFrictionParams.set <bool >(" Zero Effective Pressure On Floating Ice At Nodes" , zeroEffectPressOnShelf);
647
632
@@ -714,7 +699,7 @@ void velocity_solver_extrude_3d_grid(int nLayers, int globalTrianglesStride,
714
699
715
700
discretizationList->set (" Workset Size" , discretizationList->get (" Workset Size" , -1 ));
716
701
717
- discretizationList->set (" Method" , discretizationList->get (" Method" , " STKExtruded " )); // set to STKExtruded is not defined
702
+ discretizationList->set (" Method" , discretizationList->get (" Method" , " Extruded " )); // set to Extruded is not defined
718
703
719
704
auto & rfi = discretizationList->sublist (" Required Fields Info" );
720
705
int fp = rfi.get <int >(" Number Of Fields" ,0 );
0 commit comments