Changeset 5136
- Timestamp:
- 08/10/10 16:34:40 (15 years ago)
- Location:
- issm/trunk/src/c/objects/Loads
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Loads/Icefront.cpp
r5125 r5136 30 30 /*}}}*/ 31 31 /*FUNCTION Icefront::Icefront(int id, int i, IoModel* iomodel,int analysis_type) {{{1*/ 32 Icefront::Icefront(int icefront_id,int i, IoModel* iomodel,int in_ analysis_type){32 Icefront::Icefront(int icefront_id,int i, IoModel* iomodel,int in_icefront_type, int in_analysis_type){ 33 33 34 34 int segment_width; … … 41 41 int icefront_node_ids[MAX_ICEFRONT_GRIDS]; 42 42 int icefront_fill; 43 int icefront_type;44 43 45 44 /*First, retrieve element index and element type: */ … … 56 55 icefront_mparid=iomodel->numberofelements+1; //matlab indexing 57 56 58 icefront_node_ids[0]=iomodel->nodecounter+(int)*(iomodel->pressureload+segment_width*i+0); 59 icefront_node_ids[1]=iomodel->nodecounter+(int)*(iomodel->pressureload+segment_width*i+1); 60 61 if (in_analysis_type==DiagnosticHorizAnalysisEnum){ 62 if ((int)*(iomodel->elements_type+2*element+0)==MacAyealApproximationEnum){ //this is a collapsed 3d element, icefront will be 2d 63 icefront_type=SegmentIcefrontEnum; 64 } 65 else if ((int)*(iomodel->elements_type+2*element+0)==PattynApproximationEnum){ //this is a real 3d element, icefront will be 3d. 66 icefront_type=QuadIceFrontEnum; 67 icefront_node_ids[2]=iomodel->nodecounter+(int)*(iomodel->pressureload+segment_width*i+2); 68 icefront_node_ids[3]=iomodel->nodecounter+(int)*(iomodel->pressureload+segment_width*i+3); 69 } 70 else ISSMERROR(" element type %i not supported yet",(int)*(iomodel->elements_type+2*element+0)); 71 } 72 else if (in_analysis_type==DiagnosticStokesAnalysisEnum){ 73 //We have a Stokes element, so we need a 3d Icefront 74 icefront_type=QuadIceFrontEnum; 57 if (in_icefront_type==QuadIceFrontEnum){ 58 icefront_node_ids[0]=iomodel->nodecounter+(int)*(iomodel->pressureload+segment_width*i+0); 59 icefront_node_ids[1]=iomodel->nodecounter+(int)*(iomodel->pressureload+segment_width*i+1); 60 } 61 else if (in_icefront_type==QuadIceFrontEnum){ 62 icefront_node_ids[0]=iomodel->nodecounter+(int)*(iomodel->pressureload+segment_width*i+0); 63 icefront_node_ids[1]=iomodel->nodecounter+(int)*(iomodel->pressureload+segment_width*i+1); 75 64 icefront_node_ids[2]=iomodel->nodecounter+(int)*(iomodel->pressureload+segment_width*i+2); 76 65 icefront_node_ids[3]=iomodel->nodecounter+(int)*(iomodel->pressureload+segment_width*i+3); … … 78 67 else ISSMERROR("analysis_type %s not supported yet!",EnumToString(in_analysis_type)); 79 68 80 if (i cefront_type==QuadIceFrontEnum) num_nodes=4;69 if (in_icefront_type==QuadIceFrontEnum) num_nodes=4; 81 70 else num_nodes=2; 82 71 icefront_fill=(int)*(iomodel->pressureload+segment_width*i+segment_width-1); … … 94 83 this->inputs=new Inputs(); 95 84 this->inputs->AddInput(new IntInput(FillEnum,icefront_fill)); 96 this->inputs->AddInput(new IntInput(TypeEnum,i cefront_type));85 this->inputs->AddInput(new IntInput(TypeEnum,in_icefront_type)); 97 86 98 87 //this->parameters: we still can't point to it, it may not even exist. Configure will handle this. -
issm/trunk/src/c/objects/Loads/Icefront.h
r5096 r5136 35 35 /*Icefront constructors, destructors: {{{1*/ 36 36 Icefront(); 37 Icefront(int icefront_id,int i, IoModel* iomodel,int analysis_type);37 Icefront(int icefront_id,int i, IoModel* iomodel,int in_icefront_type, int analysis_type); 38 38 ~Icefront(); 39 39 /*}}}*/
Note:
See TracChangeset
for help on using the changeset viewer.