Changeset 23370
- Timestamp:
- 10/02/18 10:00:01 (6 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/analyses/HydrologyDCEfficientAnalysis.cpp
r23368 r23370 607 607 //thickness[i] = old_thickness[i]*(1.0+opening-closing)/(1.0-opening+closing); 608 608 609 /* if(element->nodes[i]->Sid()==2299){ */ 610 /* printf("for node %i \n",element->nodes[i]->Sid()); */ 611 /* printf(" old thickness is %g \n",old_thickness[i]); */ 612 /* printf(" new thickness is %g \n",thickness[i]); */ 613 /* printf(" closing is %g \n",((2.0*A*dt*pow(EPL_N,n))/(pow(n,n)))); */ 614 /* printf(" opening is %g \n",((rho_water*gravity*epl_conductivity*EPLgrad2*dt)/(rho_ice*latentheat))); */ 615 /* } */ 609 if(element->nodes[i]->Sid()==2299){ 610 printf("for node %i \n",element->nodes[i]->Sid()); 611 printf(" old thickness is %g \n",old_thickness[i]); 612 printf(" new thickness is %g \n",thickness[i]); 613 } 616 614 /*Take care of otherthikening*/ 617 615 if(thickness[i]>max_thick){ … … 711 709 vec_mask->SetValue(basalelement->nodes[i]->Sid(),1.,INS_VAL); 712 710 /* If epl thickness gets under colapse thickness, close the layer */ 713 /* if(element->nodes[i]->Sid()==2299){ */714 /* printf("thickness for maksing for node %i is %g \n",element->nodes[i]->Sid(),epl_thickness[i]);} */715 711 if(epl_thickness[i]<colapse_thick){ 716 /* if(element->nodes[i]->Sid()==2299){ */717 /* printf("maksing node %i\n",element->nodes[i]->Sid());} */712 if(element->nodes[i]->Sid()==2299){ 713 printf("masking node %i with thickness %f\n",element->nodes[i]->Sid(),epl_thickness[i]);} 718 714 vec_mask->SetValue(basalelement->nodes[i]->Sid(),0.,INS_VAL); 719 715 recurence->SetValue(basalelement->nodes[i]->Sid(),1.,INS_VAL); 720 716 } 721 /* //If epl head gets under base elevation, close the layer */722 /* else if(eplhead[i]<(base[i]-1.0e-8)){ */723 /* vec_mask->SetValue(basalelement->nodes[i]->Sid(),0.,INS_VAL); */724 /* recurence->SetValue(basalelement->nodes[i]->Sid(),1.,INS_VAL); */725 /* } */726 717 } 727 718 /*If node is now closed bring its thickness back to initial*/ -
issm/trunk-jpl/src/c/analyses/HydrologyDCInefficientAnalysis.cpp
r23366 r23370 29 29 30 30 /*retrieve some parameters: */ 31 /* bool issmb; */ 32 /* iomodel->FindConstant(&issmb,"md.transient.issmb"); */ 31 33 iomodel->FindConstant(&hydrology_model,"md.hydrology.model"); 32 34 … … 63 65 parameters->AddObject(new DoubleParam(HydrologydcSedimentlimitEnum,sedimentlimit)); 64 66 } 67 /* if(!issmb){ */ 68 /* parameters->AddObject(iomodel->CopyConstantObject("md.smb.model",SmbEnum)); */ 69 /* } */ 70 65 71 /*Requested outputs*/ 66 72 iomodel->FindConstant(&requestedoutputs,&numoutputs,"md.hydrology.requested_outputs"); … … 77 83 /*Fetch data needed: */ 78 84 iomodel->FindConstant(&hydrology_model,"md.hydrology.model"); 85 bool issmb; 86 iomodel->FindConstant(&issmb,"md.transient.issmb"); 79 87 80 88 /*Now, do we really want DC?*/ … … 109 117 iomodel->FetchDataToInput(elements,"md.initialization.epl_head",EplHeadHydrostepEnum); 110 118 } 119 if(!issmb){ 120 iomodel->FetchDataToInput(elements,"md.smb.model",SmbEnum); 121 } 122 111 123 }/*}}}*/ 112 124 … … 638 650 IssmDouble base_elev,prestep_head,water_sheet; 639 651 IssmDouble sediment_thickness = element->GetMaterialParameter(HydrologydcSedimentThicknessEnum); 640 bool isthermal; 641 642 element->FindParam(&isthermal,TransientIsthermalEnum); 652 643 653 element->FindParam(&unconf_scheme,HydrologydcUnconfinedFlagEnum); 644 654 SedTrans_input->GetInputValue(&FullLayer_transmitivity,gauss); -
issm/trunk-jpl/src/c/analyses/MasstransportAnalysis.cpp
r23335 r23370 188 188 189 189 if(!issmb){ 190 iomodel->FetchDataToInput(elements,"md.smb.m ass_balance",SmbMassBalanceEnum);190 iomodel->FetchDataToInput(elements,"md.smb.model",SmbEnum); 191 191 } 192 192 if(stabilization==3){ … … 629 629 }/*}}}*/ 630 630 void MasstransportAnalysis::GetB(IssmDouble* B,Element* element,int dim,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 631 /*Compute B matrix. B=[B1 B2 B3] where Bi is of size 3*NDOF2. 631 /*Compute B matrix. B=[B1 B2 B3] where Bi is of size 3*NDOF2. 632 632 * For node i, Bi can be expressed in the actual coordinate system 633 * by: 633 * by: 634 634 * Bi=[ N ] 635 635 * [ N ] … … 657 657 }/*}}}*/ 658 658 void MasstransportAnalysis::GetBprime(IssmDouble* Bprime,Element* element,int dim,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 659 /*Compute B' matrix. B'=[B1' B2' B3'] where Bi' is of size 3*NDOF2. 659 /*Compute B' matrix. B'=[B1' B2' B3'] where Bi' is of size 3*NDOF2. 660 660 * For node i, Bi' can be expressed in the actual coordinate system 661 * by: 661 * by: 662 662 * Bi_prime=[ dN/dx ] 663 663 * [ dN/dy ] -
issm/trunk-jpl/src/c/classes/Params/Parameters.cpp
r23310 r23370 92 92 } 93 93 /*}}}*/ 94 void Parameters::DeepEcho(void){/*{{{*/ 94 void Parameters::DeepEcho(void){/*{{{*/ 95 95 for(int i=0;i<NUMPARAMS;i++) { 96 96 if(this->params[i]) this->params[i]->DeepEcho(); … … 99 99 } 100 100 /*}}}*/ 101 void Parameters::Echo(void){/*{{{*/ 101 void Parameters::Echo(void){/*{{{*/ 102 102 for(int i=0;i<NUMPARAMS;i++) { 103 103 if(this->params[i]) this->params[i]->Echo(); … … 139 139 140 140 /*Recover enum of object first: */ 141 MARSHALLING(obj_enum); 141 MARSHALLING(obj_enum); 142 142 143 143 if(obj_enum==DoubleParamEnum){ … … 200 200 fileparam->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction); 201 201 delete fileparam; 202 /* No need to add this object, the pointer is not valid 202 /* No need to add this object, the pointer is not valid 203 203 The FemModel should reset all FileParams in the restart function */ 204 204 } … … 649 649 char* OptionsFromAnalysis(char** pouttoolkit,Parameters* parameters,int analysis_type){ /*{{{*/ 650 650 651 /* figure out ISSM options for current analysis, return a string. */ 651 /* figure out ISSM options for current analysis, return a string. */ 652 652 653 653 /*output: */ … … 667 667 668 668 parameters->FindParam(&strings,&numanalyses,ToolkitsOptionsStringsEnum); 669 parameters->FindParam(&toolkits,&dummy,ToolkitsTypesEnum); _assert_(dummy==numanalyses); 670 parameters->FindParam(&analyses,&dummy,ToolkitsOptionsAnalysesEnum); _assert_(dummy==numanalyses); 669 parameters->FindParam(&toolkits,&dummy,ToolkitsTypesEnum); _assert_(dummy==numanalyses); 670 parameters->FindParam(&analyses,&dummy,ToolkitsOptionsAnalysesEnum); _assert_(dummy==numanalyses); 671 671 672 672 if(numanalyses==0)return NULL; //we did not find petsc options, don't bother. … … 710 710 xDelete<int>(analyses); 711 711 return outstring; 712 } 712 } 713 713 /*}}}*/ 714 714 void ToolkitsOptionsFromAnalysis(Parameters* parameters,int analysis_type){ /*{{{*/ 715 715 716 716 /*!\file: ToolkitsOptionsFromAnalysis.cpp 717 * \brief: for each analysis, setup the issmoptions string. 718 * This is mainly for the case where we run our toolkits using petsc. In this case, we need to 719 * plug our toolkits options directly into the petsc options database. This is the case for each analysis type 717 * \brief: for each analysis, setup the issmoptions string. 718 * This is mainly for the case where we run our toolkits using petsc. In this case, we need to 719 * plug our toolkits options directly into the petsc options database. This is the case for each analysis type 720 720 * and parameters 721 */ 721 */ 722 722 723 723 char* options = NULL; … … 731 731 732 732 #ifdef _HAVE_PETSC_ 733 /*In case we are using PETSC, we do not rely on issmoptions. Instead, we dump issmoptions into the Petsc 733 /*In case we are using PETSC, we do not rely on issmoptions. Instead, we dump issmoptions into the Petsc 734 734 * options database: */ 735 735 #if (_PETSC_MINOR_>=7) -
issm/trunk-jpl/src/c/cores/hydrology_core.cpp
r23232 r23370 14 14 /*Start profiler*/ 15 15 femmodel->profiler->Start(HYDROLOGYCORE); 16 16 17 17 /*intermediary*/ 18 18 int hydrology_model; … … 50 50 /*intermediary: */ 51 51 bool isefficientlayer; 52 bool isthermal;53 52 int step,hydroslices; 54 53 IssmDouble time,init_time,hydrotime,yts; … … 62 61 femmodel->parameters->FindParam(&yts,ConstantsYtsEnum); 63 62 64 femmodel->parameters->FindParam(&isthermal,TransientIsthermalEnum);65 63 /*first we exclude frozen nodes of the solved nodes*/ 66 64 femmodel->SetCurrentConfiguration(HydrologyDCInefficientAnalysisEnum); … … 153 151 xDelete<char*>(requested_outputs); 154 152 } 155 153 156 154 /*End profiler*/ 157 155 femmodel->profiler->Stop(HYDROLOGYCORE); -
issm/trunk-jpl/src/c/cores/transient_core.cpp
r23366 r23370 384 384 } 385 385 386 /* duplicating smb position to have runoff value*/386 /*shifting smb position to have runoff value*/ 387 387 if(issmb) smb_core(femmodel); 388 388 … … 396 396 397 397 /* from here on, prepare geometry for next time step*/ 398 if(issmb) smb_core(femmodel);398 //if(issmb) smb_core(femmodel); 399 399 400 400 if(ismasstransport){
Note:
See TracChangeset
for help on using the changeset viewer.