Changeset 3105
- Timestamp:
- 02/23/10 17:02:40 (15 years ago)
- Location:
- issm/trunk/src/c
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/ModelProcessorx/DiagnosticHoriz/CreateLoadsDiagnosticHoriz.cpp
r3098 r3105 34 34 /*icefront intermediary data: */ 35 35 char icefront_type[ICEFRONTSTRING]; 36 int icefront_element_type; 37 int icefront_sid; 38 int icefront_eid; 39 int icefront_mparid; 40 int icefront_node_ids[MAX_ICEFRONT_GRIDS]; 36 int icefront_fill; 37 int icefront_element_type; 38 int icefront_sid; 39 int icefront_eid; 40 int icefront_mparid; 41 int icefront_node_ids[MAX_ICEFRONT_GRIDS]; 41 42 double icefront_h[MAX_ICEFRONT_GRIDS]; 42 43 double icefront_b[MAX_ICEFRONT_GRIDS]; … … 115 116 icefront_mparid=iomodel->numberofelements+1; //matlab indexing 116 117 icefront_sid=i+1; //matlab indexing 117 icefront_eid=(int)*(iomodel->pressureload+segment_width*i+segment_width-2); //matlab indexing 118 icefront_fill=(int)*(iomodel->pressureload+segment_width*i+segment_width-1); 119 icefront_eid=(int) *(iomodel->pressureload+segment_width*i+segment_width-2); //matlab indexing 118 120 icefront_element_type=element_type; 119 121 … … 150 152 } 151 153 152 icefront = new Icefront(icefront_type,icefront_ sid,icefront_mparid,icefront_eid,icefront_element_type,icefront_node_ids,icefront_h,icefront_b);154 icefront = new Icefront(icefront_type,icefront_fill,icefront_sid,icefront_mparid,icefront_eid,icefront_element_type,icefront_node_ids,icefront_h,icefront_b); 153 155 154 156 loads->AddObject(icefront); -
issm/trunk/src/c/ModelProcessorx/DiagnosticStokes/CreateLoadsDiagnosticStokes.cpp
r3098 r3105 33 33 /*icefront intermediary data: */ 34 34 char icefront_type[ICEFRONTSTRING]; 35 int icefront_element_type; 36 int icefront_sid; 35 int icefront_fill; 36 int icefront_element_type; 37 int icefront_sid; 37 38 int icefront_eid; 38 39 int icefront_mparid; … … 92 93 icefront_mparid=iomodel->numberofelements+1; //matlab indexing 93 94 icefront_sid=count+1; //matlab indexing 94 icefront_eid=(int)*(iomodel->pressureload+segment_width*i+segment_width-2); //matlab indexing 95 icefront_fill=(int)*(iomodel->pressureload+segment_width*i+segment_width-1); 96 icefront_eid=(int) *(iomodel->pressureload+segment_width*i+segment_width-2); //matlab indexing 95 97 icefront_element_type=PentaEnum(); 96 98 … … 115 117 icefront_b[3]=iomodel->bed[i4-1]; 116 118 117 icefront = new Icefront(icefront_type,icefront_ sid,icefront_mparid,icefront_eid,icefront_element_type,icefront_node_ids,icefront_h,icefront_b);119 icefront = new Icefront(icefront_type,icefront_fill,icefront_sid,icefront_mparid,icefront_eid,icefront_element_type,icefront_node_ids,icefront_h,icefront_b); 118 120 119 121 loads->AddObject(icefront); -
issm/trunk/src/c/objects/Icefront.cpp
r2907 r3105 26 26 /*}}}*/ 27 27 /*FUNCTION Icefront creation {{{1*/ 28 Icefront::Icefront(char icefront_type[ICEFRONTSTRING],int icefront_ sid, int icefront_mparid, int icefront_eid, int icefront_element_type,28 Icefront::Icefront(char icefront_type[ICEFRONTSTRING],int icefront_fill,int icefront_sid, int icefront_mparid, int icefront_eid, int icefront_element_type, 29 29 int icefront_node_ids[MAX_ICEFRONT_GRIDS],double icefront_h[MAX_ICEFRONT_GRIDS],double icefront_b[MAX_ICEFRONT_GRIDS]){ 30 30 … … 32 32 33 33 strcpy(type,icefront_type); 34 fill=icefront_fill; 34 35 sid=icefront_sid; 35 36 … … 75 76 76 77 memcpy(&type,marshalled_dataset,sizeof(type));marshalled_dataset+=sizeof(type); 78 memcpy(&fill,marshalled_dataset,sizeof(fill));marshalled_dataset+=sizeof(fill); 77 79 memcpy(&sid,marshalled_dataset,sizeof(sid));marshalled_dataset+=sizeof(sid); 78 80 … … 116 118 /*marshall Icefront data: */ 117 119 memcpy(marshalled_dataset,&type,sizeof(type));marshalled_dataset+=sizeof(type); 120 memcpy(marshalled_dataset,&fill,sizeof(fill));marshalled_dataset+=sizeof(fill); 118 121 memcpy(marshalled_dataset,&sid,sizeof(sid));marshalled_dataset+=sizeof(sid); 119 122 … … 139 142 140 143 return sizeof(type)+ 144 sizeof(fill)+ 141 145 sizeof(sid)+ 142 146 sizeof(mparid)+ … … 251 255 } 252 256 /*}}}*/ 253 /*FUNCTION Icefront CreatePVectorDiagnosticHorizS tokes{{{1*/257 /*FUNCTION Icefront CreatePVectorDiagnosticHorizSegment{{{1*/ 254 258 #undef __FUNCT__ 255 259 #define __FUNCT__ "Icefront::CreatePVectorDiagnosticHorizSegment" … … 277 281 double normal[2]; 278 282 double length; 279 int fill;280 283 281 284 /*Objects: */ … … 287 290 inputs=(ParameterInputs*)vinputs; 288 291 289 /*Recover material and fill parameters:*/292 /*Recover material */ 290 293 matpar=(Matpar*)element->GetMatPar(); 291 if (element->GetShelf())fill=WaterEnum();292 else fill=AirEnum();293 294 294 295 //check that the element is onbed (collapsed formulation) otherwise:pe=0 … … 380 381 int doflist[numdofs]; 381 382 382 int fill;383 383 double xyz_list[numgrids][3]; 384 384 double xyz_list_quad[numgrids+1][3]; //center node … … 416 416 throw ErrorException(__FUNCT__," quad icefront is associated to a TriaElem!"); 417 417 } 418 /*Recover material and fill parameters:*/418 /*Recover material*/ 419 419 matpar=(Matpar*)element->GetMatPar(); 420 if (element->GetShelf())fill=WaterEnum();421 else fill=AirEnum();422 420 423 421 /* Set pe_g to 0: */ … … 543 541 int doflist[numdofs]; 544 542 545 int fill;546 543 double xyz_list[numgrids][3]; 547 544 double xyz_list_quad[numgrids+1][3]; //center node … … 579 576 throw ErrorException(__FUNCT__," quad icefront is associated to a TriaElem!"); 580 577 } 581 /*Recover material and fill parameters:*/578 /*Recover material*/ 582 579 matpar=(Matpar*)element->GetMatPar(); 583 if (element->GetShelf())fill=WaterEnum();584 else fill=AirEnum();585 580 586 581 /* Set pe_g to 0: */ … … 699 694 printf("Icefront:\n"); 700 695 printf(" type: %s\n",type); 696 printf(" fill: %i\n",fill); 701 697 printf(" sid: %i\n",sid); 702 698 … … 743 739 printf("Icefront:\n"); 744 740 printf(" type: %s\n",type); 741 printf(" fill: %i\n",fill); 745 742 printf(" sid: %i\n",sid); 746 743 … … 1415 1412 } 1416 1413 else{ 1417 throw ErrorException(__FUNCT__, " fill type not supported yet");1414 throw ErrorException(__FUNCT__,exprintf("fill type %i not supported yet",fill)); 1418 1415 } 1419 1416 -
issm/trunk/src/c/objects/Icefront.h
r803 r3105 19 19 private: 20 20 char type[ICEFRONTSTRING]; 21 int sid; 21 int fill; 22 int sid; 22 23 23 24 /*material: */ … … 44 45 45 46 Icefront(); 46 Icefront(char type[ICEFRONTSTRING],int sid, int mparid, int eid, int element_type, int node_ids[MAX_ICEFRONT_GRIDS],double h[MAX_ICEFRONT_GRIDS],double b[MAX_ICEFRONT_GRIDS]);47 Icefront(char type[ICEFRONTSTRING],int fill,int sid, int mparid, int eid, int element_type, int node_ids[MAX_ICEFRONT_GRIDS],double h[MAX_ICEFRONT_GRIDS],double b[MAX_ICEFRONT_GRIDS]); 47 48 ~Icefront(); 48 49
Note:
See TracChangeset
for help on using the changeset viewer.