Changeset 17444
- Timestamp:
- 03/17/14 08:58:00 (11 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/analyses/HydrologyDCInefficientAnalysis.cpp
r17422 r17444 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]){ … … 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; … … 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 … … 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++){ -
issm/trunk-jpl/src/c/classes/Loads/Pengrid.cpp
r17391 r17444 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); 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 } 185 200 186 201 } … … 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){ -
issm/trunk-jpl/src/c/classes/Loads/Pengrid.h
r17268 r17444 94 94 void ConstraintActivateHydrologyDCInefficient(int* punstable); 95 95 void ConstraintActivate(int* punstable); 96 ElementVector* CreatePVectorHydrologyDCInefficient(void); 96 97 void ResetConstraint(void); 97 98 /*}}}*/ -
issm/trunk-jpl/src/c/modules/SystemMatricesx/SystemMatricesx.cpp
r17230 r17444 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; … … 87 91 load->CreateKMatrix(Kff,Kfs); 88 92 load->CreatePVector(pf); 93 /* printf("-------------------LOADING \n"); */ 94 /* pf->Echo(); */ 89 95 } 90 96 } … … 97 103 load->PenaltyCreateKMatrix(Kff,Kfs,kmax); 98 104 load->PenaltyCreatePVector(pf,kmax); 105 /* printf("-------------------PENALTY \n"); */ 106 /* pf->Echo(); */ 99 107 } 100 108 }
Note:
See TracChangeset
for help on using the changeset viewer.