Changeset 15564
- Timestamp:
- 07/23/13 14:23:07 (12 years ago)
- Location:
- issm/trunk-jpl/src
- Files:
-
- 83 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/ad/validation/Update/update.m
r10975 r15564 4 4 md=setmask(md,'all',''); 5 5 md=parameterize(md,'SquareShelfConstrained.par'); 6 md=setflowequation(md,' macayeal','all');6 md=setflowequation(md,'SSA','all'); 7 7 md.cluster=generic('name',oshostname(),'np',3); 8 8 md.cluster.executionpath=[issmtier() '/src/ad/validation/Validation/']; -
issm/trunk-jpl/src/c/analyses/AnalysisConfiguration.cpp
r15339 r15564 30 30 analyses[0]=DiagnosticHorizAnalysisEnum; 31 31 analyses[1]=DiagnosticVertAnalysisEnum; 32 analyses[2]=Diagnostic HutterAnalysisEnum;32 analyses[2]=DiagnosticSIAAnalysisEnum; 33 33 analyses[3]=SurfaceSlopeAnalysisEnum; 34 34 analyses[4]=BedSlopeAnalysisEnum; … … 40 40 analyses[0]=DiagnosticHorizAnalysisEnum; 41 41 analyses[1]=DiagnosticVertAnalysisEnum; 42 analyses[2]=Diagnostic HutterAnalysisEnum;42 analyses[2]=DiagnosticSIAAnalysisEnum; 43 43 analyses[3]=SurfaceSlopeAnalysisEnum; 44 44 analyses[4]=BedSlopeAnalysisEnum; … … 112 112 analyses[0]=DiagnosticHorizAnalysisEnum; 113 113 analyses[1]=DiagnosticVertAnalysisEnum; 114 analyses[2]=Diagnostic HutterAnalysisEnum;114 analyses[2]=DiagnosticSIAAnalysisEnum; 115 115 analyses[3]=SurfaceSlopeAnalysisEnum; 116 116 analyses[4]=BedSlopeAnalysisEnum; -
issm/trunk-jpl/src/c/analyses/adjointdiagnostic_core.cpp
r15104 r15564 13 13 14 14 /*parameters: */ 15 bool is stokes;15 bool isFS; 16 16 bool save_results; 17 17 bool conserve_loads = true; 18 18 19 19 /*retrieve parameters:*/ 20 femmodel->parameters->FindParam(&is stokes,FlowequationIsstokesEnum);20 femmodel->parameters->FindParam(&isFS,FlowequationIsFSEnum); 21 21 femmodel->parameters->FindParam(&save_results,SaveResultsEnum); 22 22 … … 39 39 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,AdjointxEnum); 40 40 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,AdjointyEnum); 41 if (is stokes){41 if (isFS){ 42 42 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,AdjointzEnum); 43 43 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,AdjointpEnum); -
issm/trunk-jpl/src/c/analyses/control_core.cpp
r15483 r15564 24 24 int dim; 25 25 int solution_type; 26 bool is stokes;26 bool isFS; 27 27 bool dakota_analysis = false; 28 28 … … 57 57 femmodel->parameters->FindParam(&dim,MeshDimensionEnum); 58 58 femmodel->parameters->FindParam(&solution_type,SolutionTypeEnum); 59 femmodel->parameters->FindParam(&is stokes,FlowequationIsstokesEnum);59 femmodel->parameters->FindParam(&isFS,FlowequationIsFSEnum); 60 60 femmodel->parameters->FindParam(&dakota_analysis,QmuIsdakotaEnum); 61 61 femmodel->parameters->SetParam(false,SaveResultsEnum); … … 67 67 /*Launch once a complete solution to set up all inputs*/ 68 68 if(VerboseControl()) _printf0_(" preparing initial solution\n"); 69 if(is stokes) solutioncore(femmodel);69 if(isFS) solutioncore(femmodel); 70 70 71 71 /*Initialize responses: */ -
issm/trunk-jpl/src/c/analyses/diagnostic_core.cpp
r15504 r15564 15 15 bool dakota_analysis; 16 16 int dim; 17 bool is hutter,ismacayeal,isl1l2,ispattyn,isstokes;17 bool isSIA,isSSA,isL1L2,isHO,isFS; 18 18 bool conserve_loads = true; 19 19 bool save_results; … … 25 25 /* recover parameters:*/ 26 26 femmodel->parameters->FindParam(&dim,MeshDimensionEnum); 27 femmodel->parameters->FindParam(&is hutter,FlowequationIshutterEnum);28 femmodel->parameters->FindParam(&is macayeal,FlowequationIsmacayealEnum);29 femmodel->parameters->FindParam(&is l1l2,FlowequationIsl1l2Enum);30 femmodel->parameters->FindParam(&is pattyn,FlowequationIspattynEnum);31 femmodel->parameters->FindParam(&is stokes,FlowequationIsstokesEnum);27 femmodel->parameters->FindParam(&isSIA,FlowequationIsSIAEnum); 28 femmodel->parameters->FindParam(&isSSA,FlowequationIsSSAEnum); 29 femmodel->parameters->FindParam(&isL1L2,FlowequationIsL1L2Enum); 30 femmodel->parameters->FindParam(&isHO,FlowequationIsHOEnum); 31 femmodel->parameters->FindParam(&isFS,FlowequationIsFSEnum); 32 32 femmodel->parameters->FindParam(&newton,DiagnosticIsnewtonEnum); 33 33 femmodel->parameters->FindParam(&dakota_analysis,QmuIsdakotaEnum); … … 46 46 47 47 /*Compute slopes: */ 48 if(is hutter) surfaceslope_core(femmodel);49 if(is stokes){48 if(isSIA) surfaceslope_core(femmodel); 49 if(isFS){ 50 50 bedslope_core(femmodel); 51 51 femmodel->SetCurrentConfiguration(DiagnosticHorizAnalysisEnum); … … 53 53 } 54 54 55 if(is hutter){56 if(VerboseSolution()) _printf0_(" computing huttervelocities\n");55 if(isSIA){ 56 if(VerboseSolution()) _printf0_(" computing SIA velocities\n"); 57 57 58 58 /*Take the last velocity into account so that the velocity on the MacAyeal domain is not zero*/ 59 if(is macayeal || isl1l2 || ispattyn ) ResetBoundaryConditions(femmodel,DiagnosticHutterAnalysisEnum);60 femmodel->SetCurrentConfiguration(Diagnostic HutterAnalysisEnum);59 if(isSSA || isL1L2 || isHO ) ResetBoundaryConditions(femmodel,DiagnosticSIAAnalysisEnum); 60 femmodel->SetCurrentConfiguration(DiagnosticSIAAnalysisEnum); 61 61 solutionsequence_linear(femmodel); 62 if(is macayeal || isl1l2 || ispattyn) ResetBoundaryConditions(femmodel,DiagnosticHorizAnalysisEnum);62 if(isSSA || isL1L2 || isHO) ResetBoundaryConditions(femmodel,DiagnosticHorizAnalysisEnum); 63 63 } 64 64 65 if ((is macayeal || ispattyn || isl1l2) ^ isstokes){ // ^ = xor65 if ((isSSA || isHO || isL1L2) ^ isFS){ // ^ = xor 66 66 if(VerboseSolution()) _printf0_(" computing velocities\n"); 67 67 … … 73 73 } 74 74 75 if ((is macayeal || isl1l2 || ispattyn) && isstokes){76 if(VerboseSolution()) _printf0_(" computing coupling betweem lower order models and full- Stokes\n");77 solutionsequence_ stokescoupling_nonlinear(femmodel,conserve_loads);75 if ((isSSA || isL1L2 || isHO) && isFS){ 76 if(VerboseSolution()) _printf0_(" computing coupling betweem lower order models and full-FS\n"); 77 solutionsequence_FScoupling_nonlinear(femmodel,conserve_loads); 78 78 } 79 79 80 if (dim==3 & (is hutter || ismacayeal || isl1l2 || ispattyn)){80 if (dim==3 & (isSIA || isSSA || isL1L2 || isHO)){ 81 81 if(VerboseSolution()) _printf0_(" computing vertical velocities\n"); 82 82 femmodel->SetCurrentConfiguration(DiagnosticVertAnalysisEnum); -
issm/trunk-jpl/src/c/analyses/objectivefunction.cpp
r15339 r15564 24 24 /*parameters: */ 25 25 int solution_type,analysis_type; 26 bool is stokes= false;26 bool isFS = false; 27 27 bool conserve_loads = true; 28 28 FemModel *femmodel = NULL; … … 32 32 33 33 /*Recover parameters: */ 34 femmodel->parameters->FindParam(&is stokes,FlowequationIsstokesEnum);34 femmodel->parameters->FindParam(&isFS,FlowequationIsFSEnum); 35 35 femmodel->parameters->FindParam(&analysis_type,AnalysisTypeEnum); 36 36 femmodel->parameters->FindParam(&solution_type,SolutionTypeEnum); -
issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
r15556 r15564 217 217 IssmDouble xyz_list[NUMVERTICES][3]; 218 218 IssmDouble xyz_list_tria[3][3]; 219 IssmDouble rho_ice,gravity, stokesreconditioning;219 IssmDouble rho_ice,gravity,FSreconditioning; 220 220 IssmDouble pressure,viscosity,Jdet2d; 221 221 IssmDouble bed_normal[3]; … … 234 234 /*Check analysis_types*/ 235 235 if (analysis_type!=DiagnosticHorizAnalysisEnum) _error_("Not supported yet!"); 236 if (approximation!= StokesApproximationEnum) _error_("Not supported yet!");236 if (approximation!=FSApproximationEnum) _error_("Not supported yet!"); 237 237 238 238 /*retrieve some parameters: */ 239 this->parameters->FindParam(& stokesreconditioning,DiagnosticStokesreconditioningEnum);239 this->parameters->FindParam(&FSreconditioning,DiagnosticFSreconditioningEnum); 240 240 241 241 if(!IsOnBed()){ … … 267 267 /*Compute strain rate viscosity and pressure: */ 268 268 this->GetStrainRate3d(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input,vz_input); 269 material->GetViscosity3d Stokes(&viscosity,&epsilon[0]);269 material->GetViscosity3dFS(&viscosity,&epsilon[0]); 270 270 pressure_input->GetInputValue(&pressure,gauss); 271 271 272 272 /*Compute Stress*/ 273 sigma_xx=2*viscosity*epsilon[0]-pressure* stokesreconditioning; // sigma = nu eps - pressure274 sigma_yy=2*viscosity*epsilon[1]-pressure* stokesreconditioning;275 sigma_zz=2*viscosity*epsilon[2]-pressure* stokesreconditioning;273 sigma_xx=2*viscosity*epsilon[0]-pressure*FSreconditioning; // sigma = nu eps - pressure 274 sigma_yy=2*viscosity*epsilon[1]-pressure*FSreconditioning; 275 sigma_zz=2*viscosity*epsilon[2]-pressure*FSreconditioning; 276 276 sigma_xy=2*viscosity*epsilon[3]; 277 277 sigma_xz=2*viscosity*epsilon[4]; … … 415 415 Ke=CreateKMatrixAdjointHoriz(); 416 416 break; 417 case Diagnostic HutterAnalysisEnum:418 Ke=CreateKMatrixDiagnostic Hutter();417 case DiagnosticSIAAnalysisEnum: 418 Ke=CreateKMatrixDiagnosticSIA(); 419 419 break; 420 420 case DiagnosticVertAnalysisEnum: … … 546 546 pe=CreatePVectorDiagnosticHoriz(); 547 547 break; 548 case Diagnostic HutterAnalysisEnum:549 pe=CreatePVectorDiagnostic Hutter();548 case DiagnosticSIAAnalysisEnum: 549 pe=CreatePVectorDiagnosticSIA(); 550 550 break; 551 551 case DiagnosticVertAnalysisEnum: … … 1190 1190 int approximation; 1191 1191 inputs->GetInputValue(&approximation,ApproximationEnum); 1192 if(approximation== StokesApproximationEnum || approximation==NoneApproximationEnum){1193 GetSolutionFromInputsDiagnostic Stokes(solution);1194 } 1195 else if (approximation==MacAyealApproximationEnum || approximation== PattynApproximationEnum || approximation==HutterApproximationEnum){1192 if(approximation==FSApproximationEnum || approximation==NoneApproximationEnum){ 1193 GetSolutionFromInputsDiagnosticFS(solution); 1194 } 1195 else if (approximation==MacAyealApproximationEnum || approximation==HOApproximationEnum || approximation==SIAApproximationEnum){ 1196 1196 GetSolutionFromInputsDiagnosticHoriz(solution); 1197 1197 } 1198 else if (approximation==MacAyeal PattynApproximationEnum || approximation==PattynStokesApproximationEnum || approximation==MacAyealStokesApproximationEnum){1198 else if (approximation==MacAyealHOApproximationEnum || approximation==HOFSApproximationEnum || approximation==MacAyealFSApproximationEnum){ 1199 1199 return; //the elements around will create the solution 1200 1200 } 1201 1201 break; 1202 case Diagnostic HutterAnalysisEnum:1203 GetSolutionFromInputsDiagnostic Hutter(solution);1202 case DiagnosticSIAAnalysisEnum: 1203 GetSolutionFromInputsDiagnosticSIA(solution); 1204 1204 break; 1205 1205 case DiagnosticVertAnalysisEnum: … … 1249 1249 } 1250 1250 /*}}}*/ 1251 /*FUNCTION Penta::GetStrainRate3d Pattyn{{{*/1252 void Penta::GetStrainRate3d Pattyn(IssmDouble* epsilon,IssmDouble* xyz_list, GaussPenta* gauss, Input* vx_input, Input* vy_input){1253 /*Compute the 3d Blatter/ PattynStrain Rate (5 components):1251 /*FUNCTION Penta::GetStrainRate3dHO{{{*/ 1252 void Penta::GetStrainRate3dHO(IssmDouble* epsilon,IssmDouble* xyz_list, GaussPenta* gauss, Input* vx_input, Input* vy_input){ 1253 /*Compute the 3d Blatter/HOStrain Rate (5 components): 1254 1254 * 1255 1255 * epsilon=[exx eyy exy exz eyz] … … 1271 1271 1272 1272 /*Get strain rate assuming that epsilon has been allocated*/ 1273 vx_input->GetVxStrainRate3d Pattyn(epsilonvx,xyz_list,gauss);1274 vy_input->GetVyStrainRate3d Pattyn(epsilonvy,xyz_list,gauss);1273 vx_input->GetVxStrainRate3dHO(epsilonvx,xyz_list,gauss); 1274 vy_input->GetVyStrainRate3dHO(epsilonvy,xyz_list,gauss); 1275 1275 1276 1276 /*Sum all contributions*/ … … 1973 1973 this->inputs->AddInput(new IntInput(ApproximationEnum,MacAyealApproximationEnum)); 1974 1974 } 1975 else if (iomodel->Data(FlowequationElementEquationEnum)[index]== PattynApproximationEnum){1976 this->inputs->AddInput(new IntInput(ApproximationEnum, PattynApproximationEnum));1977 } 1978 else if (iomodel->Data(FlowequationElementEquationEnum)[index]==MacAyeal PattynApproximationEnum){1979 this->inputs->AddInput(new IntInput(ApproximationEnum,MacAyeal PattynApproximationEnum));1980 } 1981 else if (iomodel->Data(FlowequationElementEquationEnum)[index]== HutterApproximationEnum){1982 this->inputs->AddInput(new IntInput(ApproximationEnum, HutterApproximationEnum));1975 else if (iomodel->Data(FlowequationElementEquationEnum)[index]==HOApproximationEnum){ 1976 this->inputs->AddInput(new IntInput(ApproximationEnum,HOApproximationEnum)); 1977 } 1978 else if (iomodel->Data(FlowequationElementEquationEnum)[index]==MacAyealHOApproximationEnum){ 1979 this->inputs->AddInput(new IntInput(ApproximationEnum,MacAyealHOApproximationEnum)); 1980 } 1981 else if (iomodel->Data(FlowequationElementEquationEnum)[index]==SIAApproximationEnum){ 1982 this->inputs->AddInput(new IntInput(ApproximationEnum,SIAApproximationEnum)); 1983 1983 } 1984 1984 else if (iomodel->Data(FlowequationElementEquationEnum)[index]==L1L2ApproximationEnum){ 1985 1985 this->inputs->AddInput(new IntInput(ApproximationEnum,L1L2ApproximationEnum)); 1986 1986 } 1987 else if (iomodel->Data(FlowequationElementEquationEnum)[index]== StokesApproximationEnum){1988 this->inputs->AddInput(new IntInput(ApproximationEnum, StokesApproximationEnum));1989 } 1990 else if (iomodel->Data(FlowequationElementEquationEnum)[index]==MacAyeal StokesApproximationEnum){1991 this->inputs->AddInput(new IntInput(ApproximationEnum,MacAyeal StokesApproximationEnum));1992 } 1993 else if (iomodel->Data(FlowequationElementEquationEnum)[index]== PattynStokesApproximationEnum){1994 this->inputs->AddInput(new IntInput(ApproximationEnum, PattynStokesApproximationEnum));1987 else if (iomodel->Data(FlowequationElementEquationEnum)[index]==FSApproximationEnum){ 1988 this->inputs->AddInput(new IntInput(ApproximationEnum,FSApproximationEnum)); 1989 } 1990 else if (iomodel->Data(FlowequationElementEquationEnum)[index]==MacAyealFSApproximationEnum){ 1991 this->inputs->AddInput(new IntInput(ApproximationEnum,MacAyealFSApproximationEnum)); 1992 } 1993 else if (iomodel->Data(FlowequationElementEquationEnum)[index]==HOFSApproximationEnum){ 1994 this->inputs->AddInput(new IntInput(ApproximationEnum,HOFSApproximationEnum)); 1995 1995 } 1996 1996 else if (iomodel->Data(FlowequationElementEquationEnum)[index]==NoneApproximationEnum){ … … 2031 2031 InputUpdateFromSolutionDiagnosticHoriz( solution); 2032 2032 break; 2033 case Diagnostic HutterAnalysisEnum:2034 InputUpdateFromSolutionDiagnostic Hutter( solution);2033 case DiagnosticSIAAnalysisEnum: 2034 InputUpdateFromSolutionDiagnosticSIA( solution); 2035 2035 break; 2036 2036 case DiagnosticVertAnalysisEnum: … … 2042 2042 int approximation; 2043 2043 inputs->GetInputValue(&approximation,ApproximationEnum); 2044 if(approximation== StokesApproximationEnum || approximation==NoneApproximationEnum){2045 InputUpdateFromSolutionAdjoint Stokes( solution);2044 if(approximation==FSApproximationEnum || approximation==NoneApproximationEnum){ 2045 InputUpdateFromSolutionAdjointFS( solution); 2046 2046 } 2047 2047 else{ … … 2651 2651 } 2652 2652 /*}}}*/ 2653 /*FUNCTION Penta::ReduceMatrix Stokes{{{*/2654 void Penta::ReduceMatrix Stokes(IssmDouble* Ke_reduced, IssmDouble* Ke_temp){2653 /*FUNCTION Penta::ReduceMatrixFS {{{*/ 2654 void Penta::ReduceMatrixFS(IssmDouble* Ke_reduced, IssmDouble* Ke_temp){ 2655 2655 2656 2656 int i,j; … … 2693 2693 } 2694 2694 /*}}}*/ 2695 /*FUNCTION Penta::ReduceVector Stokes{{{*/2696 void Penta::ReduceVector Stokes(IssmDouble* Pe_reduced, IssmDouble* Ke_temp, IssmDouble* Pe_temp){2695 /*FUNCTION Penta::ReduceVectorFS {{{*/ 2696 void Penta::ReduceVectorFS(IssmDouble* Pe_reduced, IssmDouble* Ke_temp, IssmDouble* Pe_temp){ 2697 2697 2698 2698 int i,j; … … 2786 2786 IssmDouble xz_plane[6]; 2787 2787 2788 /*For Stokesonly: we want the CS to be tangential to the bedrock*/2788 /*For FS only: we want the CS to be tangential to the bedrock*/ 2789 2789 inputs->GetInputValue(&approximation,ApproximationEnum); 2790 if(IsFloating() || !IsOnBed() || (approximation!= StokesApproximationEnum && approximation!=MacAyealStokesApproximationEnum && approximation!=PattynStokesApproximationEnum)) return;2790 if(IsFloating() || !IsOnBed() || (approximation!=FSApproximationEnum && approximation!=MacAyealFSApproximationEnum && approximation!=HOFSApproximationEnum)) return; 2791 2791 2792 2792 /*Get slope on each node*/ … … 2883 2883 if(analysis_type==DiagnosticHorizAnalysisEnum){ 2884 2884 inputs->GetInputValue(&approximation,ApproximationEnum); 2885 if(approximation==MacAyeal PattynApproximationEnum || approximation==MacAyealStokesApproximationEnum){2885 if(approximation==MacAyealHOApproximationEnum || approximation==MacAyealFSApproximationEnum){ 2886 2886 parameters->FindParam(&numlayers,MeshNumberoflayersEnum); 2887 2887 o_nz += numlayers*3; … … 3102 3102 int stabilization; 3103 3103 bool dakota_analysis; 3104 bool is stokes;3104 bool isFS; 3105 3105 IssmDouble beta,heatcapacity,referencetemperature,meltingpoint,latentheat; 3106 3106 … … 3109 3109 iomodel->Constant(&stabilization,PrognosticStabilizationEnum); 3110 3110 iomodel->Constant(&dakota_analysis,QmuIsdakotaEnum); 3111 iomodel->Constant(&is stokes,FlowequationIsstokesEnum);3111 iomodel->Constant(&isFS,FlowequationIsFSEnum); 3112 3112 iomodel->Constant(&beta,MaterialsBetaEnum); 3113 3113 iomodel->Constant(&heatcapacity,MaterialsHeatcapacityEnum); … … 3175 3175 this->inputs->AddInput(new PentaInput(QmuPressureEnum,nodeinputs,P1Enum)); 3176 3176 } 3177 if(is stokes){3177 if(isFS){ 3178 3178 this->inputs->AddInput(new PentaInput(PressureEnum,nodeinputs,P1Enum)); 3179 3179 this->inputs->AddInput(new PentaInput(PressurePicardEnum,nodeinputs,P1Enum)); 3180 3180 } 3181 3181 } 3182 if(*(iomodel->Data(FlowequationElementEquationEnum)+index)== PattynStokesApproximationEnum){3183 /*Create Vz Pattyn and VzStokesEnums*/3184 if(iomodel->Data(VzEnum) && iomodel->Data(FlowequationBorder stokesEnum)){3185 for(i=0;i<6;i++) nodeinputs[i]=iomodel->Data(VzEnum)[penta_vertex_ids[i]-1]*iomodel->Data(FlowequationBorder stokesEnum)[penta_vertex_ids[i]-1];3186 this->inputs->AddInput(new PentaInput(Vz StokesEnum,nodeinputs,P1Enum));3187 for(i=0;i<6;i++) nodeinputs[i]=iomodel->Data(VzEnum)[penta_vertex_ids[i]-1]*(1-iomodel->Data(FlowequationBorder stokesEnum)[penta_vertex_ids[i]-1]);3188 this->inputs->AddInput(new PentaInput(Vz PattynEnum,nodeinputs,P1Enum));3182 if(*(iomodel->Data(FlowequationElementEquationEnum)+index)==HOFSApproximationEnum){ 3183 /*Create VzHO and VzFS Enums*/ 3184 if(iomodel->Data(VzEnum) && iomodel->Data(FlowequationBorderFSEnum)){ 3185 for(i=0;i<6;i++) nodeinputs[i]=iomodel->Data(VzEnum)[penta_vertex_ids[i]-1]*iomodel->Data(FlowequationBorderFSEnum)[penta_vertex_ids[i]-1]; 3186 this->inputs->AddInput(new PentaInput(VzFSEnum,nodeinputs,P1Enum)); 3187 for(i=0;i<6;i++) nodeinputs[i]=iomodel->Data(VzEnum)[penta_vertex_ids[i]-1]*(1-iomodel->Data(FlowequationBorderFSEnum)[penta_vertex_ids[i]-1]); 3188 this->inputs->AddInput(new PentaInput(VzHOEnum,nodeinputs,P1Enum)); 3189 3189 } 3190 3190 else{ 3191 3191 for(i=0;i<6;i++)nodeinputs[i]=0; 3192 this->inputs->AddInput(new PentaInput(Vz StokesEnum,nodeinputs,P1Enum));3193 this->inputs->AddInput(new PentaInput(Vz PattynEnum,nodeinputs,P1Enum));3192 this->inputs->AddInput(new PentaInput(VzFSEnum,nodeinputs,P1Enum)); 3193 this->inputs->AddInput(new PentaInput(VzHOEnum,nodeinputs,P1Enum)); 3194 3194 } 3195 3195 } 3196 if(*(iomodel->Data(FlowequationElementEquationEnum)+index)==MacAyeal StokesApproximationEnum){3197 /*Create VzMacAyeal and Vz StokesEnums*/3198 if(iomodel->Data(VzEnum) && iomodel->Data(FlowequationBorder stokesEnum)){3199 for(i=0;i<6;i++) nodeinputs[i]=iomodel->Data(VzEnum)[penta_vertex_ids[i]-1]*iomodel->Data(FlowequationBorder stokesEnum)[penta_vertex_ids[i]-1];3200 this->inputs->AddInput(new PentaInput(Vz StokesEnum,nodeinputs,P1Enum));3201 for(i=0;i<6;i++) nodeinputs[i]=iomodel->Data(VzEnum)[penta_vertex_ids[i]-1]*(1-iomodel->Data(FlowequationBorder stokesEnum)[penta_vertex_ids[i]-1]);3196 if(*(iomodel->Data(FlowequationElementEquationEnum)+index)==MacAyealFSApproximationEnum){ 3197 /*Create VzMacAyeal and VzFS Enums*/ 3198 if(iomodel->Data(VzEnum) && iomodel->Data(FlowequationBorderFSEnum)){ 3199 for(i=0;i<6;i++) nodeinputs[i]=iomodel->Data(VzEnum)[penta_vertex_ids[i]-1]*iomodel->Data(FlowequationBorderFSEnum)[penta_vertex_ids[i]-1]; 3200 this->inputs->AddInput(new PentaInput(VzFSEnum,nodeinputs,P1Enum)); 3201 for(i=0;i<6;i++) nodeinputs[i]=iomodel->Data(VzEnum)[penta_vertex_ids[i]-1]*(1-iomodel->Data(FlowequationBorderFSEnum)[penta_vertex_ids[i]-1]); 3202 3202 this->inputs->AddInput(new PentaInput(VzMacAyealEnum,nodeinputs,P1Enum)); 3203 3203 } 3204 3204 else{ 3205 3205 for(i=0;i<6;i++)nodeinputs[i]=0; 3206 this->inputs->AddInput(new PentaInput(Vz StokesEnum,nodeinputs,P1Enum));3206 this->inputs->AddInput(new PentaInput(VzFSEnum,nodeinputs,P1Enum)); 3207 3207 this->inputs->AddInput(new PentaInput(VzMacAyealEnum,nodeinputs,P1Enum)); 3208 3208 } … … 3289 3289 3290 3290 this->GetStrainRate3d(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input,vz_input); 3291 material->GetViscosity3d Stokes(&viscosity,&epsilon[0]);3291 material->GetViscosity3dFS(&viscosity,&epsilon[0]); 3292 3292 GetPhi(&phi, &epsilon[0], viscosity); 3293 3293 … … 4067 4067 4068 4068 this->GetStrainRate3d(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input,vz_input); 4069 material->GetViscosity3d Stokes(&viscosity,&epsilon[0]);4069 material->GetViscosity3dFS(&viscosity,&epsilon[0]); 4070 4070 GetPhi(&phi, &epsilon[0], viscosity); 4071 4071 … … 4323 4323 4324 4324 this->GetStrainRate3d(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input,vz_input); 4325 material->GetViscosity3d Stokes(&viscosity,&epsilon[0]);4325 material->GetViscosity3dFS(&viscosity,&epsilon[0]); 4326 4326 GetPhi(&phi, &epsilon[0], viscosity); 4327 4327 … … 4776 4776 case MacAyealApproximationEnum: 4777 4777 return CreateKMatrixAdjointMacAyeal2d(); 4778 case PattynApproximationEnum:4779 return CreateKMatrixAdjoint Pattyn();4780 case StokesApproximationEnum:4781 return CreateKMatrixAdjoint Stokes();4778 case HOApproximationEnum: 4779 return CreateKMatrixAdjointHO(); 4780 case FSApproximationEnum: 4781 return CreateKMatrixAdjointFS(); 4782 4782 case NoneApproximationEnum: 4783 4783 return NULL; … … 4821 4821 } 4822 4822 /*}}}*/ 4823 /*FUNCTION Penta::CreateKMatrixAdjoint Pattyn{{{*/4824 ElementMatrix* Penta::CreateKMatrixAdjoint Pattyn(void){4823 /*FUNCTION Penta::CreateKMatrixAdjointHO{{{*/ 4824 ElementMatrix* Penta::CreateKMatrixAdjointHO(void){ 4825 4825 4826 4826 /*Intermediaries */ … … 4838 4838 GaussPenta *gauss=NULL; 4839 4839 4840 /*Initialize Jacobian with regular Pattyn(first part of the Gateau derivative)*/4840 /*Initialize Jacobian with regular HO (first part of the Gateau derivative)*/ 4841 4841 parameters->FindParam(&incomplete_adjoint,InversionIncompleteAdjointEnum); 4842 ElementMatrix* Ke=CreateKMatrixDiagnostic Pattyn();4842 ElementMatrix* Ke=CreateKMatrixDiagnosticHO(); 4843 4843 if(incomplete_adjoint) return Ke; 4844 4844 … … 4857 4857 GetNodalFunctionsP1Derivatives(&dphi[0][0],&xyz_list[0][0],gauss); 4858 4858 4859 this->GetStrainRate3d Pattyn(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input);4859 this->GetStrainRate3dHO(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input); 4860 4860 material->GetViscosityDerivativeEpsSquare(&mu_prime,&epsilon[0]); 4861 4861 eps1[0]=2*epsilon[0]+epsilon[1]; eps2[0]=epsilon[2]; … … 4886 4886 } 4887 4887 /*}}}*/ 4888 /*FUNCTION Penta::CreateKMatrixAdjoint Stokes{{{*/4889 ElementMatrix* Penta::CreateKMatrixAdjoint Stokes(void){4888 /*FUNCTION Penta::CreateKMatrixAdjointFS{{{*/ 4889 ElementMatrix* Penta::CreateKMatrixAdjointFS(void){ 4890 4890 4891 4891 /*Constants*/ … … 4906 4906 GaussPenta *gauss=NULL; 4907 4907 4908 /*Initialize Jacobian with regular Stokes(first part of the Gateau derivative)*/4908 /*Initialize Jacobian with regular FS (first part of the Gateau derivative)*/ 4909 4909 parameters->FindParam(&incomplete_adjoint,InversionIncompleteAdjointEnum); 4910 ElementMatrix* Ke=CreateKMatrixDiagnostic Stokes();4910 ElementMatrix* Ke=CreateKMatrixDiagnosticFS(); 4911 4911 if(incomplete_adjoint) return Ke; 4912 4912 … … 4926 4926 GetNodalFunctionsP1Derivatives(&dphi[0][0],&xyz_list[0][0],gauss); 4927 4927 4928 this->GetStrainRate3d Pattyn(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input);4928 this->GetStrainRate3dHO(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input); 4929 4929 material->GetViscosityDerivativeEpsSquare(&mu_prime,&epsilon[0]); 4930 4930 eps1[0]=epsilon[0]; eps2[0]=epsilon[2]; eps3[0]=epsilon[3]; … … 4973 4973 case MacAyealApproximationEnum: 4974 4974 return CreatePVectorAdjointMacAyeal(); 4975 case PattynApproximationEnum:4976 return CreatePVectorAdjoint Pattyn();4975 case HOApproximationEnum: 4976 return CreatePVectorAdjointHO(); 4977 4977 case NoneApproximationEnum: 4978 4978 return NULL; 4979 case StokesApproximationEnum:4980 return CreatePVectorAdjoint Stokes();4979 case FSApproximationEnum: 4980 return CreatePVectorAdjointFS(); 4981 4981 default: 4982 4982 _error_("Approximation " << EnumToStringx(approximation) << " not supported yet"); … … 4998 4998 } 4999 4999 /*}}}*/ 5000 /*FUNCTION Penta::CreatePVectorAdjoint Pattyn{{{*/5001 ElementVector* Penta::CreatePVectorAdjoint Pattyn(void){5000 /*FUNCTION Penta::CreatePVectorAdjointHO{{{*/ 5001 ElementVector* Penta::CreatePVectorAdjointHO(void){ 5002 5002 5003 5003 if (!IsOnSurface()) return NULL; … … 5012 5012 } 5013 5013 /*}}}*/ 5014 /*FUNCTION Penta::CreatePVectorAdjoint Stokes{{{*/5015 ElementVector* Penta::CreatePVectorAdjoint Stokes(void){5014 /*FUNCTION Penta::CreatePVectorAdjointFS{{{*/ 5015 ElementVector* Penta::CreatePVectorAdjointFS(void){ 5016 5016 5017 5017 if (!IsOnSurface()) return NULL; … … 5019 5019 /*Call Tria function*/ 5020 5020 Tria* tria=(Tria*)SpawnTria(3,4,5); //nodes 3, 4 and 5 make the new tria (upper face). 5021 ElementVector* pe=tria->CreatePVectorAdjoint Stokes();5021 ElementVector* pe=tria->CreatePVectorAdjointFS(); 5022 5022 delete tria->material; delete tria; 5023 5023 … … 5059 5059 GradjDragMacAyeal(gradient,control_index); 5060 5060 break; 5061 case PattynApproximationEnum:5062 GradjDrag Pattyn(gradient,control_index);5061 case HOApproximationEnum: 5062 GradjDragHO(gradient,control_index); 5063 5063 break; 5064 case StokesApproximationEnum:5065 GradjDrag Stokes(gradient,control_index);5064 case FSApproximationEnum: 5065 GradjDragFS(gradient,control_index); 5066 5066 break; 5067 5067 case NoneApproximationEnum: … … 5079 5079 GradjBbarMacAyeal(gradient,control_index); 5080 5080 break; 5081 case PattynApproximationEnum:5082 GradjBbar Pattyn(gradient,control_index);5081 case HOApproximationEnum: 5082 GradjBbarHO(gradient,control_index); 5083 5083 break; 5084 case StokesApproximationEnum:5085 GradjBbar Stokes(gradient,control_index);5084 case FSApproximationEnum: 5085 GradjBbarFS(gradient,control_index); 5086 5086 break; 5087 5087 case NoneApproximationEnum: … … 5143 5143 5144 5144 } /*}}}*/ 5145 /*FUNCTION Penta::GradjDrag Pattyn{{{*/5146 void Penta::GradjDrag Pattyn(Vector<IssmDouble>* gradient,int control_index){5145 /*FUNCTION Penta::GradjDragHO {{{*/ 5146 void Penta::GradjDragHO(Vector<IssmDouble>* gradient,int control_index){ 5147 5147 5148 5148 int i,j; … … 5214 5214 } 5215 5215 /*}}}*/ 5216 /*FUNCTION Penta::GradjDrag Stokes{{{*/5217 void Penta::GradjDrag Stokes(Vector<IssmDouble>* gradient,int control_index){5216 /*FUNCTION Penta::GradjDragFS {{{*/ 5217 void Penta::GradjDragFS(Vector<IssmDouble>* gradient,int control_index){ 5218 5218 5219 5219 int i,j; … … 5324 5324 5325 5325 } /*}}}*/ 5326 /*FUNCTION Penta::GradjBbar Pattyn{{{*/5327 void Penta::GradjBbar Pattyn(Vector<IssmDouble>* gradient,int control_index){5326 /*FUNCTION Penta::GradjBbarHO {{{*/ 5327 void Penta::GradjBbarHO(Vector<IssmDouble>* gradient,int control_index){ 5328 5328 5329 5329 /*Gradient is computed on bed only (Bbar)*/ … … 5341 5341 this->material->inputs->DeleteInput(MaterialsRheologyBbarEnum); 5342 5342 } /*}}}*/ 5343 /*FUNCTION Penta::GradjBbar Stokes{{{*/5344 void Penta::GradjBbar Stokes(Vector<IssmDouble>* gradient,int control_index){5343 /*FUNCTION Penta::GradjBbarFS {{{*/ 5344 void Penta::GradjBbarFS(Vector<IssmDouble>* gradient,int control_index){ 5345 5345 5346 5346 /*Gradient is computed on bed only (Bbar)*/ … … 5403 5403 } 5404 5404 /*}}}*/ 5405 /*FUNCTION Penta::InputUpdateFromSolutionAdjoint Stokes{{{*/5406 void Penta::InputUpdateFromSolutionAdjoint Stokes(IssmDouble* solution){5405 /*FUNCTION Penta::InputUpdateFromSolutionAdjointFS {{{*/ 5406 void Penta::InputUpdateFromSolutionAdjointFS(IssmDouble* solution){ 5407 5407 5408 5408 const int numdof=NDOF4*NUMVERTICES; … … 5951 5951 5952 5952 switch(approximation){ 5953 case StokesApproximationEnum:5954 return CreateDVectorDiagnostic Stokes();5953 case FSApproximationEnum: 5954 return CreateDVectorDiagnosticFS(); 5955 5955 default: 5956 return NULL; //no need for doftypes outside of stokesapproximation5957 } 5958 } 5959 /*}}}*/ 5960 /*FUNCTION Penta::CreateDVectorDiagnostic Stokes{{{*/5961 ElementVector* Penta::CreateDVectorDiagnostic Stokes(void){5956 return NULL; //no need for doftypes outside of FS approximation 5957 } 5958 } 5959 /*}}}*/ 5960 /*FUNCTION Penta::CreateDVectorDiagnosticFS{{{*/ 5961 ElementVector* Penta::CreateDVectorDiagnosticFS(void){ 5962 5962 5963 5963 /*output: */ … … 5969 5969 /*Initialize Element vector and return if necessary*/ 5970 5970 inputs->GetInputValue(&approximation,ApproximationEnum); 5971 if(approximation!= StokesApproximationEnum) return NULL;5972 5973 De=new ElementVector(nodes,NUMVERTICES,this->parameters, StokesApproximationEnum);5971 if(approximation!=FSApproximationEnum) return NULL; 5972 5973 De=new ElementVector(nodes,NUMVERTICES,this->parameters,FSApproximationEnum); 5974 5974 5975 5975 for (i=0;i<NUMVERTICES;i++){ … … 5983 5983 } 5984 5984 /*}}}*/ 5985 /*FUNCTION Penta::CreateKMatrixCouplingMacAyeal Pattyn{{{*/5986 ElementMatrix* Penta::CreateKMatrixCouplingMacAyeal Pattyn(void){5985 /*FUNCTION Penta::CreateKMatrixCouplingMacAyealHO{{{*/ 5986 ElementMatrix* Penta::CreateKMatrixCouplingMacAyealHO(void){ 5987 5987 5988 5988 /*compute all stiffness matrices for this element*/ 5989 ElementMatrix* Ke1=CreateKMatrixCouplingMacAyeal PattynViscous();5990 ElementMatrix* Ke2=CreateKMatrixCouplingMacAyeal PattynFriction();5989 ElementMatrix* Ke1=CreateKMatrixCouplingMacAyealHOViscous(); 5990 ElementMatrix* Ke2=CreateKMatrixCouplingMacAyealHOFriction(); 5991 5991 ElementMatrix* Ke=new ElementMatrix(Ke1,Ke2); 5992 5992 … … 5997 5997 } 5998 5998 /*}}}*/ 5999 /*FUNCTION Penta::CreateKMatrixCouplingMacAyeal PattynViscous{{{*/6000 ElementMatrix* Penta::CreateKMatrixCouplingMacAyeal PattynViscous(void){5999 /*FUNCTION Penta::CreateKMatrixCouplingMacAyealHOViscous{{{*/ 6000 ElementMatrix* Penta::CreateKMatrixCouplingMacAyealHOViscous(void){ 6001 6001 6002 6002 /*Constants*/ … … 6023 6023 int cs_list[numnodes]; 6024 6024 6025 /*Find penta on bed as pattynmust be coupled to the dofs on the bed: */6025 /*Find penta on bed as HO must be coupled to the dofs on the bed: */ 6026 6026 Penta* pentabase=GetBasalElement(); 6027 6027 Tria* tria=pentabase->SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria. … … 6037 6037 /*Initialize Element matrix*/ 6038 6038 ElementMatrix* Ke1=new ElementMatrix(pentabase->nodes,NUMVERTICES,this->parameters,MacAyealApproximationEnum); 6039 ElementMatrix* Ke2=new ElementMatrix(this->nodes ,NUMVERTICES,this->parameters, PattynApproximationEnum);6039 ElementMatrix* Ke2=new ElementMatrix(this->nodes ,NUMVERTICES,this->parameters,HOApproximationEnum); 6040 6040 ElementMatrix* Ke =new ElementMatrix(Ke1,Ke2); 6041 6041 delete Ke1; delete Ke2; … … 6058 6058 6059 6059 GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss); 6060 GetBMacAyeal Pattyn(&B[0][0], &xyz_list[0][0], gauss);6060 GetBMacAyealHO(&B[0][0], &xyz_list[0][0], gauss); 6061 6061 tria->GetBprimeMacAyeal(&Bprime[0][0], &xyz_list[0][0], gauss_tria); 6062 6062 6063 this->GetStrainRate3d Pattyn(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input);6064 this->GetStrainRate3d Pattyn(&oldepsilon[0],&xyz_list[0][0],gauss,vxold_input,vyold_input);6063 this->GetStrainRate3dHO(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input); 6064 this->GetStrainRate3dHO(&oldepsilon[0],&xyz_list[0][0],gauss,vxold_input,vyold_input); 6065 6065 material->GetViscosity3d(&viscosity, &epsilon[0]); 6066 6066 material->GetViscosity3d(&oldviscosity, &oldepsilon[0]); … … 6090 6090 } 6091 6091 /*}}}*/ 6092 /*FUNCTION Penta::CreateKMatrixCouplingMacAyeal PattynFriction{{{*/6093 ElementMatrix* Penta::CreateKMatrixCouplingMacAyeal PattynFriction(void){6092 /*FUNCTION Penta::CreateKMatrixCouplingMacAyealHOFriction{{{*/ 6093 ElementMatrix* Penta::CreateKMatrixCouplingMacAyealHOFriction(void){ 6094 6094 6095 6095 /*Constants*/ … … 6116 6116 if(IsFloating() || !IsOnBed()) return NULL; 6117 6117 ElementMatrix* Ke1=new ElementMatrix(nodes,NUMVERTICES,this->parameters,MacAyealApproximationEnum); 6118 ElementMatrix* Ke2=new ElementMatrix(nodes,NUMVERTICES,this->parameters, PattynApproximationEnum);6118 ElementMatrix* Ke2=new ElementMatrix(nodes,NUMVERTICES,this->parameters,HOApproximationEnum); 6119 6119 ElementMatrix* Ke=new ElementMatrix(Ke1,Ke2); 6120 6120 delete Ke1; delete Ke2; … … 6149 6149 6150 6150 GetTriaJacobianDeterminant(&Jdet2d, &xyz_list_tria[0][0],gauss); 6151 GetB PattynFriction(&L[0][0],gauss);6151 GetBHOFriction(&L[0][0],gauss); 6152 6152 6153 6153 DL_scalar=alpha2*gauss->weight*Jdet2d; … … 6175 6175 } 6176 6176 /*}}}*/ 6177 /*FUNCTION Penta::CreateKMatrixCouplingMacAyeal Stokes{{{*/6178 ElementMatrix* Penta::CreateKMatrixCouplingMacAyeal Stokes(void){6177 /*FUNCTION Penta::CreateKMatrixCouplingMacAyealFS{{{*/ 6178 ElementMatrix* Penta::CreateKMatrixCouplingMacAyealFS(void){ 6179 6179 6180 6180 /*compute all stiffness matrices for this element*/ 6181 ElementMatrix* Ke1=CreateKMatrixCouplingMacAyeal StokesViscous();6182 ElementMatrix* Ke2=CreateKMatrixCouplingMacAyeal StokesFriction();6181 ElementMatrix* Ke1=CreateKMatrixCouplingMacAyealFSViscous(); 6182 ElementMatrix* Ke2=CreateKMatrixCouplingMacAyealFSFriction(); 6183 6183 ElementMatrix* Ke =new ElementMatrix(Ke1,Ke2); 6184 6184 … … 6189 6189 } 6190 6190 /*}}}*/ 6191 /*FUNCTION Penta::CreateKMatrixCouplingMacAyeal StokesViscous{{{*/6192 ElementMatrix* Penta::CreateKMatrixCouplingMacAyeal StokesViscous(void){6191 /*FUNCTION Penta::CreateKMatrixCouplingMacAyealFSViscous{{{*/ 6192 ElementMatrix* Penta::CreateKMatrixCouplingMacAyealFSViscous(void){ 6193 6193 6194 6194 /*Constants*/ … … 6201 6201 int i,j; 6202 6202 IssmDouble Jdet; 6203 IssmDouble viscosity, stokesreconditioning; //viscosity6203 IssmDouble viscosity,FSreconditioning; //viscosity 6204 6204 IssmDouble epsilon[6]; /* epsilon=[exx,eyy,exy,exz,eyz];*/ 6205 6205 IssmDouble xyz_list[NUMVERTICES][3]; … … 6220 6220 int cs_list[numnodes]; 6221 6221 6222 /*Find penta on bed as stokesmust be coupled to the dofs on the bed: */6222 /*Find penta on bed as FS must be coupled to the dofs on the bed: */ 6223 6223 Penta* pentabase=GetBasalElement(); 6224 6224 Tria* tria=pentabase->SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria. … … 6234 6234 /*Initialize Element matrix and return if necessary*/ 6235 6235 ElementMatrix* Ke1=new ElementMatrix(pentabase->nodes,NUMVERTICES,this->parameters,MacAyealApproximationEnum); 6236 ElementMatrix* Ke2=new ElementMatrix(this->nodes ,NUMVERTICES,this->parameters, StokesApproximationEnum);6236 ElementMatrix* Ke2=new ElementMatrix(this->nodes ,NUMVERTICES,this->parameters,FSApproximationEnum); 6237 6237 ElementMatrix* Ke=new ElementMatrix(Ke1,Ke2); 6238 6238 delete Ke1; delete Ke2; … … 6240 6240 /* Get node coordinates and dof list: */ 6241 6241 GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES); 6242 parameters->FindParam(& stokesreconditioning,DiagnosticStokesreconditioningEnum);6242 parameters->FindParam(&FSreconditioning,DiagnosticFSreconditioningEnum); 6243 6243 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 6244 6244 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); … … 6254 6254 6255 6255 GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss); 6256 GetBMacAyeal Stokes(&B[0][0], &xyz_list[0][0], gauss);6257 tria->GetBprimeMacAyeal Stokes(&Bprime[0][0], &xyz_list[0][0], gauss_tria);6258 tria->GetBMacAyeal Stokes(&B2[0][0], &xyz_list[0][0], gauss_tria);6259 GetBprimeMacAyeal Stokes(&Bprime2[0][0], &xyz_list[0][0], gauss);6256 GetBMacAyealFS(&B[0][0], &xyz_list[0][0], gauss); 6257 tria->GetBprimeMacAyealFS(&Bprime[0][0], &xyz_list[0][0], gauss_tria); 6258 tria->GetBMacAyealFS(&B2[0][0], &xyz_list[0][0], gauss_tria); 6259 GetBprimeMacAyealFS(&Bprime2[0][0], &xyz_list[0][0], gauss); 6260 6260 6261 6261 this->GetStrainRate3d(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input,vz_input); 6262 material->GetViscosity3d Stokes(&viscosity, &epsilon[0]);6262 material->GetViscosity3dFS(&viscosity, &epsilon[0]); 6263 6263 6264 6264 D_scalar=2*viscosity*gauss->weight*Jdet; 6265 6265 for (i=0;i<3;i++) D[i][i]=D_scalar; 6266 D[3][3]=-gauss->weight*Jdet* stokesreconditioning;6266 D[3][3]=-gauss->weight*Jdet*FSreconditioning; 6267 6267 for (i=0;i<3;i++) D2[i][i]=D_scalar; 6268 6268 … … 6293 6293 } 6294 6294 /*}}}*/ 6295 /*FUNCTION Penta::CreateKMatrixCouplingMacAyeal StokesFriction {{{*/6296 ElementMatrix* Penta::CreateKMatrixCouplingMacAyeal StokesFriction(void){6295 /*FUNCTION Penta::CreateKMatrixCouplingMacAyealFSFriction {{{*/ 6296 ElementMatrix* Penta::CreateKMatrixCouplingMacAyealFSFriction(void){ 6297 6297 6298 6298 /*Constants*/ … … 6307 6307 int i,j; 6308 6308 int analysis_type,approximation; 6309 IssmDouble stokesreconditioning;6309 IssmDouble FSreconditioning; 6310 6310 IssmDouble viscosity,alpha2_gauss,Jdet2d; 6311 6311 IssmDouble bed_normal[3]; … … 6313 6313 IssmDouble xyz_list[NUMVERTICES][3]; 6314 6314 IssmDouble xyz_list_tria[NUMVERTICES2D][3]; 6315 IssmDouble LMacAyeal Stokes[8][numdof2dm];6316 IssmDouble LprimeMacAyeal Stokes[8][numdof2d];6317 IssmDouble DLMacAyeal Stokes[8][8]={0.0};6318 IssmDouble L StokesMacAyeal[4][numdof2d];6319 IssmDouble Lprime StokesMacAyeal[4][numdof2dm];6320 IssmDouble DL StokesMacAyeal[4][4]={0.0};6315 IssmDouble LMacAyealFS[8][numdof2dm]; 6316 IssmDouble LprimeMacAyealFS[8][numdof2d]; 6317 IssmDouble DLMacAyealFS[8][8]={0.0}; 6318 IssmDouble LFSMacAyeal[4][numdof2d]; 6319 IssmDouble LprimeFSMacAyeal[4][numdof2dm]; 6320 IssmDouble DLFSMacAyeal[4][4]={0.0}; 6321 6321 IssmDouble Ke_drag_gaussian[numdof2dm][numdof2d]; 6322 6322 IssmDouble Ke_drag_gaussian2[numdof2d][numdof2dm]; … … 6326 6326 int cs_list[numnodes]; 6327 6327 6328 /*If on water or not Stokes, skip stiffness: */6328 /*If on water or not FS, skip stiffness: */ 6329 6329 inputs->GetInputValue(&approximation,ApproximationEnum); 6330 6330 if(IsFloating() || !IsOnBed()) return NULL; 6331 6331 ElementMatrix* Ke1=new ElementMatrix(this->nodes,NUMVERTICES,this->parameters,MacAyealApproximationEnum); 6332 ElementMatrix* Ke2=new ElementMatrix(this->nodes,NUMVERTICES,this->parameters, StokesApproximationEnum);6332 ElementMatrix* Ke2=new ElementMatrix(this->nodes,NUMVERTICES,this->parameters,FSApproximationEnum); 6333 6333 ElementMatrix* Ke=new ElementMatrix(Ke1,Ke2); 6334 6334 delete Ke1; delete Ke2; … … 6345 6345 GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES); 6346 6346 parameters->FindParam(&analysis_type,AnalysisTypeEnum); 6347 parameters->FindParam(& stokesreconditioning,DiagnosticStokesreconditioningEnum);6347 parameters->FindParam(&FSreconditioning,DiagnosticFSreconditioningEnum); 6348 6348 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 6349 6349 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); … … 6361 6361 6362 6362 GetTriaJacobianDeterminant(&Jdet2d, &xyz_list_tria[0][0],gauss); 6363 GetLMacAyeal Stokes(&LMacAyealStokes[0][0], gauss);6364 GetLprimeMacAyeal Stokes(&LprimeMacAyealStokes[0][0], &xyz_list[0][0], gauss);6365 GetL StokesMacAyeal(&LStokesMacAyeal[0][0], gauss);6366 GetLprime StokesMacAyeal(&LprimeStokesMacAyeal[0][0], &xyz_list[0][0], gauss);6363 GetLMacAyealFS(&LMacAyealFS[0][0], gauss); 6364 GetLprimeMacAyealFS(&LprimeMacAyealFS[0][0], &xyz_list[0][0], gauss); 6365 GetLFSMacAyeal(&LFSMacAyeal[0][0], gauss); 6366 GetLprimeFSMacAyeal(&LprimeFSMacAyeal[0][0], &xyz_list[0][0], gauss); 6367 6367 6368 6368 this->GetStrainRate3d(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input,vz_input); 6369 material->GetViscosity3d Stokes(&viscosity,&epsilon[0]);6369 material->GetViscosity3dFS(&viscosity,&epsilon[0]); 6370 6370 6371 6371 BedNormal(&bed_normal[0],xyz_list_tria); 6372 6372 friction->GetAlpha2(&alpha2_gauss, gauss,VxEnum,VyEnum,VzEnum); 6373 6373 6374 DLMacAyeal Stokes[0][0]=alpha2_gauss*gauss->weight*Jdet2d;6375 DLMacAyeal Stokes[1][1]=alpha2_gauss*gauss->weight*Jdet2d;6376 DLMacAyeal Stokes[2][2]=-alpha2_gauss*gauss->weight*Jdet2d*bed_normal[0]*bed_normal[2];6377 DLMacAyeal Stokes[3][3]=-alpha2_gauss*gauss->weight*Jdet2d*bed_normal[1]*bed_normal[2];6378 DLMacAyeal Stokes[4][4]=-2*viscosity*gauss->weight*Jdet2d*bed_normal[0];6379 DLMacAyeal Stokes[5][5]=-2*viscosity*gauss->weight*Jdet2d*bed_normal[1];6380 DLMacAyeal Stokes[6][6]=stokesreconditioning*gauss->weight*Jdet2d*bed_normal[0];6381 DLMacAyeal Stokes[7][7]=stokesreconditioning*gauss->weight*Jdet2d*bed_normal[1];6382 6383 DL StokesMacAyeal[0][0]=alpha2_gauss*gauss->weight*Jdet2d;6384 DL StokesMacAyeal[1][1]=alpha2_gauss*gauss->weight*Jdet2d;6385 DL StokesMacAyeal[2][2]=-alpha2_gauss*gauss->weight*Jdet2d*bed_normal[0]*bed_normal[2];6386 DL StokesMacAyeal[3][3]=-alpha2_gauss*gauss->weight*Jdet2d*bed_normal[1]*bed_normal[2];6387 6388 TripleMultiply( &LMacAyeal Stokes[0][0],8,numdof2dm,1,6389 &DLMacAyeal Stokes[0][0],8,8,0,6390 &LprimeMacAyeal Stokes[0][0],8,numdof2d,0,6374 DLMacAyealFS[0][0]=alpha2_gauss*gauss->weight*Jdet2d; 6375 DLMacAyealFS[1][1]=alpha2_gauss*gauss->weight*Jdet2d; 6376 DLMacAyealFS[2][2]=-alpha2_gauss*gauss->weight*Jdet2d*bed_normal[0]*bed_normal[2]; 6377 DLMacAyealFS[3][3]=-alpha2_gauss*gauss->weight*Jdet2d*bed_normal[1]*bed_normal[2]; 6378 DLMacAyealFS[4][4]=-2*viscosity*gauss->weight*Jdet2d*bed_normal[0]; 6379 DLMacAyealFS[5][5]=-2*viscosity*gauss->weight*Jdet2d*bed_normal[1]; 6380 DLMacAyealFS[6][6]=FSreconditioning*gauss->weight*Jdet2d*bed_normal[0]; 6381 DLMacAyealFS[7][7]=FSreconditioning*gauss->weight*Jdet2d*bed_normal[1]; 6382 6383 DLFSMacAyeal[0][0]=alpha2_gauss*gauss->weight*Jdet2d; 6384 DLFSMacAyeal[1][1]=alpha2_gauss*gauss->weight*Jdet2d; 6385 DLFSMacAyeal[2][2]=-alpha2_gauss*gauss->weight*Jdet2d*bed_normal[0]*bed_normal[2]; 6386 DLFSMacAyeal[3][3]=-alpha2_gauss*gauss->weight*Jdet2d*bed_normal[1]*bed_normal[2]; 6387 6388 TripleMultiply( &LMacAyealFS[0][0],8,numdof2dm,1, 6389 &DLMacAyealFS[0][0],8,8,0, 6390 &LprimeMacAyealFS[0][0],8,numdof2d,0, 6391 6391 &Ke_drag_gaussian[0][0],0); 6392 6392 6393 TripleMultiply( &L StokesMacAyeal[0][0],4,numdof2d,1,6394 &DL StokesMacAyeal[0][0],4,4,0,6395 &Lprime StokesMacAyeal[0][0],4,numdof2dm,0,6393 TripleMultiply( &LFSMacAyeal[0][0],4,numdof2d,1, 6394 &DLFSMacAyeal[0][0],4,4,0, 6395 &LprimeFSMacAyeal[0][0],4,numdof2dm,0, 6396 6396 &Ke_drag_gaussian2[0][0],0); 6397 6397 … … 6409 6409 } 6410 6410 /*}}}*/ 6411 /*FUNCTION Penta::CreateKMatrixCoupling PattynStokes{{{*/6412 ElementMatrix* Penta::CreateKMatrixCoupling PattynStokes(void){6411 /*FUNCTION Penta::CreateKMatrixCouplingHOFS{{{*/ 6412 ElementMatrix* Penta::CreateKMatrixCouplingHOFS(void){ 6413 6413 6414 6414 /*Constants*/ … … 6432 6432 6433 6433 /*compute all stiffness matrices for this element*/ 6434 ElementMatrix* Ke1=new ElementMatrix(this->nodes,NUMVERTICES,this->parameters, PattynApproximationEnum);6435 ElementMatrix* Ke2=new ElementMatrix(this->nodes,NUMVERTICES,this->parameters, StokesApproximationEnum);6434 ElementMatrix* Ke1=new ElementMatrix(this->nodes,NUMVERTICES,this->parameters,HOApproximationEnum); 6435 ElementMatrix* Ke2=new ElementMatrix(this->nodes,NUMVERTICES,this->parameters,FSApproximationEnum); 6436 6436 ElementMatrix* Ke=new ElementMatrix(Ke1,Ke2); 6437 6437 delete Ke1; 6438 6438 delete Ke2; 6439 Ke1=CreateKMatrixDiagnostic Pattyn(); TransformInvStiffnessMatrixCoord(Ke1,this->nodes,NUMVERTICES,XYEnum);6440 Ke2=CreateKMatrixDiagnostic Stokes(); TransformInvStiffnessMatrixCoord(Ke2,this->nodes,NUMVERTICES,XYZPEnum);6439 Ke1=CreateKMatrixDiagnosticHO(); TransformInvStiffnessMatrixCoord(Ke1,this->nodes,NUMVERTICES,XYEnum); 6440 Ke2=CreateKMatrixDiagnosticFS(); TransformInvStiffnessMatrixCoord(Ke2,this->nodes,NUMVERTICES,XYZPEnum); 6441 6441 6442 6442 for(i=0;i<numdofs;i++) for(j=0;j<NUMVERTICES;j++){ … … 6469 6469 case L1L2ApproximationEnum: 6470 6470 return CreateKMatrixDiagnosticL1L2(); 6471 case PattynApproximationEnum:6472 return CreateKMatrixDiagnostic Pattyn();6473 case StokesApproximationEnum:6474 return CreateKMatrixDiagnostic Stokes();6475 case HutterApproximationEnum:6471 case HOApproximationEnum: 6472 return CreateKMatrixDiagnosticHO(); 6473 case FSApproximationEnum: 6474 return CreateKMatrixDiagnosticFS(); 6475 case SIAApproximationEnum: 6476 6476 return NULL; 6477 6477 case NoneApproximationEnum: 6478 6478 return NULL; 6479 case MacAyeal PattynApproximationEnum:6480 return CreateKMatrixDiagnosticMacAyeal Pattyn();6481 case MacAyeal StokesApproximationEnum:6482 return CreateKMatrixDiagnosticMacAyeal Stokes();6483 case PattynStokesApproximationEnum:6484 return CreateKMatrixDiagnostic PattynStokes();6479 case MacAyealHOApproximationEnum: 6480 return CreateKMatrixDiagnosticMacAyealHO(); 6481 case MacAyealFSApproximationEnum: 6482 return CreateKMatrixDiagnosticMacAyealFS(); 6483 case HOFSApproximationEnum: 6484 return CreateKMatrixDiagnosticHOFS(); 6485 6485 default: 6486 6486 _error_("Approximation " << EnumToStringx(approximation) << " not supported yet"); … … 6488 6488 } 6489 6489 /*}}}*/ 6490 /*FUNCTION Penta::CreateKMatrixDiagnostic Hutter{{{*/6491 ElementMatrix* Penta::CreateKMatrixDiagnostic Hutter(void){6490 /*FUNCTION Penta::CreateKMatrixDiagnosticSIA{{{*/ 6491 ElementMatrix* Penta::CreateKMatrixDiagnosticSIA(void){ 6492 6492 6493 6493 /*Constants*/ … … 6610 6610 IssmDouble viscosity , oldviscosity, newviscosity, viscosity_overshoot; 6611 6611 IssmDouble epsilon[5],oldepsilon[5]; /* epsilon=[exx,eyy,exy,exz,eyz];*/ 6612 IssmDouble epsilons[6]; //6 for stokes6612 IssmDouble epsilons[6]; //6 for FS 6613 6613 IssmDouble xyz_list[NUMVERTICES][3]; 6614 6614 IssmDouble B[3][numdof2d]; … … 6622 6622 GaussTria *gauss_tria = NULL; 6623 6623 6624 /*Find penta on bed as this is a macayealelements: */6624 /*Find penta on bed as this is a SSA elements: */ 6625 6625 pentabase=GetBasalElement(); 6626 6626 tria=pentabase->SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria. … … 6651 6651 tria->GetBprimeMacAyeal(&Bprime[0][0], &xyz_list[0][0], gauss_tria); 6652 6652 6653 if(approximation==MacAyeal PattynApproximationEnum){6654 this->GetStrainRate3d Pattyn(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input);6655 this->GetStrainRate3d Pattyn(&oldepsilon[0],&xyz_list[0][0],gauss,vxold_input,vyold_input);6653 if(approximation==MacAyealHOApproximationEnum){ 6654 this->GetStrainRate3dHO(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input); 6655 this->GetStrainRate3dHO(&oldepsilon[0],&xyz_list[0][0],gauss,vxold_input,vyold_input); 6656 6656 material->GetViscosity3d(&viscosity, &epsilon[0]); 6657 6657 material->GetViscosity3d(&oldviscosity, &oldepsilon[0]); … … 6659 6659 newviscosity=viscosity+viscosity_overshoot*(viscosity-oldviscosity); 6660 6660 } 6661 else if (approximation==MacAyeal StokesApproximationEnum){6661 else if (approximation==MacAyealFSApproximationEnum){ 6662 6662 this->GetStrainRate3d(&epsilons[0],&xyz_list[0][0],gauss,vx_input,vy_input,vz_input); 6663 material->GetViscosity3d Stokes(&newviscosity,&epsilons[0]);6663 material->GetViscosity3dFS(&newviscosity,&epsilons[0]); 6664 6664 } 6665 6665 else _error_("approximation " << approximation << " (" << EnumToStringx(approximation) << ") not supported yet"); … … 6704 6704 } 6705 6705 /*}}}*/ 6706 /*FUNCTION Penta::CreateKMatrixDiagnosticMacAyeal Pattyn{{{*/6707 ElementMatrix* Penta::CreateKMatrixDiagnosticMacAyeal Pattyn(void){6706 /*FUNCTION Penta::CreateKMatrixDiagnosticMacAyealHO{{{*/ 6707 ElementMatrix* Penta::CreateKMatrixDiagnosticMacAyealHO(void){ 6708 6708 6709 6709 /*compute all stiffness matrices for this element*/ 6710 6710 ElementMatrix* Ke1=CreateKMatrixDiagnosticMacAyeal3d(); 6711 ElementMatrix* Ke2=CreateKMatrixDiagnostic Pattyn();6712 ElementMatrix* Ke3=CreateKMatrixCouplingMacAyeal Pattyn();6711 ElementMatrix* Ke2=CreateKMatrixDiagnosticHO(); 6712 ElementMatrix* Ke3=CreateKMatrixCouplingMacAyealHO(); 6713 6713 ElementMatrix* Ke =new ElementMatrix(Ke1,Ke2,Ke3); 6714 6714 … … 6720 6720 } 6721 6721 /*}}}*/ 6722 /*FUNCTION Penta::CreateKMatrixDiagnosticMacAyeal Stokes{{{*/6723 ElementMatrix* Penta::CreateKMatrixDiagnosticMacAyeal Stokes(void){6722 /*FUNCTION Penta::CreateKMatrixDiagnosticMacAyealFS{{{*/ 6723 ElementMatrix* Penta::CreateKMatrixDiagnosticMacAyealFS(void){ 6724 6724 6725 6725 /*compute all stiffness matrices for this element*/ 6726 6726 ElementMatrix* Ke1=CreateKMatrixDiagnosticMacAyeal3d(); 6727 ElementMatrix* Ke2=CreateKMatrixDiagnostic Stokes();6728 ElementMatrix* Ke3=CreateKMatrixCouplingMacAyeal Stokes();6727 ElementMatrix* Ke2=CreateKMatrixDiagnosticFS(); 6728 ElementMatrix* Ke3=CreateKMatrixCouplingMacAyealFS(); 6729 6729 ElementMatrix* Ke =new ElementMatrix(Ke1,Ke2,Ke3); 6730 6730 … … 6770 6770 GaussTria *gauss_tria = NULL; 6771 6771 6772 /*Find penta on bed as this is a macayealelements: */6772 /*Find penta on bed as this is a SSA elements: */ 6773 6773 pentabase=GetBasalElement(); 6774 6774 tria=pentabase->SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria. … … 6835 6835 } 6836 6836 /*}}}*/ 6837 /*FUNCTION Penta::CreateKMatrixDiagnostic Pattyn{{{*/6838 ElementMatrix* Penta::CreateKMatrixDiagnostic Pattyn(void){6837 /*FUNCTION Penta::CreateKMatrixDiagnosticHO{{{*/ 6838 ElementMatrix* Penta::CreateKMatrixDiagnosticHO(void){ 6839 6839 6840 6840 /*compute all stiffness matrices for this element*/ 6841 ElementMatrix* Ke1=CreateKMatrixDiagnostic PattynViscous();6842 ElementMatrix* Ke2=CreateKMatrixDiagnostic PattynFriction();6841 ElementMatrix* Ke1=CreateKMatrixDiagnosticHOViscous(); 6842 ElementMatrix* Ke2=CreateKMatrixDiagnosticHOFriction(); 6843 6843 ElementMatrix* Ke =new ElementMatrix(Ke1,Ke2); 6844 6844 … … 6850 6850 } 6851 6851 /*}}}*/ 6852 /*FUNCTION Penta::CreateKMatrixDiagnostic PattynViscous{{{*/6853 ElementMatrix* Penta::CreateKMatrixDiagnostic PattynViscous(void){6852 /*FUNCTION Penta::CreateKMatrixDiagnosticHOViscous{{{*/ 6853 ElementMatrix* Penta::CreateKMatrixDiagnosticHOViscous(void){ 6854 6854 6855 6855 /*Constants*/ … … 6871 6871 6872 6872 /*Initialize Element matrix*/ 6873 ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters, PattynApproximationEnum);6873 ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,HOApproximationEnum); 6874 6874 6875 6875 /*Retrieve all inputs and parameters*/ … … 6889 6889 6890 6890 GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss); 6891 GetB Pattyn(&B[0][0], &xyz_list[0][0], gauss);6892 GetBprime Pattyn(&Bprime[0][0], &xyz_list[0][0], gauss);6893 6894 this->GetStrainRate3d Pattyn(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input);6895 this->GetStrainRate3d Pattyn(&oldepsilon[0],&xyz_list[0][0],gauss,vxold_input,vyold_input);6891 GetBHO(&B[0][0], &xyz_list[0][0], gauss); 6892 GetBprimeHO(&Bprime[0][0], &xyz_list[0][0], gauss); 6893 6894 this->GetStrainRate3dHO(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input); 6895 this->GetStrainRate3dHO(&oldepsilon[0],&xyz_list[0][0],gauss,vxold_input,vyold_input); 6896 6896 material->GetViscosity3d(&viscosity, &epsilon[0]); 6897 6897 material->GetViscosity3d(&oldviscosity, &oldepsilon[0]); … … 6915 6915 } 6916 6916 /*}}}*/ 6917 /*FUNCTION Penta::CreateKMatrixDiagnostic PattynFriction{{{*/6918 ElementMatrix* Penta::CreateKMatrixDiagnostic PattynFriction(void){6917 /*FUNCTION Penta::CreateKMatrixDiagnosticHOFriction{{{*/ 6918 ElementMatrix* Penta::CreateKMatrixDiagnosticHOFriction(void){ 6919 6919 6920 6920 /*Constants*/ … … 6937 6937 if(IsFloating() || !IsOnBed()) return NULL; 6938 6938 6939 ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters, PattynApproximationEnum);6939 ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,HOApproximationEnum); 6940 6940 6941 6941 /*Retrieve all inputs and parameters*/ … … 6962 6962 6963 6963 GetTriaJacobianDeterminant(&Jdet, &xyz_list_tria[0][0],gauss); 6964 GetB PattynFriction(&L[0][0],gauss);6964 GetBHOFriction(&L[0][0],gauss); 6965 6965 6966 6966 friction->GetAlpha2(&alpha2, gauss,VxEnum,VyEnum,VzEnum); … … 6985 6985 } 6986 6986 /*}}}*/ 6987 /*FUNCTION Penta::CreateKMatrixDiagnostic PattynStokes{{{*/6988 ElementMatrix* Penta::CreateKMatrixDiagnostic PattynStokes(void){6987 /*FUNCTION Penta::CreateKMatrixDiagnosticHOFS{{{*/ 6988 ElementMatrix* Penta::CreateKMatrixDiagnosticHOFS(void){ 6989 6989 6990 6990 /*compute all stiffness matrices for this element*/ 6991 ElementMatrix* Ke1=CreateKMatrixDiagnostic Pattyn();6992 ElementMatrix* Ke2=CreateKMatrixDiagnostic Stokes();6993 ElementMatrix* Ke3=CreateKMatrixCoupling PattynStokes();6991 ElementMatrix* Ke1=CreateKMatrixDiagnosticHO(); 6992 ElementMatrix* Ke2=CreateKMatrixDiagnosticFS(); 6993 ElementMatrix* Ke3=CreateKMatrixCouplingHOFS(); 6994 6994 ElementMatrix* Ke =new ElementMatrix(Ke1,Ke2,Ke3); 6995 6995 … … 7001 7001 } 7002 7002 /*}}}*/ 7003 /*FUNCTION Penta::CreateKMatrixDiagnostic Stokes{{{*/7004 ElementMatrix* Penta::CreateKMatrixDiagnostic Stokes(void){7005 7006 int fe_ stokes;7003 /*FUNCTION Penta::CreateKMatrixDiagnosticFS{{{*/ 7004 ElementMatrix* Penta::CreateKMatrixDiagnosticFS(void){ 7005 7006 int fe_FS; 7007 7007 ElementMatrix* Ke1; 7008 7008 ElementMatrix* Ke2; 7009 7009 ElementMatrix* Ke; 7010 parameters->FindParam(&fe_ stokes,FlowequationFeStokesEnum);7011 7012 switch(fe_ stokes){7010 parameters->FindParam(&fe_FS,FlowequationFeFSEnum); 7011 7012 switch(fe_FS){ 7013 7013 case 0: 7014 7014 /*compute all stiffness matrices for this element*/ 7015 Ke1=CreateKMatrixDiagnostic StokesViscous();7016 Ke2=CreateKMatrixDiagnostic StokesFriction();7015 Ke1=CreateKMatrixDiagnosticFSViscous(); 7016 Ke2=CreateKMatrixDiagnosticFSFriction(); 7017 7017 Ke =new ElementMatrix(Ke1,Ke2); 7018 7018 break; 7019 7019 case 1: 7020 7020 /*compute all stiffness matrices for this element*/ 7021 Ke1=CreateKMatrixDiagnostic StokesGLSViscous();7022 Ke2=CreateKMatrixDiagnostic StokesFriction();7021 Ke1=CreateKMatrixDiagnosticFSGLSViscous(); 7022 Ke2=CreateKMatrixDiagnosticFSFriction(); 7023 7023 Ke =new ElementMatrix(Ke1,Ke2); 7024 7024 break; 7025 7025 default: 7026 _error_("Finite element" << fe_ stokes<< " not supported yet");7026 _error_("Finite element" << fe_FS << " not supported yet"); 7027 7027 } 7028 7028 … … 7034 7034 } 7035 7035 /*}}}*/ 7036 /*FUNCTION Penta::CreateKMatrixDiagnostic StokesViscous {{{*/7037 ElementMatrix* Penta::CreateKMatrixDiagnostic StokesViscous(void){7036 /*FUNCTION Penta::CreateKMatrixDiagnosticFSViscous {{{*/ 7037 ElementMatrix* Penta::CreateKMatrixDiagnosticFSViscous(void){ 7038 7038 7039 7039 /*Intermediaries */ 7040 7040 int i,approximation; 7041 IssmDouble Jdet,viscosity, stokesreconditioning;7041 IssmDouble Jdet,viscosity,FSreconditioning; 7042 7042 IssmDouble xyz_list[NUMVERTICES][3]; 7043 7043 IssmDouble epsilon[6]; /* epsilon=[exx,eyy,ezz,exy,exz,eyz];*/ … … 7049 7049 GaussPenta *gauss=NULL; 7050 7050 7051 /*If on water or not Stokes, skip stiffness: */7051 /*If on water or not FS, skip stiffness: */ 7052 7052 inputs->GetInputValue(&approximation,ApproximationEnum); 7053 if(approximation!= StokesApproximationEnum && approximation!=MacAyealStokesApproximationEnum && approximation!=PattynStokesApproximationEnum) return NULL;7054 ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters, StokesApproximationEnum);7053 if(approximation!=FSApproximationEnum && approximation!=MacAyealFSApproximationEnum && approximation!=HOFSApproximationEnum) return NULL; 7054 ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,FSApproximationEnum); 7055 7055 7056 7056 /*Retrieve all inputs and parameters*/ 7057 7057 GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES); 7058 parameters->FindParam(& stokesreconditioning,DiagnosticStokesreconditioningEnum);7058 parameters->FindParam(&FSreconditioning,DiagnosticFSreconditioningEnum); 7059 7059 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 7060 7060 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); … … 7068 7068 7069 7069 GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss); 7070 GetB Stokes(&B[0][0],&xyz_list[0][0],gauss);7071 GetBprime Stokes(&B_prime[0][0],&xyz_list[0][0],gauss);7070 GetBFS(&B[0][0],&xyz_list[0][0],gauss); 7071 GetBprimeFS(&B_prime[0][0],&xyz_list[0][0],gauss); 7072 7072 7073 7073 this->GetStrainRate3d(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input,vz_input); 7074 material->GetViscosity3d Stokes(&viscosity,&epsilon[0]);7074 material->GetViscosity3dFS(&viscosity,&epsilon[0]); 7075 7075 7076 7076 D_scalar=gauss->weight*Jdet; 7077 7077 for (i=0;i<6;i++) D[i][i]=D_scalar*2*viscosity; 7078 for (i=6;i<8;i++) D[i][i]=-D_scalar* stokesreconditioning;7078 for (i=6;i<8;i++) D[i][i]=-D_scalar*FSreconditioning; 7079 7079 7080 7080 TripleMultiply( &B[0][0],8,27,1, … … 7085 7085 7086 7086 /*Condensation*/ 7087 ReduceMatrix Stokes(Ke->values, &Ke_temp[0][0]);7087 ReduceMatrixFS(Ke->values, &Ke_temp[0][0]); 7088 7088 //Ke->Echo(); 7089 7089 //_error_("stop"); … … 7097 7097 } 7098 7098 /*}}}*/ 7099 /*FUNCTION Penta::CreateKMatrixDiagnostic StokesGLSViscous {{{*/7100 ElementMatrix* Penta::CreateKMatrixDiagnostic StokesGLSViscous(void){7099 /*FUNCTION Penta::CreateKMatrixDiagnosticFSGLSViscous {{{*/ 7100 ElementMatrix* Penta::CreateKMatrixDiagnosticFSGLSViscous(void){ 7101 7101 7102 7102 int numdof = NUMVERTICES*NDOF4; … … 7104 7104 /*Intermediaries */ 7105 7105 int i,j,approximation; 7106 IssmDouble Jdet,viscosity, stokesreconditioning,diameter,rigidity;7106 IssmDouble Jdet,viscosity,FSreconditioning,diameter,rigidity; 7107 7107 IssmDouble xyz_list[NUMVERTICES][3]; 7108 7108 IssmDouble epsilon[6]; /* epsilon=[exx,eyy,ezz,exy,exz,eyz];*/ … … 7128 7128 int c=3; //index of pressure 7129 7129 7130 /*If on water or not Stokes, skip stiffness: */7130 /*If on water or not FS, skip stiffness: */ 7131 7131 inputs->GetInputValue(&approximation,ApproximationEnum); 7132 if(approximation!= StokesApproximationEnum && approximation!=MacAyealStokesApproximationEnum && approximation!=PattynStokesApproximationEnum) return NULL;7133 ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters, StokesApproximationEnum);7132 if(approximation!=FSApproximationEnum && approximation!=MacAyealFSApproximationEnum && approximation!=HOFSApproximationEnum) return NULL; 7133 ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,FSApproximationEnum); 7134 7134 7135 7135 /*Retrieve all inputs and parameters*/ 7136 7136 GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES); 7137 parameters->FindParam(& stokesreconditioning,DiagnosticStokesreconditioningEnum);7137 parameters->FindParam(&FSreconditioning,DiagnosticFSreconditioningEnum); 7138 7138 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 7139 7139 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); … … 7165 7165 7166 7166 GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss); 7167 GetB StokesGLS(&B[0][0],&xyz_list[0][0],gauss);7168 GetBprime StokesGLS(&B_prime[0][0],&xyz_list[0][0],gauss);7167 GetBFSGLS(&B[0][0],&xyz_list[0][0],gauss); 7168 GetBprimeFSGLS(&B_prime[0][0],&xyz_list[0][0],gauss); 7169 7169 7170 7170 this->GetStrainRate3d(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input,vz_input); 7171 material->GetViscosity3d Stokes(&viscosity,&epsilon[0]);7171 material->GetViscosity3dFS(&viscosity,&epsilon[0]); 7172 7172 7173 7173 D_scalar=gauss->weight*Jdet; 7174 7174 for (i=0;i<6;i++) D[i][i]=D_scalar*2.*2.*viscosity; 7175 for (i=6;i<8;i++) D[i][i]=-D_scalar* stokesreconditioning;7175 for (i=6;i<8;i++) D[i][i]=-D_scalar*FSreconditioning; 7176 7176 7177 7177 TripleMultiply( &B[0][0],8,24,1, … … 7235 7235 } 7236 7236 /*}}}*/ 7237 /*FUNCTION Penta::CreateKMatrixDiagnostic StokesFriction{{{*/7238 ElementMatrix* Penta::CreateKMatrixDiagnostic StokesFriction(void){7237 /*FUNCTION Penta::CreateKMatrixDiagnosticFSFriction{{{*/ 7238 ElementMatrix* Penta::CreateKMatrixDiagnosticFSFriction(void){ 7239 7239 7240 7240 /*Constants*/ … … 7246 7246 int analysis_type,approximation; 7247 7247 IssmDouble alpha2,Jdet2d; 7248 IssmDouble stokesreconditioning,viscosity;7248 IssmDouble FSreconditioning,viscosity; 7249 7249 IssmDouble epsilon[6]; /* epsilon=[exx,eyy,ezz,exy,exz,eyz];*/ 7250 7250 IssmDouble xyz_list[NUMVERTICES][3]; 7251 7251 IssmDouble xyz_list_tria[NUMVERTICES2D][3]; 7252 IssmDouble L Stokes[2][numdof2d];7253 IssmDouble DL Stokes[2][2]={0.0};7252 IssmDouble LFS[2][numdof2d]; 7253 IssmDouble DLFS[2][2]={0.0}; 7254 7254 IssmDouble Ke_drag_gaussian[numdof2d][numdof2d]; 7255 7255 Friction* friction=NULL; 7256 7256 GaussPenta *gauss=NULL; 7257 7257 7258 /*If on water or not Stokes, skip stiffness: */7258 /*If on water or not FS, skip stiffness: */ 7259 7259 inputs->GetInputValue(&approximation,ApproximationEnum); 7260 if(IsFloating() || !IsOnBed() || (approximation!= StokesApproximationEnum && approximation!=MacAyealStokesApproximationEnum && approximation!=PattynStokesApproximationEnum)) return NULL;7261 ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters, StokesApproximationEnum);7260 if(IsFloating() || !IsOnBed() || (approximation!=FSApproximationEnum && approximation!=MacAyealFSApproximationEnum && approximation!=HOFSApproximationEnum)) return NULL; 7261 ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,FSApproximationEnum); 7262 7262 7263 7263 /*Retrieve all inputs and parameters*/ 7264 7264 GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES); 7265 7265 parameters->FindParam(&analysis_type,AnalysisTypeEnum); 7266 parameters->FindParam(& stokesreconditioning,DiagnosticStokesreconditioningEnum);7266 parameters->FindParam(&FSreconditioning,DiagnosticFSreconditioningEnum); 7267 7267 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 7268 7268 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); … … 7280 7280 7281 7281 GetTriaJacobianDeterminant(&Jdet2d, &xyz_list_tria[0][0],gauss); 7282 GetL Stokes(&LStokes[0][0], gauss);7282 GetLFS(&LFS[0][0], gauss); 7283 7283 7284 7284 this->GetStrainRate3d(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input,vz_input); 7285 material->GetViscosity3d Stokes(&viscosity,&epsilon[0]);7285 material->GetViscosity3dFS(&viscosity,&epsilon[0]); 7286 7286 7287 7287 friction->GetAlpha2(&alpha2, gauss,VxEnum,VyEnum,VzEnum); 7288 7288 7289 DL Stokes[0][0] = +alpha2*gauss->weight*Jdet2d; //taub_x = -alpha2 vx7290 DL Stokes[1][1] = +alpha2*gauss->weight*Jdet2d; //taub_y = -alpha2 vy7291 7292 TripleMultiply( &L Stokes[0][0],2,numdof2d,1,7293 &DL Stokes[0][0],2,2,0,7294 &L Stokes[0][0],2,numdof2d,0,7289 DLFS[0][0] = +alpha2*gauss->weight*Jdet2d; //taub_x = -alpha2 vx 7290 DLFS[1][1] = +alpha2*gauss->weight*Jdet2d; //taub_y = -alpha2 vy 7291 7292 TripleMultiply( &LFS[0][0],2,numdof2d,1, 7293 &DLFS[0][0],2,2,0, 7294 &LFS[0][0],2,numdof2d,0, 7295 7295 &Ke_drag_gaussian[0][0],0); 7296 7296 … … 7412 7412 } 7413 7413 /*}}}*/ 7414 /*FUNCTION Penta::CreatePVectorCouplingMacAyeal Stokes{{{*/7415 ElementVector* Penta::CreatePVectorCouplingMacAyeal Stokes(void){7414 /*FUNCTION Penta::CreatePVectorCouplingMacAyealFS {{{*/ 7415 ElementVector* Penta::CreatePVectorCouplingMacAyealFS(void){ 7416 7416 7417 7417 /*compute all load vectors for this element*/ 7418 ElementVector* pe1=CreatePVectorCouplingMacAyeal StokesViscous();7419 ElementVector* pe2=CreatePVectorCouplingMacAyeal StokesFriction();7418 ElementVector* pe1=CreatePVectorCouplingMacAyealFSViscous(); 7419 ElementVector* pe2=CreatePVectorCouplingMacAyealFSFriction(); 7420 7420 ElementVector* pe =new ElementVector(pe1,pe2); 7421 7421 … … 7426 7426 } 7427 7427 /*}}}*/ 7428 /*FUNCTION Penta::CreatePVectorCouplingMacAyeal StokesViscous {{{*/7429 ElementVector* Penta::CreatePVectorCouplingMacAyeal StokesViscous(void){7428 /*FUNCTION Penta::CreatePVectorCouplingMacAyealFSViscous {{{*/ 7429 ElementVector* Penta::CreatePVectorCouplingMacAyealFSViscous(void){ 7430 7430 7431 7431 /*Constants*/ … … 7436 7436 int approximation; 7437 7437 IssmDouble viscosity,Jdet; 7438 IssmDouble stokesreconditioning;7438 IssmDouble FSreconditioning; 7439 7439 IssmDouble epsilon[6]; /* epsilon=[exx,eyy,ezz,exy,exz,eyz];*/ 7440 7440 IssmDouble dw[3]; … … 7446 7446 /*Initialize Element vector and return if necessary*/ 7447 7447 inputs->GetInputValue(&approximation,ApproximationEnum); 7448 if(approximation!=MacAyeal StokesApproximationEnum) return NULL;7449 ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters, StokesApproximationEnum);7448 if(approximation!=MacAyealFSApproximationEnum) return NULL; 7449 ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters,FSApproximationEnum); 7450 7450 7451 7451 /*Retrieve all inputs and parameters*/ 7452 7452 GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES); 7453 this->parameters->FindParam(& stokesreconditioning,DiagnosticStokesreconditioningEnum);7453 this->parameters->FindParam(&FSreconditioning,DiagnosticFSreconditioningEnum); 7454 7454 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 7455 7455 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); 7456 7456 Input* vz_input=inputs->GetInput(VzEnum); _assert_(vz_input); 7457 Input* vz macayeal_input=inputs->GetInput(VzMacAyealEnum); _assert_(vzmacayeal_input);7457 Input* vzSSA_input=inputs->GetInput(VzMacAyealEnum); _assert_(vzSSA_input); 7458 7458 7459 7459 /* Start looping on the number of gaussian points: */ … … 7467 7467 GetNodalFunctionsP1Derivatives(&dbasis[0][0],&xyz_list[0][0], gauss); 7468 7468 7469 vz macayeal_input->GetInputDerivativeValue(&dw[0],&xyz_list[0][0],gauss);7469 vzSSA_input->GetInputDerivativeValue(&dw[0],&xyz_list[0][0],gauss); 7470 7470 7471 7471 this->GetStrainRate3d(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input,vz_input); 7472 material->GetViscosity3d Stokes(&viscosity,&epsilon[0]);7472 material->GetViscosity3dFS(&viscosity,&epsilon[0]); 7473 7473 7474 7474 for(i=0;i<NUMVERTICES;i++){ … … 7476 7476 pe->values[i*NDOF4+1]+=-Jdet*gauss->weight*viscosity*dw[1]*dbasis[2][i]; 7477 7477 pe->values[i*NDOF4+2]+=-Jdet*gauss->weight*viscosity*(dw[0]*dbasis[0][i]+dw[1]*dbasis[1][i]+2*dw[2]*dbasis[2][i]); 7478 pe->values[i*NDOF4+3]+=Jdet*gauss->weight* stokesreconditioning*dw[2]*basis[i];7478 pe->values[i*NDOF4+3]+=Jdet*gauss->weight*FSreconditioning*dw[2]*basis[i]; 7479 7479 } 7480 7480 } … … 7488 7488 } 7489 7489 /*}}}*/ 7490 /*FUNCTION Penta::CreatePVectorCouplingMacAyeal StokesFriction{{{*/7491 ElementVector* Penta::CreatePVectorCouplingMacAyeal StokesFriction(void){7490 /*FUNCTION Penta::CreatePVectorCouplingMacAyealFSFriction{{{*/ 7491 ElementVector* Penta::CreatePVectorCouplingMacAyealFSFriction(void){ 7492 7492 7493 7493 /*Constants*/ … … 7498 7498 int approximation,analysis_type; 7499 7499 IssmDouble Jdet,Jdet2d; 7500 IssmDouble stokesreconditioning;7500 IssmDouble FSreconditioning; 7501 7501 IssmDouble bed_normal[3]; 7502 7502 IssmDouble epsilon[6]; /* epsilon=[exx,eyy,ezz,exy,exz,eyz];*/ … … 7513 7513 if(!IsOnBed() || IsFloating()) return NULL; 7514 7514 inputs->GetInputValue(&approximation,ApproximationEnum); 7515 if(approximation!=MacAyeal StokesApproximationEnum) return NULL;7516 ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters, StokesApproximationEnum);7515 if(approximation!=MacAyealFSApproximationEnum) return NULL; 7516 ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters,FSApproximationEnum); 7517 7517 7518 7518 /*Retrieve all inputs and parameters*/ 7519 7519 GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES); 7520 7520 parameters->FindParam(&analysis_type,AnalysisTypeEnum); 7521 this->parameters->FindParam(& stokesreconditioning,DiagnosticStokesreconditioningEnum);7521 this->parameters->FindParam(&FSreconditioning,DiagnosticFSreconditioningEnum); 7522 7522 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 7523 7523 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); 7524 7524 Input* vz_input=inputs->GetInput(VzEnum); _assert_(vz_input); 7525 Input* vz macayeal_input=inputs->GetInput(VzMacAyealEnum); _assert_(vzmacayeal_input);7525 Input* vzSSA_input=inputs->GetInput(VzMacAyealEnum); _assert_(vzSSA_input); 7526 7526 7527 7527 for(i=0;i<NUMVERTICES2D;i++) for(j=0;j<3;j++) xyz_list_tria[i][j]=xyz_list[i][j]; … … 7539 7539 GetNodalFunctionsP1(basis, gauss); 7540 7540 7541 vz macayeal_input->GetInputValue(&w, gauss);7542 vz macayeal_input->GetInputDerivativeValue(&dw[0],&xyz_list[0][0],gauss);7541 vzSSA_input->GetInputValue(&w, gauss); 7542 vzSSA_input->GetInputDerivativeValue(&dw[0],&xyz_list[0][0],gauss); 7543 7543 7544 7544 BedNormal(&bed_normal[0],xyz_list_tria); 7545 7545 this->GetStrainRate3d(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input,vz_input); 7546 material->GetViscosity3d Stokes(&viscosity,&epsilon[0]);7546 material->GetViscosity3dFS(&viscosity,&epsilon[0]); 7547 7547 friction->GetAlpha2(&alpha2_gauss, gauss,VxEnum,VyEnum,VzEnum); 7548 7548 … … 7563 7563 } 7564 7564 /*}}}*/ 7565 /*FUNCTION Penta::CreatePVectorCoupling PattynStokes{{{*/7566 ElementVector* Penta::CreatePVectorCoupling PattynStokes(void){7565 /*FUNCTION Penta::CreatePVectorCouplingHOFS {{{*/ 7566 ElementVector* Penta::CreatePVectorCouplingHOFS(void){ 7567 7567 7568 7568 /*compute all load vectors for this element*/ 7569 ElementVector* pe1=CreatePVectorCoupling PattynStokesViscous();7570 ElementVector* pe2=CreatePVectorCoupling PattynStokesFriction();7569 ElementVector* pe1=CreatePVectorCouplingHOFSViscous(); 7570 ElementVector* pe2=CreatePVectorCouplingHOFSFriction(); 7571 7571 ElementVector* pe =new ElementVector(pe1,pe2); 7572 7572 … … 7577 7577 } 7578 7578 /*}}}*/ 7579 /*FUNCTION Penta::CreatePVectorCoupling PattynStokesViscous {{{*/7580 ElementVector* Penta::CreatePVectorCoupling PattynStokesViscous(void){7579 /*FUNCTION Penta::CreatePVectorCouplingHOFSViscous {{{*/ 7580 ElementVector* Penta::CreatePVectorCouplingHOFSViscous(void){ 7581 7581 7582 7582 /*Constants*/ … … 7587 7587 int approximation; 7588 7588 IssmDouble viscosity,Jdet; 7589 IssmDouble stokesreconditioning;7589 IssmDouble FSreconditioning; 7590 7590 IssmDouble epsilon[6]; /* epsilon=[exx,eyy,ezz,exy,exz,eyz];*/ 7591 7591 IssmDouble dw[3]; … … 7597 7597 /*Initialize Element vector and return if necessary*/ 7598 7598 inputs->GetInputValue(&approximation,ApproximationEnum); 7599 if(approximation!= PattynStokesApproximationEnum) return NULL;7600 ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters, StokesApproximationEnum);7599 if(approximation!=HOFSApproximationEnum) return NULL; 7600 ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters,FSApproximationEnum); 7601 7601 7602 7602 /*Retrieve all inputs and parameters*/ 7603 7603 GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES); 7604 this->parameters->FindParam(& stokesreconditioning,DiagnosticStokesreconditioningEnum);7604 this->parameters->FindParam(&FSreconditioning,DiagnosticFSreconditioningEnum); 7605 7605 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 7606 7606 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); 7607 7607 Input* vz_input=inputs->GetInput(VzEnum); _assert_(vz_input); 7608 Input* vz pattyn_input=inputs->GetInput(VzPattynEnum); _assert_(vzpattyn_input);7608 Input* vzHO_input=inputs->GetInput(VzHOEnum); _assert_(vzHO_input); 7609 7609 7610 7610 /* Start looping on the number of gaussian points: */ … … 7618 7618 GetNodalFunctionsP1Derivatives(&dbasis[0][0],&xyz_list[0][0], gauss); 7619 7619 7620 vz pattyn_input->GetInputDerivativeValue(&dw[0],&xyz_list[0][0],gauss);7620 vzHO_input->GetInputDerivativeValue(&dw[0],&xyz_list[0][0],gauss); 7621 7621 7622 7622 this->GetStrainRate3d(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input,vz_input); 7623 material->GetViscosity3d Stokes(&viscosity,&epsilon[0]);7623 material->GetViscosity3dFS(&viscosity,&epsilon[0]); 7624 7624 7625 7625 for(i=0;i<NUMVERTICES;i++){ … … 7627 7627 pe->values[i*NDOF4+1]+=-Jdet*gauss->weight*viscosity*dw[1]*dbasis[2][i]; 7628 7628 pe->values[i*NDOF4+2]+=-Jdet*gauss->weight*viscosity*(dw[0]*dbasis[0][i]+dw[1]*dbasis[1][i]+2*dw[2]*dbasis[2][i]); 7629 pe->values[i*NDOF4+3]+=Jdet*gauss->weight* stokesreconditioning*dw[2]*basis[i];7629 pe->values[i*NDOF4+3]+=Jdet*gauss->weight*FSreconditioning*dw[2]*basis[i]; 7630 7630 } 7631 7631 } … … 7639 7639 } 7640 7640 /*}}}*/ 7641 /*FUNCTION Penta::CreatePVectorCoupling PattynStokesFriction{{{*/7642 ElementVector* Penta::CreatePVectorCoupling PattynStokesFriction(void){7641 /*FUNCTION Penta::CreatePVectorCouplingHOFSFriction{{{*/ 7642 ElementVector* Penta::CreatePVectorCouplingHOFSFriction(void){ 7643 7643 7644 7644 /*Constants*/ … … 7649 7649 int approximation,analysis_type; 7650 7650 IssmDouble Jdet,Jdet2d; 7651 IssmDouble stokesreconditioning;7651 IssmDouble FSreconditioning; 7652 7652 IssmDouble bed_normal[3]; 7653 7653 IssmDouble epsilon[6]; /* epsilon=[exx,eyy,ezz,exy,exz,eyz];*/ … … 7664 7664 if(!IsOnBed() || IsFloating()) return NULL; 7665 7665 inputs->GetInputValue(&approximation,ApproximationEnum); 7666 if(approximation!= PattynStokesApproximationEnum) return NULL;7667 ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters, StokesApproximationEnum);7666 if(approximation!=HOFSApproximationEnum) return NULL; 7667 ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters,FSApproximationEnum); 7668 7668 7669 7669 /*Retrieve all inputs and parameters*/ 7670 7670 GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES); 7671 7671 parameters->FindParam(&analysis_type,AnalysisTypeEnum); 7672 this->parameters->FindParam(& stokesreconditioning,DiagnosticStokesreconditioningEnum);7672 this->parameters->FindParam(&FSreconditioning,DiagnosticFSreconditioningEnum); 7673 7673 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 7674 7674 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); 7675 7675 Input* vz_input=inputs->GetInput(VzEnum); _assert_(vz_input); 7676 Input* vz pattyn_input=inputs->GetInput(VzPattynEnum); _assert_(vzpattyn_input);7676 Input* vzHO_input=inputs->GetInput(VzHOEnum); _assert_(vzHO_input); 7677 7677 7678 7678 for(i=0;i<NUMVERTICES2D;i++) for(j=0;j<3;j++) xyz_list_tria[i][j]=xyz_list[i][j]; … … 7690 7690 GetNodalFunctionsP1(basis, gauss); 7691 7691 7692 vz pattyn_input->GetInputValue(&w, gauss);7693 vz pattyn_input->GetInputDerivativeValue(&dw[0],&xyz_list[0][0],gauss);7692 vzHO_input->GetInputValue(&w, gauss); 7693 vzHO_input->GetInputDerivativeValue(&dw[0],&xyz_list[0][0],gauss); 7694 7694 7695 7695 BedNormal(&bed_normal[0],xyz_list_tria); 7696 7696 this->GetStrainRate3d(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input,vz_input); 7697 material->GetViscosity3d Stokes(&viscosity,&epsilon[0]);7697 material->GetViscosity3dFS(&viscosity,&epsilon[0]); 7698 7698 friction->GetAlpha2(&alpha2_gauss, gauss,VxEnum,VyEnum,VzEnum); 7699 7699 … … 7723 7723 case MacAyealApproximationEnum: 7724 7724 return CreatePVectorDiagnosticMacAyeal(); 7725 case PattynApproximationEnum:7726 return CreatePVectorDiagnostic Pattyn();7725 case HOApproximationEnum: 7726 return CreatePVectorDiagnosticHO(); 7727 7727 case L1L2ApproximationEnum: 7728 7728 return CreatePVectorDiagnosticL1L2(); 7729 case HutterApproximationEnum:7729 case SIAApproximationEnum: 7730 7730 return NULL; 7731 7731 case NoneApproximationEnum: 7732 7732 return NULL; 7733 case StokesApproximationEnum:7734 return CreatePVectorDiagnostic Stokes();7735 case MacAyeal PattynApproximationEnum:7736 return CreatePVectorDiagnosticMacAyeal Pattyn();7737 case MacAyeal StokesApproximationEnum:7738 return CreatePVectorDiagnosticMacAyeal Stokes();7739 case PattynStokesApproximationEnum:7740 return CreatePVectorDiagnostic PattynStokes();7733 case FSApproximationEnum: 7734 return CreatePVectorDiagnosticFS(); 7735 case MacAyealHOApproximationEnum: 7736 return CreatePVectorDiagnosticMacAyealHO(); 7737 case MacAyealFSApproximationEnum: 7738 return CreatePVectorDiagnosticMacAyealFS(); 7739 case HOFSApproximationEnum: 7740 return CreatePVectorDiagnosticHOFS(); 7741 7741 default: 7742 7742 _error_("Approximation " << EnumToStringx(approximation) << " not supported yet"); … … 7744 7744 } 7745 7745 /*}}}*/ 7746 /*FUNCTION Penta::CreatePVectorDiagnosticMacAyeal Pattyn{{{*/7747 ElementVector* Penta::CreatePVectorDiagnosticMacAyeal Pattyn(void){7746 /*FUNCTION Penta::CreatePVectorDiagnosticMacAyealHO{{{*/ 7747 ElementVector* Penta::CreatePVectorDiagnosticMacAyealHO(void){ 7748 7748 7749 7749 /*compute all load vectors for this element*/ 7750 7750 ElementVector* pe1=CreatePVectorDiagnosticMacAyeal(); 7751 ElementVector* pe2=CreatePVectorDiagnostic Pattyn();7751 ElementVector* pe2=CreatePVectorDiagnosticHO(); 7752 7752 ElementVector* pe =new ElementVector(pe1,pe2); 7753 7753 … … 7758 7758 } 7759 7759 /*}}}*/ 7760 /*FUNCTION Penta::CreatePVectorDiagnosticMacAyeal Stokes{{{*/7761 ElementVector* Penta::CreatePVectorDiagnosticMacAyeal Stokes(void){7760 /*FUNCTION Penta::CreatePVectorDiagnosticMacAyealFS{{{*/ 7761 ElementVector* Penta::CreatePVectorDiagnosticMacAyealFS(void){ 7762 7762 7763 7763 /*compute all load vectors for this element*/ 7764 7764 ElementVector* pe1=CreatePVectorDiagnosticMacAyeal(); 7765 ElementVector* pe2=CreatePVectorDiagnostic Stokes();7766 ElementVector* pe3=CreatePVectorCouplingMacAyeal Stokes();7765 ElementVector* pe2=CreatePVectorDiagnosticFS(); 7766 ElementVector* pe3=CreatePVectorCouplingMacAyealFS(); 7767 7767 ElementVector* pe =new ElementVector(pe1,pe2,pe3); 7768 7768 … … 7774 7774 } 7775 7775 /*}}}*/ 7776 /*FUNCTION Penta::CreatePVectorDiagnostic PattynStokes{{{*/7777 ElementVector* Penta::CreatePVectorDiagnostic PattynStokes(void){7776 /*FUNCTION Penta::CreatePVectorDiagnosticHOFS{{{*/ 7777 ElementVector* Penta::CreatePVectorDiagnosticHOFS(void){ 7778 7778 7779 7779 /*compute all load vectors for this element*/ 7780 ElementVector* pe1=CreatePVectorDiagnostic Pattyn();7781 ElementVector* pe2=CreatePVectorDiagnostic Stokes();7782 ElementVector* pe3=CreatePVectorCoupling PattynStokes();7780 ElementVector* pe1=CreatePVectorDiagnosticHO(); 7781 ElementVector* pe2=CreatePVectorDiagnosticFS(); 7782 ElementVector* pe3=CreatePVectorCouplingHOFS(); 7783 7783 ElementVector* pe =new ElementVector(pe1,pe2,pe3); 7784 7784 … … 7790 7790 } 7791 7791 /*}}}*/ 7792 /*FUNCTION Penta::CreatePVectorDiagnostic Hutter{{{*/7793 ElementVector* Penta::CreatePVectorDiagnostic Hutter(void){7792 /*FUNCTION Penta::CreatePVectorDiagnosticSIA{{{*/ 7793 ElementVector* Penta::CreatePVectorDiagnosticSIA(void){ 7794 7794 7795 7795 /*Intermediaries*/ … … 7903 7903 } 7904 7904 /*}}}*/ 7905 /*FUNCTION Penta::CreatePVectorDiagnostic Pattyn{{{*/7906 ElementVector* Penta::CreatePVectorDiagnostic Pattyn(void){7905 /*FUNCTION Penta::CreatePVectorDiagnosticHO{{{*/ 7906 ElementVector* Penta::CreatePVectorDiagnosticHO(void){ 7907 7907 7908 7908 /*compute all load vectors for this element*/ 7909 ElementVector* pe1=CreatePVectorDiagnostic PattynDrivingStress();7910 ElementVector* pe2=CreatePVectorDiagnostic PattynFront();7909 ElementVector* pe1=CreatePVectorDiagnosticHODrivingStress(); 7910 ElementVector* pe2=CreatePVectorDiagnosticHOFront(); 7911 7911 ElementVector* pe =new ElementVector(pe1,pe2); 7912 7912 … … 7917 7917 } 7918 7918 /*}}}*/ 7919 /*FUNCTION Penta::CreatePVectorDiagnostic PattynDrivingStress{{{*/7920 ElementVector* Penta::CreatePVectorDiagnostic PattynDrivingStress(void){7919 /*FUNCTION Penta::CreatePVectorDiagnosticHODrivingStress{{{*/ 7920 ElementVector* Penta::CreatePVectorDiagnosticHODrivingStress(void){ 7921 7921 7922 7922 /*Constants*/ … … 7933 7933 7934 7934 /*Initialize Element vector*/ 7935 ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters, PattynApproximationEnum);7935 ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters,HOApproximationEnum); 7936 7936 7937 7937 /*Retrieve all inputs and parameters*/ … … 7965 7965 } 7966 7966 /*}}}*/ 7967 /*FUNCTION Penta::CreatePVectorDiagnostic PattynFront{{{*/7968 ElementVector* Penta::CreatePVectorDiagnostic PattynFront(void){7967 /*FUNCTION Penta::CreatePVectorDiagnosticHOFront{{{*/ 7968 ElementVector* Penta::CreatePVectorDiagnosticHOFront(void){ 7969 7969 7970 7970 /*Intermediaries */ … … 8000 8000 8001 8001 GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES); 8002 ElementVector* pe=new ElementVector(nodes,numnodes,this->parameters, PattynApproximationEnum);8002 ElementVector* pe=new ElementVector(nodes,numnodes,this->parameters,HOApproximationEnum); 8003 8003 Input* surface_input=inputs->GetInput(SurfaceEnum); _assert_(surface_input); 8004 8004 rho_water=matpar->GetRhoWater(); … … 8043 8043 } 8044 8044 /*}}}*/ 8045 /*FUNCTION Penta::CreatePVectorDiagnostic Stokes{{{*/8046 ElementVector* Penta::CreatePVectorDiagnostic Stokes(void){8047 8048 int fe_ stokes;8045 /*FUNCTION Penta::CreatePVectorDiagnosticFS {{{*/ 8046 ElementVector* Penta::CreatePVectorDiagnosticFS(void){ 8047 8048 int fe_FS; 8049 8049 ElementVector* pe1; 8050 8050 ElementVector* pe2; 8051 8051 ElementVector* pe3; 8052 8052 ElementVector* pe; 8053 parameters->FindParam(&fe_ stokes,FlowequationFeStokesEnum);8054 8055 switch(fe_ stokes){8053 parameters->FindParam(&fe_FS,FlowequationFeFSEnum); 8054 8055 switch(fe_FS){ 8056 8056 case 0: 8057 8057 /*compute all stiffness matrices for this element*/ 8058 pe1=CreatePVectorDiagnostic StokesViscous();8059 pe2=CreatePVectorDiagnostic StokesShelf();8060 pe3=CreatePVectorDiagnostic StokesFront();8058 pe1=CreatePVectorDiagnosticFSViscous(); 8059 pe2=CreatePVectorDiagnosticFSShelf(); 8060 pe3=CreatePVectorDiagnosticFSFront(); 8061 8061 pe =new ElementVector(pe1,pe2,pe3); 8062 8062 break; 8063 8063 case 1: 8064 8064 /*compute all stiffness matrices for this element*/ 8065 pe1=CreatePVectorDiagnostic StokesGLSViscous();8066 pe2=CreatePVectorDiagnostic StokesShelf();8067 pe3=CreatePVectorDiagnostic StokesFront();8065 pe1=CreatePVectorDiagnosticFSGLSViscous(); 8066 pe2=CreatePVectorDiagnosticFSShelf(); 8067 pe3=CreatePVectorDiagnosticFSFront(); 8068 8068 pe =new ElementVector(pe1,pe2,pe3); 8069 8069 break; 8070 8070 default: 8071 _error_("Finite element" << fe_ stokes<< " not supported yet");8071 _error_("Finite element" << fe_FS << " not supported yet"); 8072 8072 } 8073 8073 … … 8080 8080 } 8081 8081 /*}}}*/ 8082 /*FUNCTION Penta::CreatePVectorDiagnostic StokesViscous {{{*/8083 ElementVector* Penta::CreatePVectorDiagnostic StokesViscous(void){8082 /*FUNCTION Penta::CreatePVectorDiagnosticFSViscous {{{*/ 8083 ElementVector* Penta::CreatePVectorDiagnosticFSViscous(void){ 8084 8084 8085 8085 /*Constants*/ … … 8090 8090 int approximation; 8091 8091 IssmDouble Jdet,viscosity; 8092 IssmDouble gravity,rho_ice, stokesreconditioning;8092 IssmDouble gravity,rho_ice,FSreconditioning; 8093 8093 IssmDouble forcex,forcey,forcez; 8094 8094 IssmDouble xyz_list[NUMVERTICES][3]; … … 8106 8106 /*Initialize Element vector and return if necessary*/ 8107 8107 inputs->GetInputValue(&approximation,ApproximationEnum); 8108 if(approximation!= StokesApproximationEnum && approximation!=MacAyealStokesApproximationEnum && approximation!=PattynStokesApproximationEnum) return NULL;8109 ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters, StokesApproximationEnum);8108 if(approximation!=FSApproximationEnum && approximation!=MacAyealFSApproximationEnum && approximation!=HOFSApproximationEnum) return NULL; 8109 ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters,FSApproximationEnum); 8110 8110 8111 8111 /*Retrieve all inputs and parameters*/ 8112 this->parameters->FindParam(& stokesreconditioning,DiagnosticStokesreconditioningEnum);8112 this->parameters->FindParam(&FSreconditioning,DiagnosticFSreconditioningEnum); 8113 8113 rho_ice=matpar->GetRhoIce(); 8114 8114 gravity=matpar->GetG(); … … 8128 8128 8129 8129 GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss); 8130 GetB Stokes(&B[0][0],&xyz_list[0][0],gauss);8131 GetBprime Stokes(&B_prime[0][0],&xyz_list[0][0], gauss);8130 GetBFS(&B[0][0],&xyz_list[0][0],gauss); 8131 GetBprimeFS(&B_prime[0][0],&xyz_list[0][0], gauss); 8132 8132 GetNodalFunctionsMINI(&l1l7[0], gauss); 8133 8133 8134 8134 this->GetStrainRate3d(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input,vz_input); 8135 material->GetViscosity3d Stokes(&viscosity,&epsilon[0]);8135 material->GetViscosity3dFS(&viscosity,&epsilon[0]); 8136 8136 8137 8137 loadingforcex_input->GetInputValue(&forcex, gauss); … … 8151 8151 D_scalar=gauss->weight*Jdet; 8152 8152 for (i=0;i<6;i++) D[i][i]=D_scalar*2*viscosity; 8153 for (i=6;i<8;i++) D[i][i]=-D_scalar* stokesreconditioning;8153 for (i=6;i<8;i++) D[i][i]=-D_scalar*FSreconditioning; 8154 8154 8155 8155 TripleMultiply(&B[0][0],8,numdofbubble,1, … … 8160 8160 8161 8161 /*Condensation*/ 8162 ReduceVector Stokes(pe->values, &Ke_temp[0][0], &Pe_gaussian[0]);8162 ReduceVectorFS(pe->values, &Ke_temp[0][0], &Pe_gaussian[0]); 8163 8163 8164 8164 /*Transform coordinate system*/ … … 8170 8170 } 8171 8171 /*}}}*/ 8172 /*FUNCTION Penta::CreatePVectorDiagnostic StokesFront{{{*/8173 ElementVector* Penta::CreatePVectorDiagnostic StokesFront(void){8172 /*FUNCTION Penta::CreatePVectorDiagnosticFSFront{{{*/ 8173 ElementVector* Penta::CreatePVectorDiagnosticFSFront(void){ 8174 8174 8175 8175 /*Intermediaries */ … … 8205 8205 8206 8206 GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES); 8207 ElementVector* pe=new ElementVector(nodes,numnodes,this->parameters, StokesApproximationEnum);8207 ElementVector* pe=new ElementVector(nodes,numnodes,this->parameters,FSApproximationEnum); 8208 8208 rho_water=matpar->GetRhoWater(); 8209 8209 rho_ice =matpar->GetRhoIce(); … … 8247 8247 } 8248 8248 /*}}}*/ 8249 /*FUNCTION Penta::CreatePVectorDiagnostic StokesGLSViscous {{{*/8250 ElementVector* Penta::CreatePVectorDiagnostic StokesGLSViscous(void){8249 /*FUNCTION Penta::CreatePVectorDiagnosticFSGLSViscous {{{*/ 8250 ElementVector* Penta::CreatePVectorDiagnosticFSGLSViscous(void){ 8251 8251 8252 8252 /*Constants*/ … … 8257 8257 int approximation; 8258 8258 IssmDouble Jdet,gravity,rho_ice,B,D_scalar_stab,viscosity; 8259 IssmDouble forcex,forcey,forcez,diameter, stokesreconditioning;8259 IssmDouble forcex,forcey,forcez,diameter,FSreconditioning; 8260 8260 IssmDouble xyz_list[NUMVERTICES][3]; 8261 8261 IssmDouble epsilon[6]; /* epsilon=[exx,eyy,ezz,exy,exz,eyz];*/ … … 8276 8276 /*Initialize Element vector and return if necessary*/ 8277 8277 inputs->GetInputValue(&approximation,ApproximationEnum); 8278 if(approximation!= StokesApproximationEnum && approximation!=MacAyealStokesApproximationEnum && approximation!=PattynStokesApproximationEnum) return NULL;8279 parameters->FindParam(& stokesreconditioning,DiagnosticStokesreconditioningEnum);8280 ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters, StokesApproximationEnum);8278 if(approximation!=FSApproximationEnum && approximation!=MacAyealFSApproximationEnum && approximation!=HOFSApproximationEnum) return NULL; 8279 parameters->FindParam(&FSreconditioning,DiagnosticFSreconditioningEnum); 8280 ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters,FSApproximationEnum); 8281 8281 8282 8282 /*Retrieve all inputs and parameters*/ … … 8318 8318 GetNodalFunctionsP1(&l1l6[0], gauss); 8319 8319 this->GetStrainRate3d(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input,vz_input); 8320 material->GetViscosity3d Stokes(&viscosity,&epsilon[0]);8320 material->GetViscosity3dFS(&viscosity,&epsilon[0]); 8321 8321 8322 8322 loadingforcex_input->GetInputValue(&forcex, gauss); … … 8372 8372 } 8373 8373 /*}}}*/ 8374 /*FUNCTION Penta::CreatePVectorDiagnostic StokesShelf{{{*/8375 ElementVector* Penta::CreatePVectorDiagnostic StokesShelf(void){8374 /*FUNCTION Penta::CreatePVectorDiagnosticFSShelf{{{*/ 8375 ElementVector* Penta::CreatePVectorDiagnosticFSShelf(void){ 8376 8376 8377 8377 /*Intermediaries*/ … … 8392 8392 inputs->GetInputValue(&approximation,ApproximationEnum); 8393 8393 this->parameters->FindParam(&shelf_dampening,DiagnosticShelfDampeningEnum); 8394 if(approximation!= StokesApproximationEnum && approximation!=MacAyealStokesApproximationEnum && approximation!=PattynStokesApproximationEnum) return NULL;8395 ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters, StokesApproximationEnum);8394 if(approximation!=FSApproximationEnum && approximation!=MacAyealFSApproximationEnum && approximation!=HOFSApproximationEnum) return NULL; 8395 ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters,FSApproximationEnum); 8396 8396 8397 8397 /*Retrieve all inputs and parameters*/ … … 8477 8477 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 8478 8478 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); 8479 Input* vz stokes_input=NULL;8480 if(approximation== PattynStokesApproximationEnum || approximation==MacAyealStokesApproximationEnum){8481 vz stokes_input=inputs->GetInput(VzStokesEnum); _assert_(vzstokes_input);8479 Input* vzFS_input=NULL; 8480 if(approximation==HOFSApproximationEnum || approximation==MacAyealFSApproximationEnum){ 8481 vzFS_input=inputs->GetInput(VzFSEnum); _assert_(vzFS_input); 8482 8482 } 8483 8483 … … 8493 8493 vx_input->GetInputDerivativeValue(&du[0],&xyz_list[0][0],gauss); 8494 8494 vy_input->GetInputDerivativeValue(&dv[0],&xyz_list[0][0],gauss); 8495 if(approximation== PattynStokesApproximationEnum || approximation==MacAyealStokesApproximationEnum){8496 vz stokes_input->GetInputDerivativeValue(&dw[0],&xyz_list[0][0],gauss);8495 if(approximation==HOFSApproximationEnum || approximation==MacAyealFSApproximationEnum){ 8496 vzFS_input->GetInputDerivativeValue(&dw[0],&xyz_list[0][0],gauss); 8497 8497 dwdz=dw[2]; 8498 8498 } … … 8539 8539 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 8540 8540 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); 8541 Input* vz stokes_input=NULL;8542 if(approximation== PattynStokesApproximationEnum || approximation==MacAyealStokesApproximationEnum){8543 vz stokes_input=inputs->GetInput(VzStokesEnum); _assert_(vzstokes_input);8541 Input* vzFS_input=NULL; 8542 if(approximation==HOFSApproximationEnum || approximation==MacAyealFSApproximationEnum){ 8543 vzFS_input=inputs->GetInput(VzFSEnum); _assert_(vzFS_input); 8544 8544 } 8545 8545 … … 8554 8554 vx_input->GetInputValue(&vx, gauss); 8555 8555 vy_input->GetInputValue(&vy, gauss); 8556 if(approximation== PattynStokesApproximationEnum || approximation==MacAyealStokesApproximationEnum){8557 vz stokes_input->GetInputValue(&vz, gauss);8556 if(approximation==HOFSApproximationEnum || approximation==MacAyealFSApproximationEnum){ 8557 vzFS_input->GetInputValue(&vz, gauss); 8558 8558 } 8559 8559 else vz=0; … … 8581 8581 switch(approximation){ 8582 8582 case MacAyealApproximationEnum: 8583 return CreateJacobianDiagnostic Macayeal2d();8584 case PattynApproximationEnum:8585 return CreateJacobianDiagnostic Pattyn();8586 case StokesApproximationEnum:8587 return CreateJacobianDiagnostic Stokes();8583 return CreateJacobianDiagnosticSSA2d(); 8584 case HOApproximationEnum: 8585 return CreateJacobianDiagnosticHO(); 8586 case FSApproximationEnum: 8587 return CreateJacobianDiagnosticFS(); 8588 8588 case NoneApproximationEnum: 8589 8589 return NULL; … … 8593 8593 } 8594 8594 /*}}}*/ 8595 /*FUNCTION Penta::CreateJacobianDiagnostic Macayeal2d{{{*/8596 ElementMatrix* Penta::CreateJacobianDiagnostic Macayeal2d(void){8595 /*FUNCTION Penta::CreateJacobianDiagnosticSSA2d{{{*/ 8596 ElementMatrix* Penta::CreateJacobianDiagnosticSSA2d(void){ 8597 8597 8598 8598 /*Figure out if this penta is collapsed. If so, then bailout, except if it is at the … … 8616 8616 /*Call Tria function*/ 8617 8617 Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria. 8618 ElementMatrix* Ke=tria->CreateJacobianDiagnostic Macayeal();8618 ElementMatrix* Ke=tria->CreateJacobianDiagnosticSSA(); 8619 8619 delete tria->material; delete tria; 8620 8620 … … 8627 8627 } 8628 8628 /*}}}*/ 8629 /*FUNCTION Penta::CreateJacobianDiagnostic Pattyn{{{*/8630 ElementMatrix* Penta::CreateJacobianDiagnostic Pattyn(void){8629 /*FUNCTION Penta::CreateJacobianDiagnosticHO{{{*/ 8630 ElementMatrix* Penta::CreateJacobianDiagnosticHO(void){ 8631 8631 8632 8632 /*Constants*/ … … 8645 8645 GaussPenta *gauss=NULL; 8646 8646 8647 /*Initialize Jacobian with regular Pattyn(first part of the Gateau derivative)*/8648 ElementMatrix* Ke=CreateKMatrixDiagnostic Pattyn();8647 /*Initialize Jacobian with regular HO (first part of the Gateau derivative)*/ 8648 ElementMatrix* Ke=CreateKMatrixDiagnosticHO(); 8649 8649 8650 8650 /*Retrieve all inputs and parameters*/ … … 8662 8662 GetNodalFunctionsP1Derivatives(&dphi[0][0],&xyz_list[0][0],gauss); 8663 8663 8664 this->GetStrainRate3d Pattyn(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input);8664 this->GetStrainRate3dHO(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input); 8665 8665 material->GetViscosityDerivativeEpsSquare(&mu_prime,&epsilon[0]); 8666 8666 eps1[0]=2*epsilon[0]+epsilon[1]; eps2[0]=epsilon[2]; … … 8691 8691 } 8692 8692 /*}}}*/ 8693 /*FUNCTION Penta::CreateJacobianDiagnostic Stokes{{{*/8694 ElementMatrix* Penta::CreateJacobianDiagnostic Stokes(void){8693 /*FUNCTION Penta::CreateJacobianDiagnosticFS{{{*/ 8694 ElementMatrix* Penta::CreateJacobianDiagnosticFS(void){ 8695 8695 8696 8696 /*Constants*/ … … 8710 8710 GaussPenta *gauss=NULL; 8711 8711 8712 /*Initialize Jacobian with regular Stokes(first part of the Gateau derivative)*/8713 ElementMatrix* Ke=CreateKMatrixDiagnostic Stokes();8712 /*Initialize Jacobian with regular FS (first part of the Gateau derivative)*/ 8713 ElementMatrix* Ke=CreateKMatrixDiagnosticFS(); 8714 8714 8715 8715 /*Retrieve all inputs and parameters*/ … … 8728 8728 GetNodalFunctionsP1Derivatives(&dphi[0][0],&xyz_list[0][0],gauss); 8729 8729 8730 this->GetStrainRate3d Pattyn(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input);8730 this->GetStrainRate3dHO(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input); 8731 8731 material->GetViscosityDerivativeEpsSquare(&mu_prime,&epsilon[0]); 8732 8732 eps1[0]=epsilon[0]; eps2[0]=epsilon[2]; eps3[0]=epsilon[3]; … … 8784 8784 8785 8785 /*If the element is a coupling, do nothing: every node is also on an other elements 8786 * (as coupling is between MacAyeal and Pattyn) so the other element will take care of it*/8786 * (as coupling is between MacAyeal and HO) so the other element will take care of it*/ 8787 8787 GetDofList(&doflist,approximation,GsetEnum); 8788 8788 … … 8808 8808 } 8809 8809 /*}}}*/ 8810 /*FUNCTION Penta::GetSolutionFromInputsDiagnostic Hutter{{{*/8811 void Penta::GetSolutionFromInputsDiagnostic Hutter(Vector<IssmDouble>* solution){8810 /*FUNCTION Penta::GetSolutionFromInputsDiagnosticSIA{{{*/ 8811 void Penta::GetSolutionFromInputsDiagnosticSIA(Vector<IssmDouble>* solution){ 8812 8812 8813 8813 const int numdof=NDOF2*NUMVERTICES; … … 8877 8877 } 8878 8878 /*}}}*/ 8879 /*FUNCTION Penta::GetSolutionFromInputsDiagnostic Stokes{{{*/8880 void Penta::GetSolutionFromInputsDiagnostic Stokes(Vector<IssmDouble>* solution){8879 /*FUNCTION Penta::GetSolutionFromInputsDiagnosticFS{{{*/ 8880 void Penta::GetSolutionFromInputsDiagnosticFS(Vector<IssmDouble>* solution){ 8881 8881 8882 8882 const int numdof=NDOF4*NUMVERTICES; … … 8885 8885 int* doflist=NULL; 8886 8886 IssmDouble vx,vy,vz,p; 8887 IssmDouble stokesreconditioning;8887 IssmDouble FSreconditioning; 8888 8888 IssmDouble values[numdof]; 8889 8889 GaussPenta *gauss; 8890 8890 8891 8891 /*Get dof list: */ 8892 GetDofList(&doflist, StokesApproximationEnum,GsetEnum);8892 GetDofList(&doflist,FSApproximationEnum,GsetEnum); 8893 8893 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 8894 8894 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); … … 8897 8897 8898 8898 /*Recondition pressure: */ 8899 this->parameters->FindParam(& stokesreconditioning,DiagnosticStokesreconditioningEnum);8899 this->parameters->FindParam(&FSreconditioning,DiagnosticFSreconditioningEnum); 8900 8900 8901 8901 /*Ok, we have vx vy vz and P in values, fill in vx vy vz P arrays: */ … … 8911 8911 values[i*NDOF4+1]=vy; 8912 8912 values[i*NDOF4+2]=vz; 8913 values[i*NDOF4+3]=p/ stokesreconditioning;8913 values[i*NDOF4+3]=p/FSreconditioning; 8914 8914 } 8915 8915 … … 8961 8961 8962 8962 /* Get eps_b*/ 8963 vx_input->GetVxStrainRate3d Pattyn(epsilonvx,xyz_list,gauss);8964 vy_input->GetVyStrainRate3d Pattyn(epsilonvy,xyz_list,gauss);8963 vx_input->GetVxStrainRate3dHO(epsilonvx,xyz_list,gauss); 8964 vy_input->GetVyStrainRate3dHO(epsilonvy,xyz_list,gauss); 8965 8965 for(i=0;i<5;i++) epsilon[i]=epsilonvx[i]+epsilonvy[i]; 8966 8966 eps_b = sqrt(epsilon[0]*epsilon[0] + epsilon[1]*epsilon[1] + epsilon[0]*epsilon[1] + epsilon[2]*epsilon[2]); … … 9015 9015 return; 9016 9016 } 9017 else if (approximation== PattynApproximationEnum){9018 InputUpdateFromSolutionDiagnostic Pattyn(solution);9019 } 9020 else if (approximation== PattynStokesApproximationEnum){9021 InputUpdateFromSolutionDiagnostic PattynStokes(solution);9022 } 9023 else if (approximation==MacAyeal StokesApproximationEnum){9024 InputUpdateFromSolutionDiagnosticMacAyeal Stokes(solution);9025 } 9026 else if (approximation== StokesApproximationEnum || approximation==NoneApproximationEnum){9027 InputUpdateFromSolutionDiagnostic Stokes(solution);9028 } 9029 else if (approximation==MacAyeal PattynApproximationEnum){9030 InputUpdateFromSolutionDiagnosticMacAyeal Pattyn(solution);9017 else if (approximation==HOApproximationEnum){ 9018 InputUpdateFromSolutionDiagnosticHO(solution); 9019 } 9020 else if (approximation==HOFSApproximationEnum){ 9021 InputUpdateFromSolutionDiagnosticHOFS(solution); 9022 } 9023 else if (approximation==MacAyealFSApproximationEnum){ 9024 InputUpdateFromSolutionDiagnosticMacAyealFS(solution); 9025 } 9026 else if (approximation==FSApproximationEnum || approximation==NoneApproximationEnum){ 9027 InputUpdateFromSolutionDiagnosticFS(solution); 9028 } 9029 else if (approximation==MacAyealHOApproximationEnum){ 9030 InputUpdateFromSolutionDiagnosticMacAyealHO(solution); 9031 9031 } 9032 9032 } … … 9113 9113 } 9114 9114 /*}}}*/ 9115 /*FUNCTION Penta::InputUpdateFromSolutionDiagnosticMacAyeal Pattyn{{{*/9116 void Penta::InputUpdateFromSolutionDiagnosticMacAyeal Pattyn(IssmDouble* solution){9115 /*FUNCTION Penta::InputUpdateFromSolutionDiagnosticMacAyealHO {{{*/ 9116 void Penta::InputUpdateFromSolutionDiagnosticMacAyealHO(IssmDouble* solution){ 9117 9117 9118 9118 const int numdof=NDOF2*NUMVERTICES; … … 9121 9121 int i; 9122 9122 IssmDouble rho_ice,g; 9123 IssmDouble macayeal_values[numdof];9124 IssmDouble pattyn_values[numdof];9123 IssmDouble SSA_values[numdof]; 9124 IssmDouble HO_values[numdof]; 9125 9125 IssmDouble vx[NUMVERTICES]; 9126 9126 IssmDouble vy[NUMVERTICES]; … … 9134 9134 Penta *penta = NULL; 9135 9135 9136 /*OK, we have to add results of this element for pattyn9137 * and results from the penta at base for macayeal. Now recover results*/9136 /*OK, we have to add results of this element for HO 9137 * and results from the penta at base for SSA. Now recover results*/ 9138 9138 penta=GetBasalElement(); 9139 9139 9140 /*Get dof listof this element ( pattyn dofs) and of the penta at base (macayealdofs): */9141 GetDofList(&doflistp, PattynApproximationEnum,GsetEnum);9140 /*Get dof listof this element (HO dofs) and of the penta at base (SSA dofs): */ 9141 GetDofList(&doflistp,HOApproximationEnum,GsetEnum); 9142 9142 penta->GetDofList(&doflistm,MacAyealApproximationEnum,GsetEnum); 9143 9143 … … 9147 9147 /*Use the dof list to index into the solution vector: */ 9148 9148 for(i=0;i<numdof2d;i++){ 9149 pattyn_values[i]=solution[doflistp[i]];9150 macayeal_values[i]=solution[doflistm[i]];9149 HO_values[i]=solution[doflistp[i]]; 9150 SSA_values[i]=solution[doflistm[i]]; 9151 9151 } 9152 9152 for(i=numdof2d;i<numdof;i++){ 9153 pattyn_values[i]=solution[doflistp[i]];9154 macayeal_values[i]=macayeal_values[i-numdof2d];9153 HO_values[i]=solution[doflistp[i]]; 9154 SSA_values[i]=SSA_values[i-numdof2d]; 9155 9155 } 9156 9156 9157 9157 /*Transform solution in Cartesian Space*/ 9158 TransformSolutionCoord(& macayeal_values[0],penta->nodes,NUMVERTICES,XYEnum);9159 TransformSolutionCoord(& pattyn_values[0], this->nodes,NUMVERTICES,XYEnum);9158 TransformSolutionCoord(&SSA_values[0],penta->nodes,NUMVERTICES,XYEnum); 9159 TransformSolutionCoord(&HO_values[0], this->nodes,NUMVERTICES,XYEnum); 9160 9160 9161 9161 /*Ok, we have vx and vy in values, fill in vx and vy arrays: */ 9162 9162 for(i=0;i<NUMVERTICES;i++){ 9163 vx[i]= macayeal_values[i*NDOF2+0]+pattyn_values[i*NDOF2+0];9164 vy[i]= macayeal_values[i*NDOF2+1]+pattyn_values[i*NDOF2+1];9163 vx[i]=SSA_values[i*NDOF2+0]+HO_values[i*NDOF2+0]; 9164 vy[i]=SSA_values[i*NDOF2+1]+HO_values[i*NDOF2+1]; 9165 9165 9166 9166 /*Check solution*/ … … 9197 9197 } 9198 9198 /*}}}*/ 9199 /*FUNCTION Penta::InputUpdateFromSolutionDiagnosticMacAyeal Stokes{{{*/9200 void Penta::InputUpdateFromSolutionDiagnosticMacAyeal Stokes(IssmDouble* solution){9199 /*FUNCTION Penta::InputUpdateFromSolutionDiagnosticMacAyealFS {{{*/ 9200 void Penta::InputUpdateFromSolutionDiagnosticMacAyealFS(IssmDouble* solution){ 9201 9201 9202 9202 const int numdofm=NDOF2*NUMVERTICES; … … 9205 9205 9206 9206 int i; 9207 IssmDouble stokesreconditioning;9208 IssmDouble macayeal_values[numdofm];9209 IssmDouble stokes_values[numdofs];9207 IssmDouble FSreconditioning; 9208 IssmDouble SSA_values[numdofm]; 9209 IssmDouble FS_values[numdofs]; 9210 9210 IssmDouble vx[NUMVERTICES]; 9211 9211 IssmDouble vy[NUMVERTICES]; 9212 9212 IssmDouble vz[NUMVERTICES]; 9213 IssmDouble vz macayeal[NUMVERTICES];9214 IssmDouble vz stokes[NUMVERTICES];9213 IssmDouble vzSSA[NUMVERTICES]; 9214 IssmDouble vzFS[NUMVERTICES]; 9215 9215 IssmDouble vel[NUMVERTICES]; 9216 9216 IssmDouble pressure[NUMVERTICES]; … … 9220 9220 Penta *penta = NULL; 9221 9221 9222 /*OK, we have to add results of this element for macayeal9223 * and results from the penta at base for macayeal. Now recover results*/9222 /*OK, we have to add results of this element for SSA 9223 * and results from the penta at base for SSA. Now recover results*/ 9224 9224 penta=GetBasalElement(); 9225 9225 9226 /*Get dof listof this element ( macayeal dofs) and of the penta at base (macayealdofs): */9226 /*Get dof listof this element (SSA dofs) and of the penta at base (SSA dofs): */ 9227 9227 penta->GetDofList(&doflistm,MacAyealApproximationEnum,GsetEnum); 9228 GetDofList(&doflists, StokesApproximationEnum,GsetEnum);9229 this->parameters->FindParam(& stokesreconditioning,DiagnosticStokesreconditioningEnum);9228 GetDofList(&doflists,FSApproximationEnum,GsetEnum); 9229 this->parameters->FindParam(&FSreconditioning,DiagnosticFSreconditioningEnum); 9230 9230 9231 9231 /*Get node data: */ … … 9234 9234 /*Use the dof list to index into the solution vector: */ 9235 9235 for(i=0;i<numdof2d;i++){ 9236 macayeal_values[i]=solution[doflistm[i]];9237 macayeal_values[i+numdof2d]=solution[doflistm[i]];9236 SSA_values[i]=solution[doflistm[i]]; 9237 SSA_values[i+numdof2d]=solution[doflistm[i]]; 9238 9238 } 9239 9239 for(i=0;i<numdofs;i++){ 9240 stokes_values[i]=solution[doflists[i]];9240 FS_values[i]=solution[doflists[i]]; 9241 9241 } 9242 9242 9243 9243 /*Transform solution in Cartesian Space*/ 9244 TransformSolutionCoord(& macayeal_values[0],this->nodes,NUMVERTICES,XYEnum);9245 TransformSolutionCoord(& stokes_values[0],this->nodes,NUMVERTICES,XYZPEnum);9244 TransformSolutionCoord(&SSA_values[0],this->nodes,NUMVERTICES,XYEnum); 9245 TransformSolutionCoord(&FS_values[0],this->nodes,NUMVERTICES,XYZPEnum); 9246 9246 9247 9247 /*Ok, we have vx and vy in values, fill in vx and vy arrays: */ 9248 9248 for(i=0;i<NUMVERTICES;i++){ 9249 vx[i]= stokes_values[i*NDOF4+0]+macayeal_values[i*NDOF2+0];9250 vy[i]= stokes_values[i*NDOF4+1]+macayeal_values[i*NDOF2+1];9251 vz stokes[i]=stokes_values[i*NDOF4+2];9252 pressure[i]= stokes_values[i*NDOF4+3]*stokesreconditioning;9249 vx[i]=FS_values[i*NDOF4+0]+SSA_values[i*NDOF2+0]; 9250 vy[i]=FS_values[i*NDOF4+1]+SSA_values[i*NDOF2+1]; 9251 vzFS[i]=FS_values[i*NDOF4+2]; 9252 pressure[i]=FS_values[i*NDOF4+3]*FSreconditioning; 9253 9253 9254 9254 /*Check solution*/ 9255 9255 if(xIsNan<IssmDouble>(vx[i])) _error_("NaN found in solution vector"); 9256 9256 if(xIsNan<IssmDouble>(vy[i])) _error_("NaN found in solution vector"); 9257 if(xIsNan<IssmDouble>(vz stokes[i])) _error_("NaN found in solution vector");9257 if(xIsNan<IssmDouble>(vzFS[i])) _error_("NaN found in solution vector"); 9258 9258 if(xIsNan<IssmDouble>(pressure[i])) _error_("NaN found in solution vector"); 9259 9259 } 9260 9260 9261 9261 /*Get Vz*/ 9262 Input* vz macayeal_input=inputs->GetInput(VzMacAyealEnum);9263 if (vz macayeal_input){9264 if (vz macayeal_input->ObjectEnum()!=PentaInputEnum){9265 _error_("Cannot compute Vel as VzMacAyeal is of type " << EnumToStringx(vz macayeal_input->ObjectEnum()));9266 } 9267 GetInputListOnVertices(&vz macayeal[0],VzMacAyealEnum);9262 Input* vzSSA_input=inputs->GetInput(VzMacAyealEnum); 9263 if (vzSSA_input){ 9264 if (vzSSA_input->ObjectEnum()!=PentaInputEnum){ 9265 _error_("Cannot compute Vel as VzMacAyeal is of type " << EnumToStringx(vzSSA_input->ObjectEnum())); 9266 } 9267 GetInputListOnVertices(&vzSSA[0],VzMacAyealEnum); 9268 9268 } 9269 9269 else{ … … 9273 9273 /*Now Compute vel*/ 9274 9274 for(i=0;i<NUMVERTICES;i++) { 9275 vz[i]=vz macayeal[i]+vzstokes[i];9275 vz[i]=vzSSA[i]+vzFS[i]; 9276 9276 vel[i]=pow( pow(vx[i],2.0) + pow(vy[i],2.0) + pow(vz[i],2.0) , 0.5); 9277 9277 } … … 9288 9288 this->inputs->AddInput(new PentaInput(VyEnum,vy,P1Enum)); 9289 9289 this->inputs->AddInput(new PentaInput(VzEnum,vz,P1Enum)); 9290 this->inputs->AddInput(new PentaInput(Vz StokesEnum,vzstokes,P1Enum));9290 this->inputs->AddInput(new PentaInput(VzFSEnum,vzFS,P1Enum)); 9291 9291 this->inputs->AddInput(new PentaInput(VelEnum,vel,P1Enum)); 9292 9292 this->inputs->AddInput(new PentaInput(PressureEnum,pressure,P1Enum)); … … 9378 9378 } 9379 9379 /*}}}*/ 9380 /*FUNCTION Penta::InputUpdateFromSolutionDiagnostic Pattyn{{{*/9381 void Penta::InputUpdateFromSolutionDiagnostic Pattyn(IssmDouble* solution){9380 /*FUNCTION Penta::InputUpdateFromSolutionDiagnosticHO {{{*/ 9381 void Penta::InputUpdateFromSolutionDiagnosticHO(IssmDouble* solution){ 9382 9382 9383 9383 const int numdof=NDOF2*NUMVERTICES; … … 9396 9396 9397 9397 /*Get dof list: */ 9398 GetDofList(&doflist, PattynApproximationEnum,GsetEnum);9398 GetDofList(&doflist,HOApproximationEnum,GsetEnum); 9399 9399 9400 9400 /*Get node data: */ … … 9452 9452 } 9453 9453 /*}}}*/ 9454 /*FUNCTION Penta::InputUpdateFromSolutionDiagnostic PattynStokes{{{*/9455 void Penta::InputUpdateFromSolutionDiagnostic PattynStokes(IssmDouble* solution){9454 /*FUNCTION Penta::InputUpdateFromSolutionDiagnosticHOFS {{{*/ 9455 void Penta::InputUpdateFromSolutionDiagnosticHOFS(IssmDouble* solution){ 9456 9456 9457 9457 const int numdofp=NDOF2*NUMVERTICES; … … 9459 9459 9460 9460 int i; 9461 IssmDouble pattyn_values[numdofp];9462 IssmDouble stokes_values[numdofs];9461 IssmDouble HO_values[numdofp]; 9462 IssmDouble FS_values[numdofs]; 9463 9463 IssmDouble vx[NUMVERTICES]; 9464 9464 IssmDouble vy[NUMVERTICES]; 9465 9465 IssmDouble vz[NUMVERTICES]; 9466 IssmDouble vz pattyn[NUMVERTICES];9467 IssmDouble vz stokes[NUMVERTICES];9466 IssmDouble vzHO[NUMVERTICES]; 9467 IssmDouble vzFS[NUMVERTICES]; 9468 9468 IssmDouble vel[NUMVERTICES]; 9469 9469 IssmDouble pressure[NUMVERTICES]; 9470 9470 IssmDouble xyz_list[NUMVERTICES][3]; 9471 IssmDouble stokesreconditioning;9471 IssmDouble FSreconditioning; 9472 9472 int* doflistp = NULL; 9473 9473 int* doflists = NULL; 9474 9474 Penta *penta = NULL; 9475 9475 9476 /*OK, we have to add results of this element for pattyn9477 * and results from the penta at base for macayeal. Now recover results*/9476 /*OK, we have to add results of this element for HO 9477 * and results from the penta at base for SSA. Now recover results*/ 9478 9478 penta=GetBasalElement(); 9479 9479 9480 /*Get dof listof this element ( pattyn dofs) and of the penta at base (macayealdofs): */9481 GetDofList(&doflistp, PattynApproximationEnum,GsetEnum);9482 GetDofList(&doflists, StokesApproximationEnum,GsetEnum);9483 this->parameters->FindParam(& stokesreconditioning,DiagnosticStokesreconditioningEnum);9480 /*Get dof listof this element (HO dofs) and of the penta at base (SSA dofs): */ 9481 GetDofList(&doflistp,HOApproximationEnum,GsetEnum); 9482 GetDofList(&doflists,FSApproximationEnum,GsetEnum); 9483 this->parameters->FindParam(&FSreconditioning,DiagnosticFSreconditioningEnum); 9484 9484 9485 9485 /*Get node data: */ … … 9487 9487 9488 9488 /*Use the dof list to index into the solution vector: */ 9489 for(i=0;i<numdofp;i++) pattyn_values[i]=solution[doflistp[i]];9490 for(i=0;i<numdofs;i++) stokes_values[i]=solution[doflists[i]];9489 for(i=0;i<numdofp;i++) HO_values[i]=solution[doflistp[i]]; 9490 for(i=0;i<numdofs;i++) FS_values[i]=solution[doflists[i]]; 9491 9491 9492 9492 /*Transform solution in Cartesian Space*/ 9493 TransformSolutionCoord(& pattyn_values[0],this->nodes,NUMVERTICES,XYEnum);9494 TransformSolutionCoord(& stokes_values[0],this->nodes,NUMVERTICES,XYZPEnum);9493 TransformSolutionCoord(&HO_values[0],this->nodes,NUMVERTICES,XYEnum); 9494 TransformSolutionCoord(&FS_values[0],this->nodes,NUMVERTICES,XYZPEnum); 9495 9495 9496 9496 /*Ok, we have vx and vy in values, fill in vx and vy arrays: */ 9497 9497 for(i=0;i<NUMVERTICES;i++){ 9498 vx[i]= stokes_values[i*NDOF4+0]+pattyn_values[i*NDOF2+0];9499 vy[i]= stokes_values[i*NDOF4+1]+pattyn_values[i*NDOF2+1];9500 vz stokes[i]=stokes_values[i*NDOF4+2];9501 pressure[i]= stokes_values[i*NDOF4+3]*stokesreconditioning;9498 vx[i]=FS_values[i*NDOF4+0]+HO_values[i*NDOF2+0]; 9499 vy[i]=FS_values[i*NDOF4+1]+HO_values[i*NDOF2+1]; 9500 vzFS[i]=FS_values[i*NDOF4+2]; 9501 pressure[i]=FS_values[i*NDOF4+3]*FSreconditioning; 9502 9502 9503 9503 /*Check solution*/ 9504 9504 if(xIsNan<IssmDouble>(vx[i])) _error_("NaN found in solution vector"); 9505 9505 if(xIsNan<IssmDouble>(vy[i])) _error_("NaN found in solution vector"); 9506 if(xIsNan<IssmDouble>(vz stokes[i])) _error_("NaN found in solution vector");9506 if(xIsNan<IssmDouble>(vzFS[i])) _error_("NaN found in solution vector"); 9507 9507 if(xIsNan<IssmDouble>(pressure[i])) _error_("NaN found in solution vector"); 9508 9508 } 9509 9509 9510 9510 /*Get Vz*/ 9511 Input* vz pattyn_input=inputs->GetInput(VzPattynEnum);9512 if (vz pattyn_input){9513 if (vz pattyn_input->ObjectEnum()!=PentaInputEnum){9514 _error_("Cannot compute Vel as Vz Pattyn is of type " << EnumToStringx(vzpattyn_input->ObjectEnum()));9515 } 9516 GetInputListOnVertices(&vz pattyn[0],VzPattynEnum);9511 Input* vzHO_input=inputs->GetInput(VzHOEnum); 9512 if (vzHO_input){ 9513 if (vzHO_input->ObjectEnum()!=PentaInputEnum){ 9514 _error_("Cannot compute Vel as VzHO is of type " << EnumToStringx(vzHO_input->ObjectEnum())); 9515 } 9516 GetInputListOnVertices(&vzHO[0],VzHOEnum); 9517 9517 } 9518 9518 else{ 9519 _error_("Cannot update solution as Vz Pattynis not present");9519 _error_("Cannot update solution as VzHO is not present"); 9520 9520 } 9521 9521 9522 9522 /*Now Compute vel*/ 9523 9523 for(i=0;i<NUMVERTICES;i++) { 9524 vz[i]=vz pattyn[i]+vzstokes[i];9524 vz[i]=vzHO[i]+vzFS[i]; 9525 9525 vel[i]=pow( pow(vx[i],2.0) + pow(vy[i],2.0) + pow(vz[i],2.0) , 0.5); 9526 9526 } … … 9537 9537 this->inputs->AddInput(new PentaInput(VyEnum,vy,P1Enum)); 9538 9538 this->inputs->AddInput(new PentaInput(VzEnum,vz,P1Enum)); 9539 this->inputs->AddInput(new PentaInput(Vz StokesEnum,vzstokes,P1Enum));9539 this->inputs->AddInput(new PentaInput(VzFSEnum,vzFS,P1Enum)); 9540 9540 this->inputs->AddInput(new PentaInput(VelEnum,vel,P1Enum)); 9541 9541 this->inputs->AddInput(new PentaInput(PressureEnum,pressure,P1Enum)); … … 9546 9546 } 9547 9547 /*}}}*/ 9548 /*FUNCTION Penta::InputUpdateFromSolutionDiagnostic Hutter{{{*/9549 void Penta::InputUpdateFromSolutionDiagnostic Hutter(IssmDouble* solution){9548 /*FUNCTION Penta::InputUpdateFromSolutionDiagnosticSIA {{{*/ 9549 void Penta::InputUpdateFromSolutionDiagnosticSIA(IssmDouble* solution){ 9550 9550 9551 9551 const int numdof=NDOF2*NUMVERTICES; … … 9621 9621 IssmDouble vy[NUMVERTICES]; 9622 9622 IssmDouble vz[NUMVERTICES]; 9623 IssmDouble vz macayeal[NUMVERTICES];9624 IssmDouble vz pattyn[NUMVERTICES];9625 IssmDouble vz stokes[NUMVERTICES];9623 IssmDouble vzSSA[NUMVERTICES]; 9624 IssmDouble vzHO[NUMVERTICES]; 9625 IssmDouble vzFS[NUMVERTICES]; 9626 9626 IssmDouble vel[NUMVERTICES]; 9627 9627 IssmDouble pressure[NUMVERTICES]; … … 9630 9630 int* doflist = NULL; 9631 9631 9632 /*Get the approximation and do nothing if the element in Stokesor None*/9632 /*Get the approximation and do nothing if the element in FS or None*/ 9633 9633 inputs->GetInputValue(&approximation,ApproximationEnum); 9634 if(approximation== StokesApproximationEnum || approximation==NoneApproximationEnum){9634 if(approximation==FSApproximationEnum || approximation==NoneApproximationEnum){ 9635 9635 return; 9636 9636 } … … 9653 9653 GetInputListOnVertices(&vy[0],VyEnum,0.0); //default is 0 9654 9654 9655 /*Do some modifications if we actually have a PattynStokes or MacAyealStokeselement*/9656 if(approximation== PattynStokesApproximationEnum){9657 Input* vz stokes_input=inputs->GetInput(VzStokesEnum);9658 if (vz stokes_input){9659 if (vz stokes_input->ObjectEnum()!=PentaInputEnum) _error_("Cannot compute Vel as VzStokes is of type " << EnumToStringx(vzstokes_input->ObjectEnum()));9660 GetInputListOnVertices(&vz stokes[0],VzStokesEnum);9661 } 9662 else _error_("Cannot compute Vz as Vz Stokes in not present in PattynStokeselement");9655 /*Do some modifications if we actually have a HOFS or MacAyealFS element*/ 9656 if(approximation==HOFSApproximationEnum){ 9657 Input* vzFS_input=inputs->GetInput(VzFSEnum); 9658 if (vzFS_input){ 9659 if (vzFS_input->ObjectEnum()!=PentaInputEnum) _error_("Cannot compute Vel as VzFS is of type " << EnumToStringx(vzFS_input->ObjectEnum())); 9660 GetInputListOnVertices(&vzFS[0],VzFSEnum); 9661 } 9662 else _error_("Cannot compute Vz as VzFS in not present in HOFS element"); 9663 9663 for(i=0;i<NUMVERTICES;i++){ 9664 vz pattyn[i]=vz[i];9665 vz[i]=vz pattyn[i]+vzstokes[i];9666 } 9667 } 9668 else if(approximation==MacAyeal StokesApproximationEnum){9669 Input* vz stokes_input=inputs->GetInput(VzStokesEnum);9670 if (vz stokes_input){9671 if (vz stokes_input->ObjectEnum()!=PentaInputEnum) _error_("Cannot compute Vel as VzStokes is of type " << EnumToStringx(vzstokes_input->ObjectEnum()));9672 GetInputListOnVertices(&vz stokes[0],VzStokesEnum);9673 } 9674 else _error_("Cannot compute Vz as Vz Stokes in not present in MacAyealStokeselement");9664 vzHO[i]=vz[i]; 9665 vz[i]=vzHO[i]+vzFS[i]; 9666 } 9667 } 9668 else if(approximation==MacAyealFSApproximationEnum){ 9669 Input* vzFS_input=inputs->GetInput(VzFSEnum); 9670 if (vzFS_input){ 9671 if (vzFS_input->ObjectEnum()!=PentaInputEnum) _error_("Cannot compute Vel as VzFS is of type " << EnumToStringx(vzFS_input->ObjectEnum())); 9672 GetInputListOnVertices(&vzFS[0],VzFSEnum); 9673 } 9674 else _error_("Cannot compute Vz as VzFS in not present in MacAyealFS element"); 9675 9675 for(i=0;i<NUMVERTICES;i++){ 9676 vz macayeal[i]=vz[i];9677 vz[i]=vz macayeal[i]+vzstokes[i];9676 vzSSA[i]=vz[i]; 9677 vz[i]=vzSSA[i]+vzFS[i]; 9678 9678 } 9679 9679 } … … 9683 9683 9684 9684 /*For pressure: we have not computed pressure in this analysis, for this element. We are in 3D, 9685 *so the pressure is just the pressure at the z elevation: except it this is a PattynStokeselement */9686 if(approximation!= PattynStokesApproximationEnum && approximation!=MacAyealStokesApproximationEnum){9685 *so the pressure is just the pressure at the z elevation: except it this is a HOFS element */ 9686 if(approximation!=HOFSApproximationEnum && approximation!=MacAyealFSApproximationEnum){ 9687 9687 rho_ice=matpar->GetRhoIce(); 9688 9688 g=matpar->GetG(); … … 9695 9695 this->inputs->ChangeEnum(VzEnum,VzPicardEnum); 9696 9696 9697 if(approximation!= PattynStokesApproximationEnum && approximation!=MacAyealStokesApproximationEnum){9697 if(approximation!=HOFSApproximationEnum && approximation!=MacAyealFSApproximationEnum){ 9698 9698 this->inputs->ChangeEnum(PressureEnum,PressurePicardEnum); 9699 9699 this->inputs->AddInput(new PentaInput(PressureEnum,pressure,P1Enum)); 9700 9700 } 9701 else if(approximation== PattynStokesApproximationEnum){9702 this->inputs->AddInput(new PentaInput(Vz PattynEnum,vzpattyn,P1Enum));9703 } 9704 else if(approximation==MacAyeal StokesApproximationEnum){9705 this->inputs->AddInput(new PentaInput(VzMacAyealEnum,vz macayeal,P1Enum));9701 else if(approximation==HOFSApproximationEnum){ 9702 this->inputs->AddInput(new PentaInput(VzHOEnum,vzHO,P1Enum)); 9703 } 9704 else if(approximation==MacAyealFSApproximationEnum){ 9705 this->inputs->AddInput(new PentaInput(VzMacAyealEnum,vzSSA,P1Enum)); 9706 9706 } 9707 9707 this->inputs->AddInput(new PentaInput(VzEnum,vz,P1Enum)); … … 9712 9712 } 9713 9713 /*}}}*/ 9714 /*FUNCTION Penta::InputUpdateFromSolutionDiagnostic Stokes{{{*/9715 void Penta::InputUpdateFromSolutionDiagnostic Stokes(IssmDouble* solution){9714 /*FUNCTION Penta::InputUpdateFromSolutionDiagnosticFS {{{*/ 9715 void Penta::InputUpdateFromSolutionDiagnosticFS(IssmDouble* solution){ 9716 9716 9717 9717 const int numdof=NDOF4*NUMVERTICES; … … 9724 9724 IssmDouble vel[NUMVERTICES]; 9725 9725 IssmDouble pressure[NUMVERTICES]; 9726 IssmDouble stokesreconditioning;9726 IssmDouble FSreconditioning; 9727 9727 int* doflist=NULL; 9728 9728 9729 9729 /*Get dof list: */ 9730 GetDofList(&doflist, StokesApproximationEnum,GsetEnum);9730 GetDofList(&doflist,FSApproximationEnum,GsetEnum); 9731 9731 9732 9732 /*Use the dof list to index into the solution vector: */ … … 9751 9751 9752 9752 /*Recondition pressure and compute vel: */ 9753 this->parameters->FindParam(& stokesreconditioning,DiagnosticStokesreconditioningEnum);9754 for(i=0;i<NUMVERTICES;i++) pressure[i]=pressure[i]* stokesreconditioning;9753 this->parameters->FindParam(&FSreconditioning,DiagnosticFSreconditioningEnum); 9754 for(i=0;i<NUMVERTICES;i++) pressure[i]=pressure[i]*FSreconditioning; 9755 9755 for(i=0;i<NUMVERTICES;i++) vel[i]=pow( pow(vx[i],2.0) + pow(vy[i],2.0) + pow(vz[i],2.0) , 0.5); 9756 9756 -
issm/trunk-jpl/src/c/classes/Elements/Penta.h
r15538 r15564 145 145 void Gradj(Vector<IssmDouble>* gradient,int control_type,int control_index); 146 146 void GradjDragMacAyeal(Vector<IssmDouble>* gradient,int control_index); 147 void GradjDrag Pattyn(Vector<IssmDouble>* gradient,int control_index);148 void GradjDrag Stokes(Vector<IssmDouble>* gradient,int control_index);147 void GradjDragHO(Vector<IssmDouble>* gradient,int control_index); 148 void GradjDragFS(Vector<IssmDouble>* gradient,int control_index); 149 149 void GradjBbarMacAyeal(Vector<IssmDouble>* gradient,int control_index); 150 void GradjBbar Pattyn(Vector<IssmDouble>* gradient,int control_index);151 void GradjBbar Stokes(Vector<IssmDouble>* gradient,int control_index);150 void GradjBbarHO(Vector<IssmDouble>* gradient,int control_index); 151 void GradjBbarFS(Vector<IssmDouble>* gradient,int control_index); 152 152 void GetVectorFromControlInputs(Vector<IssmDouble>* gradient,int control_enum,int control_index,const char* data); 153 153 void SetControlInputsFromVector(IssmDouble* vector,int control_enum,int control_index); … … 197 197 void GetSolutionFromInputsEnthalpy(Vector<IssmDouble>* solutiong); 198 198 IssmDouble GetStabilizationParameter(IssmDouble u, IssmDouble v, IssmDouble w, IssmDouble diameter, IssmDouble kappa); 199 void GetStrainRate3d Pattyn(IssmDouble* epsilon,IssmDouble* xyz_list, GaussPenta* gauss, Input* vx_input, Input* vy_input);199 void GetStrainRate3dHO(IssmDouble* epsilon,IssmDouble* xyz_list, GaussPenta* gauss, Input* vx_input, Input* vy_input); 200 200 void GetStrainRate3d(IssmDouble* epsilon,IssmDouble* xyz_list, GaussPenta* gauss, Input* vx_input, Input* vy_input, Input* vz_input); 201 201 Penta* GetUpperElement(void); … … 215 215 bool IsOnWater(void); 216 216 IssmDouble MinEdgeLength(IssmDouble xyz_list[6][3]); 217 void ReduceMatrix Stokes(IssmDouble* Ke_reduced, IssmDouble* Ke_temp);218 void ReduceVector Stokes(IssmDouble* Pe_reduced, IssmDouble* Ke_temp, IssmDouble* Pe_temp);217 void ReduceMatrixFS(IssmDouble* Ke_reduced, IssmDouble* Ke_temp); 218 void ReduceVectorFS(IssmDouble* Pe_reduced, IssmDouble* Ke_temp, IssmDouble* Pe_temp); 219 219 void SetClone(int* minranks); 220 220 Tria* SpawnTria(int g0, int g1, int g2); … … 223 223 224 224 #ifdef _HAVE_DIAGNOSTIC_ 225 ElementMatrix* CreateKMatrixCouplingMacAyeal Pattyn(void);226 ElementMatrix* CreateKMatrixCouplingMacAyeal PattynViscous(void);227 ElementMatrix* CreateKMatrixCouplingMacAyeal PattynFriction(void);228 ElementMatrix* CreateKMatrixCouplingMacAyeal Stokes(void);229 ElementMatrix* CreateKMatrixCouplingMacAyeal StokesViscous(void);230 ElementMatrix* CreateKMatrixCouplingMacAyeal StokesFriction(void);231 ElementMatrix* CreateKMatrixCoupling PattynStokes(void);225 ElementMatrix* CreateKMatrixCouplingMacAyealHO(void); 226 ElementMatrix* CreateKMatrixCouplingMacAyealHOViscous(void); 227 ElementMatrix* CreateKMatrixCouplingMacAyealHOFriction(void); 228 ElementMatrix* CreateKMatrixCouplingMacAyealFS(void); 229 ElementMatrix* CreateKMatrixCouplingMacAyealFSViscous(void); 230 ElementMatrix* CreateKMatrixCouplingMacAyealFSFriction(void); 231 ElementMatrix* CreateKMatrixCouplingHOFS(void); 232 232 ElementMatrix* CreateKMatrixDiagnosticHoriz(void); 233 233 ElementMatrix* CreateKMatrixAdjointHoriz(void); 234 234 ElementVector* CreateDVectorDiagnosticHoriz(void); 235 ElementVector* CreateDVectorDiagnostic Stokes(void);236 ElementMatrix* CreateKMatrixDiagnostic Hutter(void);235 ElementVector* CreateDVectorDiagnosticFS(void); 236 ElementMatrix* CreateKMatrixDiagnosticSIA(void); 237 237 ElementMatrix* CreateKMatrixDiagnosticMacAyeal2d(void); 238 238 ElementMatrix* CreateKMatrixDiagnosticMacAyeal3d(void); 239 239 ElementMatrix* CreateKMatrixDiagnosticMacAyeal3dViscous(void); 240 240 ElementMatrix* CreateKMatrixDiagnosticMacAyeal3dFriction(void); 241 ElementMatrix* CreateKMatrixDiagnosticMacAyeal Pattyn(void);242 ElementMatrix* CreateKMatrixDiagnosticMacAyeal Stokes(void);241 ElementMatrix* CreateKMatrixDiagnosticMacAyealHO(void); 242 ElementMatrix* CreateKMatrixDiagnosticMacAyealFS(void); 243 243 ElementMatrix* CreateKMatrixDiagnosticL1L2(void); 244 244 ElementMatrix* CreateKMatrixDiagnosticL1L2Viscous(void); 245 245 ElementMatrix* CreateKMatrixDiagnosticL1L2Friction(void); 246 ElementMatrix* CreateKMatrixDiagnostic Pattyn(void);247 ElementMatrix* CreateKMatrixDiagnostic PattynViscous(void);248 ElementMatrix* CreateKMatrixDiagnostic PattynFriction(void);249 ElementMatrix* CreateKMatrixDiagnostic PattynStokes(void);250 ElementMatrix* CreateKMatrixDiagnostic Stokes(void);251 ElementMatrix* CreateKMatrixDiagnostic StokesViscous(void);252 ElementMatrix* CreateKMatrixDiagnostic StokesGLSViscous(void);253 ElementMatrix* CreateKMatrixDiagnostic StokesFriction(void);254 ElementMatrix* CreateKMatrixDiagnostic StokesGLSFriction(void);246 ElementMatrix* CreateKMatrixDiagnosticHO(void); 247 ElementMatrix* CreateKMatrixDiagnosticHOViscous(void); 248 ElementMatrix* CreateKMatrixDiagnosticHOFriction(void); 249 ElementMatrix* CreateKMatrixDiagnosticHOFS(void); 250 ElementMatrix* CreateKMatrixDiagnosticFS(void); 251 ElementMatrix* CreateKMatrixDiagnosticFSViscous(void); 252 ElementMatrix* CreateKMatrixDiagnosticFSGLSViscous(void); 253 ElementMatrix* CreateKMatrixDiagnosticFSFriction(void); 254 ElementMatrix* CreateKMatrixDiagnosticFSGLSFriction(void); 255 255 ElementMatrix* CreateKMatrixDiagnosticVert(void); 256 256 ElementMatrix* CreateKMatrixDiagnosticVertVolume(void); 257 257 ElementMatrix* CreateKMatrixDiagnosticVertSurface(void); 258 258 ElementMatrix* CreateJacobianDiagnosticHoriz(void); 259 ElementMatrix* CreateJacobianDiagnostic Macayeal2d(void);260 ElementMatrix* CreateJacobianDiagnostic Pattyn(void);261 ElementMatrix* CreateJacobianDiagnostic Stokes(void);259 ElementMatrix* CreateJacobianDiagnosticSSA2d(void); 260 ElementMatrix* CreateJacobianDiagnosticHO(void); 261 ElementMatrix* CreateJacobianDiagnosticFS(void); 262 262 void InputUpdateFromSolutionDiagnosticHoriz( IssmDouble* solutiong); 263 263 void InputUpdateFromSolutionDiagnosticMacAyeal( IssmDouble* solutiong); 264 void InputUpdateFromSolutionDiagnosticMacAyeal Pattyn( IssmDouble* solutiong);265 void InputUpdateFromSolutionDiagnosticMacAyeal Stokes( IssmDouble* solutiong);264 void InputUpdateFromSolutionDiagnosticMacAyealHO( IssmDouble* solutiong); 265 void InputUpdateFromSolutionDiagnosticMacAyealFS( IssmDouble* solutiong); 266 266 void InputUpdateFromSolutionDiagnosticL1L2( IssmDouble* solutiong); 267 void InputUpdateFromSolutionDiagnostic Pattyn( IssmDouble* solutiong);268 void InputUpdateFromSolutionDiagnostic PattynStokes( IssmDouble* solutiong);269 void InputUpdateFromSolutionDiagnostic Hutter( IssmDouble* solutiong);267 void InputUpdateFromSolutionDiagnosticHO( IssmDouble* solutiong); 268 void InputUpdateFromSolutionDiagnosticHOFS( IssmDouble* solutiong); 269 void InputUpdateFromSolutionDiagnosticSIA( IssmDouble* solutiong); 270 270 void InputUpdateFromSolutionDiagnosticVert( IssmDouble* solutiong); 271 void InputUpdateFromSolutionDiagnostic Stokes( IssmDouble* solutiong);271 void InputUpdateFromSolutionDiagnosticFS( IssmDouble* solutiong); 272 272 void GetSolutionFromInputsDiagnosticHoriz(Vector<IssmDouble>* solutiong); 273 void GetSolutionFromInputsDiagnostic Hutter(Vector<IssmDouble>* solutiong);274 void GetSolutionFromInputsDiagnostic Stokes(Vector<IssmDouble>* solutiong);273 void GetSolutionFromInputsDiagnosticSIA(Vector<IssmDouble>* solutiong); 274 void GetSolutionFromInputsDiagnosticFS(Vector<IssmDouble>* solutiong); 275 275 void GetSolutionFromInputsDiagnosticVert(Vector<IssmDouble>* solutiong); 276 ElementVector* CreatePVectorCouplingMacAyeal Stokes(void);277 ElementVector* CreatePVectorCouplingMacAyeal StokesViscous(void);278 ElementVector* CreatePVectorCouplingMacAyeal StokesFriction(void);279 ElementVector* CreatePVectorCoupling PattynStokes(void);280 ElementVector* CreatePVectorCoupling PattynStokesViscous(void);281 ElementVector* CreatePVectorCoupling PattynStokesFriction(void);276 ElementVector* CreatePVectorCouplingMacAyealFS(void); 277 ElementVector* CreatePVectorCouplingMacAyealFSViscous(void); 278 ElementVector* CreatePVectorCouplingMacAyealFSFriction(void); 279 ElementVector* CreatePVectorCouplingHOFS(void); 280 ElementVector* CreatePVectorCouplingHOFSViscous(void); 281 ElementVector* CreatePVectorCouplingHOFSFriction(void); 282 282 ElementVector* CreatePVectorDiagnosticHoriz(void); 283 ElementVector* CreatePVectorDiagnostic Hutter(void);283 ElementVector* CreatePVectorDiagnosticSIA(void); 284 284 ElementVector* CreatePVectorDiagnosticMacAyeal(void); 285 ElementVector* CreatePVectorDiagnosticMacAyeal Pattyn(void);286 ElementVector* CreatePVectorDiagnosticMacAyeal Stokes(void);285 ElementVector* CreatePVectorDiagnosticMacAyealHO(void); 286 ElementVector* CreatePVectorDiagnosticMacAyealFS(void); 287 287 ElementVector* CreatePVectorDiagnosticL1L2(void); 288 ElementVector* CreatePVectorDiagnostic Pattyn(void);289 ElementVector* CreatePVectorDiagnostic PattynDrivingStress(void);290 ElementVector* CreatePVectorDiagnostic PattynFront(void);291 ElementVector* CreatePVectorDiagnostic PattynStokes(void);292 ElementVector* CreatePVectorDiagnostic Stokes(void);293 ElementVector* CreatePVectorDiagnostic StokesFront(void);294 ElementVector* CreatePVectorDiagnostic StokesViscous(void);295 ElementVector* CreatePVectorDiagnostic StokesGLSViscous(void);296 ElementVector* CreatePVectorDiagnostic StokesShelf(void);288 ElementVector* CreatePVectorDiagnosticHO(void); 289 ElementVector* CreatePVectorDiagnosticHODrivingStress(void); 290 ElementVector* CreatePVectorDiagnosticHOFront(void); 291 ElementVector* CreatePVectorDiagnosticHOFS(void); 292 ElementVector* CreatePVectorDiagnosticFS(void); 293 ElementVector* CreatePVectorDiagnosticFSFront(void); 294 ElementVector* CreatePVectorDiagnosticFSViscous(void); 295 ElementVector* CreatePVectorDiagnosticFSGLSViscous(void); 296 ElementVector* CreatePVectorDiagnosticFSShelf(void); 297 297 ElementVector* CreatePVectorDiagnosticVert(void); 298 298 ElementVector* CreatePVectorDiagnosticVertVolume(void); … … 304 304 ElementVector* CreatePVectorAdjointHoriz(void); 305 305 ElementMatrix* CreateKMatrixAdjointMacAyeal2d(void); 306 ElementMatrix* CreateKMatrixAdjoint Pattyn(void);307 ElementMatrix* CreateKMatrixAdjoint Stokes(void);306 ElementMatrix* CreateKMatrixAdjointHO(void); 307 ElementMatrix* CreateKMatrixAdjointFS(void); 308 308 ElementVector* CreatePVectorAdjointMacAyeal(void); 309 ElementVector* CreatePVectorAdjoint Pattyn(void);310 ElementVector* CreatePVectorAdjoint Stokes(void);309 ElementVector* CreatePVectorAdjointHO(void); 310 ElementVector* CreatePVectorAdjointFS(void); 311 311 void InputUpdateFromSolutionAdjointHoriz( IssmDouble* solutiong); 312 void InputUpdateFromSolutionAdjoint Stokes( IssmDouble* solutiong);312 void InputUpdateFromSolutionAdjointFS( IssmDouble* solutiong); 313 313 #endif 314 314 -
issm/trunk-jpl/src/c/classes/Elements/PentaRef.cpp
r15511 r15564 54 54 55 55 /*Reference Element numerics*/ 56 /*FUNCTION PentaRef::GetBMacAyeal Pattyn{{{*/57 void PentaRef::GetBMacAyeal Pattyn(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss){56 /*FUNCTION PentaRef::GetBMacAyealHO {{{*/ 57 void PentaRef::GetBMacAyealHO(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss){ 58 58 /*Compute B matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5*NDOF2. 59 59 * For node i, Bi can be expressed in the actual coordinate system … … 85 85 } 86 86 /*}}}*/ 87 /*FUNCTION PentaRef::GetBMacAyeal Stokes{{{*/88 void PentaRef::GetBMacAyeal Stokes(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss){87 /*FUNCTION PentaRef::GetBMacAyealFS{{{*/ 88 void PentaRef::GetBMacAyealFS(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss){ 89 89 /*Compute B matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5*NDOF2. 90 90 * For node i, Bi can be expressed in the actual coordinate system … … 131 131 } 132 132 /*}}}*/ 133 /*FUNCTION PentaRef::GetB Pattyn{{{*/134 void PentaRef::GetB Pattyn(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss){133 /*FUNCTION PentaRef::GetBHO {{{*/ 134 void PentaRef::GetBHO(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss){ 135 135 /*Compute B matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5*NDOF2. 136 136 * For node i, Bi can be expressed in the actual coordinate system … … 171 171 } 172 172 /*}}}*/ 173 /*FUNCTION PentaRef::GetBprime Pattyn{{{*/174 void PentaRef::GetBprime Pattyn(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss_coord){173 /*FUNCTION PentaRef::GetBprimeHO {{{*/ 174 void PentaRef::GetBprimeHO(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss_coord){ 175 175 /*Compute B prime matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5*NDOF2. 176 176 * For node i, Bi can be expressed in the actual coordinate system … … 209 209 } 210 210 /*}}}*/ 211 /*FUNCTION PentaRef::GetBprimeMacAyeal Stokes{{{*/212 void PentaRef::GetBprimeMacAyeal Stokes(IssmDouble* Bprime, IssmDouble* xyz_list, GaussPenta* gauss){211 /*FUNCTION PentaRef::GetBprimeMacAyealFS{{{*/ 212 void PentaRef::GetBprimeMacAyealFS(IssmDouble* Bprime, IssmDouble* xyz_list, GaussPenta* gauss){ 213 213 /*Compute Bprime matrix. Bprime=[Bprime1 Bprime2 Bprime3 Bprime4 Bprime5 Bprime6] where Bprimei is of size 5*NDOF2. 214 214 * For node i, Bprimei can be expressed in the actual coordinate system … … 249 249 } 250 250 /*}}}*/ 251 /*FUNCTION PentaRef::GetB Stokes{{{*/252 void PentaRef::GetB Stokes(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss){251 /*FUNCTION PentaRef::GetBFS {{{*/ 252 void PentaRef::GetBFS(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss){ 253 253 254 254 /*Compute B matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 3*NDOF4. … … 316 316 } 317 317 /*}}}*/ 318 /*FUNCTION PentaRef::GetB StokesGLS {{{*/319 void PentaRef::GetB StokesGLS(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss){318 /*FUNCTION PentaRef::GetBFSGLS {{{*/ 319 void PentaRef::GetBFSGLS(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss){ 320 320 321 321 /*Compute B matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 3*NDOF4. … … 382 382 } 383 383 /*}}}*/ 384 /*FUNCTION PentaRef::GetBprime Stokes{{{*/385 void PentaRef::GetBprime Stokes(IssmDouble* B_prime, IssmDouble* xyz_list, GaussPenta* gauss){384 /*FUNCTION PentaRef::GetBprimeFS {{{*/ 385 void PentaRef::GetBprimeFS(IssmDouble* B_prime, IssmDouble* xyz_list, GaussPenta* gauss){ 386 386 /* Compute B' matrix. B'=[B1' B2' B3' B4' B5' B6' Bb'] where Bi' is of size 3*NDOF2. 387 387 * For node i, Bi' can be expressed in the actual coordinate system … … 449 449 } 450 450 /*}}}*/ 451 /*FUNCTION PentaRef::GetBprime StokesGLS {{{*/452 void PentaRef::GetBprime StokesGLS(IssmDouble* B_prime, IssmDouble* xyz_list, GaussPenta* gauss){451 /*FUNCTION PentaRef::GetBprimeFSGLS {{{*/ 452 void PentaRef::GetBprimeFSGLS(IssmDouble* B_prime, IssmDouble* xyz_list, GaussPenta* gauss){ 453 453 /* Compute B' matrix. B'=[B1' B2' B3' B4' B5' B6' Bb'] where Bi' is of size 3*NDOF2. 454 454 * For node i, Bi' can be expressed in the actual coordinate system … … 618 618 } 619 619 /*}}}*/ 620 /*FUNCTION PentaRef::GetB PattynFriction{{{*/621 void PentaRef::GetB PattynFriction(IssmDouble* B, GaussPenta* gauss){620 /*FUNCTION PentaRef::GetBHOFriction{{{*/ 621 void PentaRef::GetBHOFriction(IssmDouble* B, GaussPenta* gauss){ 622 622 /*Compute B matrix. B=[B1 B2 B3] where Bi is square and of size 2x2. 623 623 ** For node i, Bi can be expressed in the actual coordinate system … … 642 642 } 643 643 /*}}}*/ 644 /*FUNCTION PentaRef::GetL Stokes{{{*/645 void PentaRef::GetL Stokes(IssmDouble* LStokes, GaussPenta* gauss){644 /*FUNCTION PentaRef::GetLFS{{{*/ 645 void PentaRef::GetLFS(IssmDouble* LFS, GaussPenta* gauss){ 646 646 /* Compute L matrix. L=[L1 L2 L3] where Li is square and of size numdof. 647 647 * For node i, Li can be expressed in the actual coordinate system … … 655 655 656 656 const int num_dof=4; 657 IssmDouble l1l2l3[NUMNODESP1_2d];658 659 /*Get l1l2l3 in actual coordinate system: */660 l1l2l3[0]=gauss->coord1*(1-gauss->coord4)/2.0;661 l1l2l3[1]=gauss->coord2*(1-gauss->coord4)/2.0;662 l1l2l3[2]=gauss->coord3*(1-gauss->coord4)/2.0;663 664 /*Build L Stokes: */657 IssmDouble L1L2l3[NUMNODESP1_2d]; 658 659 /*Get L1L2l3 in actual coordinate system: */ 660 L1L2l3[0]=gauss->coord1*(1-gauss->coord4)/2.0; 661 L1L2l3[1]=gauss->coord2*(1-gauss->coord4)/2.0; 662 L1L2l3[2]=gauss->coord3*(1-gauss->coord4)/2.0; 663 664 /*Build LFS: */ 665 665 for(int i=0;i<3;i++){ 666 L Stokes[num_dof*NUMNODESP1_2d*0+num_dof*i+0] = l1l2l3[i];667 L Stokes[num_dof*NUMNODESP1_2d*0+num_dof*i+1] = 0.;668 L Stokes[num_dof*NUMNODESP1_2d*0+num_dof*i+2] = 0.;669 L Stokes[num_dof*NUMNODESP1_2d*0+num_dof*i+3] = 0.;670 671 L Stokes[num_dof*NUMNODESP1_2d*1+num_dof*i+0] = 0.;672 L Stokes[num_dof*NUMNODESP1_2d*1+num_dof*i+1] = l1l2l3[i];673 L Stokes[num_dof*NUMNODESP1_2d*1+num_dof*i+2] = 0.;674 L Stokes[num_dof*NUMNODESP1_2d*1+num_dof*i+3] = 0.;675 } 676 } 677 /*}}}*/ 678 /*FUNCTION PentaRef::GetLprime Stokes{{{*/679 void PentaRef::GetLprime Stokes(IssmDouble* LprimeStokes, IssmDouble* xyz_list, GaussPenta* gauss){666 LFS[num_dof*NUMNODESP1_2d*0+num_dof*i+0] = L1L2l3[i]; 667 LFS[num_dof*NUMNODESP1_2d*0+num_dof*i+1] = 0.; 668 LFS[num_dof*NUMNODESP1_2d*0+num_dof*i+2] = 0.; 669 LFS[num_dof*NUMNODESP1_2d*0+num_dof*i+3] = 0.; 670 671 LFS[num_dof*NUMNODESP1_2d*1+num_dof*i+0] = 0.; 672 LFS[num_dof*NUMNODESP1_2d*1+num_dof*i+1] = L1L2l3[i]; 673 LFS[num_dof*NUMNODESP1_2d*1+num_dof*i+2] = 0.; 674 LFS[num_dof*NUMNODESP1_2d*1+num_dof*i+3] = 0.; 675 } 676 } 677 /*}}}*/ 678 /*FUNCTION PentaRef::GetLprimeFS {{{*/ 679 void PentaRef::GetLprimeFS(IssmDouble* LprimeFS, IssmDouble* xyz_list, GaussPenta* gauss){ 680 680 /* Compute Lprime matrix. Lprime=[Lp1 Lp2 Lp3] where Lpi is square and of size numdof. 681 681 * For node i, Lpi can be expressed in the actual coordinate system … … 715 715 int num_dof=4; 716 716 717 IssmDouble l1l2l3[NUMNODESP1_2d];717 IssmDouble L1L2l3[NUMNODESP1_2d]; 718 718 IssmDouble dbasis[3][NUMNODESP1]; 719 719 720 /*Get l1l2l3 in actual coordinate system: */721 l1l2l3[0]=gauss->coord1*(1-gauss->coord4)/2.0;722 l1l2l3[1]=gauss->coord2*(1-gauss->coord4)/2.0;723 l1l2l3[2]=gauss->coord3*(1-gauss->coord4)/2.0;720 /*Get L1L2l3 in actual coordinate system: */ 721 L1L2l3[0]=gauss->coord1*(1-gauss->coord4)/2.0; 722 L1L2l3[1]=gauss->coord2*(1-gauss->coord4)/2.0; 723 L1L2l3[2]=gauss->coord3*(1-gauss->coord4)/2.0; 724 724 725 725 GetNodalFunctionsP1Derivatives(&dbasis[0][0],xyz_list,gauss); 726 726 727 /*Build Lprime Stokes: */727 /*Build LprimeFS: */ 728 728 for(int i=0;i<3;i++){ 729 Lprime Stokes[num_dof*NUMNODESP1_2d*0+num_dof*i+0] = l1l2l3[i];730 Lprime Stokes[num_dof*NUMNODESP1_2d*0+num_dof*i+1] = 0.;731 Lprime Stokes[num_dof*NUMNODESP1_2d*0+num_dof*i+2] = 0.;732 Lprime Stokes[num_dof*NUMNODESP1_2d*0+num_dof*i+3] = 0.;733 Lprime Stokes[num_dof*NUMNODESP1_2d*1+num_dof*i+0] = 0.;734 Lprime Stokes[num_dof*NUMNODESP1_2d*1+num_dof*i+1] = l1l2l3[i];735 Lprime Stokes[num_dof*NUMNODESP1_2d*1+num_dof*i+2] = 0.;736 Lprime Stokes[num_dof*NUMNODESP1_2d*1+num_dof*i+3] = 0.;737 Lprime Stokes[num_dof*NUMNODESP1_2d*2+num_dof*i+0] = l1l2l3[i];738 Lprime Stokes[num_dof*NUMNODESP1_2d*2+num_dof*i+1] = 0.;739 Lprime Stokes[num_dof*NUMNODESP1_2d*2+num_dof*i+2] = 0.;740 Lprime Stokes[num_dof*NUMNODESP1_2d*2+num_dof*i+3] = 0.;741 Lprime Stokes[num_dof*NUMNODESP1_2d*3+num_dof*i+0] = 0.;742 Lprime Stokes[num_dof*NUMNODESP1_2d*3+num_dof*i+1] = l1l2l3[i];743 Lprime Stokes[num_dof*NUMNODESP1_2d*3+num_dof*i+2] = 0.;744 Lprime Stokes[num_dof*NUMNODESP1_2d*3+num_dof*i+3] = 0.;745 Lprime Stokes[num_dof*NUMNODESP1_2d*4+num_dof*i+0] = 0.;746 Lprime Stokes[num_dof*NUMNODESP1_2d*4+num_dof*i+1] = 0.;747 Lprime Stokes[num_dof*NUMNODESP1_2d*4+num_dof*i+2] = l1l2l3[i];748 Lprime Stokes[num_dof*NUMNODESP1_2d*4+num_dof*i+3] = 0.;749 Lprime Stokes[num_dof*NUMNODESP1_2d*5+num_dof*i+0] = 0.;750 Lprime Stokes[num_dof*NUMNODESP1_2d*5+num_dof*i+1] = 0.;751 Lprime Stokes[num_dof*NUMNODESP1_2d*5+num_dof*i+2] = l1l2l3[i];752 Lprime Stokes[num_dof*NUMNODESP1_2d*5+num_dof*i+3] = 0.;753 Lprime Stokes[num_dof*NUMNODESP1_2d*6+num_dof*i+0] = 0.;754 Lprime Stokes[num_dof*NUMNODESP1_2d*6+num_dof*i+1] = 0.;755 Lprime Stokes[num_dof*NUMNODESP1_2d*6+num_dof*i+2] = dbasis[2][i];756 Lprime Stokes[num_dof*NUMNODESP1_2d*6+num_dof*i+3] = 0.;757 Lprime Stokes[num_dof*NUMNODESP1_2d*7+num_dof*i+0] = 0.;758 Lprime Stokes[num_dof*NUMNODESP1_2d*7+num_dof*i+1] = 0.;759 Lprime Stokes[num_dof*NUMNODESP1_2d*7+num_dof*i+2] = dbasis[2][i];760 Lprime Stokes[num_dof*NUMNODESP1_2d*7+num_dof*i+3] = 0.;761 Lprime Stokes[num_dof*NUMNODESP1_2d*8+num_dof*i+0] = 0.;762 Lprime Stokes[num_dof*NUMNODESP1_2d*8+num_dof*i+1] = 0.;763 Lprime Stokes[num_dof*NUMNODESP1_2d*8+num_dof*i+2] = dbasis[2][i];764 Lprime Stokes[num_dof*NUMNODESP1_2d*8+num_dof*i+3] = 0.;765 Lprime Stokes[num_dof*NUMNODESP1_2d*9+num_dof*i+0] = dbasis[2][i];766 Lprime Stokes[num_dof*NUMNODESP1_2d*9+num_dof*i+1] = 0.;767 Lprime Stokes[num_dof*NUMNODESP1_2d*9+num_dof*i+2] = dbasis[0][i];768 Lprime Stokes[num_dof*NUMNODESP1_2d*9+num_dof*i+3] = 0.;769 Lprime Stokes[num_dof*NUMNODESP1_2d*10+num_dof*i+0] = 0.;770 Lprime Stokes[num_dof*NUMNODESP1_2d*10+num_dof*i+1] = dbasis[2][i];771 Lprime Stokes[num_dof*NUMNODESP1_2d*10+num_dof*i+2] = dbasis[1][i];772 Lprime Stokes[num_dof*NUMNODESP1_2d*10+num_dof*i+3] = 0.;773 Lprime Stokes[num_dof*NUMNODESP1_2d*11+num_dof*i+0] = 0.;774 Lprime Stokes[num_dof*NUMNODESP1_2d*11+num_dof*i+1] = 0.;775 Lprime Stokes[num_dof*NUMNODESP1_2d*11+num_dof*i+2] = 0.;776 Lprime Stokes[num_dof*NUMNODESP1_2d*11+num_dof*i+3] = l1l2l3[i];777 Lprime Stokes[num_dof*NUMNODESP1_2d*12+num_dof*i+0] = 0.;778 Lprime Stokes[num_dof*NUMNODESP1_2d*12+num_dof*i+1] = 0.;779 Lprime Stokes[num_dof*NUMNODESP1_2d*12+num_dof*i+2] = 0.;780 Lprime Stokes[num_dof*NUMNODESP1_2d*12+num_dof*i+3] = l1l2l3[i];781 Lprime Stokes[num_dof*NUMNODESP1_2d*13+num_dof*i+0] = 0.;782 Lprime Stokes[num_dof*NUMNODESP1_2d*13+num_dof*i+1] = 0;783 Lprime Stokes[num_dof*NUMNODESP1_2d*13+num_dof*i+2] = 0;784 Lprime Stokes[num_dof*NUMNODESP1_2d*13+num_dof*i+3] = l1l2l3[i];785 } 786 } 787 /*}}}*/ 788 /*FUNCTION PentaRef::GetLMacAyeal Stokes{{{*/789 void PentaRef::GetLMacAyeal Stokes(IssmDouble* LStokes, GaussPenta* gauss){729 LprimeFS[num_dof*NUMNODESP1_2d*0+num_dof*i+0] = L1L2l3[i]; 730 LprimeFS[num_dof*NUMNODESP1_2d*0+num_dof*i+1] = 0.; 731 LprimeFS[num_dof*NUMNODESP1_2d*0+num_dof*i+2] = 0.; 732 LprimeFS[num_dof*NUMNODESP1_2d*0+num_dof*i+3] = 0.; 733 LprimeFS[num_dof*NUMNODESP1_2d*1+num_dof*i+0] = 0.; 734 LprimeFS[num_dof*NUMNODESP1_2d*1+num_dof*i+1] = L1L2l3[i]; 735 LprimeFS[num_dof*NUMNODESP1_2d*1+num_dof*i+2] = 0.; 736 LprimeFS[num_dof*NUMNODESP1_2d*1+num_dof*i+3] = 0.; 737 LprimeFS[num_dof*NUMNODESP1_2d*2+num_dof*i+0] = L1L2l3[i]; 738 LprimeFS[num_dof*NUMNODESP1_2d*2+num_dof*i+1] = 0.; 739 LprimeFS[num_dof*NUMNODESP1_2d*2+num_dof*i+2] = 0.; 740 LprimeFS[num_dof*NUMNODESP1_2d*2+num_dof*i+3] = 0.; 741 LprimeFS[num_dof*NUMNODESP1_2d*3+num_dof*i+0] = 0.; 742 LprimeFS[num_dof*NUMNODESP1_2d*3+num_dof*i+1] = L1L2l3[i]; 743 LprimeFS[num_dof*NUMNODESP1_2d*3+num_dof*i+2] = 0.; 744 LprimeFS[num_dof*NUMNODESP1_2d*3+num_dof*i+3] = 0.; 745 LprimeFS[num_dof*NUMNODESP1_2d*4+num_dof*i+0] = 0.; 746 LprimeFS[num_dof*NUMNODESP1_2d*4+num_dof*i+1] = 0.; 747 LprimeFS[num_dof*NUMNODESP1_2d*4+num_dof*i+2] = L1L2l3[i]; 748 LprimeFS[num_dof*NUMNODESP1_2d*4+num_dof*i+3] = 0.; 749 LprimeFS[num_dof*NUMNODESP1_2d*5+num_dof*i+0] = 0.; 750 LprimeFS[num_dof*NUMNODESP1_2d*5+num_dof*i+1] = 0.; 751 LprimeFS[num_dof*NUMNODESP1_2d*5+num_dof*i+2] = L1L2l3[i]; 752 LprimeFS[num_dof*NUMNODESP1_2d*5+num_dof*i+3] = 0.; 753 LprimeFS[num_dof*NUMNODESP1_2d*6+num_dof*i+0] = 0.; 754 LprimeFS[num_dof*NUMNODESP1_2d*6+num_dof*i+1] = 0.; 755 LprimeFS[num_dof*NUMNODESP1_2d*6+num_dof*i+2] = dbasis[2][i]; 756 LprimeFS[num_dof*NUMNODESP1_2d*6+num_dof*i+3] = 0.; 757 LprimeFS[num_dof*NUMNODESP1_2d*7+num_dof*i+0] = 0.; 758 LprimeFS[num_dof*NUMNODESP1_2d*7+num_dof*i+1] = 0.; 759 LprimeFS[num_dof*NUMNODESP1_2d*7+num_dof*i+2] = dbasis[2][i]; 760 LprimeFS[num_dof*NUMNODESP1_2d*7+num_dof*i+3] = 0.; 761 LprimeFS[num_dof*NUMNODESP1_2d*8+num_dof*i+0] = 0.; 762 LprimeFS[num_dof*NUMNODESP1_2d*8+num_dof*i+1] = 0.; 763 LprimeFS[num_dof*NUMNODESP1_2d*8+num_dof*i+2] = dbasis[2][i]; 764 LprimeFS[num_dof*NUMNODESP1_2d*8+num_dof*i+3] = 0.; 765 LprimeFS[num_dof*NUMNODESP1_2d*9+num_dof*i+0] = dbasis[2][i]; 766 LprimeFS[num_dof*NUMNODESP1_2d*9+num_dof*i+1] = 0.; 767 LprimeFS[num_dof*NUMNODESP1_2d*9+num_dof*i+2] = dbasis[0][i]; 768 LprimeFS[num_dof*NUMNODESP1_2d*9+num_dof*i+3] = 0.; 769 LprimeFS[num_dof*NUMNODESP1_2d*10+num_dof*i+0] = 0.; 770 LprimeFS[num_dof*NUMNODESP1_2d*10+num_dof*i+1] = dbasis[2][i]; 771 LprimeFS[num_dof*NUMNODESP1_2d*10+num_dof*i+2] = dbasis[1][i]; 772 LprimeFS[num_dof*NUMNODESP1_2d*10+num_dof*i+3] = 0.; 773 LprimeFS[num_dof*NUMNODESP1_2d*11+num_dof*i+0] = 0.; 774 LprimeFS[num_dof*NUMNODESP1_2d*11+num_dof*i+1] = 0.; 775 LprimeFS[num_dof*NUMNODESP1_2d*11+num_dof*i+2] = 0.; 776 LprimeFS[num_dof*NUMNODESP1_2d*11+num_dof*i+3] = L1L2l3[i]; 777 LprimeFS[num_dof*NUMNODESP1_2d*12+num_dof*i+0] = 0.; 778 LprimeFS[num_dof*NUMNODESP1_2d*12+num_dof*i+1] = 0.; 779 LprimeFS[num_dof*NUMNODESP1_2d*12+num_dof*i+2] = 0.; 780 LprimeFS[num_dof*NUMNODESP1_2d*12+num_dof*i+3] = L1L2l3[i]; 781 LprimeFS[num_dof*NUMNODESP1_2d*13+num_dof*i+0] = 0.; 782 LprimeFS[num_dof*NUMNODESP1_2d*13+num_dof*i+1] = 0; 783 LprimeFS[num_dof*NUMNODESP1_2d*13+num_dof*i+2] = 0; 784 LprimeFS[num_dof*NUMNODESP1_2d*13+num_dof*i+3] = L1L2l3[i]; 785 } 786 } 787 /*}}}*/ 788 /*FUNCTION PentaRef::GetLMacAyealFS {{{*/ 789 void PentaRef::GetLMacAyealFS(IssmDouble* LFS, GaussPenta* gauss){ 790 790 /* 791 791 * Compute L matrix. L=[L1 L2 L3] where Li is square and of size numdof. … … 804 804 805 805 int num_dof=2; 806 IssmDouble l1l2l3[NUMNODESP1_2d];807 808 /*Get l1l2l3 in actual coordinate system: */809 l1l2l3[0]=gauss->coord1*(1-gauss->coord4)/2.0;810 l1l2l3[1]=gauss->coord2*(1-gauss->coord4)/2.0;811 l1l2l3[2]=gauss->coord3*(1-gauss->coord4)/2.0;812 813 /*Build L Stokes: */806 IssmDouble L1L2l3[NUMNODESP1_2d]; 807 808 /*Get L1L2l3 in actual coordinate system: */ 809 L1L2l3[0]=gauss->coord1*(1-gauss->coord4)/2.0; 810 L1L2l3[1]=gauss->coord2*(1-gauss->coord4)/2.0; 811 L1L2l3[2]=gauss->coord3*(1-gauss->coord4)/2.0; 812 813 /*Build LFS: */ 814 814 for(int i=0;i<3;i++){ 815 L Stokes[num_dof*NUMNODESP1_2d*0+num_dof*i+0] = l1l2l3[i];816 L Stokes[num_dof*NUMNODESP1_2d*0+num_dof*i+1] = 0;817 L Stokes[num_dof*NUMNODESP1_2d*1+num_dof*i+0] = 0;818 L Stokes[num_dof*NUMNODESP1_2d*1+num_dof*i+1] = l1l2l3[i];819 L Stokes[num_dof*NUMNODESP1_2d*2+num_dof*i+0] = l1l2l3[i];820 L Stokes[num_dof*NUMNODESP1_2d*2+num_dof*i+1] = 0;821 L Stokes[num_dof*NUMNODESP1_2d*3+num_dof*i+0] = 0;822 L Stokes[num_dof*NUMNODESP1_2d*3+num_dof*i+1] = l1l2l3[i];823 L Stokes[num_dof*NUMNODESP1_2d*4+num_dof*i+0] = l1l2l3[i];824 L Stokes[num_dof*NUMNODESP1_2d*4+num_dof*i+1] = 0;825 L Stokes[num_dof*NUMNODESP1_2d*5+num_dof*i+0] = 0;826 L Stokes[num_dof*NUMNODESP1_2d*5+num_dof*i+1] = l1l2l3[i];827 L Stokes[num_dof*NUMNODESP1_2d*6+num_dof*i+0] = l1l2l3[i];828 L Stokes[num_dof*NUMNODESP1_2d*6+num_dof*i+1] = 0;829 L Stokes[num_dof*NUMNODESP1_2d*7+num_dof*i+0] = 0;830 L Stokes[num_dof*NUMNODESP1_2d*7+num_dof*i+1] = l1l2l3[i];831 } 832 } 833 /*}}}*/ 834 /*FUNCTION PentaRef::GetLprimeMacAyeal Stokes{{{*/835 void PentaRef::GetLprimeMacAyeal Stokes(IssmDouble* LprimeStokes, IssmDouble* xyz_list, GaussPenta* gauss){815 LFS[num_dof*NUMNODESP1_2d*0+num_dof*i+0] = L1L2l3[i]; 816 LFS[num_dof*NUMNODESP1_2d*0+num_dof*i+1] = 0; 817 LFS[num_dof*NUMNODESP1_2d*1+num_dof*i+0] = 0; 818 LFS[num_dof*NUMNODESP1_2d*1+num_dof*i+1] = L1L2l3[i]; 819 LFS[num_dof*NUMNODESP1_2d*2+num_dof*i+0] = L1L2l3[i]; 820 LFS[num_dof*NUMNODESP1_2d*2+num_dof*i+1] = 0; 821 LFS[num_dof*NUMNODESP1_2d*3+num_dof*i+0] = 0; 822 LFS[num_dof*NUMNODESP1_2d*3+num_dof*i+1] = L1L2l3[i]; 823 LFS[num_dof*NUMNODESP1_2d*4+num_dof*i+0] = L1L2l3[i]; 824 LFS[num_dof*NUMNODESP1_2d*4+num_dof*i+1] = 0; 825 LFS[num_dof*NUMNODESP1_2d*5+num_dof*i+0] = 0; 826 LFS[num_dof*NUMNODESP1_2d*5+num_dof*i+1] = L1L2l3[i]; 827 LFS[num_dof*NUMNODESP1_2d*6+num_dof*i+0] = L1L2l3[i]; 828 LFS[num_dof*NUMNODESP1_2d*6+num_dof*i+1] = 0; 829 LFS[num_dof*NUMNODESP1_2d*7+num_dof*i+0] = 0; 830 LFS[num_dof*NUMNODESP1_2d*7+num_dof*i+1] = L1L2l3[i]; 831 } 832 } 833 /*}}}*/ 834 /*FUNCTION PentaRef::GetLprimeMacAyealFS {{{*/ 835 void PentaRef::GetLprimeMacAyealFS(IssmDouble* LprimeFS, IssmDouble* xyz_list, GaussPenta* gauss){ 836 836 /* Compute Lprime matrix. Lprime=[Lp1 Lp2 Lp3] where Lpi is square and of size numdof. 837 837 * For node i, Lpi can be expressed in the actual coordinate system … … 848 848 */ 849 849 int num_dof=4; 850 IssmDouble l1l2l3[NUMNODESP1_2d];850 IssmDouble L1L2l3[NUMNODESP1_2d]; 851 851 IssmDouble dbasis[3][NUMNODESP1]; 852 852 853 /*Get l1l2l3 in actual coordinate system: */854 l1l2l3[0]=gauss->coord1*(1-gauss->coord4)/2.0;855 l1l2l3[1]=gauss->coord2*(1-gauss->coord4)/2.0;856 l1l2l3[2]=gauss->coord3*(1-gauss->coord4)/2.0;853 /*Get L1L2l3 in actual coordinate system: */ 854 L1L2l3[0]=gauss->coord1*(1-gauss->coord4)/2.0; 855 L1L2l3[1]=gauss->coord2*(1-gauss->coord4)/2.0; 856 L1L2l3[2]=gauss->coord3*(1-gauss->coord4)/2.0; 857 857 858 858 GetNodalFunctionsP1Derivatives(&dbasis[0][0],xyz_list,gauss); 859 859 860 /*Build Lprime Stokes: */860 /*Build LprimeFS: */ 861 861 for(int i=0;i<3;i++){ 862 Lprime Stokes[num_dof*NUMNODESP1_2d*0+num_dof*i+0] = l1l2l3[i];863 Lprime Stokes[num_dof*NUMNODESP1_2d*0+num_dof*i+1] = 0.;864 Lprime Stokes[num_dof*NUMNODESP1_2d*0+num_dof*i+2] = 0.;865 Lprime Stokes[num_dof*NUMNODESP1_2d*0+num_dof*i+3] = 0.;866 Lprime Stokes[num_dof*NUMNODESP1_2d*1+num_dof*i+0] = 0.;867 Lprime Stokes[num_dof*NUMNODESP1_2d*1+num_dof*i+1] = l1l2l3[i];868 Lprime Stokes[num_dof*NUMNODESP1_2d*1+num_dof*i+2] = 0.;869 Lprime Stokes[num_dof*NUMNODESP1_2d*1+num_dof*i+3] = 0.;870 Lprime Stokes[num_dof*NUMNODESP1_2d*2+num_dof*i+0] = 0.;871 Lprime Stokes[num_dof*NUMNODESP1_2d*2+num_dof*i+1] = 0.;872 Lprime Stokes[num_dof*NUMNODESP1_2d*2+num_dof*i+2] = l1l2l3[i];873 Lprime Stokes[num_dof*NUMNODESP1_2d*2+num_dof*i+3] = 0.;874 Lprime Stokes[num_dof*NUMNODESP1_2d*3+num_dof*i+0] = 0.;875 Lprime Stokes[num_dof*NUMNODESP1_2d*3+num_dof*i+1] = 0.;876 Lprime Stokes[num_dof*NUMNODESP1_2d*3+num_dof*i+2] = l1l2l3[i];877 Lprime Stokes[num_dof*NUMNODESP1_2d*3+num_dof*i+3] = 0.;878 Lprime Stokes[num_dof*NUMNODESP1_2d*4+num_dof*i+0] = 0.;879 Lprime Stokes[num_dof*NUMNODESP1_2d*4+num_dof*i+1] = 0.;880 Lprime Stokes[num_dof*NUMNODESP1_2d*4+num_dof*i+2] = dbasis[2][i];881 Lprime Stokes[num_dof*NUMNODESP1_2d*4+num_dof*i+3] = 0.;882 Lprime Stokes[num_dof*NUMNODESP1_2d*5+num_dof*i+0] = 0.;883 Lprime Stokes[num_dof*NUMNODESP1_2d*5+num_dof*i+1] = 0.;884 Lprime Stokes[num_dof*NUMNODESP1_2d*5+num_dof*i+2] = dbasis[2][i];885 Lprime Stokes[num_dof*NUMNODESP1_2d*5+num_dof*i+3] = 0.;886 Lprime Stokes[num_dof*NUMNODESP1_2d*6+num_dof*i+0] = 0.;887 Lprime Stokes[num_dof*NUMNODESP1_2d*6+num_dof*i+1] = 0.;888 Lprime Stokes[num_dof*NUMNODESP1_2d*6+num_dof*i+2] = 0.;889 Lprime Stokes[num_dof*NUMNODESP1_2d*6+num_dof*i+3] = l1l2l3[i];890 Lprime Stokes[num_dof*NUMNODESP1_2d*7+num_dof*i+0] = 0.;891 Lprime Stokes[num_dof*NUMNODESP1_2d*7+num_dof*i+1] = 0.;892 Lprime Stokes[num_dof*NUMNODESP1_2d*7+num_dof*i+2] = 0.;893 Lprime Stokes[num_dof*NUMNODESP1_2d*7+num_dof*i+3] = l1l2l3[i];894 } 895 } 896 /*}}}*/ 897 /*FUNCTION PentaRef::GetL StokesMacAyeal {{{*/898 void PentaRef::GetL StokesMacAyeal(IssmDouble* LStokes, GaussPenta* gauss){862 LprimeFS[num_dof*NUMNODESP1_2d*0+num_dof*i+0] = L1L2l3[i]; 863 LprimeFS[num_dof*NUMNODESP1_2d*0+num_dof*i+1] = 0.; 864 LprimeFS[num_dof*NUMNODESP1_2d*0+num_dof*i+2] = 0.; 865 LprimeFS[num_dof*NUMNODESP1_2d*0+num_dof*i+3] = 0.; 866 LprimeFS[num_dof*NUMNODESP1_2d*1+num_dof*i+0] = 0.; 867 LprimeFS[num_dof*NUMNODESP1_2d*1+num_dof*i+1] = L1L2l3[i]; 868 LprimeFS[num_dof*NUMNODESP1_2d*1+num_dof*i+2] = 0.; 869 LprimeFS[num_dof*NUMNODESP1_2d*1+num_dof*i+3] = 0.; 870 LprimeFS[num_dof*NUMNODESP1_2d*2+num_dof*i+0] = 0.; 871 LprimeFS[num_dof*NUMNODESP1_2d*2+num_dof*i+1] = 0.; 872 LprimeFS[num_dof*NUMNODESP1_2d*2+num_dof*i+2] = L1L2l3[i]; 873 LprimeFS[num_dof*NUMNODESP1_2d*2+num_dof*i+3] = 0.; 874 LprimeFS[num_dof*NUMNODESP1_2d*3+num_dof*i+0] = 0.; 875 LprimeFS[num_dof*NUMNODESP1_2d*3+num_dof*i+1] = 0.; 876 LprimeFS[num_dof*NUMNODESP1_2d*3+num_dof*i+2] = L1L2l3[i]; 877 LprimeFS[num_dof*NUMNODESP1_2d*3+num_dof*i+3] = 0.; 878 LprimeFS[num_dof*NUMNODESP1_2d*4+num_dof*i+0] = 0.; 879 LprimeFS[num_dof*NUMNODESP1_2d*4+num_dof*i+1] = 0.; 880 LprimeFS[num_dof*NUMNODESP1_2d*4+num_dof*i+2] = dbasis[2][i]; 881 LprimeFS[num_dof*NUMNODESP1_2d*4+num_dof*i+3] = 0.; 882 LprimeFS[num_dof*NUMNODESP1_2d*5+num_dof*i+0] = 0.; 883 LprimeFS[num_dof*NUMNODESP1_2d*5+num_dof*i+1] = 0.; 884 LprimeFS[num_dof*NUMNODESP1_2d*5+num_dof*i+2] = dbasis[2][i]; 885 LprimeFS[num_dof*NUMNODESP1_2d*5+num_dof*i+3] = 0.; 886 LprimeFS[num_dof*NUMNODESP1_2d*6+num_dof*i+0] = 0.; 887 LprimeFS[num_dof*NUMNODESP1_2d*6+num_dof*i+1] = 0.; 888 LprimeFS[num_dof*NUMNODESP1_2d*6+num_dof*i+2] = 0.; 889 LprimeFS[num_dof*NUMNODESP1_2d*6+num_dof*i+3] = L1L2l3[i]; 890 LprimeFS[num_dof*NUMNODESP1_2d*7+num_dof*i+0] = 0.; 891 LprimeFS[num_dof*NUMNODESP1_2d*7+num_dof*i+1] = 0.; 892 LprimeFS[num_dof*NUMNODESP1_2d*7+num_dof*i+2] = 0.; 893 LprimeFS[num_dof*NUMNODESP1_2d*7+num_dof*i+3] = L1L2l3[i]; 894 } 895 } 896 /*}}}*/ 897 /*FUNCTION PentaRef::GetLFSMacAyeal {{{*/ 898 void PentaRef::GetLFSMacAyeal(IssmDouble* LFS, GaussPenta* gauss){ 899 899 /* Compute L matrix. L=[L1 L2 L3] where Li is square and of size numdof. 900 900 * For node i, Li can be expressed in the actual coordinate system … … 908 908 909 909 int num_dof=4; 910 IssmDouble l1l2l3[NUMNODESP1_2d];911 912 /*Get l1l2l3 in actual coordinate system: */913 l1l2l3[0]=gauss->coord1*(1-gauss->coord4)/2.0;914 l1l2l3[1]=gauss->coord2*(1-gauss->coord4)/2.0;915 l1l2l3[2]=gauss->coord3*(1-gauss->coord4)/2.0;916 917 /*Build L Stokes: */910 IssmDouble L1L2l3[NUMNODESP1_2d]; 911 912 /*Get L1L2l3 in actual coordinate system: */ 913 L1L2l3[0]=gauss->coord1*(1-gauss->coord4)/2.0; 914 L1L2l3[1]=gauss->coord2*(1-gauss->coord4)/2.0; 915 L1L2l3[2]=gauss->coord3*(1-gauss->coord4)/2.0; 916 917 /*Build LFS: */ 918 918 for(int i=0;i<3;i++){ 919 L Stokes[num_dof*NUMNODESP1_2d*0+num_dof*i+0] = l1l2l3[i];920 L Stokes[num_dof*NUMNODESP1_2d*0+num_dof*i+1] = 0.;921 L Stokes[num_dof*NUMNODESP1_2d*0+num_dof*i+2] = 0.;922 L Stokes[num_dof*NUMNODESP1_2d*0+num_dof*i+3] = 0.;923 L Stokes[num_dof*NUMNODESP1_2d*1+num_dof*i+0] = 0.;924 L Stokes[num_dof*NUMNODESP1_2d*1+num_dof*i+1] = l1l2l3[i];925 L Stokes[num_dof*NUMNODESP1_2d*1+num_dof*i+2] = 0.;926 L Stokes[num_dof*NUMNODESP1_2d*1+num_dof*i+3] = 0.;927 L Stokes[num_dof*NUMNODESP1_2d*2+num_dof*i+0] = 0.;928 L Stokes[num_dof*NUMNODESP1_2d*2+num_dof*i+1] = 0.;929 L Stokes[num_dof*NUMNODESP1_2d*2+num_dof*i+2] = l1l2l3[i];930 L Stokes[num_dof*NUMNODESP1_2d*2+num_dof*i+3] = 0.;931 L Stokes[num_dof*NUMNODESP1_2d*3+num_dof*i+0] = 0.;932 L Stokes[num_dof*NUMNODESP1_2d*3+num_dof*i+1] = 0.;933 L Stokes[num_dof*NUMNODESP1_2d*3+num_dof*i+2] = l1l2l3[i];934 L Stokes[num_dof*NUMNODESP1_2d*3+num_dof*i+3] = 0.;935 } 936 } 937 /*}}}*/ 938 /*FUNCTION PentaRef::GetLprime StokesMacAyeal {{{*/939 void PentaRef::GetLprime StokesMacAyeal(IssmDouble* LprimeStokes, IssmDouble* xyz_list, GaussPenta* gauss){919 LFS[num_dof*NUMNODESP1_2d*0+num_dof*i+0] = L1L2l3[i]; 920 LFS[num_dof*NUMNODESP1_2d*0+num_dof*i+1] = 0.; 921 LFS[num_dof*NUMNODESP1_2d*0+num_dof*i+2] = 0.; 922 LFS[num_dof*NUMNODESP1_2d*0+num_dof*i+3] = 0.; 923 LFS[num_dof*NUMNODESP1_2d*1+num_dof*i+0] = 0.; 924 LFS[num_dof*NUMNODESP1_2d*1+num_dof*i+1] = L1L2l3[i]; 925 LFS[num_dof*NUMNODESP1_2d*1+num_dof*i+2] = 0.; 926 LFS[num_dof*NUMNODESP1_2d*1+num_dof*i+3] = 0.; 927 LFS[num_dof*NUMNODESP1_2d*2+num_dof*i+0] = 0.; 928 LFS[num_dof*NUMNODESP1_2d*2+num_dof*i+1] = 0.; 929 LFS[num_dof*NUMNODESP1_2d*2+num_dof*i+2] = L1L2l3[i]; 930 LFS[num_dof*NUMNODESP1_2d*2+num_dof*i+3] = 0.; 931 LFS[num_dof*NUMNODESP1_2d*3+num_dof*i+0] = 0.; 932 LFS[num_dof*NUMNODESP1_2d*3+num_dof*i+1] = 0.; 933 LFS[num_dof*NUMNODESP1_2d*3+num_dof*i+2] = L1L2l3[i]; 934 LFS[num_dof*NUMNODESP1_2d*3+num_dof*i+3] = 0.; 935 } 936 } 937 /*}}}*/ 938 /*FUNCTION PentaRef::GetLprimeFSMacAyeal {{{*/ 939 void PentaRef::GetLprimeFSMacAyeal(IssmDouble* LprimeFS, IssmDouble* xyz_list, GaussPenta* gauss){ 940 940 /* Compute Lprime matrix. Lprime=[Lp1 Lp2 Lp3] where Lpi is square and of size numdof. 941 941 * For node i, Lpi can be expressed in the actual coordinate system … … 948 948 */ 949 949 int num_dof=2; 950 IssmDouble l1l2l3[NUMNODESP1_2d];950 IssmDouble L1L2l3[NUMNODESP1_2d]; 951 951 IssmDouble dbasis[3][NUMNODESP1]; 952 952 953 /*Get l1l2l3 in actual coordinate system: */954 l1l2l3[0]=gauss->coord1*(1-gauss->coord4)/2.0;955 l1l2l3[1]=gauss->coord2*(1-gauss->coord4)/2.0;956 l1l2l3[2]=gauss->coord3*(1-gauss->coord4)/2.0;953 /*Get L1L2l3 in actual coordinate system: */ 954 L1L2l3[0]=gauss->coord1*(1-gauss->coord4)/2.0; 955 L1L2l3[1]=gauss->coord2*(1-gauss->coord4)/2.0; 956 L1L2l3[2]=gauss->coord3*(1-gauss->coord4)/2.0; 957 957 GetNodalFunctionsP1Derivatives(&dbasis[0][0],xyz_list,gauss); 958 958 959 /*Build Lprime Stokes: */959 /*Build LprimeFS: */ 960 960 for(int i=0;i<3;i++){ 961 Lprime Stokes[num_dof*NUMNODESP1_2d*0+num_dof*i+0] = l1l2l3[i];962 Lprime Stokes[num_dof*NUMNODESP1_2d*0+num_dof*i+1] = 0.;963 Lprime Stokes[num_dof*NUMNODESP1_2d*1+num_dof*i+0] = 0.;964 Lprime Stokes[num_dof*NUMNODESP1_2d*1+num_dof*i+1] = l1l2l3[i];965 Lprime Stokes[num_dof*NUMNODESP1_2d*2+num_dof*i+0] = l1l2l3[i];966 Lprime Stokes[num_dof*NUMNODESP1_2d*2+num_dof*i+1] = 0.;967 Lprime Stokes[num_dof*NUMNODESP1_2d*3+num_dof*i+0] = 0.;968 Lprime Stokes[num_dof*NUMNODESP1_2d*3+num_dof*i+1] = l1l2l3[i];961 LprimeFS[num_dof*NUMNODESP1_2d*0+num_dof*i+0] = L1L2l3[i]; 962 LprimeFS[num_dof*NUMNODESP1_2d*0+num_dof*i+1] = 0.; 963 LprimeFS[num_dof*NUMNODESP1_2d*1+num_dof*i+0] = 0.; 964 LprimeFS[num_dof*NUMNODESP1_2d*1+num_dof*i+1] = L1L2l3[i]; 965 LprimeFS[num_dof*NUMNODESP1_2d*2+num_dof*i+0] = L1L2l3[i]; 966 LprimeFS[num_dof*NUMNODESP1_2d*2+num_dof*i+1] = 0.; 967 LprimeFS[num_dof*NUMNODESP1_2d*3+num_dof*i+0] = 0.; 968 LprimeFS[num_dof*NUMNODESP1_2d*3+num_dof*i+1] = L1L2l3[i]; 969 969 } 970 970 } -
issm/trunk-jpl/src/c/classes/Elements/PentaRef.h
r15425 r15564 38 38 void GetSegmentJacobianDeterminant(IssmDouble* Jdet, IssmDouble* xyz_list,GaussPenta* gauss); 39 39 void GetJacobianInvert(IssmDouble* Jinv, IssmDouble* xyz_list,GaussPenta* gauss); 40 void GetBMacAyeal Pattyn(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss);41 void GetBMacAyeal Stokes(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss);42 void GetB Pattyn(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss);43 void GetB Stokes(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss);44 void GetB StokesGLS(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss);45 void GetBprimeMacAyeal Stokes(IssmDouble* Bprime, IssmDouble* xyz_list, GaussPenta* gauss);46 void GetBprime Pattyn(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss);47 void GetBprime Stokes(IssmDouble* B_prime, IssmDouble* xyz_list, GaussPenta* gauss);48 void GetBprime StokesGLS(IssmDouble* B_prime, IssmDouble* xyz_list, GaussPenta* gauss);40 void GetBMacAyealHO(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss); 41 void GetBMacAyealFS(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss); 42 void GetBHO(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss); 43 void GetBFS(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss); 44 void GetBFSGLS(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss); 45 void GetBprimeMacAyealFS(IssmDouble* Bprime, IssmDouble* xyz_list, GaussPenta* gauss); 46 void GetBprimeHO(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss); 47 void GetBprimeFS(IssmDouble* B_prime, IssmDouble* xyz_list, GaussPenta* gauss); 48 void GetBprimeFSGLS(IssmDouble* B_prime, IssmDouble* xyz_list, GaussPenta* gauss); 49 49 void GetBprimeVert(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss); 50 50 void GetBAdvec(IssmDouble* B_advec, IssmDouble* xyz_list, GaussPenta* gauss); … … 52 52 void GetBVert(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss); 53 53 void GetBprimeAdvec(IssmDouble* Bprime_advec, IssmDouble* xyz_list, GaussPenta* gauss); 54 void GetB PattynFriction(IssmDouble* L, GaussPenta* gauss);55 void GetL Stokes(IssmDouble* LStokes, GaussPenta* gauss);56 void GetLprime Stokes(IssmDouble* LprimeStokes, IssmDouble* xyz_list, GaussPenta* gauss);57 void GetLMacAyeal Stokes(IssmDouble* LMacAyealStokes, GaussPenta* gauss);58 void GetLprimeMacAyeal Stokes(IssmDouble* LprimeMacAyealStokes, IssmDouble* xyz_list, GaussPenta* gauss);59 void GetL StokesMacAyeal(IssmDouble* LStokesMacAyeal, GaussPenta* gauss);60 void GetLprime StokesMacAyeal(IssmDouble* LprimeStokesMacAyeal, IssmDouble* xyz_list, GaussPenta* gauss);54 void GetBHOFriction(IssmDouble* L, GaussPenta* gauss); 55 void GetLFS(IssmDouble* LFS, GaussPenta* gauss); 56 void GetLprimeFS(IssmDouble* LprimeFS, IssmDouble* xyz_list, GaussPenta* gauss); 57 void GetLMacAyealFS(IssmDouble* LMacAyealFS, GaussPenta* gauss); 58 void GetLprimeMacAyealFS(IssmDouble* LprimeMacAyealFS, IssmDouble* xyz_list, GaussPenta* gauss); 59 void GetLFSMacAyeal(IssmDouble* LFSMacAyeal, GaussPenta* gauss); 60 void GetLprimeFSMacAyeal(IssmDouble* LprimeFSMacAyeal, IssmDouble* xyz_list, GaussPenta* gauss); 61 61 void GetInputValue(IssmDouble* pvalue,IssmDouble* plist, GaussPenta* gauss); 62 62 void GetInputValue(IssmDouble* pvalue,IssmDouble* plist,GaussTria* gauss){_error_("only PentaGauss are supported");}; -
issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
r15544 r15564 193 193 Ke=CreateKMatrixDiagnosticMacAyeal(); 194 194 break; 195 case Diagnostic HutterAnalysisEnum:196 Ke=CreateKMatrixDiagnostic Hutter();195 case DiagnosticSIAAnalysisEnum: 196 Ke=CreateKMatrixDiagnosticSIA(); 197 197 break; 198 198 #endif … … 306 306 pe=CreatePVectorDiagnosticMacAyeal(); 307 307 break; 308 case Diagnostic HutterAnalysisEnum:309 pe=CreatePVectorDiagnostic Hutter();308 case DiagnosticSIAAnalysisEnum: 309 pe=CreatePVectorDiagnosticSIA(); 310 310 break; 311 311 #endif … … 423 423 #ifdef _HAVE_DIAGNOSTIC_ 424 424 case DiagnosticHorizAnalysisEnum: 425 Ke=CreateJacobianDiagnostic Macayeal();425 Ke=CreateJacobianDiagnosticSSA(); 426 426 break; 427 427 #endif … … 1201 1201 GetSolutionFromInputsDiagnosticHoriz(solution); 1202 1202 break; 1203 case Diagnostic HutterAnalysisEnum:1204 GetSolutionFromInputsDiagnostic Hutter(solution);1203 case DiagnosticSIAAnalysisEnum: 1204 GetSolutionFromInputsDiagnosticSIA(solution); 1205 1205 break; 1206 1206 #endif … … 1522 1522 InputUpdateFromSolutionDiagnosticHoriz(solution); 1523 1523 break; 1524 case Diagnostic HutterAnalysisEnum:1524 case DiagnosticSIAAnalysisEnum: 1525 1525 InputUpdateFromSolutionDiagnosticHoriz(solution); 1526 1526 break; … … 2343 2343 iomodel->Constant(&progstabilization,PrognosticStabilizationEnum); 2344 2344 iomodel->Constant(&balancestabilization,BalancethicknessStabilizationEnum); 2345 iomodel->Constant(&fe_ssa,FlowequationFeS saEnum);2345 iomodel->Constant(&fe_ssa,FlowequationFeSSAEnum); 2346 2346 iomodel->Constant(&dakota_analysis,QmuIsdakotaEnum); 2347 2347 … … 3055 3055 } 3056 3056 /*}}}*/ 3057 /*FUNCTION Tria::CreateKMatrixDiagnostic Hutter{{{*/3058 ElementMatrix* Tria::CreateKMatrixDiagnostic Hutter(void){3057 /*FUNCTION Tria::CreateKMatrixDiagnosticSIA{{{*/ 3058 ElementMatrix* Tria::CreateKMatrixDiagnosticSIA(void){ 3059 3059 3060 3060 /*Intermediaries*/ … … 3224 3224 } 3225 3225 /*}}}*/ 3226 /*FUNCTION Tria::CreatePVectorDiagnostic Hutter{{{*/3227 ElementVector* Tria::CreatePVectorDiagnostic Hutter(void){3226 /*FUNCTION Tria::CreatePVectorDiagnosticSIA{{{*/ 3227 ElementVector* Tria::CreatePVectorDiagnosticSIA(void){ 3228 3228 3229 3229 /*Intermediaries */ … … 3274 3274 } 3275 3275 /*}}}*/ 3276 /*FUNCTION Tria::CreateJacobianDiagnostic Macayeal{{{*/3277 ElementMatrix* Tria::CreateJacobianDiagnostic Macayeal(void){3276 /*FUNCTION Tria::CreateJacobianDiagnosticSSA{{{*/ 3277 ElementMatrix* Tria::CreateJacobianDiagnosticSSA(void){ 3278 3278 3279 3279 /*Intermediaries */ … … 3382 3382 } 3383 3383 /*}}}*/ 3384 /*FUNCTION Tria::GetSolutionFromInputsDiagnostic Hutter{{{*/3385 void Tria::GetSolutionFromInputsDiagnostic Hutter(Vector<IssmDouble>* solution){3384 /*FUNCTION Tria::GetSolutionFromInputsDiagnosticSIA{{{*/ 3385 void Tria::GetSolutionFromInputsDiagnosticSIA(Vector<IssmDouble>* solution){ 3386 3386 3387 3387 const int numdof=NDOF2*NUMVERTICES; … … 3494 3494 } 3495 3495 /*}}}*/ 3496 /*FUNCTION Tria::InputUpdateFromSolutionDiagnostic Hutter{{{*/3497 void Tria::InputUpdateFromSolutionDiagnostic Hutter(IssmDouble* solution){3496 /*FUNCTION Tria::InputUpdateFromSolutionDiagnosticSIA {{{*/ 3497 void Tria::InputUpdateFromSolutionDiagnosticSIA(IssmDouble* solution){ 3498 3498 3499 3499 int i; … … 5137 5137 } 5138 5138 /*}}}*/ 5139 /*FUNCTION Tria::CreatePVectorAdjoint Stokes{{{*/5140 ElementVector* Tria::CreatePVectorAdjoint Stokes(void){5139 /*FUNCTION Tria::CreatePVectorAdjointFS{{{*/ 5140 ElementVector* Tria::CreatePVectorAdjointFS(void){ 5141 5141 5142 5142 /*Intermediaries */ … … 5156 5156 5157 5157 /*Initialize Element vector*/ 5158 ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters, StokesApproximationEnum);5158 ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters,FSApproximationEnum); 5159 5159 5160 5160 /*Retrieve all inputs and parameters*/ -
issm/trunk-jpl/src/c/classes/Elements/Tria.h
r15517 r15564 147 147 void GradjZMacAyeal(Vector<IssmDouble>* gradient,int control_index); 148 148 void GradjDragMacAyeal(Vector<IssmDouble>* gradient,int control_index); 149 void GradjDrag Stokes(Vector<IssmDouble>* gradient,int control_index);149 void GradjDragFS(Vector<IssmDouble>* gradient,int control_index); 150 150 void GradjDragGradient(Vector<IssmDouble>* gradient,int weight_index,int control_index); 151 151 void GradjDhDtBalancedthickness(Vector<IssmDouble>* gradient,int control_index); … … 223 223 ElementMatrix* CreateKMatrixDiagnosticMacAyealViscous(void); 224 224 ElementMatrix* CreateKMatrixDiagnosticMacAyealFriction(void); 225 ElementMatrix* CreateKMatrixDiagnostic Hutter(void);225 ElementMatrix* CreateKMatrixDiagnosticSIA(void); 226 226 ElementVector* CreatePVectorDiagnosticMacAyeal(void); 227 227 ElementVector* CreatePVectorDiagnosticMacAyealDrivingStress(void); 228 228 ElementVector* CreatePVectorDiagnosticMacAyealFront(void); 229 ElementVector* CreatePVectorDiagnostic Hutter(void);230 ElementMatrix* CreateJacobianDiagnostic Macayeal(void);229 ElementVector* CreatePVectorDiagnosticSIA(void); 230 ElementMatrix* CreateJacobianDiagnosticSSA(void); 231 231 void GetSolutionFromInputsDiagnosticHoriz(Vector<IssmDouble>* solution); 232 void GetSolutionFromInputsDiagnostic Hutter(Vector<IssmDouble>* solution);232 void GetSolutionFromInputsDiagnosticSIA(Vector<IssmDouble>* solution); 233 233 void InputUpdateFromSolutionDiagnosticHoriz( IssmDouble* solution); 234 void InputUpdateFromSolutionDiagnostic Hutter( IssmDouble* solution);234 void InputUpdateFromSolutionDiagnosticSIA( IssmDouble* solution); 235 235 #endif 236 236 … … 239 239 ElementMatrix* CreateKMatrixAdjointMacAyeal(void); 240 240 ElementVector* CreatePVectorAdjointHoriz(void); 241 ElementVector* CreatePVectorAdjoint Stokes(void);241 ElementVector* CreatePVectorAdjointFS(void); 242 242 ElementVector* CreatePVectorAdjointBalancethickness(void); 243 243 void InputUpdateFromSolutionAdjointBalancethickness( IssmDouble* solution); -
issm/trunk-jpl/src/c/classes/Elements/TriaRef.cpp
r15496 r15564 114 114 } 115 115 /*}}}*/ 116 /*FUNCTION TriaRef::GetBMacAyeal Stokes{{{*/117 void TriaRef::GetBMacAyeal Stokes(IssmDouble* B, IssmDouble* xyz_list, GaussTria* gauss){116 /*FUNCTION TriaRef::GetBMacAyealFS {{{*/ 117 void TriaRef::GetBMacAyealFS(IssmDouble* B, IssmDouble* xyz_list, GaussTria* gauss){ 118 118 119 119 /*Compute B matrix. B=[B1 B2 B3] where Bi is of size 3*NDOF2. … … 265 265 } 266 266 /*}}}*/ 267 /*FUNCTION TriaRef::GetBprimeMacAyeal Stokes{{{*/268 void TriaRef::GetBprimeMacAyeal Stokes(IssmDouble* Bprime, IssmDouble* xyz_list, GaussTria* gauss){267 /*FUNCTION TriaRef::GetBprimeMacAyealFS {{{*/ 268 void TriaRef::GetBprimeMacAyealFS(IssmDouble* Bprime, IssmDouble* xyz_list, GaussTria* gauss){ 269 269 /*Compute Bprime matrix. Bprime=[Bprime1 Bprime2 Bprime3] where Bprimei is of size 3*NDOF2. 270 270 * For node i, Bprimei can be expressed in the actual coordinate system -
issm/trunk-jpl/src/c/classes/Elements/TriaRef.h
r15326 r15564 24 24 /*Numerics*/ 25 25 void GetBMacAyeal(IssmDouble* B, IssmDouble* xyz_list, GaussTria* gauss); 26 void GetBMacAyeal Stokes(IssmDouble* B , IssmDouble* xyz_list, GaussTria* gauss);26 void GetBMacAyealFS(IssmDouble* B , IssmDouble* xyz_list, GaussTria* gauss); 27 27 void GetBprimeMacAyeal(IssmDouble* Bprime, IssmDouble* xyz_list, GaussTria* gauss); 28 void GetBprimeMacAyeal Stokes(IssmDouble* Bprime, IssmDouble* xyz_list, GaussTria* gauss);28 void GetBprimeMacAyealFS(IssmDouble* Bprime, IssmDouble* xyz_list, GaussTria* gauss); 29 29 void GetBprimePrognostic(IssmDouble* Bprime, IssmDouble* xyz_list, GaussTria* gauss); 30 30 void GetBPrognostic(IssmDouble* B, IssmDouble* xyz_list, GaussTria* gauss); -
issm/trunk-jpl/src/c/classes/Inputs/BoolInput.h
r15130 r15564 62 62 void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 63 63 void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 64 void GetVxStrainRate3d Pattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};65 void GetVyStrainRate3d Pattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};64 void GetVxStrainRate3dHO(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 65 void GetVyStrainRate3dHO(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 66 66 void ChangeEnum(int newenumtype); 67 67 void SquareMin(IssmDouble* psquaremin, Parameters* parameters); -
issm/trunk-jpl/src/c/classes/Inputs/ControlInput.h
r15417 r15564 67 67 void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 68 68 void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 69 void GetVxStrainRate3d Pattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};70 void GetVyStrainRate3d Pattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};69 void GetVxStrainRate3dHO(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 70 void GetVyStrainRate3dHO(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 71 71 void ChangeEnum(int newenumtype){_error_("not implemented yet");}; 72 72 void SquareMin(IssmDouble* psquaremin,Parameters* parameters){_error_("not implemented yet");}; -
issm/trunk-jpl/src/c/classes/Inputs/DatasetInput.h
r15130 r15564 61 61 void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 62 62 void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 63 void GetVxStrainRate3d Pattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};64 void GetVyStrainRate3d Pattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};63 void GetVxStrainRate3dHO(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 64 void GetVyStrainRate3dHO(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 65 65 void ChangeEnum(int newenumtype){_error_("not implemented yet");}; 66 66 void SquareMin(IssmDouble* psquaremin,Parameters* parameters){_error_("not implemented yet");}; -
issm/trunk-jpl/src/c/classes/Inputs/DoubleInput.cpp
r15417 r15564 156 156 } 157 157 /*}}}*/ 158 /*FUNCTION DoubleInput::GetVxStrainRate3d Pattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){{{*/159 void DoubleInput::GetVxStrainRate3d Pattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){158 /*FUNCTION DoubleInput::GetVxStrainRate3dHO(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){{{*/ 159 void DoubleInput::GetVxStrainRate3dHO(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){ 160 160 /*Epsilon is zero as vx is constant over the element*/ 161 161 for(int i=0;i<5;i++) epsilonvx[i]=0; 162 162 } 163 163 /*}}}*/ 164 /*FUNCTION DoubleInput::GetVyStrainRate3d Pattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){{{*/165 void DoubleInput::GetVyStrainRate3d Pattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){164 /*FUNCTION DoubleInput::GetVyStrainRate3dHO(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){{{*/ 165 void DoubleInput::GetVyStrainRate3dHO(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){ 166 166 /*Epsilon is zero as vy is constant over the element*/ 167 167 for(int i=0;i<5;i++) epsilonvy[i]=0; -
issm/trunk-jpl/src/c/classes/Inputs/DoubleInput.h
r15130 r15564 61 61 void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss); 62 62 void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmDouble* xyz_list, GaussPenta* gauss); 63 void GetVxStrainRate3d Pattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss);64 void GetVyStrainRate3d Pattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss);63 void GetVxStrainRate3dHO(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss); 64 void GetVyStrainRate3dHO(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss); 65 65 void ChangeEnum(int newenumtype); 66 66 void SquareMin(IssmDouble* psquaremin,Parameters* parameters); -
issm/trunk-jpl/src/c/classes/Inputs/Input.h
r15130 r15564 44 44 virtual void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss)=0; 45 45 virtual void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmDouble* xyz_list, GaussPenta* gauss)=0; 46 virtual void GetVxStrainRate3d Pattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss)=0;47 virtual void GetVyStrainRate3d Pattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss)=0;46 virtual void GetVxStrainRate3dHO(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss)=0; 47 virtual void GetVyStrainRate3dHO(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss)=0; 48 48 virtual void ChangeEnum(int newenumtype)=0; 49 49 virtual void Configure(Parameters* parameters)=0; -
issm/trunk-jpl/src/c/classes/Inputs/IntInput.h
r15130 r15564 63 63 void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 64 64 void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 65 void GetVxStrainRate3d Pattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};66 void GetVyStrainRate3d Pattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};65 void GetVxStrainRate3dHO(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 66 void GetVyStrainRate3dHO(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 67 67 void ChangeEnum(int newenumtype); 68 68 void SquareMin(IssmDouble* psquaremin,Parameters* parameters); -
issm/trunk-jpl/src/c/classes/Inputs/PentaInput.cpp
r15417 r15564 145 145 146 146 /*Get B matrix: */ 147 GetB Stokes(&B[0][0], xyz_list, gauss);147 GetBFS(&B[0][0], xyz_list, gauss); 148 148 149 149 /*Create a reduced matrix of B to get rid of pressure */ … … 193 193 194 194 /*Get B matrix: */ 195 GetB Stokes(&B[0][0], xyz_list, gauss);195 GetBFS(&B[0][0], xyz_list, gauss); 196 196 /*Create a reduced matrix of B to get rid of pressure */ 197 197 for (i=0;i<6;i++){ … … 238 238 239 239 /*Get B matrix: */ 240 GetB Stokes(&B[0][0], xyz_list, gauss);240 GetBFS(&B[0][0], xyz_list, gauss); 241 241 242 242 _assert_(this->NumberofNodes()==6); //Check Tria too … … 276 276 } 277 277 /*}}}*/ 278 /*FUNCTION PentaInput::GetVxStrainRate3d Pattyn{{{*/279 void PentaInput::GetVxStrainRate3d Pattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){278 /*FUNCTION PentaInput::GetVxStrainRate3dHO{{{*/ 279 void PentaInput::GetVxStrainRate3dHO(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){ 280 280 281 281 int i; … … 285 285 286 286 /*Get B matrix: */ 287 GetB Pattyn(&B[0][0], xyz_list, gauss);287 GetBHO(&B[0][0], xyz_list, gauss); 288 288 289 289 _assert_(this->NumberofNodes()==6); //Check Tria too … … 303 303 } 304 304 /*}}}*/ 305 /*FUNCTION PentaInput::GetVyStrainRate3d Pattyn{{{*/306 void PentaInput::GetVyStrainRate3d Pattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){305 /*FUNCTION PentaInput::GetVyStrainRate3dHO{{{*/ 306 void PentaInput::GetVyStrainRate3dHO(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){ 307 307 308 308 int i; … … 312 312 313 313 /*Get B matrix: */ 314 GetB Pattyn(&B[0][0], xyz_list, gauss);314 GetBHO(&B[0][0], xyz_list, gauss); 315 315 316 316 _assert_(this->NumberofNodes()==6); //Check Tria too -
issm/trunk-jpl/src/c/classes/Inputs/PentaInput.h
r15417 r15564 62 62 void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss); 63 63 void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmDouble* xyz_list, GaussPenta* gauss); 64 void GetVxStrainRate3d Pattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss);65 void GetVyStrainRate3d Pattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss);64 void GetVxStrainRate3dHO(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss); 65 void GetVyStrainRate3dHO(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss); 66 66 void ChangeEnum(int newenumtype); 67 67 -
issm/trunk-jpl/src/c/classes/Inputs/TransientInput.h
r15130 r15564 65 65 void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 66 66 void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 67 void GetVxStrainRate3d Pattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};68 void GetVyStrainRate3d Pattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};67 void GetVxStrainRate3dHO(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 68 void GetVyStrainRate3dHO(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 69 69 void ChangeEnum(int newenumtype); 70 70 -
issm/trunk-jpl/src/c/classes/Inputs/TriaInput.h
r15417 r15564 62 62 void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 63 63 void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 64 void GetVxStrainRate3d Pattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};65 void GetVyStrainRate3d Pattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};64 void GetVxStrainRate3dHO(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 65 void GetVyStrainRate3dHO(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 66 66 void ChangeEnum(int newenumtype); 67 67 -
issm/trunk-jpl/src/c/classes/Loads/Icefront.cpp
r15508 r15564 75 75 icefront_vertex_ids[1]=reCast<int>(*(iomodel->Data(DiagnosticIcefrontEnum)+segment_width*i+1)); 76 76 } 77 else if (in_icefront_type== PattynIceFrontEnum || in_icefront_type==StokesIceFrontEnum){77 else if (in_icefront_type==HOIceFrontEnum || in_icefront_type==FSIceFrontEnum){ 78 78 numnodes = 4; 79 79 numvertices = 4; … … 158 158 // icefront_vertex_ids[1]=reCast<int>(*(iomodel->Data(DiagnosticIcefrontEnum)+segment_width*i+1)); 159 159 } 160 else if (in_icefront_type== PattynIceFrontEnum || in_icefront_type==StokesIceFrontEnum){160 else if (in_icefront_type==HOIceFrontEnum || in_icefront_type==FSIceFrontEnum){ 161 161 // icefront_node_ids[0]=iomodel->nodecounter+reCast<int>(*(iomodel->Data(DiagnosticIcefrontEnum)+segment_width*i+0)); 162 162 // icefront_node_ids[1]=iomodel->nodecounter+reCast<int>(*(iomodel->Data(DiagnosticIcefrontEnum)+segment_width*i+1)); … … 170 170 else _error_("in_icefront_type " << EnumToStringx(in_icefront_type) << " not supported yet!"); 171 171 172 if (in_icefront_type== PattynIceFrontEnum || in_icefront_type==StokesIceFrontEnum){172 if (in_icefront_type==HOIceFrontEnum || in_icefront_type==FSIceFrontEnum){ 173 173 numnodes=4; 174 174 numvertices=4; … … 380 380 return; 381 381 #ifdef _HAVE_3D_ 382 case PattynIceFrontEnum:383 case StokesIceFrontEnum:382 case HOIceFrontEnum: 383 case FSIceFrontEnum: 384 384 for(int i=0;i<NUMVERTICESQUA;i++) sidlist[i]=nodes[i]->Sid(); 385 385 return; … … 402 402 case MacAyeal3dIceFrontEnum: 403 403 return NUMVERTICESSEG; 404 case PattynIceFrontEnum:404 case HOIceFrontEnum: 405 405 return NUMVERTICESQUA; 406 case StokesIceFrontEnum:406 case FSIceFrontEnum: 407 407 return NUMVERTICESQUA; 408 408 #endif … … 564 564 case MacAyeal3dIceFrontEnum: 565 565 return CreatePVectorDiagnosticMacAyeal3d(); 566 case PattynIceFrontEnum:567 return CreatePVectorDiagnostic Pattyn();568 case StokesIceFrontEnum:569 return CreatePVectorDiagnostic Stokes();566 case HOIceFrontEnum: 567 return CreatePVectorDiagnosticHO(); 568 case FSIceFrontEnum: 569 return CreatePVectorDiagnosticFS(); 570 570 #endif 571 571 default: … … 696 696 } 697 697 /*}}}*/ 698 /*FUNCTION Icefront::CreatePVectorDiagnostic Pattyn{{{*/699 ElementVector* Icefront::CreatePVectorDiagnostic Pattyn(void){698 /*FUNCTION Icefront::CreatePVectorDiagnosticHO{{{*/ 699 ElementVector* Icefront::CreatePVectorDiagnosticHO(void){ 700 700 701 701 /*Constants*/ … … 717 717 /*Initialize Element vector and return if necessary*/ 718 718 if(penta->IsOnWater()) return NULL; 719 ElementVector* pe=new ElementVector(nodes,NUMVERTICESQUA,this->parameters, PattynApproximationEnum);719 ElementVector* pe=new ElementVector(nodes,NUMVERTICESQUA,this->parameters,HOApproximationEnum); 720 720 721 721 /*Retrieve all inputs and parameters*/ … … 773 773 } 774 774 /*}}}*/ 775 /*FUNCTION Icefront::CreatePVectorDiagnostic Stokes{{{*/776 ElementVector* Icefront::CreatePVectorDiagnostic Stokes(void){775 /*FUNCTION Icefront::CreatePVectorDiagnosticFS{{{*/ 776 ElementVector* Icefront::CreatePVectorDiagnosticFS(void){ 777 777 778 778 /*Constants*/ … … 794 794 /*Initialize Element vector and return if necessary*/ 795 795 if(penta->IsOnWater()) return NULL; 796 ElementVector* pe=new ElementVector(nodes,NUMVERTICESQUA,this->parameters, StokesApproximationEnum);796 ElementVector* pe=new ElementVector(nodes,NUMVERTICESQUA,this->parameters,FSApproximationEnum); 797 797 798 798 /*Retrieve all inputs and parameters*/ … … 833 833 } 834 834 air_pressure=0; 835 pressure = water_pressure + air_pressure; //no ice pressure fore Stokes835 pressure = water_pressure + air_pressure; //no ice pressure fore FS 836 836 837 837 for(i=0;i<NUMVERTICESQUA;i++){ -
issm/trunk-jpl/src/c/classes/Loads/Icefront.h
r15509 r15564 97 97 #ifdef _HAVE_3D_ 98 98 ElementVector* CreatePVectorDiagnosticMacAyeal3d(void); 99 ElementVector* CreatePVectorDiagnostic Pattyn(void);100 ElementVector* CreatePVectorDiagnostic Stokes(void);99 ElementVector* CreatePVectorDiagnosticHO(void); 100 ElementVector* CreatePVectorDiagnosticFS(void); 101 101 #endif 102 102 /*}}}*/ -
issm/trunk-jpl/src/c/classes/Loads/Pengrid.cpp
r15428 r15564 223 223 #ifdef _HAVE_DIAGNOSTIC_ 224 224 case DiagnosticHorizAnalysisEnum: case AdjointHorizAnalysisEnum: 225 Ke=PenaltyCreateKMatrixDiagnostic Stokes(kmax);225 Ke=PenaltyCreateKMatrixDiagnosticFS(kmax); 226 226 break; 227 227 #endif … … 449 449 /*}}}*/ 450 450 #ifdef _HAVE_DIAGNOSTIC_ 451 /*FUNCTION Pengrid::PenaltyCreateKMatrixDiagnostic Stokes{{{*/452 ElementMatrix* Pengrid::PenaltyCreateKMatrixDiagnostic Stokes(IssmDouble kmax){451 /*FUNCTION Pengrid::PenaltyCreateKMatrixDiagnosticFS {{{*/ 452 ElementMatrix* Pengrid::PenaltyCreateKMatrixDiagnosticFS(IssmDouble kmax){ 453 453 454 454 const int numdof = NUMVERTICES *NDOF4; … … 461 461 /*Initialize Element vector and return if necessary*/ 462 462 penta->inputs->GetInputValue(&approximation,ApproximationEnum); 463 if(approximation!= StokesApproximationEnum && approximation!=PattynStokesApproximationEnum) return NULL;464 ElementMatrix* Ke=new ElementMatrix(&node,1,this->parameters, StokesApproximationEnum);463 if(approximation!=FSApproximationEnum && approximation!=HOFSApproximationEnum) return NULL; 464 ElementMatrix* Ke=new ElementMatrix(&node,1,this->parameters,FSApproximationEnum); 465 465 466 466 /*Retrieve all inputs and parameters*/ -
issm/trunk-jpl/src/c/classes/Loads/Pengrid.h
r14769 r15564 88 88 /*Pengrid management {{{*/ 89 89 #ifdef _HAVE_DIAGNOSTIC_ 90 ElementMatrix* PenaltyCreateKMatrixDiagnostic Stokes(IssmDouble kmax);90 ElementMatrix* PenaltyCreateKMatrixDiagnosticFS(IssmDouble kmax); 91 91 #endif 92 92 #ifdef _HAVE_THERMAL_ -
issm/trunk-jpl/src/c/classes/Loads/Penpair.cpp
r15104 r15564 301 301 case MacAyealApproximationEnum: 302 302 switch(approximation1){ 303 case MacAyealApproximationEnum: return PenaltyCreateKMatrixDiagnosticMacAyeal Pattyn(kmax);304 case PattynApproximationEnum: return PenaltyCreateKMatrixDiagnosticMacAyealPattyn(kmax);303 case MacAyealApproximationEnum: return PenaltyCreateKMatrixDiagnosticMacAyealHO(kmax); 304 case HOApproximationEnum: return PenaltyCreateKMatrixDiagnosticMacAyealHO(kmax); 305 305 default: _error_("not supported yet"); 306 306 } 307 case PattynApproximationEnum:307 case HOApproximationEnum: 308 308 switch(approximation1){ 309 case MacAyealApproximationEnum: return PenaltyCreateKMatrixDiagnosticMacAyeal Pattyn(kmax);310 case PattynApproximationEnum: return PenaltyCreateKMatrixDiagnosticMacAyealPattyn(kmax);309 case MacAyealApproximationEnum: return PenaltyCreateKMatrixDiagnosticMacAyealHO(kmax); 310 case HOApproximationEnum: return PenaltyCreateKMatrixDiagnosticMacAyealHO(kmax); 311 311 default: _error_("not supported yet"); 312 312 } 313 case StokesApproximationEnum:313 case FSApproximationEnum: 314 314 switch(approximation1){ 315 case StokesApproximationEnum: return PenaltyCreateKMatrixDiagnosticStokes(kmax);316 case NoneApproximationEnum: return PenaltyCreateKMatrixDiagnostic Stokes(kmax);315 case FSApproximationEnum: return PenaltyCreateKMatrixDiagnosticFS(kmax); 316 case NoneApproximationEnum: return PenaltyCreateKMatrixDiagnosticFS(kmax); 317 317 default: _error_("not supported yet"); 318 318 } 319 319 case NoneApproximationEnum: 320 320 switch(approximation1){ 321 case StokesApproximationEnum: return PenaltyCreateKMatrixDiagnosticStokes(kmax);322 case NoneApproximationEnum: return PenaltyCreateKMatrixDiagnostic Stokes(kmax);321 case FSApproximationEnum: return PenaltyCreateKMatrixDiagnosticFS(kmax); 322 case NoneApproximationEnum: return PenaltyCreateKMatrixDiagnosticFS(kmax); 323 323 default: _error_("not supported yet"); 324 324 } … … 327 327 } 328 328 /*}}}*/ 329 /*FUNCTION Penpair::PenaltyCreateKMatrixDiagnosticMacAyeal Pattyn{{{*/330 ElementMatrix* Penpair::PenaltyCreateKMatrixDiagnosticMacAyeal Pattyn(IssmDouble kmax){329 /*FUNCTION Penpair::PenaltyCreateKMatrixDiagnosticMacAyealHO {{{*/ 330 ElementMatrix* Penpair::PenaltyCreateKMatrixDiagnosticMacAyealHO(IssmDouble kmax){ 331 331 332 332 const int numdof=NUMVERTICES*NDOF2; … … 354 354 } 355 355 /*}}}*/ 356 /*FUNCTION Penpair::PenaltyCreateKMatrixDiagnostic Stokes{{{*/357 ElementMatrix* Penpair::PenaltyCreateKMatrixDiagnostic Stokes(IssmDouble kmax){356 /*FUNCTION Penpair::PenaltyCreateKMatrixDiagnosticFS {{{*/ 357 ElementMatrix* Penpair::PenaltyCreateKMatrixDiagnosticFS(IssmDouble kmax){ 358 358 359 359 const int numdof=NUMVERTICES*NDOF4; -
issm/trunk-jpl/src/c/classes/Loads/Penpair.h
r13925 r15564 68 68 /*Penpair management: {{{*/ 69 69 ElementMatrix* PenaltyCreateKMatrixDiagnosticHoriz(IssmDouble kmax); 70 ElementMatrix* PenaltyCreateKMatrixDiagnosticMacAyeal Pattyn(IssmDouble kmax);71 ElementMatrix* PenaltyCreateKMatrixDiagnostic Stokes(IssmDouble kmax);70 ElementMatrix* PenaltyCreateKMatrixDiagnosticMacAyealHO(IssmDouble kmax); 71 ElementMatrix* PenaltyCreateKMatrixDiagnosticFS(IssmDouble kmax); 72 72 ElementMatrix* PenaltyCreateKMatrixPrognostic(IssmDouble kmax); 73 73 /*}}}*/ -
issm/trunk-jpl/src/c/classes/Materials/Matdamageice.cpp
r15428 r15564 351 351 } 352 352 /*}}}*/ 353 /*FUNCTION Matdamageice::GetViscosity3d Stokes{{{*/354 void Matdamageice::GetViscosity3d Stokes(IssmDouble* pviscosity3d, IssmDouble* epsilon){353 /*FUNCTION Matdamageice::GetViscosity3dFS {{{*/ 354 void Matdamageice::GetViscosity3dFS(IssmDouble* pviscosity3d, IssmDouble* epsilon){ 355 355 /*Return viscosity accounting for steady state power law creep [Thomas and MacAyeal, 1982]: 356 356 * -
issm/trunk-jpl/src/c/classes/Materials/Matdamageice.h
r13414 r15564 52 52 void GetViscosity2d(IssmDouble* pviscosity, IssmDouble* pepsilon); 53 53 void GetViscosity3d(IssmDouble* pviscosity3d, IssmDouble* pepsilon); 54 void GetViscosity3d Stokes(IssmDouble* pviscosity3d, IssmDouble* epsilon);54 void GetViscosity3dFS(IssmDouble* pviscosity3d, IssmDouble* epsilon); 55 55 void GetViscosityComplement(IssmDouble* pviscosity_complement, IssmDouble* pepsilon); 56 56 void GetViscosityZComplement(IssmDouble* pviscosity_complement, IssmDouble* pepsilon); -
issm/trunk-jpl/src/c/classes/Materials/Material.h
r15067 r15564 28 28 virtual void GetViscosity2d(IssmDouble* pviscosity, IssmDouble* pepsilon)=0; 29 29 virtual void GetViscosity3d(IssmDouble* pviscosity3d, IssmDouble* pepsilon)=0; 30 virtual void GetViscosity3d Stokes(IssmDouble* pviscosity3d, IssmDouble* epsilon)=0;30 virtual void GetViscosity3dFS(IssmDouble* pviscosity3d, IssmDouble* epsilon)=0; 31 31 virtual void GetViscosityComplement(IssmDouble* pviscosity_complement, IssmDouble* pepsilon)=0; 32 32 virtual void GetViscosityZComplement(IssmDouble* pviscosity_complement, IssmDouble* pepsilon)=0; -
issm/trunk-jpl/src/c/classes/Materials/Matice.cpp
r15428 r15564 342 342 } 343 343 /*}}}*/ 344 /*FUNCTION Matice::GetViscosity3d Stokes{{{*/345 void Matice::GetViscosity3d Stokes(IssmDouble* pviscosity3d, IssmDouble* epsilon){344 /*FUNCTION Matice::GetViscosity3dFS {{{*/ 345 void Matice::GetViscosity3dFS(IssmDouble* pviscosity3d, IssmDouble* epsilon){ 346 346 /*Return viscosity accounting for steady state power law creep [Thomas and MacAyeal, 1982]: 347 347 * -
issm/trunk-jpl/src/c/classes/Materials/Matice.h
r15012 r15564 59 59 void GetViscosity2d(IssmDouble* pviscosity, IssmDouble* pepsilon); 60 60 void GetViscosity3d(IssmDouble* pviscosity3d, IssmDouble* pepsilon); 61 void GetViscosity3d Stokes(IssmDouble* pviscosity3d, IssmDouble* epsilon);61 void GetViscosity3dFS(IssmDouble* pviscosity3d, IssmDouble* epsilon); 62 62 void GetViscosityComplement(IssmDouble* pviscosity_complement, IssmDouble* pepsilon); 63 63 void GetViscosityZComplement(IssmDouble*, IssmDouble*){_error_("not supported");}; -
issm/trunk-jpl/src/c/classes/Materials/Matpar.h
r15375 r15564 89 89 void GetViscosity2d(IssmDouble* pviscosity, IssmDouble* pepsilon){_error_("not supported");}; 90 90 void GetViscosity3d(IssmDouble* pviscosity3d, IssmDouble* pepsilon){_error_("not supported");}; 91 void GetViscosity3d Stokes(IssmDouble* pviscosity3d, IssmDouble* epsilon){_error_("not supported");};91 void GetViscosity3dFS(IssmDouble* pviscosity3d, IssmDouble* epsilon){_error_("not supported");}; 92 92 void GetViscosityComplement(IssmDouble* pviscosity_complement, IssmDouble* pepsilon){_error_("not supported");}; 93 93 void GetViscosityZComplement(IssmDouble* pviscosity_complement, IssmDouble* pepsilon){_error_("not supported");}; -
issm/trunk-jpl/src/c/classes/Node.cpp
r15533 r15564 83 83 this->Deactivate(); 84 84 } 85 if(node_type==MacAyeal PattynApproximationEnum && reCast<int>(iomodel->Data(FlowequationBordermacayealEnum)[io_index])){85 if(node_type==MacAyealHOApproximationEnum && reCast<int>(iomodel->Data(FlowequationBorderSSAEnum)[io_index])){ 86 86 if(!reCast<int>(iomodel->Data(MeshVertexonbedEnum)[io_index])){ 87 87 this->Deactivate(); 88 88 } 89 89 } 90 if(node_type==MacAyeal StokesApproximationEnum && reCast<int>(iomodel->Data(FlowequationBordermacayealEnum)[io_index])){90 if(node_type==MacAyealFSApproximationEnum && reCast<int>(iomodel->Data(FlowequationBorderSSAEnum)[io_index])){ 91 91 if(!reCast<int>(iomodel->Data(MeshVertexonbedEnum)[io_index])){ 92 92 for(k=1;k<=2;k++) this->FreezeDof(k); … … 94 94 } 95 95 } 96 /*spc all nodes on hutter*/97 if(node_type== HutterApproximationEnum){96 /*spc all nodes on SIA*/ 97 if(node_type==SIAApproximationEnum){ 98 98 this->Deactivate(); 99 99 } … … 101 101 #endif 102 102 103 /*Diagnostic Hutter*/104 if(analysis_type==Diagnostic HutterAnalysisEnum){103 /*Diagnostic SIA*/ 104 if(analysis_type==DiagnosticSIAAnalysisEnum){ 105 105 _assert_(iomodel->Data(FlowequationVertexEquationEnum)); 106 /*Constrain all nodes that are not Hutter*/107 if(reCast<int>(node_type)!= HutterApproximationEnum){106 /*Constrain all nodes that are not SIA*/ 107 if(reCast<int>(node_type)!=SIAApproximationEnum){ 108 108 this->Deactivate(); 109 109 } -
issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateDataSets.cpp
r15465 r15564 55 55 break; 56 56 57 case Diagnostic HutterAnalysisEnum:58 CreateNodesDiagnostic Hutter(pnodes, iomodel);59 CreateConstraintsDiagnostic Hutter(pconstraints,iomodel);60 CreateLoadsDiagnostic Hutter(ploads,iomodel);61 UpdateElementsDiagnostic Hutter(elements,iomodel,analysis_counter,analysis_type);57 case DiagnosticSIAAnalysisEnum: 58 CreateNodesDiagnosticSIA(pnodes, iomodel); 59 CreateConstraintsDiagnosticSIA(pconstraints,iomodel); 60 CreateLoadsDiagnosticSIA(ploads,iomodel); 61 UpdateElementsDiagnosticSIA(elements,iomodel,analysis_counter,analysis_type); 62 62 break; 63 63 #endif -
issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateParameters.cpp
r15504 r15564 45 45 /*Copy some constants from iomodel */ 46 46 parameters->AddObject(iomodel->CopyConstantObject(MeshDimensionEnum)); 47 parameters->AddObject(iomodel->CopyConstantObject(FlowequationIs hutterEnum));48 parameters->AddObject(iomodel->CopyConstantObject(FlowequationIs macayealEnum));49 parameters->AddObject(iomodel->CopyConstantObject(FlowequationIs l1l2Enum));50 parameters->AddObject(iomodel->CopyConstantObject(FlowequationIs pattynEnum));51 parameters->AddObject(iomodel->CopyConstantObject(FlowequationIs stokesEnum));52 parameters->AddObject(iomodel->CopyConstantObject(FlowequationFe StokesEnum));47 parameters->AddObject(iomodel->CopyConstantObject(FlowequationIsSIAEnum)); 48 parameters->AddObject(iomodel->CopyConstantObject(FlowequationIsSSAEnum)); 49 parameters->AddObject(iomodel->CopyConstantObject(FlowequationIsL1L2Enum)); 50 parameters->AddObject(iomodel->CopyConstantObject(FlowequationIsHOEnum)); 51 parameters->AddObject(iomodel->CopyConstantObject(FlowequationIsFSEnum)); 52 parameters->AddObject(iomodel->CopyConstantObject(FlowequationFeFSEnum)); 53 53 parameters->AddObject(iomodel->CopyConstantObject(SettingsOutputFrequencyEnum)); 54 54 parameters->AddObject(iomodel->CopyConstantObject(DiagnosticRestolEnum)); … … 82 82 parameters->AddObject(iomodel->CopyConstantObject(ThermalPenaltyLockEnum)); 83 83 parameters->AddObject(iomodel->CopyConstantObject(DiagnosticRiftPenaltyThresholdEnum)); 84 parameters->AddObject(iomodel->CopyConstantObject(Diagnostic StokesreconditioningEnum));84 parameters->AddObject(iomodel->CopyConstantObject(DiagnosticFSreconditioningEnum)); 85 85 parameters->AddObject(iomodel->CopyConstantObject(DiagnosticShelfDampeningEnum)); 86 86 parameters->AddObject(iomodel->CopyConstantObject(DiagnosticViscosityOvershootEnum)); -
issm/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateConstraintsDiagnosticHoriz.cpp
r15504 r15564 16 16 IssmDouble g; 17 17 IssmDouble rho_ice; 18 IssmDouble stokesreconditioning;19 bool is macayeal,isl1l2,ispattyn,isstokes;18 IssmDouble FSreconditioning; 19 bool isSSA,isL1L2,isHO,isFS; 20 20 int fe_ssa; 21 21 bool spcpresent = false; … … 26 26 IssmDouble *spcvy = NULL; 27 27 IssmDouble *spcvz = NULL; 28 IssmDouble *nodeon macayeal= NULL;29 IssmDouble *nodeon pattyn= NULL;30 IssmDouble *nodeon stokes= NULL;28 IssmDouble *nodeonSSA = NULL; 29 IssmDouble *nodeonHO = NULL; 30 IssmDouble *nodeonFS = NULL; 31 31 IssmDouble *nodeonbed = NULL; 32 32 IssmDouble *nodeonicesheet = NULL; … … 47 47 iomodel->Constant(&g,ConstantsGEnum); 48 48 iomodel->Constant(&rho_ice,MaterialsRhoIceEnum); 49 iomodel->Constant(& stokesreconditioning,DiagnosticStokesreconditioningEnum);50 iomodel->Constant(&is macayeal,FlowequationIsmacayealEnum);51 iomodel->Constant(&is l1l2,FlowequationIsl1l2Enum);52 iomodel->Constant(&is pattyn,FlowequationIspattynEnum);53 iomodel->Constant(&is stokes,FlowequationIsstokesEnum);54 iomodel->Constant(&fe_ssa,FlowequationFeS saEnum);49 iomodel->Constant(&FSreconditioning,DiagnosticFSreconditioningEnum); 50 iomodel->Constant(&isSSA,FlowequationIsSSAEnum); 51 iomodel->Constant(&isL1L2,FlowequationIsL1L2Enum); 52 iomodel->Constant(&isHO,FlowequationIsHOEnum); 53 iomodel->Constant(&isFS,FlowequationIsFSEnum); 54 iomodel->Constant(&fe_ssa,FlowequationFeSSAEnum); 55 55 56 56 /*Recover pointer: */ 57 57 constraints=*pconstraints; 58 58 59 /*Now, is the flag macayaeal pattynon? otherwise, do nothing: */60 if(!is macayeal & !ispattyn & !isstokes & !isl1l2){59 /*Now, is the flag macayaealHO on? otherwise, do nothing: */ 60 if(!isSSA & !isHO & !isFS & !isL1L2){ 61 61 *pconstraints=constraints; 62 62 return; … … 67 67 iomodel->FetchData(&spcvy,&My,&Ny,DiagnosticSpcvyEnum); 68 68 iomodel->FetchData(&spcvz,&Mz,&Nz,DiagnosticSpcvzEnum); 69 iomodel->FetchData(&nodeon macayeal,NULL,NULL,FlowequationBordermacayealEnum);70 if(iomodel->dim==3)iomodel->FetchData(&nodeon pattyn,NULL,NULL,FlowequationBorderpattynEnum);71 if(iomodel->dim==3)iomodel->FetchData(&nodeon stokes,NULL,NULL,FlowequationBorderstokesEnum);69 iomodel->FetchData(&nodeonSSA,NULL,NULL,FlowequationBorderSSAEnum); 70 if(iomodel->dim==3)iomodel->FetchData(&nodeonHO,NULL,NULL,FlowequationBorderHOEnum); 71 if(iomodel->dim==3)iomodel->FetchData(&nodeonFS,NULL,NULL,FlowequationBorderFSEnum); 72 72 if(iomodel->dim==3)iomodel->FetchData(&nodeonbed,NULL,NULL,MeshVertexonbedEnum); 73 73 if(iomodel->dim==3)iomodel->FetchData(&nodeonicesheet,NULL,NULL,MaskVertexongroundediceEnum); … … 99 99 if(iomodel->my_vertices[i]){ 100 100 101 /*Start with adding spcs of coupling: zero at the border macayeal/pattynfor the appropriate dofs*/102 if (reCast<int,IssmDouble>(vertices_type[i]==MacAyeal PattynApproximationEnum)){103 /*If grion macayeal, spc pattyndofs: 3 & 4*/104 if (reCast<int,IssmDouble>(nodeon pattyn[i])){101 /*Start with adding spcs of coupling: zero at the border SSA/HO for the appropriate dofs*/ 102 if (reCast<int,IssmDouble>(vertices_type[i]==MacAyealHOApproximationEnum)){ 103 /*If grionSSA, spc HO dofs: 3 & 4*/ 104 if (reCast<int,IssmDouble>(nodeonHO[i])){ 105 105 constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,0,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx. 106 106 count++; … … 117 117 118 118 } 119 else if (reCast<int,IssmDouble>(nodeon macayeal[i])){119 else if (reCast<int,IssmDouble>(nodeonSSA[i])){ 120 120 constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,3,0,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx. 121 121 count++; … … 132 132 133 133 } 134 else _error_("if vertices_type is MacAyeal Pattyn, you shoud have nodeonpattyn or nodeonmacayeal");135 } 136 /*Also add spcs of coupling: zero at the border pattyn/stokesfor the appropriate dofs*/137 else if (reCast<int,IssmDouble>(vertices_type[i])== PattynStokesApproximationEnum){138 /*If grion, pattyn spc stokesdofs: 3 4 & 5*/139 if (reCast<int,IssmDouble>(nodeon pattyn[i])){134 else _error_("if vertices_type is MacAyealHO, you shoud have nodeonHO or nodeonSSA"); 135 } 136 /*Also add spcs of coupling: zero at the border HO/FS for the appropriate dofs*/ 137 else if (reCast<int,IssmDouble>(vertices_type[i])==HOFSApproximationEnum){ 138 /*If grion,HO spc FS dofs: 3 4 & 5*/ 139 if (reCast<int,IssmDouble>(nodeonHO[i])){ 140 140 constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,3,0,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx. 141 141 count++; … … 154 154 155 155 } 156 else if (reCast<int,IssmDouble>(nodeon stokes[i])){ //spc pattynnodes: 1 & 2156 else if (reCast<int,IssmDouble>(nodeonFS[i])){ //spc HO nodes: 1 & 2 157 157 constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,0,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx. 158 158 count++; … … 172 172 } 173 173 } 174 else _error_("if vertices_type is PattynStokes, you shoud have nodeonpattyn or nodeonstokes");175 } 176 /*Also add spcs of coupling: zero at the border pattyn/stokesfor the appropriate dofs*/177 else if (reCast<int,IssmDouble>(vertices_type[i])==MacAyeal StokesApproximationEnum){178 /*If grion, pattyn spc stokesdofs: 3 4 & 5*/179 if (reCast<int,IssmDouble>(nodeon macayeal[i])){174 else _error_("if vertices_type is HOFS, you shoud have nodeonHO or nodeonFS"); 175 } 176 /*Also add spcs of coupling: zero at the border HO/FS for the appropriate dofs*/ 177 else if (reCast<int,IssmDouble>(vertices_type[i])==MacAyealFSApproximationEnum){ 178 /*If grion,HO spc FS dofs: 3 4 & 5*/ 179 if (reCast<int,IssmDouble>(nodeonSSA[i])){ 180 180 constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,3,0,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx. 181 181 count++; … … 194 194 195 195 } 196 else if (reCast<int,IssmDouble>(nodeon stokes[i])){ //spc macayealnodes: 1 & 2196 else if (reCast<int,IssmDouble>(nodeonFS[i])){ //spc SSA nodes: 1 & 2 197 197 constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,0,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx. 198 198 count++; … … 212 212 } 213 213 } 214 else _error_("if vertices_type is MacAyeal Stokes, you shoud have nodeonmacayeal or nodeonstokes");214 else _error_("if vertices_type is MacAyealFS, you shoud have nodeonSSA or nodeonFS"); 215 215 } 216 216 /*Now add the regular spcs*/ … … 236 236 xDelete<IssmDouble>(values); 237 237 } 238 else if (vertices_type[i]== HutterApproximationEnum){238 else if (vertices_type[i]==SIAApproximationEnum){ 239 239 constraints->AddObject(new SpcDynamic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,DiagnosticHorizAnalysisEnum)); 240 240 count++; … … 259 259 xDelete<IssmDouble>(values); 260 260 } 261 else if (vertices_type[i]== HutterApproximationEnum){261 else if (vertices_type[i]==SIAApproximationEnum){ 262 262 constraints->AddObject(new SpcDynamic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,2,DiagnosticHorizAnalysisEnum)); 263 263 count++; 264 264 } 265 265 266 if (reCast<int,IssmDouble>(vertices_type[i])== StokesApproximationEnum || (reCast<int,IssmDouble>(vertices_type[i])==NoneApproximationEnum)){266 if (reCast<int,IssmDouble>(vertices_type[i])==FSApproximationEnum || (reCast<int,IssmDouble>(vertices_type[i])==NoneApproximationEnum)){ 267 267 if (Mz==iomodel->numberofvertices && !xIsNan<IssmDouble>(spcvz[i])){ 268 268 constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,3,spcvz[i]/yts,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 2 to vy … … 286 286 } 287 287 if (reCast<int,IssmDouble>(vertices_type[i])==NoneApproximationEnum){ 288 constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,4,g*rho_ice*(surface[i]-z[i])/ stokesreconditioning,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 2 to vy288 constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,4,g*rho_ice*(surface[i]-z[i])/FSreconditioning,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 2 to vy 289 289 count++; 290 290 } … … 292 292 293 293 /*Constraint at the bedrock interface (v.n = vz = 0) (Coordinates will be updated according to the bed slope)*/ 294 if (iomodel->dim==3) if(reCast<int,IssmDouble>(nodeonbed[i]) && reCast<int,IssmDouble>(nodeonicesheet[i]) && reCast<int,IssmDouble>(nodeon stokes[i])){294 if (iomodel->dim==3) if(reCast<int,IssmDouble>(nodeonbed[i]) && reCast<int,IssmDouble>(nodeonicesheet[i]) && reCast<int,IssmDouble>(nodeonFS[i])){ 295 295 switch(reCast<int,IssmDouble>(vertices_type[i])){ 296 case MacAyeal StokesApproximationEnum:296 case MacAyealFSApproximationEnum: 297 297 constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,5,0.,DiagnosticHorizAnalysisEnum)); 298 298 count++; 299 299 break; 300 case PattynStokesApproximationEnum:300 case HOFSApproximationEnum: 301 301 constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,5,0.,DiagnosticHorizAnalysisEnum)); 302 302 count++; 303 303 break; 304 case StokesApproximationEnum:304 case FSApproximationEnum: 305 305 constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,3,0.,DiagnosticHorizAnalysisEnum)); 306 306 count++; … … 313 313 314 314 /*SPC Quadratic elements*/ 315 if(is macayeal&& fe_ssa==1){315 if(isSSA && fe_ssa==1){ 316 316 317 317 int v1,v2; … … 338 338 count++; 339 339 } 340 if (reCast<int,IssmDouble>(vertices_type[v1])== StokesApproximationEnum || (reCast<int,IssmDouble>(vertices_type[v1])==NoneApproximationEnum)){340 if (reCast<int,IssmDouble>(vertices_type[v1])==FSApproximationEnum || (reCast<int,IssmDouble>(vertices_type[v1])==NoneApproximationEnum)){ 341 341 if(!xIsNan<IssmDouble>(spcvz[v1]) && !xIsNan<IssmDouble>(spcvz[v2])){ 342 342 constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+iomodel->numberofvertices+i+1, … … 356 356 iomodel->DeleteData(spcvy,DiagnosticSpcvyEnum); 357 357 iomodel->DeleteData(spcvz,DiagnosticSpcvzEnum); 358 iomodel->DeleteData(nodeon macayeal,FlowequationBordermacayealEnum);359 if(iomodel->dim==3)iomodel->DeleteData(nodeon pattyn,FlowequationBorderpattynEnum);360 if(iomodel->dim==3)iomodel->DeleteData(nodeon stokes,FlowequationBorderstokesEnum);358 iomodel->DeleteData(nodeonSSA,FlowequationBorderSSAEnum); 359 if(iomodel->dim==3)iomodel->DeleteData(nodeonHO,FlowequationBorderHOEnum); 360 if(iomodel->dim==3)iomodel->DeleteData(nodeonFS,FlowequationBorderFSEnum); 361 361 if(iomodel->dim==3)iomodel->DeleteData(nodeonbed,MeshVertexonbedEnum); 362 362 if(iomodel->dim==3)iomodel->DeleteData(nodeonicesheet,MaskVertexongroundediceEnum); -
issm/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateLoadsDiagnosticHoriz.cpp
r15539 r15564 19 19 int count; 20 20 int penpair_ids[2]; 21 bool is macayeal,isl1l2,ispattyn,isstokes;21 bool isSSA,isL1L2,isHO,isFS; 22 22 int numpenalties,numberofpressureloads,numrifts,numriftsegments; 23 23 IssmDouble *pressureload = NULL; … … 26 26 IssmDouble *riftinfo = NULL; 27 27 IssmDouble *nodeonbed = NULL; 28 IssmDouble *nodeon stokes= NULL;28 IssmDouble *nodeonFS = NULL; 29 29 IssmDouble *nodeonicesheet = NULL; 30 30 IssmDouble *vertices_type = NULL; … … 32 32 33 33 /*Fetch parameters: */ 34 iomodel->Constant(&is l1l2,FlowequationIsl1l2Enum);35 iomodel->Constant(&is stokes,FlowequationIsstokesEnum);36 iomodel->Constant(&is macayeal,FlowequationIsmacayealEnum);37 iomodel->Constant(&is pattyn,FlowequationIspattynEnum);34 iomodel->Constant(&isL1L2,FlowequationIsL1L2Enum); 35 iomodel->Constant(&isFS,FlowequationIsFSEnum); 36 iomodel->Constant(&isSSA,FlowequationIsSSAEnum); 37 iomodel->Constant(&isHO,FlowequationIsHOEnum); 38 38 iomodel->Constant(&numrifts,RiftsNumriftsEnum); 39 39 … … 41 41 Loads* loads=*ploads; 42 42 43 /*Now, is the flag macayaeal pattynon? otherwise, do nothing: */44 if(!is macayeal & !ispattyn & !isstokes & !isl1l2) return;43 /*Now, is the flag macayaealHO on? otherwise, do nothing: */ 44 if(!isSSA & !isHO & !isFS & !isL1L2) return; 45 45 46 46 /*Initialize counter: */ -
issm/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateNodesDiagnosticHoriz.cpp
r15504 r15564 12 12 13 13 /*Intermediary*/ 14 bool is macayeal,isl1l2,ispattyn,isstokes;14 bool isSSA,isL1L2,isHO,isFS; 15 15 int finiteelementssa; 16 16 17 17 /*Fetch parameters: */ 18 iomodel->Constant(&is macayeal,FlowequationIsmacayealEnum);19 iomodel->Constant(&is l1l2,FlowequationIsl1l2Enum);20 iomodel->Constant(&is pattyn,FlowequationIspattynEnum);21 iomodel->Constant(&is stokes,FlowequationIsstokesEnum);22 iomodel->Constant(&finiteelementssa,FlowequationFeS saEnum);18 iomodel->Constant(&isSSA,FlowequationIsSSAEnum); 19 iomodel->Constant(&isL1L2,FlowequationIsL1L2Enum); 20 iomodel->Constant(&isHO,FlowequationIsHOEnum); 21 iomodel->Constant(&isFS,FlowequationIsFSEnum); 22 iomodel->Constant(&finiteelementssa,FlowequationFeSSAEnum); 23 23 24 /*Now, is the flag macayaeal pattynon? otherwise, do nothing: */25 if(!is macayeal & !isl1l2 & !ispattyn & !isstokes) return;24 /*Now, is the flag macayaealHO on? otherwise, do nothing: */ 25 if(!isSSA & !isL1L2 & !isHO & !isFS) return; 26 26 27 27 /*Create nodes: */ 28 iomodel->FetchData(9,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,FlowequationBorder macayealEnum,FlowequationBorderstokesEnum,28 iomodel->FetchData(9,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,FlowequationBorderSSAEnum,FlowequationBorderFSEnum, 29 29 MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,MaskVertexonwaterEnum,FlowequationVertexEquationEnum,DiagnosticReferentialEnum); 30 30 if(finiteelementssa==0){ … … 37 37 _error_("finite element not supported yet"); 38 38 } 39 iomodel->DeleteData(9,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,FlowequationBorder macayealEnum,FlowequationBorderstokesEnum,39 iomodel->DeleteData(9,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,FlowequationBorderSSAEnum,FlowequationBorderFSEnum, 40 40 MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,MaskVertexonwaterEnum,FlowequationVertexEquationEnum,DiagnosticReferentialEnum); 41 41 } -
issm/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHoriz/UpdateElementsDiagnosticHoriz.cpp
r15523 r15564 17 17 18 18 int materials_type; 19 bool is macayeal,isl1l2,ispattyn,isstokes;19 bool isSSA,isL1L2,isHO,isFS; 20 20 bool control_analysis; 21 21 bool dakota_analysis; 22 22 23 23 /*Fetch constants needed: */ 24 iomodel->Constant(&is macayeal,FlowequationIsmacayealEnum);25 iomodel->Constant(&is l1l2,FlowequationIsl1l2Enum);26 iomodel->Constant(&is pattyn,FlowequationIspattynEnum);27 iomodel->Constant(&is stokes,FlowequationIsstokesEnum);24 iomodel->Constant(&isSSA,FlowequationIsSSAEnum); 25 iomodel->Constant(&isL1L2,FlowequationIsL1L2Enum); 26 iomodel->Constant(&isHO,FlowequationIsHOEnum); 27 iomodel->Constant(&isFS,FlowequationIsFSEnum); 28 28 iomodel->Constant(&control_analysis,InversionIscontrolEnum); 29 29 iomodel->Constant(&dakota_analysis,QmuIsdakotaEnum); 30 30 iomodel->Constant(&materials_type,MaterialsEnum); 31 31 32 /*Now, is the flag macayaeal pattynon? otherwise, do nothing: */33 if(!is macayeal & !isl1l2 & !ispattyn & !isstokes) return;32 /*Now, is the flag macayaealHO on? otherwise, do nothing: */ 33 if(!isSSA & !isL1L2 & !isHO & !isFS) return; 34 34 35 35 /*Fetch data needed: */ … … 72 72 iomodel->FetchDataToInput(elements,SurfaceforcingsMassBalanceEnum); 73 73 iomodel->FetchDataToInput(elements,BasalforcingsMeltingRateEnum); 74 iomodel->FetchDataToInput(elements,FlowequationBorder stokesEnum);74 iomodel->FetchDataToInput(elements,FlowequationBorderFSEnum); 75 75 iomodel->FetchDataToInput(elements,LoadingforceZEnum); 76 76 } -
issm/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHutter/CreateConstraintsDiagnosticHutter.cpp
r15465 r15564 1 1 /* 2 * CreateConstraintsDiagnostic Hutter.c:2 * CreateConstraintsDiagnosticSIA.c: 3 3 */ 4 4 … … 8 8 #include "../ModelProcessorx.h" 9 9 10 void CreateConstraintsDiagnostic Hutter(Constraints** pconstraints, IoModel* iomodel){10 void CreateConstraintsDiagnosticSIA(Constraints** pconstraints, IoModel* iomodel){ 11 11 12 12 /*Intermediary*/ 13 13 int count; 14 14 IssmDouble yts; 15 bool is hutter;15 bool isSIA; 16 16 17 17 /*Output*/ … … 24 24 /*Fetch parameters: */ 25 25 iomodel->Constant(&yts,ConstantsYtsEnum); 26 iomodel->Constant(&is hutter,FlowequationIshutterEnum);26 iomodel->Constant(&isSIA,FlowequationIsSIAEnum); 27 27 28 /*Now, is the flag is hutteron? otherwise, do nothing: */29 if (!is hutter) return;28 /*Now, is the flag isSIA on? otherwise, do nothing: */ 29 if (!isSIA) return; 30 30 31 31 /*Fetch data: */ … … 35 35 count=0; 36 36 37 /*vx and vy are spc'd if we are not on nodeon hutter: */37 /*vx and vy are spc'd if we are not on nodeonSIA: */ 38 38 for(int i=0;i<iomodel->numberofvertices;i++){ 39 39 /*keep only this partition's nodes:*/ 40 40 if((iomodel->my_vertices[i])){ 41 if (!reCast<int,IssmDouble>(iomodel->Data(FlowequationVertexEquationEnum)[i])== HutterApproximationEnum){41 if (!reCast<int,IssmDouble>(iomodel->Data(FlowequationVertexEquationEnum)[i])==SIAApproximationEnum){ 42 42 43 constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,0,Diagnostic HutterAnalysisEnum));43 constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,0,DiagnosticSIAAnalysisEnum)); 44 44 count++; 45 45 46 constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,2,0,Diagnostic HutterAnalysisEnum));46 constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,2,0,DiagnosticSIAAnalysisEnum)); 47 47 count++; 48 48 } 49 49 else{ 50 50 if (!xIsNan<IssmDouble>(iomodel->Data(DiagnosticSpcvxEnum)[i])){ 51 constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,iomodel->Data(DiagnosticSpcvxEnum)[i]/yts,Diagnostic HutterAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.51 constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,iomodel->Data(DiagnosticSpcvxEnum)[i]/yts,DiagnosticSIAAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx. 52 52 count++; 53 53 } 54 54 55 55 if (!xIsNan<IssmDouble>(iomodel->Data(DiagnosticSpcvyEnum)[i])){ 56 constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,2,iomodel->Data(DiagnosticSpcvyEnum)[i]/yts,Diagnostic HutterAnalysisEnum)); //add count'th spc, on node i+1, setting dof 2 to vy56 constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,2,iomodel->Data(DiagnosticSpcvyEnum)[i]/yts,DiagnosticSIAAnalysisEnum)); //add count'th spc, on node i+1, setting dof 2 to vy 57 57 count++; 58 58 } -
issm/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHutter/CreateLoadsDiagnosticHutter.cpp
r15465 r15564 1 /*! \file CreateLoadsDiagnostic Hutter.c:1 /*! \file CreateLoadsDiagnosticSIA.c: 2 2 */ 3 3 … … 7 7 #include "../ModelProcessorx.h" 8 8 9 void CreateLoadsDiagnostic Hutter(Loads** ploads, IoModel* iomodel){9 void CreateLoadsDiagnosticSIA(Loads** ploads, IoModel* iomodel){ 10 10 11 11 /*No loads*/ -
issm/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHutter/CreateNodesDiagnosticHutter.cpp
r15464 r15564 1 1 /* 2 * CreateNodesDiagnostic Hutter.c:2 * CreateNodesDiagnosticSIA.c: 3 3 */ 4 4 … … 9 9 #include "../ModelProcessorx.h" 10 10 11 void CreateNodesDiagnostic Hutter(Nodes** pnodes, IoModel* iomodel){11 void CreateNodesDiagnosticSIA(Nodes** pnodes, IoModel* iomodel){ 12 12 13 13 /*Fetch parameters: */ 14 bool is hutter;15 iomodel->Constant(&is hutter,FlowequationIshutterEnum);14 bool isSIA; 15 iomodel->Constant(&isSIA,FlowequationIsSIAEnum); 16 16 17 /*Now, is the flag is hutteron? otherwise, do nothing: */18 if(!is hutter) return;17 /*Now, is the flag isSIA on? otherwise, do nothing: */ 18 if(!isSIA) return; 19 19 20 20 iomodel->FetchData(6,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum,MaskVertexonwaterEnum); 21 CreateNodes(pnodes,iomodel,Diagnostic HutterAnalysisEnum,P1Enum);21 CreateNodes(pnodes,iomodel,DiagnosticSIAAnalysisEnum,P1Enum); 22 22 iomodel->DeleteData(6,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum,MaskVertexonwaterEnum); 23 23 } -
issm/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHutter/UpdateElementsDiagnosticHutter.cpp
r15450 r15564 1 1 /* 2 * UpdateElementsDiagnostic Hutter:2 * UpdateElementsDiagnosticSIA: 3 3 */ 4 4 … … 9 9 #include "../ModelProcessorx.h" 10 10 11 void UpdateElementsDiagnostic Hutter(Elements* elements, IoModel* iomodel,int analysis_counter,int analysis_type){11 void UpdateElementsDiagnosticSIA(Elements* elements, IoModel* iomodel,int analysis_counter,int analysis_type){ 12 12 13 13 /*Fetch data needed: */ 14 bool is hutter;15 iomodel->Constant(&is hutter,FlowequationIshutterEnum);14 bool isSIA; 15 iomodel->Constant(&isSIA,FlowequationIsSIAEnum); 16 16 17 /*Now, is the flag hutteron? otherwise, do nothing: */18 if (!is hutter)return;17 /*Now, is the flag SIA on? otherwise, do nothing: */ 18 if (!isSIA)return; 19 19 20 20 iomodel->FetchData(1,FlowequationElementEquationEnum); -
issm/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticVert/CreateConstraintsDiagnosticVert.cpp
r15465 r15564 24 24 25 25 /*Fetch data: */ 26 iomodel->FetchData(2,DiagnosticSpcvzEnum,FlowequationBorder stokesEnum);26 iomodel->FetchData(2,DiagnosticSpcvzEnum,FlowequationBorderFSEnum); 27 27 28 28 /*Initialize counter*/ … … 35 35 if(iomodel->my_vertices[i]){ 36 36 37 if (reCast<int,IssmDouble>(iomodel->Data(FlowequationBorder stokesEnum)[i])){38 constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,0,DiagnosticVertAnalysisEnum)); //spc to zero as vertical velocity is done in Horiz for Stokes37 if (reCast<int,IssmDouble>(iomodel->Data(FlowequationBorderFSEnum)[i])){ 38 constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,0,DiagnosticVertAnalysisEnum)); //spc to zero as vertical velocity is done in Horiz for FS 39 39 count++; 40 40 } … … 49 49 50 50 /*Free data: */ 51 iomodel->DeleteData(2,DiagnosticSpcvzEnum,FlowequationBorder stokesEnum);51 iomodel->DeleteData(2,DiagnosticSpcvzEnum,FlowequationBorderFSEnum); 52 52 53 53 /*Assign output pointer: */ -
issm/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticVert/CreateNodesDiagnosticVert.cpp
r15464 r15564 11 11 void CreateNodesDiagnosticVert(Nodes** pnodes, IoModel* iomodel){ 12 12 13 /*Now, is the flag macayaeal pattynon? otherwise, do nothing: */13 /*Now, is the flag macayaealHO on? otherwise, do nothing: */ 14 14 if(iomodel->dim==2) return; 15 15 -
issm/trunk-jpl/src/c/modules/ModelProcessorx/DistributeNumDofs.cpp
r15533 r15564 24 24 numdofs=2; 25 25 break; 26 case PattynApproximationEnum:26 case HOApproximationEnum: 27 27 numdofs=2; 28 28 break; 29 case HutterApproximationEnum:29 case SIAApproximationEnum: 30 30 numdofs=2; 31 31 break; 32 case StokesApproximationEnum:32 case FSApproximationEnum: 33 33 numdofs=4; 34 34 break; … … 36 36 numdofs=4; 37 37 break; 38 case MacAyeal PattynApproximationEnum:38 case MacAyealHOApproximationEnum: 39 39 numdofs=4; 40 40 doftype=xNew<int>(numdofs); 41 41 doftype[0]=MacAyealApproximationEnum; 42 42 doftype[1]=MacAyealApproximationEnum; 43 doftype[2]= PattynApproximationEnum;44 doftype[3]= PattynApproximationEnum;43 doftype[2]=HOApproximationEnum; 44 doftype[3]=HOApproximationEnum; 45 45 break; 46 case PattynStokesApproximationEnum:46 case HOFSApproximationEnum: 47 47 numdofs=6; 48 48 doftype=xNew<int>(numdofs); 49 doftype[0]= PattynApproximationEnum;50 doftype[1]= PattynApproximationEnum;51 doftype[2]= StokesApproximationEnum;52 doftype[3]= StokesApproximationEnum;53 doftype[4]= StokesApproximationEnum;54 doftype[5]= StokesApproximationEnum;49 doftype[0]=HOApproximationEnum; 50 doftype[1]=HOApproximationEnum; 51 doftype[2]=FSApproximationEnum; 52 doftype[3]=FSApproximationEnum; 53 doftype[4]=FSApproximationEnum; 54 doftype[5]=FSApproximationEnum; 55 55 break; 56 case MacAyeal StokesApproximationEnum:56 case MacAyealFSApproximationEnum: 57 57 numdofs=6; 58 58 doftype=xNew<int>(numdofs); 59 59 doftype[0]=MacAyealApproximationEnum; 60 60 doftype[1]=MacAyealApproximationEnum; 61 doftype[2]= StokesApproximationEnum;62 doftype[3]= StokesApproximationEnum;63 doftype[4]= StokesApproximationEnum;64 doftype[5]= StokesApproximationEnum;61 doftype[2]=FSApproximationEnum; 62 doftype[3]=FSApproximationEnum; 63 doftype[4]=FSApproximationEnum; 64 doftype[5]=FSApproximationEnum; 65 65 break; 66 66 default: … … 72 72 numdofs=1; 73 73 break; 74 case Diagnostic HutterAnalysisEnum:74 case DiagnosticSIAAnalysisEnum: 75 75 numdofs=2; 76 76 break; -
issm/trunk-jpl/src/c/modules/ModelProcessorx/ModelProcessorx.cpp
r15423 r15564 59 59 if(solution_type==TransientSolutionEnum && analysis_type==DiagnosticHorizAnalysisEnum && isdiagnostic==false) continue; 60 60 if(solution_type==TransientSolutionEnum && analysis_type==DiagnosticVertAnalysisEnum && isdiagnostic==false) continue; 61 if(solution_type==TransientSolutionEnum && analysis_type==Diagnostic HutterAnalysisEnum && isdiagnostic==false) continue;61 if(solution_type==TransientSolutionEnum && analysis_type==DiagnosticSIAAnalysisEnum && isdiagnostic==false) continue; 62 62 if(solution_type==SteadystateSolutionEnum && analysis_type==ThermalAnalysisEnum && isenthalpy==true) continue; 63 63 if(solution_type==SteadystateSolutionEnum && analysis_type==MeltingAnalysisEnum && isenthalpy==true) continue; -
issm/trunk-jpl/src/c/modules/ModelProcessorx/ModelProcessorx.h
r15533 r15564 39 39 void UpdateElementsDiagnosticVert(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type); 40 40 41 /*diagnostic hutter*/42 void CreateNodesDiagnostic Hutter(Nodes** pnodes,IoModel* iomodel);43 void CreateConstraintsDiagnostic Hutter(Constraints** pconstraints,IoModel* iomodel);44 void CreateLoadsDiagnostic Hutter(Loads** ploads, IoModel* iomodel);45 void UpdateElementsDiagnostic Hutter(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type);41 /*diagnostic SIA*/ 42 void CreateNodesDiagnosticSIA(Nodes** pnodes,IoModel* iomodel); 43 void CreateConstraintsDiagnosticSIA(Constraints** pconstraints,IoModel* iomodel); 44 void CreateLoadsDiagnosticSIA(Loads** ploads, IoModel* iomodel); 45 void UpdateElementsDiagnosticSIA(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type); 46 46 47 47 #ifdef _HAVE_GIA_ -
issm/trunk-jpl/src/c/modules/ResetCoordinateSystemx/ResetCoordinateSystemx.cpp
r14917 r15564 1 1 /*!\file ResetCoordinateSystemx 2 * \brief: reset coordinate system for full- Stokes: tangential to the bedrock2 * \brief: reset coordinate system for full-FS: tangential to the bedrock 3 3 */ 4 4 -
issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h
r15530 r15564 57 57 DiagnosticSpcvyEnum, 58 58 DiagnosticSpcvzEnum, 59 Diagnostic StokesreconditioningEnum,59 DiagnosticFSreconditioningEnum, 60 60 DiagnosticVertexPairingEnum, 61 61 DiagnosticViscosityOvershootEnum, … … 63 63 LoadingforceYEnum, 64 64 LoadingforceZEnum, 65 FlowequationBorder macayealEnum,66 FlowequationBorder pattynEnum,67 FlowequationBorder stokesEnum,65 FlowequationBorderSSAEnum, 66 FlowequationBorderHOEnum, 67 FlowequationBorderFSEnum, 68 68 FlowequationElementEquationEnum, 69 FlowequationIs hutterEnum,70 FlowequationIs macayealEnum,71 FlowequationIs l1l2Enum,72 FlowequationIs pattynEnum,73 FlowequationIs stokesEnum,74 FlowequationFe StokesEnum,75 FlowequationFeS saEnum,69 FlowequationIsSIAEnum, 70 FlowequationIsSSAEnum, 71 FlowequationIsL1L2Enum, 72 FlowequationIsHOEnum, 73 FlowequationIsFSEnum, 74 FlowequationFeFSEnum, 75 FlowequationFeSSAEnum, 76 76 FlowequationVertexEquationEnum, 77 77 FrictionCoefficientEnum, … … 282 282 BedSlopeYAnalysisEnum, 283 283 DiagnosticHorizAnalysisEnum, 284 Diagnostic HutterAnalysisEnum,284 DiagnosticSIAAnalysisEnum, 285 285 DiagnosticSolutionEnum, 286 286 DiagnosticVertAnalysisEnum, … … 310 310 ApproximationEnum, 311 311 NoneApproximationEnum, 312 HutterApproximationEnum,312 SIAApproximationEnum, 313 313 MacAyealApproximationEnum, 314 MacAyeal PattynApproximationEnum,315 MacAyeal StokesApproximationEnum,314 MacAyealHOApproximationEnum, 315 MacAyealFSApproximationEnum, 316 316 L1L2ApproximationEnum, 317 PattynApproximationEnum,318 PattynStokesApproximationEnum,319 StokesApproximationEnum,317 HOApproximationEnum, 318 HOFSApproximationEnum, 319 FSApproximationEnum, 320 320 /*}}}*/ 321 321 /*Datasets {{{*/ … … 366 366 ParamEnum, 367 367 L1L2IceFrontEnum, 368 PattynIceFrontEnum,368 HOIceFrontEnum, 369 369 PengridEnum, 370 370 PenpairEnum, … … 382 382 SpcStaticEnum, 383 383 SpcTransientEnum, 384 StokesIceFrontEnum,384 FSIceFrontEnum, 385 385 StringArrayParamEnum, 386 386 StringParamEnum, … … 461 461 VzEnum, 462 462 VzMacAyealEnum, 463 Vz PattynEnum,463 VzHOEnum, 464 464 VzPicardEnum, 465 Vz StokesEnum,465 VzFSEnum, 466 466 VxMeshEnum, 467 467 VyMeshEnum, … … 553 553 /*}}}*/ 554 554 /*Solver{{{*/ 555 StokesSolverEnum,555 FSSolverEnum, 556 556 /*}}}*/ 557 557 /*Parameters{{{*/ -
issm/trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp
r15530 r15564 65 65 case DiagnosticSpcvyEnum : return "DiagnosticSpcvy"; 66 66 case DiagnosticSpcvzEnum : return "DiagnosticSpcvz"; 67 case Diagnostic StokesreconditioningEnum : return "DiagnosticStokesreconditioning";67 case DiagnosticFSreconditioningEnum : return "DiagnosticFSreconditioning"; 68 68 case DiagnosticVertexPairingEnum : return "DiagnosticVertexPairing"; 69 69 case DiagnosticViscosityOvershootEnum : return "DiagnosticViscosityOvershoot"; … … 71 71 case LoadingforceYEnum : return "LoadingforceY"; 72 72 case LoadingforceZEnum : return "LoadingforceZ"; 73 case FlowequationBorder macayealEnum : return "FlowequationBordermacayeal";74 case FlowequationBorder pattynEnum : return "FlowequationBorderpattyn";75 case FlowequationBorder stokesEnum : return "FlowequationBorderstokes";73 case FlowequationBorderSSAEnum : return "FlowequationBorderSSA"; 74 case FlowequationBorderHOEnum : return "FlowequationBorderHO"; 75 case FlowequationBorderFSEnum : return "FlowequationBorderFS"; 76 76 case FlowequationElementEquationEnum : return "FlowequationElementEquation"; 77 case FlowequationIs hutterEnum : return "FlowequationIshutter";78 case FlowequationIs macayealEnum : return "FlowequationIsmacayeal";79 case FlowequationIs l1l2Enum : return "FlowequationIsl1l2";80 case FlowequationIs pattynEnum : return "FlowequationIspattyn";81 case FlowequationIs stokesEnum : return "FlowequationIsstokes";82 case FlowequationFe StokesEnum : return "FlowequationFeStokes";83 case FlowequationFeS saEnum : return "FlowequationFeSsa";77 case FlowequationIsSIAEnum : return "FlowequationIsSIA"; 78 case FlowequationIsSSAEnum : return "FlowequationIsSSA"; 79 case FlowequationIsL1L2Enum : return "FlowequationIsL1L2"; 80 case FlowequationIsHOEnum : return "FlowequationIsHO"; 81 case FlowequationIsFSEnum : return "FlowequationIsFS"; 82 case FlowequationFeFSEnum : return "FlowequationFeFS"; 83 case FlowequationFeSSAEnum : return "FlowequationFeSSA"; 84 84 case FlowequationVertexEquationEnum : return "FlowequationVertexEquation"; 85 85 case FrictionCoefficientEnum : return "FrictionCoefficient"; … … 288 288 case BedSlopeYAnalysisEnum : return "BedSlopeYAnalysis"; 289 289 case DiagnosticHorizAnalysisEnum : return "DiagnosticHorizAnalysis"; 290 case Diagnostic HutterAnalysisEnum : return "DiagnosticHutterAnalysis";290 case DiagnosticSIAAnalysisEnum : return "DiagnosticSIAAnalysis"; 291 291 case DiagnosticSolutionEnum : return "DiagnosticSolution"; 292 292 case DiagnosticVertAnalysisEnum : return "DiagnosticVertAnalysis"; … … 314 314 case ApproximationEnum : return "Approximation"; 315 315 case NoneApproximationEnum : return "NoneApproximation"; 316 case HutterApproximationEnum : return "HutterApproximation";316 case SIAApproximationEnum : return "SIAApproximation"; 317 317 case MacAyealApproximationEnum : return "MacAyealApproximation"; 318 case MacAyeal PattynApproximationEnum : return "MacAyealPattynApproximation";319 case MacAyeal StokesApproximationEnum : return "MacAyealStokesApproximation";318 case MacAyealHOApproximationEnum : return "MacAyealHOApproximation"; 319 case MacAyealFSApproximationEnum : return "MacAyealFSApproximation"; 320 320 case L1L2ApproximationEnum : return "L1L2Approximation"; 321 case PattynApproximationEnum : return "PattynApproximation";322 case PattynStokesApproximationEnum : return "PattynStokesApproximation";323 case StokesApproximationEnum : return "StokesApproximation";321 case HOApproximationEnum : return "HOApproximation"; 322 case HOFSApproximationEnum : return "HOFSApproximation"; 323 case FSApproximationEnum : return "FSApproximation"; 324 324 case ConstraintsEnum : return "Constraints"; 325 325 case LoadsEnum : return "Loads"; … … 366 366 case ParamEnum : return "Param"; 367 367 case L1L2IceFrontEnum : return "L1L2IceFront"; 368 case PattynIceFrontEnum : return "PattynIceFront";368 case HOIceFrontEnum : return "HOIceFront"; 369 369 case PengridEnum : return "Pengrid"; 370 370 case PenpairEnum : return "Penpair"; … … 382 382 case SpcStaticEnum : return "SpcStatic"; 383 383 case SpcTransientEnum : return "SpcTransient"; 384 case StokesIceFrontEnum : return "StokesIceFront";384 case FSIceFrontEnum : return "FSIceFront"; 385 385 case StringArrayParamEnum : return "StringArrayParam"; 386 386 case StringParamEnum : return "StringParam"; … … 455 455 case VzEnum : return "Vz"; 456 456 case VzMacAyealEnum : return "VzMacAyeal"; 457 case Vz PattynEnum : return "VzPattyn";457 case VzHOEnum : return "VzHO"; 458 458 case VzPicardEnum : return "VzPicard"; 459 case Vz StokesEnum : return "VzStokes";459 case VzFSEnum : return "VzFS"; 460 460 case VxMeshEnum : return "VxMesh"; 461 461 case VyMeshEnum : return "VyMesh"; … … 535 535 case SubelementMigration2Enum : return "SubelementMigration2"; 536 536 case GLlevelsetEnum : return "GLlevelset"; 537 case StokesSolverEnum : return "StokesSolver";537 case FSSolverEnum : return "FSSolver"; 538 538 case AdjointEnum : return "Adjoint"; 539 539 case ColinearEnum : return "Colinear"; -
issm/trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp
r15530 r15564 65 65 else if (strcmp(name,"DiagnosticSpcvy")==0) return DiagnosticSpcvyEnum; 66 66 else if (strcmp(name,"DiagnosticSpcvz")==0) return DiagnosticSpcvzEnum; 67 else if (strcmp(name,"Diagnostic Stokesreconditioning")==0) return DiagnosticStokesreconditioningEnum;67 else if (strcmp(name,"DiagnosticFSreconditioning")==0) return DiagnosticFSreconditioningEnum; 68 68 else if (strcmp(name,"DiagnosticVertexPairing")==0) return DiagnosticVertexPairingEnum; 69 69 else if (strcmp(name,"DiagnosticViscosityOvershoot")==0) return DiagnosticViscosityOvershootEnum; … … 71 71 else if (strcmp(name,"LoadingforceY")==0) return LoadingforceYEnum; 72 72 else if (strcmp(name,"LoadingforceZ")==0) return LoadingforceZEnum; 73 else if (strcmp(name,"FlowequationBorder macayeal")==0) return FlowequationBordermacayealEnum;74 else if (strcmp(name,"FlowequationBorder pattyn")==0) return FlowequationBorderpattynEnum;75 else if (strcmp(name,"FlowequationBorder stokes")==0) return FlowequationBorderstokesEnum;73 else if (strcmp(name,"FlowequationBorderSSA")==0) return FlowequationBorderSSAEnum; 74 else if (strcmp(name,"FlowequationBorderHO")==0) return FlowequationBorderHOEnum; 75 else if (strcmp(name,"FlowequationBorderFS")==0) return FlowequationBorderFSEnum; 76 76 else if (strcmp(name,"FlowequationElementEquation")==0) return FlowequationElementEquationEnum; 77 else if (strcmp(name,"FlowequationIs hutter")==0) return FlowequationIshutterEnum;78 else if (strcmp(name,"FlowequationIs macayeal")==0) return FlowequationIsmacayealEnum;79 else if (strcmp(name,"FlowequationIs l1l2")==0) return FlowequationIsl1l2Enum;80 else if (strcmp(name,"FlowequationIs pattyn")==0) return FlowequationIspattynEnum;81 else if (strcmp(name,"FlowequationIs stokes")==0) return FlowequationIsstokesEnum;82 else if (strcmp(name,"FlowequationFe Stokes")==0) return FlowequationFeStokesEnum;83 else if (strcmp(name,"FlowequationFeS sa")==0) return FlowequationFeSsaEnum;77 else if (strcmp(name,"FlowequationIsSIA")==0) return FlowequationIsSIAEnum; 78 else if (strcmp(name,"FlowequationIsSSA")==0) return FlowequationIsSSAEnum; 79 else if (strcmp(name,"FlowequationIsL1L2")==0) return FlowequationIsL1L2Enum; 80 else if (strcmp(name,"FlowequationIsHO")==0) return FlowequationIsHOEnum; 81 else if (strcmp(name,"FlowequationIsFS")==0) return FlowequationIsFSEnum; 82 else if (strcmp(name,"FlowequationFeFS")==0) return FlowequationFeFSEnum; 83 else if (strcmp(name,"FlowequationFeSSA")==0) return FlowequationFeSSAEnum; 84 84 else if (strcmp(name,"FlowequationVertexEquation")==0) return FlowequationVertexEquationEnum; 85 85 else if (strcmp(name,"FrictionCoefficient")==0) return FrictionCoefficientEnum; … … 294 294 else if (strcmp(name,"BedSlopeYAnalysis")==0) return BedSlopeYAnalysisEnum; 295 295 else if (strcmp(name,"DiagnosticHorizAnalysis")==0) return DiagnosticHorizAnalysisEnum; 296 else if (strcmp(name,"Diagnostic HutterAnalysis")==0) return DiagnosticHutterAnalysisEnum;296 else if (strcmp(name,"DiagnosticSIAAnalysis")==0) return DiagnosticSIAAnalysisEnum; 297 297 else if (strcmp(name,"DiagnosticSolution")==0) return DiagnosticSolutionEnum; 298 298 else if (strcmp(name,"DiagnosticVertAnalysis")==0) return DiagnosticVertAnalysisEnum; … … 320 320 else if (strcmp(name,"Approximation")==0) return ApproximationEnum; 321 321 else if (strcmp(name,"NoneApproximation")==0) return NoneApproximationEnum; 322 else if (strcmp(name," HutterApproximation")==0) return HutterApproximationEnum;322 else if (strcmp(name,"SIAApproximation")==0) return SIAApproximationEnum; 323 323 else if (strcmp(name,"MacAyealApproximation")==0) return MacAyealApproximationEnum; 324 else if (strcmp(name,"MacAyeal PattynApproximation")==0) return MacAyealPattynApproximationEnum;325 else if (strcmp(name,"MacAyeal StokesApproximation")==0) return MacAyealStokesApproximationEnum;324 else if (strcmp(name,"MacAyealHOApproximation")==0) return MacAyealHOApproximationEnum; 325 else if (strcmp(name,"MacAyealFSApproximation")==0) return MacAyealFSApproximationEnum; 326 326 else if (strcmp(name,"L1L2Approximation")==0) return L1L2ApproximationEnum; 327 else if (strcmp(name," PattynApproximation")==0) return PattynApproximationEnum;328 else if (strcmp(name," PattynStokesApproximation")==0) return PattynStokesApproximationEnum;329 else if (strcmp(name," StokesApproximation")==0) return StokesApproximationEnum;327 else if (strcmp(name,"HOApproximation")==0) return HOApproximationEnum; 328 else if (strcmp(name,"HOFSApproximation")==0) return HOFSApproximationEnum; 329 else if (strcmp(name,"FSApproximation")==0) return FSApproximationEnum; 330 330 else if (strcmp(name,"Constraints")==0) return ConstraintsEnum; 331 331 else if (strcmp(name,"Loads")==0) return LoadsEnum; … … 372 372 else if (strcmp(name,"Param")==0) return ParamEnum; 373 373 else if (strcmp(name,"L1L2IceFront")==0) return L1L2IceFrontEnum; 374 else if (strcmp(name," PattynIceFront")==0) return PattynIceFrontEnum;374 else if (strcmp(name,"HOIceFront")==0) return HOIceFrontEnum; 375 375 else if (strcmp(name,"Pengrid")==0) return PengridEnum; 376 376 else if (strcmp(name,"Penpair")==0) return PenpairEnum; … … 391 391 else if (strcmp(name,"SpcStatic")==0) return SpcStaticEnum; 392 392 else if (strcmp(name,"SpcTransient")==0) return SpcTransientEnum; 393 else if (strcmp(name," StokesIceFront")==0) return StokesIceFrontEnum;393 else if (strcmp(name,"FSIceFront")==0) return FSIceFrontEnum; 394 394 else if (strcmp(name,"StringArrayParam")==0) return StringArrayParamEnum; 395 395 else if (strcmp(name,"StringParam")==0) return StringParamEnum; … … 464 464 else if (strcmp(name,"Vz")==0) return VzEnum; 465 465 else if (strcmp(name,"VzMacAyeal")==0) return VzMacAyealEnum; 466 else if (strcmp(name,"Vz Pattyn")==0) return VzPattynEnum;466 else if (strcmp(name,"VzHO")==0) return VzHOEnum; 467 467 else if (strcmp(name,"VzPicard")==0) return VzPicardEnum; 468 else if (strcmp(name,"Vz Stokes")==0) return VzStokesEnum;468 else if (strcmp(name,"VzFS")==0) return VzFSEnum; 469 469 else if (strcmp(name,"VxMesh")==0) return VxMeshEnum; 470 470 else if (strcmp(name,"VyMesh")==0) return VyMeshEnum; … … 547 547 else if (strcmp(name,"SubelementMigration2")==0) return SubelementMigration2Enum; 548 548 else if (strcmp(name,"GLlevelset")==0) return GLlevelsetEnum; 549 else if (strcmp(name," StokesSolver")==0) return StokesSolverEnum;549 else if (strcmp(name,"FSSolver")==0) return FSSolverEnum; 550 550 else if (strcmp(name,"Adjoint")==0) return AdjointEnum; 551 551 else if (strcmp(name,"Colinear")==0) return ColinearEnum; -
issm/trunk-jpl/src/c/solutionsequences/solutionsequence_stokescoupling_nonlinear.cpp
r15104 r15564 1 /*!\file: solutionsequence_ stokescoupling_nonlinear.cpp2 * \brief: core of the coupling between stokes and macayealpattyn1 /*!\file: solutionsequence_FScoupling_nonlinear.cpp 2 * \brief: core of the coupling between FS and SSAHO 3 3 */ 4 4 … … 9 9 #include "../modules/modules.h" 10 10 11 void solutionsequence_ stokescoupling_nonlinear(FemModel* femmodel,bool conserve_loads){11 void solutionsequence_FScoupling_nonlinear(FemModel* femmodel,bool conserve_loads){ 12 12 13 13 /*intermediary: */ -
issm/trunk-jpl/src/c/solutionsequences/solutionsequences.h
r15055 r15564 16 16 void solutionsequence_nonlinear(FemModel* femmodel,bool conserve_loads); 17 17 void solutionsequence_newton(FemModel* femmodel); 18 void solutionsequence_ stokescoupling_nonlinear(FemModel* femmodel,bool conserve_loads);18 void solutionsequence_FScoupling_nonlinear(FemModel* femmodel,bool conserve_loads); 19 19 void solutionsequence_linear(FemModel* femmodel); 20 20 void solutionsequence_adjoint_linear(FemModel* femmodel); -
issm/trunk-jpl/src/c/toolkits/petsc/objects/PetscSolver.cpp
r14960 r15564 52 52 #endif 53 53 54 /* Stokes: */54 /*FS: */ 55 55 IS isv=NULL; 56 56 IS isp=NULL; … … 118 118 } 119 119 120 /* Stokes: */121 if (solver_type== StokesSolverEnum){120 /*FS: */ 121 if (solver_type==FSSolverEnum){ 122 122 /*Make indices out of doftypes: */ 123 if(!df)_error_("need doftypes for Stokessolver!\n");124 DofTypesToIndexSet(&isv,&isp,df, StokesSolverEnum);123 if(!df)_error_("need doftypes for FS solver!\n"); 124 DofTypesToIndexSet(&isv,&isp,df,FSSolverEnum); 125 125 126 126 /*Set field splits: */ … … 179 179 int velocity_count=0; 180 180 181 if(typeenum== StokesSolverEnum){181 if(typeenum==FSSolverEnum){ 182 182 183 183 /*Ok, recover doftypes vector values and indices: */ -
issm/trunk-jpl/src/c/toolkits/petsc/patches/PetscOptionsDetermineSolverType.cpp
r14917 r15564 60 60 61 61 PetscOptionsGetString(PETSC_NULL,"-issm_option_solver",&option[0],100,&flag); 62 if (strcmp(option," stokes")==0){63 solver_type= StokesSolverEnum;62 if (strcmp(option,"FS")==0){ 63 solver_type=FSSolverEnum; 64 64 } 65 65 -
issm/trunk-jpl/src/m/classes/diagnostic.m
r15445 r15564 13 13 abstol = 0; 14 14 isnewton = 0; 15 stokesreconditioning = 0;15 FSreconditioning = 0; 16 16 viscosity_overshoot = 0; 17 17 icefront = NaN; … … 45 45 obj.abstol=10; 46 46 47 obj. stokesreconditioning=10^13;47 obj.FSreconditioning=10^13; 48 48 obj.shelf_dampening=0; 49 49 … … 78 78 md = checkfield(md,'diagnostic.abstol','size',[1 1]); 79 79 md = checkfield(md,'diagnostic.isnewton','numel',[1],'values',[0 1 2]); 80 md = checkfield(md,'diagnostic. stokesreconditioning','size',[1 1],'NaN',1);80 md = checkfield(md,'diagnostic.FSreconditioning','size',[1 1],'NaN',1); 81 81 md = checkfield(md,'diagnostic.viscosity_overshoot','size',[1 1],'NaN',1); 82 82 if md.mesh.dimension==2, … … 109 109 end 110 110 %CHECK THAT NO rotation specified for FS Grounded ice at base 111 if md.mesh.dimension==3 & md.flowequation.is stokes,111 if md.mesh.dimension==3 & md.flowequation.isFS, 112 112 pos=find(md.mask.vertexongroundedice & md.mesh.vertexonbed); 113 113 if any(~isnan(md.diagnostic.referential(pos,:))), 114 114 md = checkmessage(md,['no referential should be specified for basal vertices of grounded ice']); 115 115 end 116 md = checkfield(md,'diagnostic. stokesreconditioning','>',0);116 md = checkfield(md,'diagnostic.FSreconditioning','>',0); 117 117 end 118 118 end % }}} … … 144 144 145 145 disp(sprintf('\n %s','Other:')); 146 fielddisplay(obj,'shelf_dampening','use dampening for floating ice ? Only for Stokesmodel');147 fielddisplay(obj,' stokesreconditioning','multiplier for incompressibility equation. Only for Stokesmodel');146 fielddisplay(obj,'shelf_dampening','use dampening for floating ice ? Only for FS model'); 147 fielddisplay(obj,'FSreconditioning','multiplier for incompressibility equation. Only for FS model'); 148 148 fielddisplay(obj,'referential','local referential'); 149 149 fielddisplay(obj,'loadingforce','loading force applied on each point [N/m^3]'); … … 159 159 WriteData(fid,'object',obj,'fieldname','abstol','format','Double'); 160 160 WriteData(fid,'object',obj,'fieldname','isnewton','format','Integer'); 161 WriteData(fid,'object',obj,'fieldname',' stokesreconditioning','format','Double');161 WriteData(fid,'object',obj,'fieldname','FSreconditioning','format','Double'); 162 162 WriteData(fid,'object',obj,'fieldname','viscosity_overshoot','format','Double'); 163 163 WriteData(fid,'object',obj,'fieldname','maxiter','format','Integer'); -
issm/trunk-jpl/src/m/classes/diagnostic.py
r15133 r15564 23 23 self.abstol = 0 24 24 self.isnewton = 0 25 self. stokesreconditioning = 025 self.FSreconditioning = 0 26 26 self.viscosity_overshoot = 0 27 27 self.icefront = float('NaN') … … 66 66 67 67 string="%s\n%s"%(string,'\n Other:') 68 string="%s\n%s"%(string,fielddisplay(self,'shelf_dampening','use dampening for floating ice ? Only for Stokesmodel'))69 string="%s\n%s"%(string,fielddisplay(self,' stokesreconditioning','multiplier for incompressibility equation. Only for Stokesmodel'))68 string="%s\n%s"%(string,fielddisplay(self,'shelf_dampening','use dampening for floating ice ? Only for FS model')) 69 string="%s\n%s"%(string,fielddisplay(self,'FSreconditioning','multiplier for incompressibility equation. Only for FS model')) 70 70 string="%s\n%s"%(string,fielddisplay(self,'referential','local referential')) 71 71 string="%s\n%s"%(string,fielddisplay(self,'loadingforce','loading force applied on each point [N/m^3]')) … … 83 83 self.abstol=10 84 84 85 self. stokesreconditioning=10**1385 self.FSreconditioning=10**13 86 86 self.shelf_dampening=0 87 87 … … 120 120 md = checkfield(md,'diagnostic.abstol','size',[1]) 121 121 md = checkfield(md,'diagnostic.isnewton','numel',[1],'values',[0,1,2]) 122 md = checkfield(md,'diagnostic. stokesreconditioning','size',[1],'NaN',1)122 md = checkfield(md,'diagnostic.FSreconditioning','size',[1],'NaN',1) 123 123 md = checkfield(md,'diagnostic.viscosity_overshoot','size',[1],'NaN',1) 124 124 if md.mesh.dimension==2: … … 152 152 md.checkmessage("Vectors in diagnostic.referential (columns 1 to 3 and 4 to 6) must be orthogonal") 153 153 #CHECK THAT NO rotation specified for FS Grounded ice at base 154 # if md.mesh.dimension==3 & md.flowequation.is stokes,155 if md.mesh.dimension==3 and md.flowequation.is stokes:154 # if md.mesh.dimension==3 & md.flowequation.isFS, 155 if md.mesh.dimension==3 and md.flowequation.isFS: 156 156 pos=numpy.nonzero(numpy.logical_and(md.mask.vertexongroundedice,md.mesh.vertexonbed)) 157 157 if numpy.any(numpy.logical_not(numpy.isnan(md.diagnostic.referential[pos,:]))): … … 168 168 WriteData(fid,'object',self,'fieldname','abstol','format','Double') 169 169 WriteData(fid,'object',self,'fieldname','isnewton','format','Integer') 170 WriteData(fid,'object',self,'fieldname',' stokesreconditioning','format','Double')170 WriteData(fid,'object',self,'fieldname','FSreconditioning','format','Double') 171 171 WriteData(fid,'object',self,'fieldname','viscosity_overshoot','format','Double') 172 172 WriteData(fid,'object',self,'fieldname','maxiter','format','Integer') -
issm/trunk-jpl/src/m/classes/flowequation.m
r15527 r15564 6 6 classdef flowequation 7 7 properties (SetAccess=public) 8 is macayeal= 0;9 is pattyn= 0;10 is hutter= 0;11 is l1l2= 0;12 is stokes= 0;13 fe_ stokes= 0;14 fe_ ssa= 0;8 isSIA = 0; 9 isSSA = 0; 10 isL1L2 = 0; 11 isHO = 0; 12 isFS = 0; 13 fe_SSA = 0; 14 fe_FS = 0; 15 15 vertex_equation = NaN; 16 16 element_equation = NaN; 17 bordermacayeal = NaN; 18 borderpattyn = NaN; 19 borderstokes = NaN; 17 borderSSA = NaN; 18 borderHO = NaN; 19 borderFS = NaN; 20 end 21 methods (Static) 22 function obj = loadobj(obj) % {{{ 23 % This function is directly called by matlab when a model object is 24 % loaded. If the input is a struct it is an old version of this class and 25 % old fields must be recovered (make sure they are in the deprecated 26 % model properties) 27 28 if verLessThan('matlab','7.9'), 29 disp('Warning: your matlab version is old and there is a risk that load does not work correctly'); 30 disp(' if the model is not loaded correctly, rename temporarily loadobj so that matlab does not use it'); 31 32 % This is a Matlab bug: all the fields of md have their default value 33 % Example of error message: 34 % Warning: Error loading an object of class 'model': 35 % Undefined function or method 'exist' for input arguments of type 'cell' 36 % 37 % This has been fixed in MATLAB 7.9 (R2009b) and later versions 38 end 39 40 if isstruct(obj) 41 disp('Recovering flowequation from older version'); 42 objstruct = obj; 43 obj = structtoobj(flowequation(),objstruct); 44 45 %2013 July 23rd 46 if isfield(objstruct,'isSIA'), obj.isSIA = objstruct.isSIA; end; 47 if isfield(objstruct,'isSSA'), obj.isSSA = objstruct.isSSA; end; 48 if isfield(objstruct,'isL1L2'), obj.isL1L2 = objstruct.isL1L2; end; 49 if isfield(objstruct,'isHO'), obj.isHO = objstruct.isHO; end; 50 if isfield(objstruct,'isFS'), obj.isFS = objstruct.isFS; end; 51 if isfield(objstruct,'fe_FS'), obj.fe_FS = objstruct.fe_FS; end; 52 if isfield(objstruct,'borderSSA'), obj.borderSSA = objstruct.borderSSA;end; 53 if isfield(objstruct,'borderHO'), obj.borderHO = objstruct.borderHO; end; 54 if isfield(objstruct,'borderFS'), obj.borderFS = objstruct.borderFS; end; 55 end 56 57 end% }}} 20 58 end 21 59 methods … … 35 73 if ismember(DiagnosticHorizAnalysisEnum(),analyses), 36 74 37 md = checkfield(md,'flowequation.is hutter','numel',[1],'values',[0 1]);38 md = checkfield(md,'flowequation.is macayeal','numel',[1],'values',[0 1]);39 md = checkfield(md,'flowequation.is l1l2','numel',[1],'values',[0 1]);40 md = checkfield(md,'flowequation.is pattyn','numel',[1],'values',[0 1]);41 md = checkfield(md,'flowequation.is stokes','numel',[1],'values',[0 1]);42 md = checkfield(md,'flowequation.border macayeal','size',[md.mesh.numberofvertices 1],'values',[0 1]);43 md = checkfield(md,'flowequation.border pattyn','size',[md.mesh.numberofvertices 1],'values',[0 1]);44 md = checkfield(md,'flowequation.border stokes','size',[md.mesh.numberofvertices 1],'values',[0 1]);75 md = checkfield(md,'flowequation.isSIA','numel',[1],'values',[0 1]); 76 md = checkfield(md,'flowequation.isSSA','numel',[1],'values',[0 1]); 77 md = checkfield(md,'flowequation.isL1L2','numel',[1],'values',[0 1]); 78 md = checkfield(md,'flowequation.isHO','numel',[1],'values',[0 1]); 79 md = checkfield(md,'flowequation.isFS','numel',[1],'values',[0 1]); 80 md = checkfield(md,'flowequation.borderSSA','size',[md.mesh.numberofvertices 1],'values',[0 1]); 81 md = checkfield(md,'flowequation.borderHO','size',[md.mesh.numberofvertices 1],'values',[0 1]); 82 md = checkfield(md,'flowequation.borderFS','size',[md.mesh.numberofvertices 1],'values',[0 1]); 45 83 if (md.mesh.dimension==2), 46 84 md = checkfield(md,'flowequation.vertex_equation','size',[md.mesh.numberofvertices 1],'values',[1:2]); … … 50 88 md = checkfield(md,'flowequation.element_equation','size',[md.mesh.numberofelements 1],'values',[0:8]); 51 89 end 52 if ~(obj.is hutter || obj.ismacayeal || obj.isl1l2 || obj.ispattyn || obj.isstokes),90 if ~(obj.isSIA || obj.isSSA || obj.isL1L2 || obj.isHO || obj.isFS), 53 91 md = checkmessage(md,['no element types set for this model']); 54 92 end 55 93 end 56 if ismember(Diagnostic HutterAnalysisEnum(),analyses),94 if ismember(DiagnosticSIAAnalysisEnum(),analyses), 57 95 if any(obj.element_equation==1), 58 96 if(obj.element_equation & md.mask.elementonfloatingice), 59 disp(sprintf('\n !!! Warning: Hutter''s model is not consistent on ice shelves !!!\n'));97 disp(sprintf('\n !!! Warning: SIA''s model is not consistent on ice shelves !!!\n')); 60 98 end 61 99 end … … 66 104 disp(sprintf(' flow equation parameters:')); 67 105 68 fielddisplay(obj,'is hutter','is the shallow ice approximationused ?');69 fielddisplay(obj,'is macayeal','is the macayeal approximationused ?');70 fielddisplay(obj,'is l1l2','is the l1l2 approximation used ?');71 fielddisplay(obj,'is pattyn','is the pattynapproximation used ?');72 fielddisplay(obj,'is stokes','are the Full-Stokesequations used ?');73 fielddisplay(obj,'fe_ ssa','Finite Element for SSA 0: Lagrange P1 (linear), 1: Lagrange P2 (quadratic)');106 fielddisplay(obj,'isSIA','is the Shallow Ice Approximation (SIA) used ?'); 107 fielddisplay(obj,'isSSA','is the Shelfy-Stream Approximation (SSA) used ?'); 108 fielddisplay(obj,'isL1L2','is the L1L2 approximation used ?'); 109 fielddisplay(obj,'isHO','is the Higher-Order (HO) approximation used ?'); 110 fielddisplay(obj,'isFS','are the Full-FS (FS) equations used ?'); 111 fielddisplay(obj,'fe_SSA','Finite Element for SSA 0: Lagrange P1 (linear), 1: Lagrange P2 (quadratic)'); 74 112 fielddisplay(obj,'vertex_equation','flow equation for each vertex'); 75 113 fielddisplay(obj,'element_equation','flow equation for each element'); 76 fielddisplay(obj,'border macayeal','vertices on MacAyeal''s border (for tiling)');77 fielddisplay(obj,'border pattyn','vertices on Pattyn''s border (for tiling)');78 fielddisplay(obj,'border stokes','vertices on Stokes'' border (for tiling)');114 fielddisplay(obj,'borderSSA','vertices on SSA''s border (for tiling)'); 115 fielddisplay(obj,'borderHO','vertices on HO''s border (for tiling)'); 116 fielddisplay(obj,'borderFS','vertices on FS'' border (for tiling)'); 79 117 80 118 end % }}} 81 119 function marshall(obj,md,fid) % {{{ 82 WriteData(fid,'object',obj,'fieldname','is hutter','format','Boolean');83 WriteData(fid,'object',obj,'fieldname','is macayeal','format','Boolean');84 WriteData(fid,'object',obj,'fieldname','is l1l2','format','Boolean');85 WriteData(fid,'object',obj,'fieldname','is pattyn','format','Boolean');86 WriteData(fid,'object',obj,'fieldname','is stokes','format','Boolean');87 WriteData(fid,'object',obj,'fieldname','fe_ stokes','format','Integer');88 WriteData(fid,'object',obj,'fieldname','fe_ ssa','format','Integer');89 WriteData(fid,'object',obj,'fieldname','border macayeal','format','DoubleMat','mattype',1);90 WriteData(fid,'object',obj,'fieldname','border pattyn','format','DoubleMat','mattype',1);91 WriteData(fid,'object',obj,'fieldname','border stokes','format','DoubleMat','mattype',1);120 WriteData(fid,'object',obj,'fieldname','isSIA','format','Boolean'); 121 WriteData(fid,'object',obj,'fieldname','isSSA','format','Boolean'); 122 WriteData(fid,'object',obj,'fieldname','isL1L2','format','Boolean'); 123 WriteData(fid,'object',obj,'fieldname','isHO','format','Boolean'); 124 WriteData(fid,'object',obj,'fieldname','isFS','format','Boolean'); 125 WriteData(fid,'object',obj,'fieldname','fe_FS','format','Integer'); 126 WriteData(fid,'object',obj,'fieldname','fe_SSA','format','Integer'); 127 WriteData(fid,'object',obj,'fieldname','borderSSA','format','DoubleMat','mattype',1); 128 WriteData(fid,'object',obj,'fieldname','borderHO','format','DoubleMat','mattype',1); 129 WriteData(fid,'object',obj,'fieldname','borderFS','format','DoubleMat','mattype',1); 92 130 %convert approximations to enums 93 131 data=obj.vertex_equation; 94 132 pos=find(data==0); data(pos,end)=NoneApproximationEnum(); 95 pos=find(data==1); data(pos,end)= HutterApproximationEnum();133 pos=find(data==1); data(pos,end)=SIAApproximationEnum(); 96 134 pos=find(data==2); data(pos,end)=MacAyealApproximationEnum(); 97 pos=find(data==3); data(pos,end)= PattynApproximationEnum();98 pos=find(data==4); data(pos,end)= StokesApproximationEnum();99 pos=find(data==5); data(pos,end)=MacAyeal PattynApproximationEnum();100 pos=find(data==6); data(pos,end)=MacAyeal StokesApproximationEnum();101 pos=find(data==7); data(pos,end)= PattynStokesApproximationEnum();135 pos=find(data==3); data(pos,end)=HOApproximationEnum(); 136 pos=find(data==4); data(pos,end)=FSApproximationEnum(); 137 pos=find(data==5); data(pos,end)=MacAyealHOApproximationEnum(); 138 pos=find(data==6); data(pos,end)=MacAyealFSApproximationEnum(); 139 pos=find(data==7); data(pos,end)=HOFSApproximationEnum(); 102 140 pos=find(data==8); data(pos,end)=L1L2ApproximationEnum(); 103 141 WriteData(fid,'data',data,'enum',FlowequationVertexEquationEnum(),'format','DoubleMat','mattype',1); 104 142 data=obj.element_equation; 105 143 pos=find(data==0); data(pos,end)=NoneApproximationEnum(); 106 pos=find(data==1); data(pos,end)= HutterApproximationEnum();144 pos=find(data==1); data(pos,end)=SIAApproximationEnum(); 107 145 pos=find(data==2); data(pos,end)=MacAyealApproximationEnum(); 108 pos=find(data==3); data(pos,end)= PattynApproximationEnum();109 pos=find(data==4); data(pos,end)= StokesApproximationEnum();110 pos=find(data==5); data(pos,end)=MacAyeal PattynApproximationEnum();111 pos=find(data==6); data(pos,end)=MacAyeal StokesApproximationEnum();112 pos=find(data==7); data(pos,end)= PattynStokesApproximationEnum();146 pos=find(data==3); data(pos,end)=HOApproximationEnum(); 147 pos=find(data==4); data(pos,end)=FSApproximationEnum(); 148 pos=find(data==5); data(pos,end)=MacAyealHOApproximationEnum(); 149 pos=find(data==6); data(pos,end)=MacAyealFSApproximationEnum(); 150 pos=find(data==7); data(pos,end)=HOFSApproximationEnum(); 113 151 pos=find(data==8); data(pos,end)=L1L2ApproximationEnum(); 114 152 WriteData(fid,'data',data,'enum',FlowequationElementEquationEnum(),'format','DoubleMat','mattype',2); -
issm/trunk-jpl/src/m/classes/flowequation.py
r15528 r15564 16 16 def __init__(self): # {{{ 17 17 18 self.is hutter= 019 self.is macayeal= 020 self.is l1l2 = 021 self.is pattyn= 022 self.is stokes= 023 self.fe_ stokes= 024 self.fe_ ssa= 018 self.isSIA = 0 19 self.isSSA = 0 20 self.isL1L2 = 0 21 self.isHO = 0 22 self.isFS = 0 23 self.fe_SSA = 0 24 self.fe_FS = 0 25 25 self.vertex_equation = float('NaN') 26 26 self.element_equation = float('NaN') 27 self.border macayeal= float('NaN')28 self.border pattyn= float('NaN')29 self.border stokes= float('NaN')27 self.borderSSA = float('NaN') 28 self.borderHO = float('NaN') 29 self.borderFS = float('NaN') 30 30 31 31 #set defaults … … 36 36 string=' flow equation parameters:' 37 37 38 string="%s\n%s"%(string,fielddisplay(self,'is hutter',"is the shallow ice approximationused ?"))39 string="%s\n%s"%(string,fielddisplay(self,'is macayeal',"is the macayeal approximationused ?"))40 string="%s\n%s"%(string,fielddisplay(self,'is l1l2',"are l1l2 equations used ?"))41 string="%s\n%s"%(string,fielddisplay(self,'is pattyn',"is the pattynapproximation used ?"))42 string="%s\n%s"%(string,fielddisplay(self,'is stokes',"are the Full-Stokesequations used ?"))43 string="%s\n%s"%(string,fielddisplay(self,'fe_ ssa',"Finite Element for SSA 0: Lagrange P1 (linear), 1: Lagrange P2 (quadratic)"))38 string="%s\n%s"%(string,fielddisplay(self,'isSIA',"is the Shallow Ice Approximation (SIA) used ?")) 39 string="%s\n%s"%(string,fielddisplay(self,'isSSA',"is the Shelfy-Stream Approximation (SSA) used ?")) 40 string="%s\n%s"%(string,fielddisplay(self,'isL1L2',"are L1L2 equations used ?")) 41 string="%s\n%s"%(string,fielddisplay(self,'isHO',"is the Higher-Order (HO) approximation used ?")) 42 string="%s\n%s"%(string,fielddisplay(self,'isFS',"are the Full-FS (FS) equations used ?")) 43 string="%s\n%s"%(string,fielddisplay(self,'fe_SSA',"Finite Element for SSA 0: Lagrange P1 (linear), 1: Lagrange P2 (quadratic)")) 44 44 string="%s\n%s"%(string,fielddisplay(self,'vertex_equation',"flow equation for each vertex")) 45 45 string="%s\n%s"%(string,fielddisplay(self,'element_equation',"flow equation for each element")) 46 string="%s\n%s"%(string,fielddisplay(self,'border macayeal',"vertices on MacAyeal's border (for tiling)"))47 string="%s\n%s"%(string,fielddisplay(self,'border pattyn',"vertices on Pattyn's border (for tiling)"))48 string="%s\n%s"%(string,fielddisplay(self,'border stokes',"vertices on Stokes' border (for tiling)"))46 string="%s\n%s"%(string,fielddisplay(self,'borderSSA',"vertices on SSA's border (for tiling)")) 47 string="%s\n%s"%(string,fielddisplay(self,'borderHO',"vertices on HO's border (for tiling)")) 48 string="%s\n%s"%(string,fielddisplay(self,'borderFS',"vertices on FS' border (for tiling)")) 49 49 return string 50 50 #}}} … … 55 55 56 56 if DiagnosticHorizAnalysisEnum() in analyses: 57 md = checkfield(md,'flowequation.is hutter','numel',[1],'values',[0,1])58 md = checkfield(md,'flowequation.is macayeal','numel',[1],'values',[0,1])59 md = checkfield(md,'flowequation.is l1l2','numel',[1],'values',[0,1])60 md = checkfield(md,'flowequation.is pattyn','numel',[1],'values',[0,1])61 md = checkfield(md,'flowequation.is stokes','numel',[1],'values',[0,1])62 md = checkfield(md,'flowequation.border macayeal','size',[md.mesh.numberofvertices],'values',[0,1])63 md = checkfield(md,'flowequation.border pattyn','size',[md.mesh.numberofvertices],'values',[0,1])64 md = checkfield(md,'flowequation.border stokes','size',[md.mesh.numberofvertices],'values',[0,1])57 md = checkfield(md,'flowequation.isSIA','numel',[1],'values',[0,1]) 58 md = checkfield(md,'flowequation.isSSA','numel',[1],'values',[0,1]) 59 md = checkfield(md,'flowequation.isL1L2','numel',[1],'values',[0,1]) 60 md = checkfield(md,'flowequation.isHO','numel',[1],'values',[0,1]) 61 md = checkfield(md,'flowequation.isFS','numel',[1],'values',[0,1]) 62 md = checkfield(md,'flowequation.borderSSA','size',[md.mesh.numberofvertices],'values',[0,1]) 63 md = checkfield(md,'flowequation.borderHO','size',[md.mesh.numberofvertices],'values',[0,1]) 64 md = checkfield(md,'flowequation.borderFS','size',[md.mesh.numberofvertices],'values',[0,1]) 65 65 if md.mesh.dimension==2: 66 66 md = checkfield(md,'flowequation.vertex_equation','size',[md.mesh.numberofvertices],'values',[1,2]) … … 69 69 md = checkfield(md,'flowequation.vertex_equation','size',[md.mesh.numberofvertices],'values',numpy.arange(0,8+1)) 70 70 md = checkfield(md,'flowequation.element_equation','size',[md.mesh.numberofelements],'values',numpy.arange(0,8+1)) 71 if not (self.is hutter or self.ismacayeal or self.isl1l2 or self.ispattyn or self.isstokes):71 if not (self.isSIA or self.isSSA or self.isL1L2 or self.isHO or self.isFS): 72 72 md.checkmessage("no element types set for this model") 73 73 74 if Diagnostic HutterAnalysisEnum() in analyses:74 if DiagnosticSIAAnalysisEnum() in analyses: 75 75 if any(self.element_equation==1): 76 76 if numpy.any(numpy.logical_and(self.element_equation,md.mask.elementonfloatingice)): 77 print "\n !!! Warning: Hutter's model is not consistent on ice shelves !!!\n"77 print "\n !!! Warning: SIA's model is not consistent on ice shelves !!!\n" 78 78 79 79 return md 80 80 # }}} 81 81 def marshall(self,md,fid): # {{{ 82 WriteData(fid,'object',self,'fieldname','is hutter','format','Boolean')83 WriteData(fid,'object',self,'fieldname','is macayeal','format','Boolean')84 WriteData(fid,'object',self,'fieldname','is l1l2','format','Boolean')85 WriteData(fid,'object',self,'fieldname','is pattyn','format','Boolean')86 WriteData(fid,'object',self,'fieldname','is stokes','format','Boolean')87 WriteData(fid,'object',self,'fieldname','fe_ stokes','format','Integer')88 WriteData(fid,'object',self,'fieldname','fe_ ssa','format','Integer')89 WriteData(fid,'object',self,'fieldname','border macayeal','format','DoubleMat','mattype',1)90 WriteData(fid,'object',self,'fieldname','border pattyn','format','DoubleMat','mattype',1)91 WriteData(fid,'object',self,'fieldname','border stokes','format','DoubleMat','mattype',1)82 WriteData(fid,'object',self,'fieldname','isSIA','format','Boolean') 83 WriteData(fid,'object',self,'fieldname','isSSA','format','Boolean') 84 WriteData(fid,'object',self,'fieldname','isL1L2','format','Boolean') 85 WriteData(fid,'object',self,'fieldname','isHO','format','Boolean') 86 WriteData(fid,'object',self,'fieldname','isFS','format','Boolean') 87 WriteData(fid,'object',self,'fieldname','fe_FS','format','Integer') 88 WriteData(fid,'object',self,'fieldname','fe_SSA','format','Integer') 89 WriteData(fid,'object',self,'fieldname','borderSSA','format','DoubleMat','mattype',1) 90 WriteData(fid,'object',self,'fieldname','borderHO','format','DoubleMat','mattype',1) 91 WriteData(fid,'object',self,'fieldname','borderFS','format','DoubleMat','mattype',1) 92 92 #convert approximations to enums 93 93 data=copy.deepcopy(self.vertex_equation) 94 94 data[numpy.nonzero(data==0)]=NoneApproximationEnum() 95 data[numpy.nonzero(data==1)]= HutterApproximationEnum()95 data[numpy.nonzero(data==1)]=SIAApproximationEnum() 96 96 data[numpy.nonzero(data==2)]=MacAyealApproximationEnum() 97 data[numpy.nonzero(data==3)]= PattynApproximationEnum()98 data[numpy.nonzero(data==4)]= StokesApproximationEnum()99 data[numpy.nonzero(data==5)]=MacAyeal PattynApproximationEnum()100 data[numpy.nonzero(data==6)]=MacAyeal StokesApproximationEnum()101 data[numpy.nonzero(data==7)]= PattynStokesApproximationEnum()97 data[numpy.nonzero(data==3)]=HOApproximationEnum() 98 data[numpy.nonzero(data==4)]=FSApproximationEnum() 99 data[numpy.nonzero(data==5)]=MacAyealHOApproximationEnum() 100 data[numpy.nonzero(data==6)]=MacAyealFSApproximationEnum() 101 data[numpy.nonzero(data==7)]=HOFSApproximationEnum() 102 102 data[numpy.nonzero(data==8)]=L1L2ApproximationEnum() 103 103 WriteData(fid,'data',data,'enum',FlowequationVertexEquationEnum(),'format','DoubleMat','mattype',1) 104 104 data=copy.deepcopy(self.element_equation) 105 105 data[numpy.nonzero(data==0)]=NoneApproximationEnum() 106 data[numpy.nonzero(data==1)]= HutterApproximationEnum()106 data[numpy.nonzero(data==1)]=SIAApproximationEnum() 107 107 data[numpy.nonzero(data==2)]=MacAyealApproximationEnum() 108 data[numpy.nonzero(data==3)]= PattynApproximationEnum()109 data[numpy.nonzero(data==4)]= StokesApproximationEnum()110 data[numpy.nonzero(data==5)]=MacAyeal PattynApproximationEnum()111 data[numpy.nonzero(data==6)]=MacAyeal StokesApproximationEnum()112 data[numpy.nonzero(data==7)]= PattynStokesApproximationEnum()108 data[numpy.nonzero(data==3)]=HOApproximationEnum() 109 data[numpy.nonzero(data==4)]=FSApproximationEnum() 110 data[numpy.nonzero(data==5)]=MacAyealHOApproximationEnum() 111 data[numpy.nonzero(data==6)]=MacAyealFSApproximationEnum() 112 data[numpy.nonzero(data==7)]=HOFSApproximationEnum() 113 113 data[numpy.nonzero(data==8)]=L1L2ApproximationEnum() 114 114 WriteData(fid,'data',data,'enum',FlowequationElementEquationEnum(),'format','DoubleMat','mattype',2) -
issm/trunk-jpl/src/m/classes/model/model.m
r15504 r15564 171 171 md.flowequation.element_equation=project2d(md,md.flowequation.element_equation,1); 172 172 md.flowequation.vertex_equation=project2d(md,md.flowequation.vertex_equation,1); 173 md.flowequation.border macayeal=project2d(md,md.flowequation.bordermacayeal,1);174 md.flowequation.border pattyn=project2d(md,md.flowequation.borderpattyn,1);175 md.flowequation.border stokes=project2d(md,md.flowequation.borderstokes,1);173 md.flowequation.borderSSA=project2d(md,md.flowequation.borderSSA,1); 174 md.flowequation.borderHO=project2d(md,md.flowequation.borderHO,1); 175 md.flowequation.borderFS=project2d(md,md.flowequation.borderFS,1); 176 176 end 177 177 … … 262 262 % It can either be a domain file (argus type, .exp extension), or an array of element flags. 263 263 % If user wants every element outside the domain to be 264 % extract2d, add '~' to the name of the domain file (ex: '~ Pattyn.exp');264 % extract2d, add '~' to the name of the domain file (ex: '~HO.exp'); 265 265 % an empty string '' will be considered as an empty domain 266 266 % a string 'all' will be considered as the entire domain … … 718 718 md.flowequation.vertex_equation=project3d(md,'vector',oldvertices_type,'type','node'); 719 719 end 720 md.flowequation.border macayeal=project3d(md,'vector',md.flowequation.bordermacayeal,'type','node');721 md.flowequation.border pattyn=project3d(md,'vector',md.flowequation.borderpattyn,'type','node');722 md.flowequation.border stokes=project3d(md,'vector',md.flowequation.borderstokes,'type','node');720 md.flowequation.borderSSA=project3d(md,'vector',md.flowequation.borderSSA,'type','node'); 721 md.flowequation.borderHO=project3d(md,'vector',md.flowequation.borderHO,'type','node'); 722 md.flowequation.borderFS=project3d(md,'vector',md.flowequation.borderFS,'type','node'); 723 723 724 724 %boundary conditions … … 882 882 if isfield(structmd,'artificial_diffusivity'), md.balancethickness.stabilization=structmd.artificial_diffusivity; end 883 883 if isfield(structmd,'dhdt'), md.balancethickness.thickening_rate=structmd.dhdt; end 884 if isfield(structmd,'is hutter'), md.flowequation.ishutter=structmd.ishutter; end885 if isfield(structmd,'is stokes'), md.flowequation.isstokes=structmd.isstokes; end884 if isfield(structmd,'isSIA'), md.flowequation.isSIA=structmd.isSIA; end 885 if isfield(structmd,'isFS'), md.flowequation.isFS=structmd.isFS; end 886 886 if isfield(structmd,'elements_type'), md.flowequation.element_equation=structmd.elements_type; end 887 887 if isfield(structmd,'vertices_type'), md.flowequation.vertex_equation=structmd.vertices_type; end -
issm/trunk-jpl/src/m/classes/model/model.py
r14901 r15564 177 177 It can either be a domain file (argus type, .exp extension), or an array of element flags. 178 178 If user wants every element outside the domain to be 179 extract2d, add '~' to the name of the domain file (ex: '~ Pattyn.exp');179 extract2d, add '~' to the name of the domain file (ex: '~HO.exp'); 180 180 an empty string '' will be considered as an empty domain 181 181 a string 'all' will be considered as the entire domain … … 613 613 md.flowequation.vertex_equation=project3d(md,'vector',oldvertices_type,'type','node') 614 614 615 md.flowequation.border macayeal=project3d(md,'vector',md.flowequation.bordermacayeal,'type','node')616 md.flowequation.border pattyn=project3d(md,'vector',md.flowequation.borderpattyn,'type','node')617 md.flowequation.border stokes=project3d(md,'vector',md.flowequation.borderstokes,'type','node')615 md.flowequation.borderSSA=project3d(md,'vector',md.flowequation.borderSSA,'type','node') 616 md.flowequation.borderHO=project3d(md,'vector',md.flowequation.borderHO,'type','node') 617 md.flowequation.borderFS=project3d(md,'vector',md.flowequation.borderFS,'type','node') 618 618 619 619 #boundary conditions -
issm/trunk-jpl/src/m/classes/toolkits.m
r14881 r15564 22 22 function obj = addoptions(obj,analysis,varargin) % {{{ 23 23 % Usage example: 24 % md.toolkits=addoptions(md.toolkits,DiagnosticHorizAnalysisEnum(), stokesoptions());24 % md.toolkits=addoptions(md.toolkits,DiagnosticHorizAnalysisEnum(),FSoptions()); 25 25 % md.toolkits=addoptions(md.toolkits,DiagnosticHorizAnalysisEnum()); 26 26 -
issm/trunk-jpl/src/m/classes/toolkits.py
r14933 r15564 39 39 def addoptions(self,analysis,*args): # {{{ 40 40 # Usage example: 41 # md.toolkits=addoptions(md.toolkits,DiagnosticHorizAnalysisEnum(), stokesoptions());41 # md.toolkits=addoptions(md.toolkits,DiagnosticHorizAnalysisEnum(),FSoptions()); 42 42 # md.toolkits=addoptions(md.toolkits,DiagnosticHorizAnalysisEnum()); 43 43 -
issm/trunk-jpl/src/m/consistency/ismodelselfconsistent.m
r15339 r15564 47 47 case DiagnosticSolutionEnum(), 48 48 numanalyses=5; 49 analyses=[DiagnosticHorizAnalysisEnum();DiagnosticVertAnalysisEnum();Diagnostic HutterAnalysisEnum();SurfaceSlopeAnalysisEnum();BedSlopeAnalysisEnum()];49 analyses=[DiagnosticHorizAnalysisEnum();DiagnosticVertAnalysisEnum();DiagnosticSIAAnalysisEnum();SurfaceSlopeAnalysisEnum();BedSlopeAnalysisEnum()]; 50 50 51 51 case SteadystateSolutionEnum(), 52 52 numanalyses=7; 53 analyses=[DiagnosticHorizAnalysisEnum();DiagnosticVertAnalysisEnum();Diagnostic HutterAnalysisEnum();SurfaceSlopeAnalysisEnum();BedSlopeAnalysisEnum();ThermalAnalysisEnum();MeltingAnalysisEnum()];53 analyses=[DiagnosticHorizAnalysisEnum();DiagnosticVertAnalysisEnum();DiagnosticSIAAnalysisEnum();SurfaceSlopeAnalysisEnum();BedSlopeAnalysisEnum();ThermalAnalysisEnum();MeltingAnalysisEnum()]; 54 54 55 55 case ThermalSolutionEnum(), … … 87 87 case TransientSolutionEnum(), 88 88 numanalyses=9; 89 analyses=[DiagnosticHorizAnalysisEnum();DiagnosticVertAnalysisEnum();Diagnostic HutterAnalysisEnum();SurfaceSlopeAnalysisEnum();BedSlopeAnalysisEnum();ThermalAnalysisEnum();MeltingAnalysisEnum();EnthalpyAnalysisEnum();PrognosticAnalysisEnum()];89 analyses=[DiagnosticHorizAnalysisEnum();DiagnosticVertAnalysisEnum();DiagnosticSIAAnalysisEnum();SurfaceSlopeAnalysisEnum();BedSlopeAnalysisEnum();ThermalAnalysisEnum();MeltingAnalysisEnum();EnthalpyAnalysisEnum();PrognosticAnalysisEnum()]; 90 90 91 91 case FlaimSolutionEnum(), -
issm/trunk-jpl/src/m/consistency/ismodelselfconsistent.py
r14771 r15564 12 12 if solutiontype == DiagnosticSolutionEnum(): 13 13 numanalyses=5 14 analyses=[DiagnosticHorizAnalysisEnum(),DiagnosticVertAnalysisEnum(),Diagnostic HutterAnalysisEnum(),SurfaceSlopeAnalysisEnum(),BedSlopeAnalysisEnum()]14 analyses=[DiagnosticHorizAnalysisEnum(),DiagnosticVertAnalysisEnum(),DiagnosticSIAAnalysisEnum(),SurfaceSlopeAnalysisEnum(),BedSlopeAnalysisEnum()] 15 15 16 16 elif solutiontype == SteadystateSolutionEnum(): 17 17 numanalyses=7 18 analyses=[DiagnosticHorizAnalysisEnum(),DiagnosticVertAnalysisEnum(),Diagnostic HutterAnalysisEnum(),SurfaceSlopeAnalysisEnum(),BedSlopeAnalysisEnum(),ThermalAnalysisEnum(),MeltingAnalysisEnum()]18 analyses=[DiagnosticHorizAnalysisEnum(),DiagnosticVertAnalysisEnum(),DiagnosticSIAAnalysisEnum(),SurfaceSlopeAnalysisEnum(),BedSlopeAnalysisEnum(),ThermalAnalysisEnum(),MeltingAnalysisEnum()] 19 19 20 20 elif solutiontype == ThermalSolutionEnum(): … … 48 48 elif solutiontype == TransientSolutionEnum(): 49 49 numanalyses=9 50 analyses=[DiagnosticHorizAnalysisEnum(),DiagnosticVertAnalysisEnum(),Diagnostic HutterAnalysisEnum(),SurfaceSlopeAnalysisEnum(),BedSlopeAnalysisEnum(),ThermalAnalysisEnum(),MeltingAnalysisEnum(),EnthalpyAnalysisEnum(),PrognosticAnalysisEnum()]50 analyses=[DiagnosticHorizAnalysisEnum(),DiagnosticVertAnalysisEnum(),DiagnosticSIAAnalysisEnum(),SurfaceSlopeAnalysisEnum(),BedSlopeAnalysisEnum(),ThermalAnalysisEnum(),MeltingAnalysisEnum(),EnthalpyAnalysisEnum(),PrognosticAnalysisEnum()] 51 51 52 52 elif solutiontype == FlaimSolutionEnum(): -
issm/trunk-jpl/src/m/contrib/hack/sia.m
r13009 r15564 2 2 %BALVEL - computation of Shallow Ice velocities 3 3 % 4 % This routine uses the model of Hutterto compute the velocities4 % This routine uses the model of SIA to compute the velocities 5 5 % of a 2d model using the surface slope 6 6 % -
issm/trunk-jpl/src/m/enum/EnumDefinitions.py
r15530 r15564 681 681 return StringToEnum('DiagnosticSpcvz')[0] 682 682 683 def Diagnostic StokesreconditioningEnum():684 """ 685 DIAGNOSTIC STOKESRECONDITIONINGENUM - Enum of DiagnosticStokesreconditioning686 687 WARNING: DO NOT MODIFY THIS FILE 688 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh 689 Please read src/c/shared/Enum/README for more information 690 691 Usage: 692 macro=Diagnostic StokesreconditioningEnum()693 """ 694 695 return StringToEnum('Diagnostic Stokesreconditioning')[0]683 def DiagnosticFSreconditioningEnum(): 684 """ 685 DIAGNOSTICFSRECONDITIONINGENUM - Enum of DiagnosticFSreconditioning 686 687 WARNING: DO NOT MODIFY THIS FILE 688 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh 689 Please read src/c/shared/Enum/README for more information 690 691 Usage: 692 macro=DiagnosticFSreconditioningEnum() 693 """ 694 695 return StringToEnum('DiagnosticFSreconditioning')[0] 696 696 697 697 def DiagnosticVertexPairingEnum(): … … 765 765 return StringToEnum('LoadingforceZ')[0] 766 766 767 def FlowequationBorder macayealEnum():768 """ 769 FLOWEQUATIONBORDER MACAYEALENUM - Enum of FlowequationBordermacayeal770 771 WARNING: DO NOT MODIFY THIS FILE 772 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh 773 Please read src/c/shared/Enum/README for more information 774 775 Usage: 776 macro=FlowequationBorder macayealEnum()777 """ 778 779 return StringToEnum('FlowequationBorder macayeal')[0]780 781 def FlowequationBorder pattynEnum():782 """ 783 FLOWEQUATIONBORDER PATTYNENUM - Enum of FlowequationBorderpattyn784 785 WARNING: DO NOT MODIFY THIS FILE 786 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh 787 Please read src/c/shared/Enum/README for more information 788 789 Usage: 790 macro=FlowequationBorder pattynEnum()791 """ 792 793 return StringToEnum('FlowequationBorder pattyn')[0]794 795 def FlowequationBorder stokesEnum():796 """ 797 FLOWEQUATIONBORDER STOKESENUM - Enum of FlowequationBorderstokes798 799 WARNING: DO NOT MODIFY THIS FILE 800 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh 801 Please read src/c/shared/Enum/README for more information 802 803 Usage: 804 macro=FlowequationBorder stokesEnum()805 """ 806 807 return StringToEnum('FlowequationBorder stokes')[0]767 def FlowequationBorderSSAEnum(): 768 """ 769 FLOWEQUATIONBORDERSSAENUM - Enum of FlowequationBorderSSA 770 771 WARNING: DO NOT MODIFY THIS FILE 772 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh 773 Please read src/c/shared/Enum/README for more information 774 775 Usage: 776 macro=FlowequationBorderSSAEnum() 777 """ 778 779 return StringToEnum('FlowequationBorderSSA')[0] 780 781 def FlowequationBorderHOEnum(): 782 """ 783 FLOWEQUATIONBORDERHOENUM - Enum of FlowequationBorderHO 784 785 WARNING: DO NOT MODIFY THIS FILE 786 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh 787 Please read src/c/shared/Enum/README for more information 788 789 Usage: 790 macro=FlowequationBorderHOEnum() 791 """ 792 793 return StringToEnum('FlowequationBorderHO')[0] 794 795 def FlowequationBorderFSEnum(): 796 """ 797 FLOWEQUATIONBORDERFSENUM - Enum of FlowequationBorderFS 798 799 WARNING: DO NOT MODIFY THIS FILE 800 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh 801 Please read src/c/shared/Enum/README for more information 802 803 Usage: 804 macro=FlowequationBorderFSEnum() 805 """ 806 807 return StringToEnum('FlowequationBorderFS')[0] 808 808 809 809 def FlowequationElementEquationEnum(): … … 821 821 return StringToEnum('FlowequationElementEquation')[0] 822 822 823 def FlowequationIs hutterEnum():824 """ 825 FLOWEQUATIONIS HUTTERENUM - Enum of FlowequationIshutter826 827 WARNING: DO NOT MODIFY THIS FILE 828 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh 829 Please read src/c/shared/Enum/README for more information 830 831 Usage: 832 macro=FlowequationIs hutterEnum()833 """ 834 835 return StringToEnum('FlowequationIs hutter')[0]836 837 def FlowequationIs macayealEnum():838 """ 839 FLOWEQUATIONIS MACAYEALENUM - Enum of FlowequationIsmacayeal840 841 WARNING: DO NOT MODIFY THIS FILE 842 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh 843 Please read src/c/shared/Enum/README for more information 844 845 Usage: 846 macro=FlowequationIs macayealEnum()847 """ 848 849 return StringToEnum('FlowequationIs macayeal')[0]850 851 def FlowequationIs l1l2Enum():852 """ 853 FLOWEQUATIONISL1L2ENUM - Enum of FlowequationIs l1l2854 855 WARNING: DO NOT MODIFY THIS FILE 856 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh 857 Please read src/c/shared/Enum/README for more information 858 859 Usage: 860 macro=FlowequationIs l1l2Enum()861 """ 862 863 return StringToEnum('FlowequationIs l1l2')[0]864 865 def FlowequationIs pattynEnum():866 """ 867 FLOWEQUATIONIS PATTYNENUM - Enum of FlowequationIspattyn868 869 WARNING: DO NOT MODIFY THIS FILE 870 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh 871 Please read src/c/shared/Enum/README for more information 872 873 Usage: 874 macro=FlowequationIs pattynEnum()875 """ 876 877 return StringToEnum('FlowequationIs pattyn')[0]878 879 def FlowequationIs stokesEnum():880 """ 881 FLOWEQUATIONIS STOKESENUM - Enum of FlowequationIsstokes882 883 WARNING: DO NOT MODIFY THIS FILE 884 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh 885 Please read src/c/shared/Enum/README for more information 886 887 Usage: 888 macro=FlowequationIs stokesEnum()889 """ 890 891 return StringToEnum('FlowequationIs stokes')[0]892 893 def FlowequationFe StokesEnum():894 """ 895 FLOWEQUATIONFE STOKESENUM - Enum of FlowequationFeStokes896 897 WARNING: DO NOT MODIFY THIS FILE 898 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh 899 Please read src/c/shared/Enum/README for more information 900 901 Usage: 902 macro=FlowequationFe StokesEnum()903 """ 904 905 return StringToEnum('FlowequationFe Stokes')[0]906 907 def FlowequationFeS saEnum():908 """ 909 FLOWEQUATIONFESSAENUM - Enum of FlowequationFeS sa910 911 WARNING: DO NOT MODIFY THIS FILE 912 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh 913 Please read src/c/shared/Enum/README for more information 914 915 Usage: 916 macro=FlowequationFeS saEnum()917 """ 918 919 return StringToEnum('FlowequationFeS sa')[0]823 def FlowequationIsSIAEnum(): 824 """ 825 FLOWEQUATIONISSIAENUM - Enum of FlowequationIsSIA 826 827 WARNING: DO NOT MODIFY THIS FILE 828 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh 829 Please read src/c/shared/Enum/README for more information 830 831 Usage: 832 macro=FlowequationIsSIAEnum() 833 """ 834 835 return StringToEnum('FlowequationIsSIA')[0] 836 837 def FlowequationIsSSAEnum(): 838 """ 839 FLOWEQUATIONISSSAENUM - Enum of FlowequationIsSSA 840 841 WARNING: DO NOT MODIFY THIS FILE 842 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh 843 Please read src/c/shared/Enum/README for more information 844 845 Usage: 846 macro=FlowequationIsSSAEnum() 847 """ 848 849 return StringToEnum('FlowequationIsSSA')[0] 850 851 def FlowequationIsL1L2Enum(): 852 """ 853 FLOWEQUATIONISL1L2ENUM - Enum of FlowequationIsL1L2 854 855 WARNING: DO NOT MODIFY THIS FILE 856 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh 857 Please read src/c/shared/Enum/README for more information 858 859 Usage: 860 macro=FlowequationIsL1L2Enum() 861 """ 862 863 return StringToEnum('FlowequationIsL1L2')[0] 864 865 def FlowequationIsHOEnum(): 866 """ 867 FLOWEQUATIONISHOENUM - Enum of FlowequationIsHO 868 869 WARNING: DO NOT MODIFY THIS FILE 870 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh 871 Please read src/c/shared/Enum/README for more information 872 873 Usage: 874 macro=FlowequationIsHOEnum() 875 """ 876 877 return StringToEnum('FlowequationIsHO')[0] 878 879 def FlowequationIsFSEnum(): 880 """ 881 FLOWEQUATIONISFSENUM - Enum of FlowequationIsFS 882 883 WARNING: DO NOT MODIFY THIS FILE 884 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh 885 Please read src/c/shared/Enum/README for more information 886 887 Usage: 888 macro=FlowequationIsFSEnum() 889 """ 890 891 return StringToEnum('FlowequationIsFS')[0] 892 893 def FlowequationFeFSEnum(): 894 """ 895 FLOWEQUATIONFEFSENUM - Enum of FlowequationFeFS 896 897 WARNING: DO NOT MODIFY THIS FILE 898 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh 899 Please read src/c/shared/Enum/README for more information 900 901 Usage: 902 macro=FlowequationFeFSEnum() 903 """ 904 905 return StringToEnum('FlowequationFeFS')[0] 906 907 def FlowequationFeSSAEnum(): 908 """ 909 FLOWEQUATIONFESSAENUM - Enum of FlowequationFeSSA 910 911 WARNING: DO NOT MODIFY THIS FILE 912 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh 913 Please read src/c/shared/Enum/README for more information 914 915 Usage: 916 macro=FlowequationFeSSAEnum() 917 """ 918 919 return StringToEnum('FlowequationFeSSA')[0] 920 920 921 921 def FlowequationVertexEquationEnum(): … … 3803 3803 return StringToEnum('DiagnosticHorizAnalysis')[0] 3804 3804 3805 def Diagnostic HutterAnalysisEnum():3806 """ 3807 DIAGNOSTIC HUTTERANALYSISENUM - Enum of DiagnosticHutterAnalysis3808 3809 WARNING: DO NOT MODIFY THIS FILE 3810 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh 3811 Please read src/c/shared/Enum/README for more information 3812 3813 Usage: 3814 macro=Diagnostic HutterAnalysisEnum()3815 """ 3816 3817 return StringToEnum('Diagnostic HutterAnalysis')[0]3805 def DiagnosticSIAAnalysisEnum(): 3806 """ 3807 DIAGNOSTICSIAANALYSISENUM - Enum of DiagnosticSIAAnalysis 3808 3809 WARNING: DO NOT MODIFY THIS FILE 3810 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh 3811 Please read src/c/shared/Enum/README for more information 3812 3813 Usage: 3814 macro=DiagnosticSIAAnalysisEnum() 3815 """ 3816 3817 return StringToEnum('DiagnosticSIAAnalysis')[0] 3818 3818 3819 3819 def DiagnosticSolutionEnum(): … … 4167 4167 return StringToEnum('NoneApproximation')[0] 4168 4168 4169 def HutterApproximationEnum():4170 """ 4171 HUTTERAPPROXIMATIONENUM - Enum of HutterApproximation4172 4173 WARNING: DO NOT MODIFY THIS FILE 4174 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh 4175 Please read src/c/shared/Enum/README for more information 4176 4177 Usage: 4178 macro= HutterApproximationEnum()4179 """ 4180 4181 return StringToEnum(' HutterApproximation')[0]4169 def SIAApproximationEnum(): 4170 """ 4171 SIAAPPROXIMATIONENUM - Enum of SIAApproximation 4172 4173 WARNING: DO NOT MODIFY THIS FILE 4174 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh 4175 Please read src/c/shared/Enum/README for more information 4176 4177 Usage: 4178 macro=SIAApproximationEnum() 4179 """ 4180 4181 return StringToEnum('SIAApproximation')[0] 4182 4182 4183 4183 def MacAyealApproximationEnum(): … … 4195 4195 return StringToEnum('MacAyealApproximation')[0] 4196 4196 4197 def MacAyeal PattynApproximationEnum():4198 """ 4199 MACAYEAL PATTYNAPPROXIMATIONENUM - Enum of MacAyealPattynApproximation4200 4201 WARNING: DO NOT MODIFY THIS FILE 4202 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh 4203 Please read src/c/shared/Enum/README for more information 4204 4205 Usage: 4206 macro=MacAyeal PattynApproximationEnum()4207 """ 4208 4209 return StringToEnum('MacAyeal PattynApproximation')[0]4210 4211 def MacAyeal StokesApproximationEnum():4212 """ 4213 MACAYEAL STOKESAPPROXIMATIONENUM - Enum of MacAyealStokesApproximation4214 4215 WARNING: DO NOT MODIFY THIS FILE 4216 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh 4217 Please read src/c/shared/Enum/README for more information 4218 4219 Usage: 4220 macro=MacAyeal StokesApproximationEnum()4221 """ 4222 4223 return StringToEnum('MacAyeal StokesApproximation')[0]4197 def MacAyealHOApproximationEnum(): 4198 """ 4199 MACAYEALHOAPPROXIMATIONENUM - Enum of MacAyealHOApproximation 4200 4201 WARNING: DO NOT MODIFY THIS FILE 4202 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh 4203 Please read src/c/shared/Enum/README for more information 4204 4205 Usage: 4206 macro=MacAyealHOApproximationEnum() 4207 """ 4208 4209 return StringToEnum('MacAyealHOApproximation')[0] 4210 4211 def MacAyealFSApproximationEnum(): 4212 """ 4213 MACAYEALFSAPPROXIMATIONENUM - Enum of MacAyealFSApproximation 4214 4215 WARNING: DO NOT MODIFY THIS FILE 4216 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh 4217 Please read src/c/shared/Enum/README for more information 4218 4219 Usage: 4220 macro=MacAyealFSApproximationEnum() 4221 """ 4222 4223 return StringToEnum('MacAyealFSApproximation')[0] 4224 4224 4225 4225 def L1L2ApproximationEnum(): … … 4237 4237 return StringToEnum('L1L2Approximation')[0] 4238 4238 4239 def PattynApproximationEnum():4240 """ 4241 PATTYNAPPROXIMATIONENUM - Enum of PattynApproximation4242 4243 WARNING: DO NOT MODIFY THIS FILE 4244 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh 4245 Please read src/c/shared/Enum/README for more information 4246 4247 Usage: 4248 macro= PattynApproximationEnum()4249 """ 4250 4251 return StringToEnum(' PattynApproximation')[0]4252 4253 def PattynStokesApproximationEnum():4254 """ 4255 PATTYNSTOKESAPPROXIMATIONENUM - Enum of PattynStokesApproximation4256 4257 WARNING: DO NOT MODIFY THIS FILE 4258 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh 4259 Please read src/c/shared/Enum/README for more information 4260 4261 Usage: 4262 macro= PattynStokesApproximationEnum()4263 """ 4264 4265 return StringToEnum(' PattynStokesApproximation')[0]4266 4267 def StokesApproximationEnum():4268 """ 4269 STOKESAPPROXIMATIONENUM - Enum of StokesApproximation4270 4271 WARNING: DO NOT MODIFY THIS FILE 4272 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh 4273 Please read src/c/shared/Enum/README for more information 4274 4275 Usage: 4276 macro= StokesApproximationEnum()4277 """ 4278 4279 return StringToEnum(' StokesApproximation')[0]4239 def HOApproximationEnum(): 4240 """ 4241 HOAPPROXIMATIONENUM - Enum of HOApproximation 4242 4243 WARNING: DO NOT MODIFY THIS FILE 4244 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh 4245 Please read src/c/shared/Enum/README for more information 4246 4247 Usage: 4248 macro=HOApproximationEnum() 4249 """ 4250 4251 return StringToEnum('HOApproximation')[0] 4252 4253 def HOFSApproximationEnum(): 4254 """ 4255 HOFSAPPROXIMATIONENUM - Enum of HOFSApproximation 4256 4257 WARNING: DO NOT MODIFY THIS FILE 4258 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh 4259 Please read src/c/shared/Enum/README for more information 4260 4261 Usage: 4262 macro=HOFSApproximationEnum() 4263 """ 4264 4265 return StringToEnum('HOFSApproximation')[0] 4266 4267 def FSApproximationEnum(): 4268 """ 4269 FSAPPROXIMATIONENUM - Enum of FSApproximation 4270 4271 WARNING: DO NOT MODIFY THIS FILE 4272 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh 4273 Please read src/c/shared/Enum/README for more information 4274 4275 Usage: 4276 macro=FSApproximationEnum() 4277 """ 4278 4279 return StringToEnum('FSApproximation')[0] 4280 4280 4281 4281 def ConstraintsEnum(): … … 4895 4895 return StringToEnum('L1L2IceFront')[0] 4896 4896 4897 def PattynIceFrontEnum():4898 """ 4899 PATTYNICEFRONTENUM - Enum of PattynIceFront4900 4901 WARNING: DO NOT MODIFY THIS FILE 4902 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh 4903 Please read src/c/shared/Enum/README for more information 4904 4905 Usage: 4906 macro= PattynIceFrontEnum()4907 """ 4908 4909 return StringToEnum(' PattynIceFront')[0]4897 def HOIceFrontEnum(): 4898 """ 4899 HOICEFRONTENUM - Enum of HOIceFront 4900 4901 WARNING: DO NOT MODIFY THIS FILE 4902 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh 4903 Please read src/c/shared/Enum/README for more information 4904 4905 Usage: 4906 macro=HOIceFrontEnum() 4907 """ 4908 4909 return StringToEnum('HOIceFront')[0] 4910 4910 4911 4911 def PengridEnum(): … … 5119 5119 return StringToEnum('SpcTransient')[0] 5120 5120 5121 def StokesIceFrontEnum():5122 """ 5123 STOKESICEFRONTENUM - Enum of StokesIceFront5124 5125 WARNING: DO NOT MODIFY THIS FILE 5126 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh 5127 Please read src/c/shared/Enum/README for more information 5128 5129 Usage: 5130 macro= StokesIceFrontEnum()5131 """ 5132 5133 return StringToEnum(' StokesIceFront')[0]5121 def FSIceFrontEnum(): 5122 """ 5123 FSICEFRONTENUM - Enum of FSIceFront 5124 5125 WARNING: DO NOT MODIFY THIS FILE 5126 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh 5127 Please read src/c/shared/Enum/README for more information 5128 5129 Usage: 5130 macro=FSIceFrontEnum() 5131 """ 5132 5133 return StringToEnum('FSIceFront')[0] 5134 5134 5135 5135 def StringArrayParamEnum(): … … 6141 6141 return StringToEnum('VzMacAyeal')[0] 6142 6142 6143 def Vz PattynEnum():6144 """ 6145 VZ PATTYNENUM - Enum of VzPattyn6146 6147 WARNING: DO NOT MODIFY THIS FILE 6148 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh 6149 Please read src/c/shared/Enum/README for more information 6150 6151 Usage: 6152 macro=Vz PattynEnum()6153 """ 6154 6155 return StringToEnum('Vz Pattyn')[0]6143 def VzHOEnum(): 6144 """ 6145 VZHOENUM - Enum of VzHO 6146 6147 WARNING: DO NOT MODIFY THIS FILE 6148 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh 6149 Please read src/c/shared/Enum/README for more information 6150 6151 Usage: 6152 macro=VzHOEnum() 6153 """ 6154 6155 return StringToEnum('VzHO')[0] 6156 6156 6157 6157 def VzPicardEnum(): … … 6169 6169 return StringToEnum('VzPicard')[0] 6170 6170 6171 def Vz StokesEnum():6172 """ 6173 VZ STOKESENUM - Enum of VzStokes6174 6175 WARNING: DO NOT MODIFY THIS FILE 6176 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh 6177 Please read src/c/shared/Enum/README for more information 6178 6179 Usage: 6180 macro=Vz StokesEnum()6181 """ 6182 6183 return StringToEnum('Vz Stokes')[0]6171 def VzFSEnum(): 6172 """ 6173 VZFSENUM - Enum of VzFS 6174 6175 WARNING: DO NOT MODIFY THIS FILE 6176 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh 6177 Please read src/c/shared/Enum/README for more information 6178 6179 Usage: 6180 macro=VzFSEnum() 6181 """ 6182 6183 return StringToEnum('VzFS')[0] 6184 6184 6185 6185 def VxMeshEnum(): … … 7261 7261 return StringToEnum('GLlevelset')[0] 7262 7262 7263 def StokesSolverEnum():7264 """ 7265 STOKESSOLVERENUM - Enum of StokesSolver7266 7267 WARNING: DO NOT MODIFY THIS FILE 7268 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh 7269 Please read src/c/shared/Enum/README for more information 7270 7271 Usage: 7272 macro= StokesSolverEnum()7273 """ 7274 7275 return StringToEnum(' StokesSolver')[0]7263 def FSSolverEnum(): 7264 """ 7265 FSSOLVERENUM - Enum of FSSolver 7266 7267 WARNING: DO NOT MODIFY THIS FILE 7268 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh 7269 Please read src/c/shared/Enum/README for more information 7270 7271 Usage: 7272 macro=FSSolverEnum() 7273 """ 7274 7275 return StringToEnum('FSSolver')[0] 7276 7276 7277 7277 def AdjointEnum(): -
issm/trunk-jpl/src/m/mech/mechanicalproperties.m
r14296 r15564 21 21 end 22 22 if any(md.flowequation.element_equation~=2), 23 disp('Warning: the model has some non macayealelements. These will be treated like MacAyeal''s elements');23 disp('Warning: the model has some non SSA elements. These will be treated like MacAyeal''s elements'); 24 24 end 25 25 -
issm/trunk-jpl/src/m/mech/strainrateuncert.m
r14296 r15564 36 36 end 37 37 if any(md.flowequation.element_equation~=2), 38 disp('Warning: the model has some non macayealelements. These will be treated like MacAyeal''s elements');38 disp('Warning: the model has some non SSA elements. These will be treated like MacAyeal''s elements'); 39 39 end 40 40 -
issm/trunk-jpl/src/m/miscellaneous/issmdoc.m
r13962 r15564 11 11 disp(sprintf('%-63s %s',' md=setmask(md,''all'','''');','%defines the glacier system as an ice shelf (no island)')); 12 12 disp(sprintf('%-63s %s',' md=parameterize(md,''Square.par'');','%fills all the other fields of the model')); 13 disp(sprintf('%-63s %s',' md=setflowequation(md,'' macayeal'',''all'');','%defines all elements as MacAyeal''s SSA'));13 disp(sprintf('%-63s %s',' md=setflowequation(md,''SSA'',''all'');','%defines all elements as MacAyeal''s SSA')); 14 14 disp(sprintf('%-63s %s',' md=solve(md,DiagnosticSolutionEnum());','%solve for stress balance')); 15 15 disp(sprintf('%-63s %s',' plotmodel(md,''data'',md.results.DiagnosticSolution.Vel);','%displays the velocity (type plotdoc for plotmodel help)')); -
issm/trunk-jpl/src/m/parameterization/setflowequation.m
r15504 r15564 3 3 % 4 4 % This routine works like plotmodel: it works with an even number of inputs 5 % ' hutter','macayeal','l1l2','pattyn','stokes' and 'fill' are the possible options5 % 'SIA','SSA','L1L2','HO','FS' and 'fill' are the possible options 6 6 % that must be followed by the corresponding exp file or flags list 7 7 % It can either be a domain file (argus type, .exp extension), or an array of element flags. 8 8 % If user wants every element outside the domain to be 9 % setflowequationd, add '~' to the name of the domain file (ex: '~ Pattyn.exp');9 % setflowequationd, add '~' to the name of the domain file (ex: '~HO.exp'); 10 10 % an empty string '' will be considered as an empty domain 11 11 % a string 'all' will be considered as the entire domain 12 12 % You can specify the type of coupling, 'penalties' or 'tiling', to use with the input 'coupling' 13 % NB: l1l2 cannot currently be coupled to any other ice flow model13 % NB: L1L2 cannot currently be coupled to any other ice flow model 14 14 % 15 15 % Usage: … … 17 17 % 18 18 % Example: 19 % md=setflowequation(md,' pattyn','Pattyn.exp','macayeal',md.mask.elementonfloatingice,'fill','hutter');20 % md=setflowequation(md,' pattyn','Pattyn.exp',fill','hutter','coupling','tiling');19 % md=setflowequation(md,'HO','HO.exp','SSA',md.mask.elementonfloatingice,'fill','SIA'); 20 % md=setflowequation(md,'HO','HO.exp',fill','SIA','coupling','tiling'); 21 21 22 22 %some checks on list of arguments … … 36 36 37 37 %recover elements distribution 38 hutterflag = FlagElements(md,getfieldvalue(options,'hutter','')); 39 macayealflag = FlagElements(md,getfieldvalue(options,'macayeal','')); 40 pattynflag = FlagElements(md,getfieldvalue(options,'pattyn','')); 41 l1l2flag = FlagElements(md,getfieldvalue(options,'l1l2','')); 42 stokesflag = FlagElements(md,getfieldvalue(options,'stokes','')); 43 filltype = getfieldvalue(options,'fill','none'); 38 SIAflag = FlagElements(md,getfieldvalue(options,'SIA','')); 39 SSAflag = FlagElements(md,getfieldvalue(options,'SSA','')); 40 HOflag = FlagElements(md,getfieldvalue(options,'HO','')); 41 L1L2flag = FlagElements(md,getfieldvalue(options,'L1L2','')); 42 FSflag = FlagElements(md,getfieldvalue(options,'FS','')); 43 filltype = getfieldvalue(options,'fill','none'); 44 displayunused(options); 44 45 45 46 %Flag the elements that have not been flagged as filltype 46 if strcmpi(filltype,' hutter'),47 hutterflag(find(~(macayealflag | pattynflag)))=1;48 elseif strcmpi(filltype,' macayeal'),49 macayealflag(find(~(hutterflag | pattynflag | stokesflag)))=1;50 elseif strcmpi(filltype,' pattyn'),51 pattynflag(find(~(hutterflag | macayealflag | stokesflag)))=1;47 if strcmpi(filltype,'SIA'), 48 SIAflag(find(~(SSAflag | HOflag)))=1; 49 elseif strcmpi(filltype,'SSA'), 50 SSAflag(find(~(SIAflag | HOflag | FSflag)))=1; 51 elseif strcmpi(filltype,'HO'), 52 HOflag(find(~(SIAflag | SSAflag | FSflag)))=1; 52 53 end 53 54 54 55 %check that each element has at least one flag 55 if any( hutterflag+macayealflag+pattynflag+l1l2flag+stokesflag==0),56 if any(SIAflag+SSAflag+HOflag+L1L2flag+FSflag==0), 56 57 error('elements type not assigned, must be specified') 57 58 end 58 59 59 60 %check that each element has only one flag 60 if any( hutterflag+macayealflag+pattynflag+l1l2flag+stokesflag>1),61 if any(SIAflag+SSAflag+HOflag+L1L2flag+FSflag>1), 61 62 disp('setflowequation warning message: some elements have several types, higher order type is used for them') 62 hutterflag(find(hutterflag & macayealflag))=0;63 hutterflag(find(hutterflag & pattynflag))=0;64 macayealflag(find(macayealflag & pattynflag))=0;65 end 66 67 %check that l1l2 is not coupled to any other model for now68 if any( l1l2flag) & any(hutterflag | macayealflag | pattynflag | stokesflag)69 error(' l1l2 cannot be coupled to any other model');70 end 71 72 %Check that no l1l2 or pattyn or stokesfor 2d mesh63 SIAflag(find(SIAflag & SSAflag))=0; 64 SIAflag(find(SIAflag & HOflag))=0; 65 SSAflag(find(SSAflag & HOflag))=0; 66 end 67 68 %check that L1L2 is not coupled to any other model for now 69 if any(L1L2flag) & any(SIAflag | SSAflag | HOflag | FSflag) 70 error('L1L2 cannot be coupled to any other model'); 71 end 72 73 %Check that no L1L2 or HO or FS for 2d mesh 73 74 if (md.mesh.dimension==2), 74 if any( l1l2flag | stokesflag | pattynflag)75 error(' stokes and pattynelements not allowed in 2d mesh, extrude it first')76 end 77 end 78 79 % Stokescan only be used alone for now:80 if any( stokesflag) &any(hutterflag),81 error(' stokes cannot be used with any other model for now, put stokeseverywhere')75 if any(L1L2flag | FSflag | HOflag) 76 error('FS and HO elements not allowed in 2d mesh, extrude it first') 77 end 78 end 79 80 %FS can only be used alone for now: 81 if any(FSflag) &any(SIAflag), 82 error('FS cannot be used with any other model for now, put FS everywhere') 82 83 end 83 84 84 85 %Initialize node fields 85 nodeon hutter=zeros(md.mesh.numberofvertices,1);86 nodeon hutter(md.mesh.elements(find(hutterflag),:))=1;87 nodeon macayeal=zeros(md.mesh.numberofvertices,1);88 nodeon macayeal(md.mesh.elements(find(macayealflag),:))=1;89 nodeon pattyn=zeros(md.mesh.numberofvertices,1);90 nodeon pattyn(md.mesh.elements(find(pattynflag),:))=1;91 nodeon l1l2=zeros(md.mesh.numberofvertices,1);92 nodeon l1l2(md.mesh.elements(find(l1l2flag),:))=1;93 nodeon stokes=zeros(md.mesh.numberofvertices,1);86 nodeonSIA=zeros(md.mesh.numberofvertices,1); 87 nodeonSIA(md.mesh.elements(find(SIAflag),:))=1; 88 nodeonSSA=zeros(md.mesh.numberofvertices,1); 89 nodeonSSA(md.mesh.elements(find(SSAflag),:))=1; 90 nodeonHO=zeros(md.mesh.numberofvertices,1); 91 nodeonHO(md.mesh.elements(find(HOflag),:))=1; 92 nodeonL1L2=zeros(md.mesh.numberofvertices,1); 93 nodeonL1L2(md.mesh.elements(find(L1L2flag),:))=1; 94 nodeonFS=zeros(md.mesh.numberofvertices,1); 94 95 noneflag=zeros(md.mesh.numberofelements,1); 95 96 96 %First modify stokesflag to get rid of elements contrained everywhere (spc + border with pattyn or macayeal)97 if any( stokesflag),98 fullspcnodes=double((~isnan(md.diagnostic.spcvx)+~isnan(md.diagnostic.spcvy)+~isnan(md.diagnostic.spcvz))==3 | (nodeon pattyn & nodeonstokes)); %find all the nodes on the boundary of the domain without icefront97 %First modify FSflag to get rid of elements contrained everywhere (spc + border with HO or SSA) 98 if any(FSflag), 99 fullspcnodes=double((~isnan(md.diagnostic.spcvx)+~isnan(md.diagnostic.spcvy)+~isnan(md.diagnostic.spcvz))==3 | (nodeonHO & nodeonFS)); %find all the nodes on the boundary of the domain without icefront 99 100 fullspcelems=double(sum(fullspcnodes(md.mesh.elements),2)==6); %find all the nodes on the boundary of the domain without icefront 100 stokesflag(find(fullspcelems))=0;101 nodeon stokes(md.mesh.elements(find(stokesflag),:))=1;102 end 103 104 %Then complete with NoneApproximation or the other model used if there is no stokes105 if any( stokesflag),106 if any( pattynflag), %fill with pattyn107 pattynflag(~stokesflag)=1;108 nodeon pattyn(md.mesh.elements(find(pattynflag),:))=1;109 elseif any( macayealflag), %fill with macayeal110 macayealflag(~stokesflag)=1;111 nodeon macayeal(md.mesh.elements(find(macayealflag),:))=1;101 FSflag(find(fullspcelems))=0; 102 nodeonFS(md.mesh.elements(find(FSflag),:))=1; 103 end 104 105 %Then complete with NoneApproximation or the other model used if there is no FS 106 if any(FSflag), 107 if any(HOflag), %fill with HO 108 HOflag(~FSflag)=1; 109 nodeonHO(md.mesh.elements(find(HOflag),:))=1; 110 elseif any(SSAflag), %fill with SSA 111 SSAflag(~FSflag)=1; 112 nodeonSSA(md.mesh.elements(find(SSAflag),:))=1; 112 113 else %fill with none 113 noneflag(find(~ stokesflag))=1;114 end 115 end 116 117 %Now take care of the coupling between MacAyeal and Pattyn114 noneflag(find(~FSflag))=1; 115 end 116 end 117 118 %Now take care of the coupling between MacAyeal and HO 118 119 md.diagnostic.vertex_pairing=[]; 119 nodeon macayealpattyn=zeros(md.mesh.numberofvertices,1);120 nodeon pattynstokes=zeros(md.mesh.numberofvertices,1);121 nodeon macayealstokes=zeros(md.mesh.numberofvertices,1);122 macayealpattynflag=zeros(md.mesh.numberofelements,1);123 macayealstokesflag=zeros(md.mesh.numberofelements,1);124 pattynstokesflag=zeros(md.mesh.numberofelements,1);120 nodeonSSAHO=zeros(md.mesh.numberofvertices,1); 121 nodeonHOFS=zeros(md.mesh.numberofvertices,1); 122 nodeonSSAFS=zeros(md.mesh.numberofvertices,1); 123 SSAHOflag=zeros(md.mesh.numberofelements,1); 124 SSAFSflag=zeros(md.mesh.numberofelements,1); 125 HOFSflag=zeros(md.mesh.numberofelements,1); 125 126 if strcmpi(coupling_method,'penalties'), 126 %Create the border nodes between Pattynand MacAyeal and extrude them127 %Create the border nodes between HO and MacAyeal and extrude them 127 128 numnodes2d=md.mesh.numberofvertices2d; 128 129 numlayers=md.mesh.numberoflayers; 129 bordernodes2d=find(nodeon pattyn(1:numnodes2d) & nodeonmacayeal(1:numnodes2d)); %Nodes connected to two different types of elements130 bordernodes2d=find(nodeonHO(1:numnodes2d) & nodeonSSA(1:numnodes2d)); %Nodes connected to two different types of elements 130 131 131 132 %initialize and fill in penalties structure … … 138 139 end 139 140 elseif strcmpi(coupling_method,'tiling'), 140 if any( macayealflag) & any(pattynflag), %coupling macayeal pattyn141 if any(SSAflag) & any(HOflag), %coupling SSA HO 141 142 %Find node at the border 142 nodeon macayealpattyn(find(nodeonmacayeal & nodeonpattyn))=1;143 % Macayeal elements in contact with this layer become MacAyealPattynelements144 matrixelements=ismember(md.mesh.elements,find(nodeon macayealpattyn));143 nodeonSSAHO(find(nodeonSSA & nodeonHO))=1; 144 %SSA elements in contact with this layer become MacAyealHO elements 145 matrixelements=ismember(md.mesh.elements,find(nodeonSSAHO)); 145 146 commonelements=sum(matrixelements,2)~=0; 146 commonelements(find( pattynflag))=0; %only one layer: the elements previously in macayeal147 macayealflag(find(commonelements))=0; %these elements are now macayealpattynelements148 macayealpattynflag(find(commonelements))=1;149 nodeon macayeal(:)=0;150 nodeon macayeal(md.mesh.elements(find(macayealflag),:))=1;147 commonelements(find(HOflag))=0; %only one layer: the elements previously in SSA 148 SSAflag(find(commonelements))=0; %these elements are now SSAHOelements 149 SSAHOflag(find(commonelements))=1; 150 nodeonSSA(:)=0; 151 nodeonSSA(md.mesh.elements(find(SSAflag),:))=1; 151 152 152 153 %rule out elements that don't touch the 2 boundaries 153 pos=find( macayealpattynflag);154 pos=find(SSAHOflag); 154 155 elist=zeros(length(pos),1); 155 elist = elist + any(sum(nodeon macayeal(md.mesh.elements(pos,:)),2),2);156 elist = elist - any(sum(nodeon pattyn(md.mesh.elements(pos,:)) ,2),2);156 elist = elist + any(sum(nodeonSSA(md.mesh.elements(pos,:)),2),2); 157 elist = elist - any(sum(nodeonHO(md.mesh.elements(pos,:)) ,2),2); 157 158 pos1=find(elist==1); 158 macayealflag(pos(pos1))=1;159 macayealpattynflag(pos(pos1))=0;159 SSAflag(pos(pos1))=1; 160 SSAHOflag(pos(pos1))=0; 160 161 pos2=find(elist==-1); 161 pattynflag(pos(pos2))=1;162 macayealpattynflag(pos(pos2))=0;162 HOflag(pos(pos2))=1; 163 SSAHOflag(pos(pos2))=0; 163 164 164 165 %Recompute nodes associated to these elements 165 nodeon macayeal(:)=0;166 nodeon macayeal(md.mesh.elements(find(macayealflag),:))=1;167 nodeon pattyn(:)=0;168 nodeon pattyn(md.mesh.elements(find(pattynflag),:))=1;169 nodeon macayealpattyn(:)=0;170 nodeon macayealpattyn(md.mesh.elements(find(macayealpattynflag),:))=1;171 172 elseif any( pattynflag) & any(stokesflag), %coupling pattyn stokes166 nodeonSSA(:)=0; 167 nodeonSSA(md.mesh.elements(find(SSAflag),:))=1; 168 nodeonHO(:)=0; 169 nodeonHO(md.mesh.elements(find(HOflag),:))=1; 170 nodeonSSAHO(:)=0; 171 nodeonSSAHO(md.mesh.elements(find(SSAHOflag),:))=1; 172 173 elseif any(HOflag) & any(FSflag), %coupling HO FS 173 174 %Find node at the border 174 nodeon pattynstokes(find(nodeonpattyn & nodeonstokes))=1;175 % Stokes elements in contact with this layer become PattynStokeselements176 matrixelements=ismember(md.mesh.elements,find(nodeon pattynstokes));175 nodeonHOFS(find(nodeonHO & nodeonFS))=1; 176 %FS elements in contact with this layer become HOFS elements 177 matrixelements=ismember(md.mesh.elements,find(nodeonHOFS)); 177 178 commonelements=sum(matrixelements,2)~=0; 178 commonelements(find( pattynflag))=0; %only one layer: the elements previously in macayeal179 stokesflag(find(commonelements))=0; %these elements are now macayealpattynelements180 pattynstokesflag(find(commonelements))=1;181 nodeon stokes=zeros(md.mesh.numberofvertices,1);182 nodeon stokes(md.mesh.elements(find(stokesflag),:))=1;179 commonelements(find(HOflag))=0; %only one layer: the elements previously in SSA 180 FSflag(find(commonelements))=0; %these elements are now SSAHOelements 181 HOFSflag(find(commonelements))=1; 182 nodeonFS=zeros(md.mesh.numberofvertices,1); 183 nodeonFS(md.mesh.elements(find(FSflag),:))=1; 183 184 184 185 %rule out elements that don't touch the 2 boundaries 185 pos=find( pattynstokesflag);186 pos=find(HOFSflag); 186 187 elist=zeros(length(pos),1); 187 elist = elist + any(sum(nodeon stokes(md.mesh.elements(pos,:)),2),2);188 elist = elist - any(sum(nodeon pattyn(md.mesh.elements(pos,:)),2),2);188 elist = elist + any(sum(nodeonFS(md.mesh.elements(pos,:)),2),2); 189 elist = elist - any(sum(nodeonHO(md.mesh.elements(pos,:)),2),2); 189 190 pos1=find(elist==1); 190 stokesflag(pos(pos1))=1;191 pattynstokesflag(pos(pos1))=0;191 FSflag(pos(pos1))=1; 192 HOFSflag(pos(pos1))=0; 192 193 pos2=find(elist==-1); 193 pattynflag(pos(pos2))=1;194 pattynstokesflag(pos(pos2))=0;194 HOflag(pos(pos2))=1; 195 HOFSflag(pos(pos2))=0; 195 196 196 197 %Recompute nodes associated to these elements 197 nodeon stokes(:)=0;198 nodeon stokes(md.mesh.elements(find(stokesflag),:))=1;199 nodeon pattyn(:)=0;200 nodeon pattyn(md.mesh.elements(find(pattynflag),:))=1;201 nodeon pattynstokes(:)=0;202 nodeon pattynstokes(md.mesh.elements(find(pattynstokesflag),:))=1;203 204 elseif any( stokesflag) & any(macayealflag),198 nodeonFS(:)=0; 199 nodeonFS(md.mesh.elements(find(FSflag),:))=1; 200 nodeonHO(:)=0; 201 nodeonHO(md.mesh.elements(find(HOflag),:))=1; 202 nodeonHOFS(:)=0; 203 nodeonHOFS(md.mesh.elements(find(HOFSflag),:))=1; 204 205 elseif any(FSflag) & any(SSAflag), 205 206 %Find node at the border 206 nodeon macayealstokes(find(nodeonmacayeal & nodeonstokes))=1;207 % Stokes elements in contact with this layer become MacAyealStokeselements208 matrixelements=ismember(md.mesh.elements,find(nodeon macayealstokes));207 nodeonSSAFS(find(nodeonSSA & nodeonFS))=1; 208 %FS elements in contact with this layer become MacAyealFS elements 209 matrixelements=ismember(md.mesh.elements,find(nodeonSSAFS)); 209 210 commonelements=sum(matrixelements,2)~=0; 210 commonelements(find( macayealflag))=0; %only one layer: the elements previously in macayeal211 stokesflag(find(commonelements))=0; %these elements are now macayealmacayealelements212 macayealstokesflag(find(commonelements))=1;213 nodeon stokes=zeros(md.mesh.numberofvertices,1);214 nodeon stokes(md.mesh.elements(find(stokesflag),:))=1;211 commonelements(find(SSAflag))=0; %only one layer: the elements previously in SSA 212 FSflag(find(commonelements))=0; %these elements are now SSASSAelements 213 SSAFSflag(find(commonelements))=1; 214 nodeonFS=zeros(md.mesh.numberofvertices,1); 215 nodeonFS(md.mesh.elements(find(FSflag),:))=1; 215 216 216 217 %rule out elements that don't touch the 2 boundaries 217 pos=find( macayealstokesflag);218 pos=find(SSAFSflag); 218 219 elist=zeros(length(pos),1); 219 elist = elist + any(sum(nodeon macayeal(md.mesh.elements(pos,:)),2),2);220 elist = elist - any(sum(nodeon stokes(md.mesh.elements(pos,:)) ,2),2);220 elist = elist + any(sum(nodeonSSA(md.mesh.elements(pos,:)),2),2); 221 elist = elist - any(sum(nodeonFS(md.mesh.elements(pos,:)) ,2),2); 221 222 pos1=find(elist==1); 222 macayealflag(pos(pos1))=1;223 macayealstokesflag(pos(pos1))=0;223 SSAflag(pos(pos1))=1; 224 SSAFSflag(pos(pos1))=0; 224 225 pos2=find(elist==-1); 225 stokesflag(pos(pos2))=1;226 macayealstokesflag(pos(pos2))=0;226 FSflag(pos(pos2))=1; 227 SSAFSflag(pos(pos2))=0; 227 228 228 229 %Recompute nodes associated to these elements 229 nodeon macayeal(:)=0;230 nodeon macayeal(md.mesh.elements(find(macayealflag),:))=1;231 nodeon stokes(:)=0;232 nodeon stokes(md.mesh.elements(find(stokesflag),:))=1;233 nodeon macayealstokes(:)=0;234 nodeon macayealstokes(md.mesh.elements(find(macayealstokesflag),:))=1;235 236 elseif any( stokesflag) & any(hutterflag),230 nodeonSSA(:)=0; 231 nodeonSSA(md.mesh.elements(find(SSAflag),:))=1; 232 nodeonFS(:)=0; 233 nodeonFS(md.mesh.elements(find(FSflag),:))=1; 234 nodeonSSAFS(:)=0; 235 nodeonSSAFS(md.mesh.elements(find(SSAFSflag),:))=1; 236 237 elseif any(FSflag) & any(SIAflag), 237 238 error('type of coupling not supported yet'); 238 239 end 239 240 end 240 241 241 %Create MacaAyeal PattynApproximation where needed242 %Create MacaAyealHOApproximation where needed 242 243 md.flowequation.element_equation=zeros(md.mesh.numberofelements,1); 243 244 md.flowequation.element_equation(find(noneflag))=0; 244 md.flowequation.element_equation(find( hutterflag))=1;245 md.flowequation.element_equation(find( macayealflag))=2;246 md.flowequation.element_equation(find( l1l2flag))=8;247 md.flowequation.element_equation(find( pattynflag))=3;248 md.flowequation.element_equation(find( stokesflag))=4;249 md.flowequation.element_equation(find( macayealpattynflag))=5;250 md.flowequation.element_equation(find( macayealstokesflag))=6;251 md.flowequation.element_equation(find( pattynstokesflag))=7;245 md.flowequation.element_equation(find(SIAflag))=1; 246 md.flowequation.element_equation(find(SSAflag))=2; 247 md.flowequation.element_equation(find(L1L2flag))=8; 248 md.flowequation.element_equation(find(HOflag))=3; 249 md.flowequation.element_equation(find(FSflag))=4; 250 md.flowequation.element_equation(find(SSAHOflag))=5; 251 md.flowequation.element_equation(find(SSAFSflag))=6; 252 md.flowequation.element_equation(find(HOFSflag))=7; 252 253 253 254 %border 254 md.flowequation.border pattyn=nodeonpattyn;255 md.flowequation.border macayeal=nodeonmacayeal;256 md.flowequation.border stokes=nodeonstokes;255 md.flowequation.borderHO=nodeonHO; 256 md.flowequation.borderSSA=nodeonSSA; 257 md.flowequation.borderFS=nodeonFS; 257 258 258 259 %Create vertices_type 259 260 md.flowequation.vertex_equation=zeros(md.mesh.numberofvertices,1); 260 pos=find(nodeon macayeal);261 pos=find(nodeonSSA); 261 262 md.flowequation.vertex_equation(pos)=2; 262 pos=find(nodeon l1l2);263 pos=find(nodeonL1L2); 263 264 md.flowequation.vertex_equation(pos)=8; 264 pos=find(nodeon pattyn);265 pos=find(nodeonHO); 265 266 md.flowequation.vertex_equation(pos)=3; 266 pos=find(nodeon hutter);267 pos=find(nodeonSIA); 267 268 md.flowequation.vertex_equation(pos)=1; 268 pos=find(nodeon macayealpattyn);269 pos=find(nodeonSSAHO); 269 270 md.flowequation.vertex_equation(pos)=5; 270 pos=find(nodeon stokes);271 pos=find(nodeonFS); 271 272 md.flowequation.vertex_equation(pos)=4; 272 if any( stokesflag),273 pos=find(~nodeon stokes);274 if(~any( pattynflag) & ~any(macayealflag)),273 if any(FSflag), 274 pos=find(~nodeonFS); 275 if(~any(HOflag) & ~any(SSAflag)), 275 276 md.flowequation.vertex_equation(pos)=0; 276 277 end 277 278 end 278 pos=find(nodeon pattynstokes);279 pos=find(nodeonHOFS); 279 280 md.flowequation.vertex_equation(pos)=7; 280 pos=find(nodeon macayealstokes);281 pos=find(nodeonSSAFS); 281 282 md.flowequation.vertex_equation(pos)=6; 282 283 283 284 %figure out solution types 284 md.flowequation.is hutter=double(any(md.flowequation.element_equation==1));285 md.flowequation.is macayeal=double(any(md.flowequation.element_equation==2));286 md.flowequation.is pattyn=double(any(md.flowequation.element_equation==3));287 md.flowequation.is l1l2=double(any(md.flowequation.element_equation==8));288 md.flowequation.is stokes=double(any(md.flowequation.element_equation==4));285 md.flowequation.isSIA = double(any(md.flowequation.element_equation == 1)); 286 md.flowequation.isSSA = double(any(md.flowequation.element_equation == 2)); 287 md.flowequation.isHO = double(any(md.flowequation.element_equation == 3)); 288 md.flowequation.isL1L2 = double(any(md.flowequation.element_equation == 8)); 289 md.flowequation.isFS = double(any(md.flowequation.element_equation == 4)); 289 290 290 291 return 291 292 292 293 %Check that tiling can work: 293 if any(md.flowequation.border macayeal) & any(md.flowequation.borderpattyn) & any(md.flowequation.borderpattyn + md.flowequation.bordermacayeal~=1),294 if any(md.flowequation.borderSSA) & any(md.flowequation.borderHO) & any(md.flowequation.borderHO + md.flowequation.borderSSA ~=1), 294 295 error('error coupling domain too irregular'); 295 296 end 296 if any(md.flowequation.border macayeal) & any(md.flowequation.borderstokes) & any(md.flowequation.borderstokes + md.flowequation.bordermacayeal~=1),297 if any(md.flowequation.borderSSA) & any(md.flowequation.borderFS) & any(md.flowequation.borderFS + md.flowequation.borderSSA ~=1), 297 298 error('error coupling domain too irregular'); 298 299 end 299 if any(md.flowequation.border stokes) & any(md.flowequation.borderpattyn) & any(md.flowequation.borderpattyn + md.flowequation.borderstokes~=1),300 if any(md.flowequation.borderFS) & any(md.flowequation.borderHO) & any(md.flowequation.borderHO + md.flowequation.borderFS~=1), 300 301 error('error coupling domain too irregular'); 301 302 end -
issm/trunk-jpl/src/m/parameterization/setflowequation.py
r15504 r15564 11 11 12 12 This routine works like plotmodel: it works with an even number of inputs 13 ' hutter','macayeal','pattyn','l1l2','stokes' and 'fill' are the possible options13 'SIA','SSA','HO','L1L2','FS' and 'fill' are the possible options 14 14 that must be followed by the corresponding exp file or flags list 15 15 It can either be a domain file (argus type, .exp extension), or an array of element flags. 16 16 If user wants every element outside the domain to be 17 setflowequationd, add '~' to the name of the domain file (ex: '~ Pattyn.exp');17 setflowequationd, add '~' to the name of the domain file (ex: '~HO.exp'); 18 18 an empty string '' will be considered as an empty domain 19 19 a string 'all' will be considered as the entire domain … … 24 24 25 25 Example: 26 md=setflowequation(md,' pattyn','Pattyn.exp','macayeal',md.mask.elementonfloatingice,'fill','hutter');27 md=setflowequation(md,' pattyn','Pattyn.exp',fill','hutter','coupling','tiling');26 md=setflowequation(md,'HO','HO.exp','SSA',md.mask.elementonfloatingice,'fill','SIA'); 27 md=setflowequation(md,'HO','HO.exp',fill','SIA','coupling','tiling'); 28 28 """ 29 29 … … 42 42 43 43 #recover elements distribution 44 hutterflag = FlagElements(md,options.getfieldvalue('hutter',''))45 macayealflag = FlagElements(md,options.getfieldvalue('macayeal',''))46 pattynflag = FlagElements(md,options.getfieldvalue('pattyn',''))47 l1l2flag = FlagElements(md,options.getfieldvalue('l1l2',''))48 stokesflag = FlagElements(md,options.getfieldvalue('stokes',''))44 SIAflag = FlagElements(md,options.getfieldvalue('SIA','')) 45 SSAflag = FlagElements(md,options.getfieldvalue('SSA','')) 46 HOflag = FlagElements(md,options.getfieldvalue('HO','')) 47 L1L2flag = FlagElements(md,options.getfieldvalue('L1L2','')) 48 FSflag = FlagElements(md,options.getfieldvalue('FS','')) 49 49 filltype = options.getfieldvalue('fill','none') 50 50 51 51 #Flag the elements that have not been flagged as filltype 52 if strcmpi(filltype,' hutter'):53 hutterflag[numpy.nonzero(numpy.logical_not(logical_or_n(macayealflag,pattynflag)))]=True54 elif strcmpi(filltype,' macayeal'):55 macayealflag[numpy.nonzero(numpy.logical_not(logical_or_n(hutterflag,pattynflag,stokesflag)))]=True56 elif strcmpi(filltype,' pattyn'):57 pattynflag[numpy.nonzero(numpy.logical_not(logical_or_n(hutterflag,macayealflag,stokesflag)))]=True52 if strcmpi(filltype,'SIA'): 53 SIAflag[numpy.nonzero(numpy.logical_not(logical_or_n(SSAflag,HOflag)))]=True 54 elif strcmpi(filltype,'SSA'): 55 SSAflag[numpy.nonzero(numpy.logical_not(logical_or_n(SIAflag,HOflag,FSflag)))]=True 56 elif strcmpi(filltype,'HO'): 57 HOflag[numpy.nonzero(numpy.logical_not(logical_or_n(SIAflag,SSAflag,FSflag)))]=True 58 58 59 59 #check that each element has at least one flag 60 if not any( hutterflag+macayealflag+l1l2flag+pattynflag+stokesflag):60 if not any(SIAflag+SSAflag+L1L2flag+HOflag+FSflag): 61 61 raise TypeError("elements type not assigned, must be specified") 62 62 63 63 #check that each element has only one flag 64 if any( hutterflag+macayealflag+l1l2flag+pattynflag+stokesflag>1):64 if any(SIAflag+SSAflag+L1L2flag+HOflag+FSflag>1): 65 65 print "setflowequation warning message: some elements have several types, higher order type is used for them" 66 hutterflag[numpy.nonzero(numpy.logical_and(hutterflag,macayealflag))]=False67 hutterflag[numpy.nonzero(numpy.logical_and(hutterflag,pattynflag))]=False68 macayealflag[numpy.nonzero(numpy.logical_and(macayealflag,pattynflag))]=False69 70 #Check that no pattyn or stokesfor 2d mesh66 SIAflag[numpy.nonzero(numpy.logical_and(SIAflag,SSAflag))]=False 67 SIAflag[numpy.nonzero(numpy.logical_and(SIAflag,HOflag))]=False 68 SSAflag[numpy.nonzero(numpy.logical_and(SSAflag,HOflag))]=False 69 70 #Check that no HO or FS for 2d mesh 71 71 if md.mesh.dimension==2: 72 if numpy.any(logical_or_n( l1l2flag,stokesflag,pattynflag)):73 raise TypeError(" stokes and pattynelements not allowed in 2d mesh, extrude it first")74 75 # Stokescan only be used alone for now:76 if any( stokesflag) and any(hutterflag):77 raise TypeError(" stokes cannot be used with any other model for now, put stokeseverywhere")72 if numpy.any(logical_or_n(L1L2flag,FSflag,HOflag)): 73 raise TypeError("FS and HO elements not allowed in 2d mesh, extrude it first") 74 75 #FS can only be used alone for now: 76 if any(FSflag) and any(SIAflag): 77 raise TypeError("FS cannot be used with any other model for now, put FS everywhere") 78 78 79 79 #Initialize node fields 80 nodeon hutter=numpy.zeros(md.mesh.numberofvertices,bool)81 nodeon hutter[md.mesh.elements[numpy.nonzero(hutterflag),:]-1]=True82 nodeon macayeal=numpy.zeros(md.mesh.numberofvertices,bool)83 nodeon macayeal[md.mesh.elements[numpy.nonzero(macayealflag),:]-1]=True84 nodeon l1l2=numpy.zeros(md.mesh.numberofvertices,bool)85 nodeon l1l2[md.mesh.elements[numpy.nonzero(l1l2flag),:]-1]=True86 nodeon pattyn=numpy.zeros(md.mesh.numberofvertices,bool)87 nodeon pattyn[md.mesh.elements[numpy.nonzero(pattynflag),:]-1]=True88 nodeon stokes=numpy.zeros(md.mesh.numberofvertices,bool)80 nodeonSIA=numpy.zeros(md.mesh.numberofvertices,bool) 81 nodeonSIA[md.mesh.elements[numpy.nonzero(SIAflag),:]-1]=True 82 nodeonSSA=numpy.zeros(md.mesh.numberofvertices,bool) 83 nodeonSSA[md.mesh.elements[numpy.nonzero(SSAflag),:]-1]=True 84 nodeonL1L2=numpy.zeros(md.mesh.numberofvertices,bool) 85 nodeonL1L2[md.mesh.elements[numpy.nonzero(L1L2flag),:]-1]=True 86 nodeonHO=numpy.zeros(md.mesh.numberofvertices,bool) 87 nodeonHO[md.mesh.elements[numpy.nonzero(HOflag),:]-1]=True 88 nodeonFS=numpy.zeros(md.mesh.numberofvertices,bool) 89 89 noneflag=numpy.zeros(md.mesh.numberofelements,bool) 90 90 91 #First modify stokesflag to get rid of elements contrained everywhere (spc + border with pattyn or macayeal)92 if any( stokesflag):93 # fullspcnodes=double((~isnan(md.diagnostic.spcvx)+~isnan(md.diagnostic.spcvy)+~isnan(md.diagnostic.spcvz))==3 | (nodeon pattyn & nodeonstokes)); %find all the nodes on the boundary of the domain without icefront91 #First modify FSflag to get rid of elements contrained everywhere (spc + border with HO or SSA) 92 if any(FSflag): 93 # fullspcnodes=double((~isnan(md.diagnostic.spcvx)+~isnan(md.diagnostic.spcvy)+~isnan(md.diagnostic.spcvz))==3 | (nodeonHO & nodeonFS)); %find all the nodes on the boundary of the domain without icefront 94 94 fullspcnodes=numpy.logical_or(numpy.logical_not(numpy.isnan(md.diagnostic.spcvx)).astype(int)+ \ 95 95 numpy.logical_not(numpy.isnan(md.diagnostic.spcvy)).astype(int)+ \ 96 96 numpy.logical_not(numpy.isnan(md.diagnostic.spcvz)).astype(int)==3, \ 97 numpy.logical_and(nodeon pattyn,nodeonstokes).reshape(-1,1)).astype(int) #find all the nodes on the boundary of the domain without icefront97 numpy.logical_and(nodeonHO,nodeonFS).reshape(-1,1)).astype(int) #find all the nodes on the boundary of the domain without icefront 98 98 # fullspcelems=double(sum(fullspcnodes(md.mesh.elements),2)==6); %find all the nodes on the boundary of the domain without icefront 99 99 fullspcelems=(numpy.sum(fullspcnodes[md.mesh.elements-1],axis=1)==6).astype(int) #find all the nodes on the boundary of the domain without icefront 100 stokesflag[numpy.nonzero(fullspcelems.reshape(-1))]=False101 nodeon stokes[md.mesh.elements[numpy.nonzero(stokesflag),:]-1]=True102 103 #Then complete with NoneApproximation or the other model used if there is no stokes104 if any( stokesflag):105 if any( pattynflag): #fill with pattyn106 pattynflag[numpy.logical_not(stokesflag)]=True107 nodeon pattyn[md.mesh.elements[numpy.nonzero(pattynflag),:]-1]=True108 elif any( macayealflag): #fill with macayeal109 macayealflag[numpy.logical_not(stokesflag)]=True110 nodeon macayeal[md.mesh.elements[numpy.nonzero(macayealflag),:]-1]=True100 FSflag[numpy.nonzero(fullspcelems.reshape(-1))]=False 101 nodeonFS[md.mesh.elements[numpy.nonzero(FSflag),:]-1]=True 102 103 #Then complete with NoneApproximation or the other model used if there is no FS 104 if any(FSflag): 105 if any(HOflag): #fill with HO 106 HOflag[numpy.logical_not(FSflag)]=True 107 nodeonHO[md.mesh.elements[numpy.nonzero(HOflag),:]-1]=True 108 elif any(SSAflag): #fill with SSA 109 SSAflag[numpy.logical_not(FSflag)]=True 110 nodeonSSA[md.mesh.elements[numpy.nonzero(SSAflag),:]-1]=True 111 111 else: #fill with none 112 noneflag[numpy.nonzero(numpy.logical_not( stokesflag))]=True113 114 #Now take care of the coupling between MacAyeal and Pattyn112 noneflag[numpy.nonzero(numpy.logical_not(FSflag))]=True 113 114 #Now take care of the coupling between MacAyeal and HO 115 115 md.diagnostic.vertex_pairing=numpy.array([]) 116 nodeon macayealpattyn=numpy.zeros(md.mesh.numberofvertices,bool)117 nodeon pattynstokes=numpy.zeros(md.mesh.numberofvertices,bool)118 nodeon macayealstokes=numpy.zeros(md.mesh.numberofvertices,bool)119 macayealpattynflag=numpy.zeros(md.mesh.numberofelements,bool)120 macayealstokesflag=numpy.zeros(md.mesh.numberofelements,bool)121 pattynstokesflag=numpy.zeros(md.mesh.numberofelements,bool)116 nodeonSSAHO=numpy.zeros(md.mesh.numberofvertices,bool) 117 nodeonHOFS=numpy.zeros(md.mesh.numberofvertices,bool) 118 nodeonSSAFS=numpy.zeros(md.mesh.numberofvertices,bool) 119 SSAHOflag=numpy.zeros(md.mesh.numberofelements,bool) 120 SSAFSflag=numpy.zeros(md.mesh.numberofelements,bool) 121 HOFSflag=numpy.zeros(md.mesh.numberofelements,bool) 122 122 if strcmpi(coupling_method,'penalties'): 123 #Create the border nodes between Pattynand MacAyeal and extrude them123 #Create the border nodes between HO and MacAyeal and extrude them 124 124 numnodes2d=md.mesh.numberofvertices2d 125 125 numlayers=md.mesh.numberoflayers 126 bordernodes2d=numpy.nonzero(numpy.logical_and(nodeon pattyn[0:numnodes2d],nodeonmacayeal[0:numnodes2d]))[0]+1 #Nodes connected to two different types of elements126 bordernodes2d=numpy.nonzero(numpy.logical_and(nodeonHO[0:numnodes2d],nodeonSSA[0:numnodes2d]))[0]+1 #Nodes connected to two different types of elements 127 127 128 128 #initialize and fill in penalties structure … … 134 134 135 135 elif strcmpi(coupling_method,'tiling'): 136 if any( macayealflag) and any(pattynflag): #coupling macayeal pattyn136 if any(SSAflag) and any(HOflag): #coupling SSA HO 137 137 #Find node at the border 138 nodeon macayealpattyn[numpy.nonzero(numpy.logical_and(nodeonmacayeal,nodeonpattyn))]=True139 # Macayeal elements in contact with this layer become MacAyealPattynelements140 matrixelements=ismember(md.mesh.elements-1,numpy.nonzero(nodeon macayealpattyn)[0])138 nodeonSSAHO[numpy.nonzero(numpy.logical_and(nodeonSSA,nodeonHO))]=True 139 #SSA elements in contact with this layer become MacAyealHO elements 140 matrixelements=ismember(md.mesh.elements-1,numpy.nonzero(nodeonSSAHO)[0]) 141 141 commonelements=numpy.sum(matrixelements,axis=1)!=0 142 commonelements[numpy.nonzero( pattynflag)]=False #only one layer: the elements previously in macayeal143 macayealflag[numpy.nonzero(commonelements)]=False #these elements are now macayealpattynelements144 macayealpattynflag[numpy.nonzero(commonelements)]=True145 nodeon macayeal[:]=False146 nodeon macayeal[md.mesh.elements[numpy.nonzero(macayealflag),:]-1]=True142 commonelements[numpy.nonzero(HOflag)]=False #only one layer: the elements previously in SSA 143 SSAflag[numpy.nonzero(commonelements)]=False #these elements are now SSAHOelements 144 SSAHOflag[numpy.nonzero(commonelements)]=True 145 nodeonSSA[:]=False 146 nodeonSSA[md.mesh.elements[numpy.nonzero(SSAflag),:]-1]=True 147 147 148 148 #rule out elements that don't touch the 2 boundaries 149 pos=numpy.nonzero( macayealpattynflag)[0]149 pos=numpy.nonzero(SSAHOflag)[0] 150 150 elist=numpy.zeros(numpy.size(pos),dtype=int) 151 elist = elist + numpy.sum(nodeon macayeal[md.mesh.elements[pos,:]-1],axis=1).astype(bool)152 elist = elist - numpy.sum(nodeon pattyn[md.mesh.elements[pos,:]-1] ,axis=1).astype(bool)151 elist = elist + numpy.sum(nodeonSSA[md.mesh.elements[pos,:]-1],axis=1).astype(bool) 152 elist = elist - numpy.sum(nodeonHO[md.mesh.elements[pos,:]-1] ,axis=1).astype(bool) 153 153 pos1=numpy.nonzero(elist==1)[0] 154 macayealflag[pos[pos1]]=True155 macayealpattynflag[pos[pos1]]=False154 SSAflag[pos[pos1]]=True 155 SSAHOflag[pos[pos1]]=False 156 156 pos2=numpy.nonzero(elist==-1)[0] 157 pattynflag[pos[pos2]]=True158 macayealpattynflag[pos[pos2]]=False157 HOflag[pos[pos2]]=True 158 SSAHOflag[pos[pos2]]=False 159 159 160 160 #Recompute nodes associated to these elements 161 nodeon macayeal[:]=False162 nodeon macayeal[md.mesh.elements[numpy.nonzero(macayealflag),:]-1]=True163 nodeon pattyn[:]=False164 nodeon pattyn[md.mesh.elements[numpy.nonzero(pattynflag),:]-1]=True165 nodeon macayealpattyn[:]=False166 nodeon macayealpattyn[md.mesh.elements[numpy.nonzero(macayealpattynflag),:]-1]=True167 168 elif any( pattynflag) and any(stokesflag): #coupling pattyn stokes161 nodeonSSA[:]=False 162 nodeonSSA[md.mesh.elements[numpy.nonzero(SSAflag),:]-1]=True 163 nodeonHO[:]=False 164 nodeonHO[md.mesh.elements[numpy.nonzero(HOflag),:]-1]=True 165 nodeonSSAHO[:]=False 166 nodeonSSAHO[md.mesh.elements[numpy.nonzero(SSAHOflag),:]-1]=True 167 168 elif any(HOflag) and any(FSflag): #coupling HO FS 169 169 #Find node at the border 170 nodeon pattynstokes[numpy.nonzero(numpy.logical_and(nodeonpattyn,nodeonstokes))]=True171 # Stokes elements in contact with this layer become PattynStokeselements172 matrixelements=ismember(md.mesh.elements-1,numpy.nonzero(nodeon pattynstokes)[0])170 nodeonHOFS[numpy.nonzero(numpy.logical_and(nodeonHO,nodeonFS))]=True 171 #FS elements in contact with this layer become HOFS elements 172 matrixelements=ismember(md.mesh.elements-1,numpy.nonzero(nodeonHOFS)[0]) 173 173 commonelements=numpy.sum(matrixelements,axis=1)!=0 174 commonelements[numpy.nonzero( pattynflag)]=False #only one layer: the elements previously in macayeal175 stokesflag[numpy.nonzero(commonelements)]=False #these elements are now macayealpattynelements176 pattynstokesflag[numpy.nonzero(commonelements)]=True177 nodeon stokes=numpy.zeros(md.mesh.numberofvertices,bool)178 nodeon stokes[md.mesh.elements[numpy.nonzero(stokesflag),:]-1]=True174 commonelements[numpy.nonzero(HOflag)]=False #only one layer: the elements previously in SSA 175 FSflag[numpy.nonzero(commonelements)]=False #these elements are now SSAHOelements 176 HOFSflag[numpy.nonzero(commonelements)]=True 177 nodeonFS=numpy.zeros(md.mesh.numberofvertices,bool) 178 nodeonFS[md.mesh.elements[numpy.nonzero(FSflag),:]-1]=True 179 179 180 180 #rule out elements that don't touch the 2 boundaries 181 pos=numpy.nonzero( pattynstokesflag)[0]181 pos=numpy.nonzero(HOFSflag)[0] 182 182 elist=numpy.zeros(numpy.size(pos),dtype=int) 183 elist = elist + numpy.sum(nodeon stokes[md.mesh.elements[pos,:]-1],axis=1).astype(bool)184 elist = elist - numpy.sum(nodeon pattyn[md.mesh.elements[pos,:]-1],axis=1).astype(bool)183 elist = elist + numpy.sum(nodeonFS[md.mesh.elements[pos,:]-1],axis=1).astype(bool) 184 elist = elist - numpy.sum(nodeonHO[md.mesh.elements[pos,:]-1],axis=1).astype(bool) 185 185 pos1=numpy.nonzero(elist==1)[0] 186 stokesflag[pos[pos1]]=True187 pattynstokesflag[pos[pos1]]=False186 FSflag[pos[pos1]]=True 187 HOFSflag[pos[pos1]]=False 188 188 pos2=numpy.nonzero(elist==-1)[0] 189 pattynflag[pos[pos2]]=True190 pattynstokesflag[pos[pos2]]=False189 HOflag[pos[pos2]]=True 190 HOFSflag[pos[pos2]]=False 191 191 192 192 #Recompute nodes associated to these elements 193 nodeon stokes[:]=False194 nodeon stokes[md.mesh.elements[numpy.nonzero(stokesflag),:]-1]=True195 nodeon pattyn[:]=False196 nodeon pattyn[md.mesh.elements[numpy.nonzero(pattynflag),:]-1]=True197 nodeon pattynstokes[:]=False198 nodeon pattynstokes[md.mesh.elements[numpy.nonzero(pattynstokesflag),:]-1]=True199 200 elif any( stokesflag) and any(macayealflag):193 nodeonFS[:]=False 194 nodeonFS[md.mesh.elements[numpy.nonzero(FSflag),:]-1]=True 195 nodeonHO[:]=False 196 nodeonHO[md.mesh.elements[numpy.nonzero(HOflag),:]-1]=True 197 nodeonHOFS[:]=False 198 nodeonHOFS[md.mesh.elements[numpy.nonzero(HOFSflag),:]-1]=True 199 200 elif any(FSflag) and any(SSAflag): 201 201 #Find node at the border 202 nodeon macayealstokes[numpy.nonzero(numpy.logical_and(nodeonmacayeal,nodeonstokes))]=True203 # Stokes elements in contact with this layer become MacAyealStokeselements204 matrixelements=ismember(md.mesh.elements-1,numpy.nonzero(nodeon macayealstokes)[0])202 nodeonSSAFS[numpy.nonzero(numpy.logical_and(nodeonSSA,nodeonFS))]=True 203 #FS elements in contact with this layer become MacAyealFS elements 204 matrixelements=ismember(md.mesh.elements-1,numpy.nonzero(nodeonSSAFS)[0]) 205 205 commonelements=numpy.sum(matrixelements,axis=1)!=0 206 commonelements[numpy.nonzero( macayealflag)]=False #only one layer: the elements previously in macayeal207 stokesflag[numpy.nonzero(commonelements)]=False #these elements are now macayealmacayealelements208 macayealstokesflag[numpy.nonzero(commonelements)]=True209 nodeon stokes=numpy.zeros(md.mesh.numberofvertices,bool)210 nodeon stokes[md.mesh.elements[numpy.nonzero(stokesflag),:]-1]=True206 commonelements[numpy.nonzero(SSAflag)]=False #only one layer: the elements previously in SSA 207 FSflag[numpy.nonzero(commonelements)]=False #these elements are now SSASSAelements 208 SSAFSflag[numpy.nonzero(commonelements)]=True 209 nodeonFS=numpy.zeros(md.mesh.numberofvertices,bool) 210 nodeonFS[md.mesh.elements[numpy.nonzero(FSflag),:]-1]=True 211 211 212 212 #rule out elements that don't touch the 2 boundaries 213 pos=numpy.nonzero( macayealstokesflag)[0]213 pos=numpy.nonzero(SSAFSflag)[0] 214 214 elist=numpy.zeros(numpy.size(pos),dtype=int) 215 elist = elist + numpy.sum(nodeon macayeal[md.mesh.elements[pos,:]-1],axis=1).astype(bool)216 elist = elist - numpy.sum(nodeon stokes[md.mesh.elements[pos,:]-1] ,axis=1).astype(bool)215 elist = elist + numpy.sum(nodeonSSA[md.mesh.elements[pos,:]-1],axis=1).astype(bool) 216 elist = elist - numpy.sum(nodeonFS[md.mesh.elements[pos,:]-1] ,axis=1).astype(bool) 217 217 pos1=numpy.nonzero(elist==1)[0] 218 macayealflag[pos[pos1]]=True219 macayealstokesflag[pos[pos1]]=False218 SSAflag[pos[pos1]]=True 219 SSAFSflag[pos[pos1]]=False 220 220 pos2=numpy.nonzero(elist==-1)[0] 221 stokesflag[pos[pos2]]=True222 macayealstokesflag[pos[pos2]]=False221 FSflag[pos[pos2]]=True 222 SSAFSflag[pos[pos2]]=False 223 223 224 224 #Recompute nodes associated to these elements 225 nodeon macayeal[:]=False226 nodeon macayeal[md.mesh.elements[numpy.nonzero(macayealflag),:]-1]=True227 nodeon stokes[:]=False228 nodeon stokes[md.mesh.elements[numpy.nonzero(stokesflag),:]-1]=True229 nodeon macayealstokes[:]=False230 nodeon macayealstokes[md.mesh.elements[numpy.nonzero(macayealstokesflag),:]-1]=True231 232 elif any( stokesflag) and any(hutterflag):225 nodeonSSA[:]=False 226 nodeonSSA[md.mesh.elements[numpy.nonzero(SSAflag),:]-1]=True 227 nodeonFS[:]=False 228 nodeonFS[md.mesh.elements[numpy.nonzero(FSflag),:]-1]=True 229 nodeonSSAFS[:]=False 230 nodeonSSAFS[md.mesh.elements[numpy.nonzero(SSAFSflag),:]-1]=True 231 232 elif any(FSflag) and any(SIAflag): 233 233 raise TypeError("type of coupling not supported yet") 234 234 235 #Create MacAyeal PattynApproximation where needed235 #Create MacAyealHOApproximation where needed 236 236 md.flowequation.element_equation=numpy.zeros(md.mesh.numberofelements,int) 237 237 md.flowequation.element_equation[numpy.nonzero(noneflag)]=0 238 md.flowequation.element_equation[numpy.nonzero( hutterflag)]=1239 md.flowequation.element_equation[numpy.nonzero( macayealflag)]=2240 md.flowequation.element_equation[numpy.nonzero( l1l2flag)]=8241 md.flowequation.element_equation[numpy.nonzero( pattynflag)]=3242 md.flowequation.element_equation[numpy.nonzero( stokesflag)]=4243 md.flowequation.element_equation[numpy.nonzero( macayealpattynflag)]=5244 md.flowequation.element_equation[numpy.nonzero( macayealstokesflag)]=6245 md.flowequation.element_equation[numpy.nonzero( pattynstokesflag)]=7238 md.flowequation.element_equation[numpy.nonzero(SIAflag)]=1 239 md.flowequation.element_equation[numpy.nonzero(SSAflag)]=2 240 md.flowequation.element_equation[numpy.nonzero(L1L2flag)]=8 241 md.flowequation.element_equation[numpy.nonzero(HOflag)]=3 242 md.flowequation.element_equation[numpy.nonzero(FSflag)]=4 243 md.flowequation.element_equation[numpy.nonzero(SSAHOflag)]=5 244 md.flowequation.element_equation[numpy.nonzero(SSAFSflag)]=6 245 md.flowequation.element_equation[numpy.nonzero(HOFSflag)]=7 246 246 247 247 #border 248 md.flowequation.border pattyn=nodeonpattyn249 md.flowequation.border macayeal=nodeonmacayeal250 md.flowequation.border stokes=nodeonstokes248 md.flowequation.borderHO=nodeonHO 249 md.flowequation.borderSSA=nodeonSSA 250 md.flowequation.borderFS=nodeonFS 251 251 252 252 #Create vertices_type 253 253 md.flowequation.vertex_equation=numpy.zeros(md.mesh.numberofvertices,int) 254 pos=numpy.nonzero(nodeon macayeal)254 pos=numpy.nonzero(nodeonSSA) 255 255 md.flowequation.vertex_equation[pos]=2 256 pos=numpy.nonzero(nodeon l1l2)256 pos=numpy.nonzero(nodeonL1L2) 257 257 md.flowequation.vertex_equation[pos]=8 258 pos=numpy.nonzero(nodeon pattyn)258 pos=numpy.nonzero(nodeonHO) 259 259 md.flowequation.vertex_equation[pos]=3 260 pos=numpy.nonzero(nodeon hutter)260 pos=numpy.nonzero(nodeonSIA) 261 261 md.flowequation.vertex_equation[pos]=1 262 pos=numpy.nonzero(nodeon macayealpattyn)262 pos=numpy.nonzero(nodeonSSAHO) 263 263 md.flowequation.vertex_equation[pos]=5 264 pos=numpy.nonzero(nodeon stokes)264 pos=numpy.nonzero(nodeonFS) 265 265 md.flowequation.vertex_equation[pos]=4 266 if any( stokesflag):267 pos=numpy.nonzero(numpy.logical_not(nodeon stokes))268 if not (any( pattynflag) or any(macayealflag)):266 if any(FSflag): 267 pos=numpy.nonzero(numpy.logical_not(nodeonFS)) 268 if not (any(HOflag) or any(SSAflag)): 269 269 md.flowequation.vertex_equation[pos]=0 270 pos=numpy.nonzero(nodeon pattynstokes)270 pos=numpy.nonzero(nodeonHOFS) 271 271 md.flowequation.vertex_equation[pos]=7 272 pos=numpy.nonzero(nodeon macayealstokes)272 pos=numpy.nonzero(nodeonSSAFS) 273 273 md.flowequation.vertex_equation[pos]=6 274 274 275 275 #figure out solution types 276 md.flowequation.is hutter=any(md.flowequation.element_equation==1)277 md.flowequation.is macayeal=any(md.flowequation.element_equation==2)278 md.flowequation.is l1l2=any(md.flowequation.element_equation==8)279 md.flowequation.is pattyn=any(md.flowequation.element_equation==3)280 md.flowequation.is stokes=any(md.flowequation.element_equation==4)276 md.flowequation.isSIA=any(md.flowequation.element_equation==1) 277 md.flowequation.isSSA=any(md.flowequation.element_equation==2) 278 md.flowequation.isL1L2=any(md.flowequation.element_equation==8) 279 md.flowequation.isHO=any(md.flowequation.element_equation==3) 280 md.flowequation.isFS=any(md.flowequation.element_equation==4) 281 281 282 282 return md 283 283 284 284 #Check that tiling can work: 285 if any(md.flowequation.border macayeal) and any(md.flowequation.borderpattyn) and any(md.flowequation.borderpattyn + md.flowequation.bordermacayeal!=1):285 if any(md.flowequation.borderSSA) and any(md.flowequation.borderHO) and any(md.flowequation.borderHO + md.flowequation.borderSSA !=1): 286 286 raise TypeError("error coupling domain too irregular") 287 if any(md.flowequation.border macayeal) and any(md.flowequation.borderstokes) and any(md.flowequation.borderstokes + md.flowequation.bordermacayeal!=1):287 if any(md.flowequation.borderSSA) and any(md.flowequation.borderFS) and any(md.flowequation.borderFS + md.flowequation.borderSSA !=1): 288 288 raise TypeError("error coupling domain too irregular") 289 if any(md.flowequation.border stokes) and any(md.flowequation.borderpattyn) and any(md.flowequation.borderpattyn + md.flowequation.borderstokes!=1):289 if any(md.flowequation.borderFS) and any(md.flowequation.borderHO) and any(md.flowequation.borderHO + md.flowequation.borderFS !=1): 290 290 raise TypeError("error coupling domain too irregular") 291 291 -
issm/trunk-jpl/src/m/plot/plot_elementstype.m
r13730 r15564 18 18 19 19 if is2d 20 % Hutterelements20 %SIA elements 21 21 posH=find(data==1); 22 22 A=elements(posH,1); B=elements(posH,2); C=elements(posH,3); … … 26 26 A=elements(posM,1); B=elements(posM,2); C=elements(posM,3); 27 27 p2=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',2,'FaceColor','flat','EdgeColor',edgecolor); 28 % Pattynelement28 %HO element 29 29 posP=find(data==3); 30 30 A=elements(posP,1); B=elements(posP,2); C=elements(posP,3); 31 31 p3=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',3,'FaceColor','flat','EdgeColor',edgecolor); 32 %MacAyeal Pattynelement32 %MacAyealHO element 33 33 posMP=find(data==5); 34 34 A=elements(posMP,1); B=elements(posMP,2); C=elements(posMP,3); 35 35 p5=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',5,'FaceColor','flat','EdgeColor',edgecolor); 36 % Stokeselements36 %FS elements 37 37 posS=find(data==4); 38 38 A=elements(posS,1); B=elements(posS,2); C=elements(posS,3); 39 39 p6=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',4,'FaceColor','flat','EdgeColor',edgecolor); 40 %MacAyeal Stokeselements40 %MacAyealFS elements 41 41 posMS=find(data==6); 42 42 A=elements(posMS,1); B=elements(posMS,2); C=elements(posMS,3); 43 43 p7=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',6,'FaceColor','flat','EdgeColor',edgecolor); 44 % PattynStokeselements44 %HOFS elements 45 45 posPS=find(data==7); 46 46 A=elements(posPS,1); B=elements(posPS,2); C=elements(posPS,3); … … 52 52 53 53 legend([p1 p2 p3 p5 p6 p7 p8 p9],... 54 ' Hutter''s elements','MacAyeal''s elements','Pattyn''s elements',...55 'MacAyeal Pattyn''s elements','Stokes''s elements','MacAyealStokes''s elements','PattynStokes''s elements','None element');54 'SIA''s elements','MacAyeal''s elements','HO''s elements',... 55 'MacAyealHO''s elements','FS''s elements','MacAyealFS''s elements','HOFS''s elements','None element'); 56 56 57 57 else 58 % Hutterelements58 %SIA elements 59 59 posH=find(data==1); 60 60 A=elements(posH,1); B=elements(posH,2); C=elements(posH,3); D=elements(posH,4); E=elements(posH,5); F=elements(posH,6); … … 72 72 patch( 'Faces', [B E F C],'Vertices', [x y z],'CData', 2,'FaceColor','flat','EdgeColor',edgecolor); 73 73 patch( 'Faces', [C A D F],'Vertices', [x y z],'CData', 2,'FaceColor','flat','EdgeColor',edgecolor); 74 % Pattynelements74 %HO elements 75 75 posP=find(data==3); 76 76 A=elements(posP,1); B=elements(posP,2); C=elements(posP,3); D=elements(posP,4); E=elements(posP,5); F=elements(posP,6); … … 80 80 patch( 'Faces', [B E F C],'Vertices', [x y z],'CData', 3,'FaceColor','flat','EdgeColor',edgecolor); 81 81 patch( 'Faces', [C A D F],'Vertices', [x y z],'CData', 3,'FaceColor','flat','EdgeColor',edgecolor); 82 % Stokeselements82 %FS elements 83 83 posS=find(data==4); 84 84 A=elements(posS,1); B=elements(posS,2); C=elements(posS,3); D=elements(posS,4); E=elements(posS,5); F=elements(posS,6); … … 88 88 patch( 'Faces', [B E F C],'Vertices', [x y z],'CData', 4,'FaceColor','flat','EdgeColor',edgecolor); 89 89 patch( 'Faces', [C A D F],'Vertices', [x y z],'CData', 4,'FaceColor','flat','EdgeColor',edgecolor); 90 %MacAyeal Pattynelements90 %MacAyealHO elements 91 91 posP=find(data==5); 92 92 A=elements(posP,1); B=elements(posP,2); C=elements(posP,3); D=elements(posP,4); E=elements(posP,5); F=elements(posP,6); … … 96 96 patch( 'Faces', [B E F C],'Vertices', [x y z],'CData', 5,'FaceColor','flat','EdgeColor',edgecolor); 97 97 patch( 'Faces', [C A D F],'Vertices', [x y z],'CData', 5,'FaceColor','flat','EdgeColor',edgecolor); 98 % PattynStokeselements98 %HOFS elements 99 99 PosPS=find(data==7); 100 100 A=elements(PosPS,1); B=elements(PosPS,2); C=elements(PosPS,3); D=elements(PosPS,4); E=elements(PosPS,5); F=elements(PosPS,6); … … 104 104 patch( 'Faces', [B E F C],'Vertices', [x y z],'CData', 7,'FaceColor','flat','EdgeColor',edgecolor); 105 105 patch( 'Faces', [C A D F],'Vertices', [x y z],'CData', 7,'FaceColor','flat','EdgeColor',edgecolor); 106 %MacAyeal Stokeselements106 %MacAyealFS elements 107 107 PosMS=find(data==6); 108 108 A=elements(PosMS,1); B=elements(PosMS,2); C=elements(PosMS,3); D=elements(PosMS,4); E=elements(PosMS,5); F=elements(PosMS,6); … … 122 122 123 123 legend([p1 p2 p3 p4 p5 p6 p7 p8],... 124 ' Hutter''s elements','MacAyeal''s elements','Pattyn''s elements','Stokes''s elements',...125 'MacAyeal Pattyn''s elements','PattynStokes''s elements','MacAyealStokes''s elements','None elements');124 'SIA''s elements','MacAyeal''s elements','HO''s elements','FS''s elements',... 125 'MacAyealHO''s elements','HOFS''s elements','MacAyealFS''s elements','None elements'); 126 126 end 127 127 -
issm/trunk-jpl/src/m/plot/plot_penalties.m
r13730 r15564 40 40 P2=plot3(x(md.penalties(i,:)),y(md.penalties(i,:)),z(md.penalties(i,:)),'bo-','LineWidth',2,'MarkerSize',8,'MarkerFaceColor','b'); 41 41 end 42 legend([P1 P2],'MacAyeal''s penalized nodes',' Pattyn''s penalized nodes');42 legend([P1 P2],'MacAyeal''s penalized nodes','HO''s penalized nodes'); 43 43 end 44 44 -
issm/trunk-jpl/src/m/qmu/qmuresponse.m
r15504 r15564 28 28 m_dhu=models.dhu; 29 29 m_ds=models.ds; 30 is hutter=m_dhu.parameters.ishutter;31 is macayeal=m_dh.parameters.ismacayeal;32 is pattyn=m_dh.parameters.ispattyn;33 is stokes=m_ds.parameters.isstokes;34 if is hutter,30 isSIA=m_dhu.parameters.isSIA; 31 isSSA=m_dh.parameters.isSSA; 32 isHO=m_dh.parameters.isHO; 33 isFS=m_ds.parameters.isFS; 34 if isSIA, 35 35 36 36 % for now, separate all segments from double array for parallel to make cells … … 58 58 end 59 59 60 elseif is macayeal || ispattyn,60 elseif isSSA || isHO, 61 61 62 62 % for now, separate all segments from double array for parallel to make cells … … 84 84 end 85 85 86 elseif is stokes,86 elseif isFS, 87 87 88 88 % for now, separate all segments from double array for parallel to make cells -
issm/trunk-jpl/src/m/solvers/stokesoptions.m
r14610 r15564 1 function stokes=stokesoptions(varargin)1 function FS=FSoptions(varargin) 2 2 %STOKESOPTIONS - return STOKES multi-physics solver petsc options 3 3 % 4 4 % Usage: 5 % options= stokesoptions;5 % options=FSoptions; 6 6 7 7 %retrieve options provided in varargin 8 8 options=pairoptions(varargin{:}); 9 stokes=struct();9 FS=struct(); 10 10 11 %default stokesoptions11 %default FS options 12 12 PETSC_VERSION=petscversion(); 13 13 if PETSC_VERSION==2, 14 error(' stokesoptions error message: multi-physics options not supported in Petsc 2');14 error('FSoptions error message: multi-physics options not supported in Petsc 2'); 15 15 end 16 16 if PETSC_VERSION==3, 17 stokes.toolkit='petsc';18 stokes.mat_type=getfieldvalue(options,'mat_type','mpiaij');19 stokes.ksp_max_it=getfieldvalue(options,'ksp_max_it',1000);20 stokes.ksp_type=getfieldvalue(options,'ksp_type','gmres');21 stokes.pc_type=getfieldvalue(options,'pc_type','fieldsplit');22 stokes.pc_field_split_type=getfieldvalue(options,'pc_field_split_type','schur');23 stokes.fieldsplit_0_pc_type=getfieldvalue(options,'fieldsplit_0_pc_type','hypre');24 stokes.fieldsplit_0_ksp_type=getfieldvalue(options,'fieldsplit_0_ksp_type','gmres');25 stokes.fieldsplit_0_pc_hypre_type=getfieldvalue(options,'fieldsplit_0_pc_hypre_type','boomerang');26 stokes.fieldsplit_1_pc_type=getfieldvalue(options,'fieldsplit_1_pc_type','jacobi');27 stokes.fieldsplit_1_ksp_type=getfieldvalue(options,'fieldsplit_1_ksp_type','preonly');28 stokes.issm_option_solver=getfieldvalue(options,'issm_option_solver','stokes');17 FS.toolkit='petsc'; 18 FS.mat_type=getfieldvalue(options,'mat_type','mpiaij'); 19 FS.ksp_max_it=getfieldvalue(options,'ksp_max_it',1000); 20 FS.ksp_type=getfieldvalue(options,'ksp_type','gmres'); 21 FS.pc_type=getfieldvalue(options,'pc_type','fieldsplit'); 22 FS.pc_field_split_type=getfieldvalue(options,'pc_field_split_type','schur'); 23 FS.fieldsplit_0_pc_type=getfieldvalue(options,'fieldsplit_0_pc_type','hypre'); 24 FS.fieldsplit_0_ksp_type=getfieldvalue(options,'fieldsplit_0_ksp_type','gmres'); 25 FS.fieldsplit_0_pc_hypre_type=getfieldvalue(options,'fieldsplit_0_pc_hypre_type','boomerang'); 26 FS.fieldsplit_1_pc_type=getfieldvalue(options,'fieldsplit_1_pc_type','jacobi'); 27 FS.fieldsplit_1_ksp_type=getfieldvalue(options,'fieldsplit_1_ksp_type','preonly'); 28 FS.issm_option_solver=getfieldvalue(options,'issm_option_solver','FS'); 29 29 end -
issm/trunk-jpl/src/m/solvers/stokesoptions.py
r14610 r15564 3 3 from petscversion import * 4 4 #}}} 5 def stokesoptions(*args):5 def FSoptions(*args): 6 6 #STOKESOPTIONS - return STOKES multi-physics solver petsc options 7 7 # 8 8 # Usage: 9 # options= stokesoptions;9 # options=FSoptions; 10 10 11 11 #retrieve options provided in varargin … … 13 13 14 14 15 #default stokesoptions15 #default FS options 16 16 PETSC_VERSION=petscversion() 17 17 18 18 if PETSC_VERSION==2: 19 raise RuntimeError(' stokesoptions error message: multi-physics options not supported in Petsc 2')19 raise RuntimeError('FSoptions error message: multi-physics options not supported in Petsc 2') 20 20 if PETSC_VERSION==3: 21 21 options=[['toolkit','petsc'],['mat_type','mpiaij'],['ksp_max_it',1000],['ksp_type','gmres'],['pc_type','fieldsplit'],['pc_field_split_type','schur'],\ 22 22 ['fieldsplit_0_pc_type','hypre'],['fieldsplit_0_ksp_type','gmres'],['fieldsplit_0_pc_hypre_type','boomerang'],\ 23 ['fieldsplit_1_pc_type','jacobi'],['fieldsplit_1_ksp_type','preonly'],['issm_option_solver',' stokes']]23 ['fieldsplit_1_pc_type','jacobi'],['fieldsplit_1_ksp_type','preonly'],['issm_option_solver','FS']] 24 24 25 25 #now, go through our arguments, and write over default options.
Note:
See TracChangeset
for help on using the changeset viewer.