source:
issm/oecreview/Archive/16554-17801/ISSM-17443-17444.diff@
17802
Last change on this file since 17802 was 17802, checked in by , 11 years ago | |
---|---|
File size: 5.0 KB |
-
../trunk-jpl/src/c/analyses/HydrologyDCInefficientAnalysis.cpp
123 123 124 124 iomodel->FetchData(1,MeshVertexonbedEnum); 125 125 126 //create penalties for nodes: no node can have a temperature over the melting point126 //create penalties for nodes: no node can have water above the max 127 127 CreateSingleNodeToElementConnectivity(iomodel); 128 128 for(int i=0;i<iomodel->numberofvertices;i++){ 129 if (iomodel->meshtype ==Mesh3DEnum){129 if (iomodel->meshtype!=Mesh3DEnum){ 130 130 /*keep only this partition's nodes:*/ 131 131 if(iomodel->my_vertices[i]){ 132 132 loads->AddObject(new Pengrid(iomodel->loadcounter+i+1,i,iomodel,HydrologyDCInefficientAnalysisEnum)); … … 279 279 /*Intermediaries */ 280 280 bool active_element,isefficientlayer; 281 281 IssmDouble dt,scalar; 282 IssmDouble moulin_load,water_head;282 IssmDouble water_head; 283 283 IssmDouble water_load,transfer; 284 284 IssmDouble Jdet; 285 285 … … 306 306 Input* thickness_input = basalelement->GetInput(ThicknessEnum); 307 307 Input* bed_input = basalelement->GetInput(BedEnum); 308 308 Input* water_input = basalelement->GetInput(BasalforcingsMeltingRateEnum); _assert_(water_input); 309 Input* moulin_input = basalelement->GetInput(HydrologydcBasalMoulinInputEnum); _assert_(moulin_input);310 309 if(dt!= 0.){old_wh_input = basalelement->GetInput(SedimentHeadOldEnum); _assert_(old_wh_input);} 311 310 312 311 IssmDouble sediment_storing = SedimentStoring(basalelement); … … 326 325 327 326 /*Loading term*/ 328 327 water_input->GetInputValue(&water_load,gauss); 329 moulin_input->GetInputValue(&moulin_load,gauss); 330 328 331 329 scalar = Jdet*gauss->weight*(water_load); 332 scalar = scalar + Jdet* moulin_load;333 330 if(dt!=0.) scalar = scalar*dt; 334 331 for(int i=0;i<numnodes;i++){ 335 332 pe->values[i]+=scalar*basis[i]; -
../trunk-jpl/src/c/modules/SystemMatricesx/SystemMatricesx.cpp
75 75 ElementVector* pe = analysis->CreatePVector(element); 76 76 element->ReduceMatrices(Ke,pe); 77 77 if(Ke) Ke->AddToGlobal(Kff,Kfs); 78 if(pe) pe->AddToGlobal(pf); 78 if(pe){ 79 pe->AddToGlobal(pf); 80 /* printf("-------------------USUAL \n"); */ 81 /* pf->Echo(); */ 82 } 79 83 delete Ke; 80 84 delete pe; 81 85 } … … 86 90 if(load->InAnalysis(configuration_type)){ 87 91 load->CreateKMatrix(Kff,Kfs); 88 92 load->CreatePVector(pf); 93 /* printf("-------------------LOADING \n"); */ 94 /* pf->Echo(); */ 89 95 } 90 96 } 91 97 … … 96 102 if(load->InAnalysis(configuration_type)){ 97 103 load->PenaltyCreateKMatrix(Kff,Kfs,kmax); 98 104 load->PenaltyCreatePVector(pf,kmax); 105 /* printf("-------------------PENALTY \n"); */ 106 /* pf->Echo(); */ 99 107 } 100 108 } 101 109 } -
../trunk-jpl/src/c/classes/Loads/Pengrid.cpp
180 180 /*FUNCTION Pengrid::CreatePVector {{{*/ 181 181 void Pengrid::CreatePVector(Vector<IssmDouble>* pf){ 182 182 183 /*No loads applied, do nothing: */ 184 return; 183 ElementVector* pe=NULL; 184 int analysis_type; 185 this->parameters->FindParam(&analysis_type,AnalysisTypeEnum); 185 186 187 switch(analysis_type){ 188 189 case HydrologyDCInefficientAnalysisEnum: 190 pe = CreatePVectorHydrologyDCInefficient(); 191 break; 192 default: 193 /*No loads applied, do nothing: */ 194 return; 195 } 196 if(pe){ 197 pe->AddToGlobal(pf); 198 delete pe; 199 } 200 186 201 } 187 202 /*}}}*/ 188 203 /*FUNCTION Pengrid::GetNodesSidList{{{*/ … … 792 807 return pe; 793 808 } 794 809 /*}}}*/ 810 /*FUNCTION Pengrid::CreatePVectorHydrologyDCInefficient {{{*/ 811 ElementVector* Pengrid::CreatePVectorHydrologyDCInefficient(void){ 812 813 IssmDouble moulin_load,dt; 814 815 /*Initialize Element matrix*/ 816 ElementVector* pe=new ElementVector(&node,1,this->parameters); 817 818 this->element->GetInputValue(&moulin_load,node,HydrologydcBasalMoulinInputEnum); 819 parameters->FindParam(&dt,TimesteppingTimeStepEnum); 820 821 if(dt!=0.0) pe->values[0]=moulin_load*dt; 822 823 /*Clean up and return*/ 824 return pe; 825 } 826 /*}}}*/ 795 827 /*FUNCTION Pengrid::ResetConstraint {{{*/ 796 828 void Pengrid::ResetConstraint(void){ 797 829 active = 0; -
../trunk-jpl/src/c/classes/Loads/Pengrid.h
93 93 ElementVector* PenaltyCreatePVectorHydrologyDCInefficient(IssmDouble kmax); 94 94 void ConstraintActivateHydrologyDCInefficient(int* punstable); 95 95 void ConstraintActivate(int* punstable); 96 ElementVector* CreatePVectorHydrologyDCInefficient(void); 96 97 void ResetConstraint(void); 97 98 /*}}}*/ 98 99
Note:
See TracBrowser
for help on using the repository browser.