Changeset 3489
- Timestamp:
- 04/09/10 08:56:57 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Penta.cpp
r3454 r3489 57 57 58 58 int j; 59 int offset;60 59 int penta_node_ids[6]; 61 60 int penta_matice_id; 62 61 int penta_matpar_id; 63 62 int penta_numpar_id; 64 double penta_h[6];65 double penta_s[6];66 double penta_b[6];67 double penta_k[6];68 double penta_melting[6];69 double penta_accumulation[6];70 int penta_friction_type;71 double penta_p,penta_q;72 int penta_shelf;73 bool penta_onwater;74 int penta_onsurface;75 int penta_onbed;76 int penta_collapse;77 63 78 64 /*id: */ … … 91 77 this->hmatpar.Init(&penta_matpar_id,1); 92 78 this->hnumpar.Init(&penta_numpar_id,1); 93 94 /*properties: */ 95 for(j=0;j<6;j++){ 96 97 offset=(int)*(iomodel->elements+6*i+j)-1; //get index of this vertex, in C numbering. 98 penta_h[j]= *(iomodel->thickness+offset); 99 penta_s[j]= *(iomodel->surface+offset); 100 penta_b[j]=*(iomodel->bed+offset); 101 penta_k[j]=*(iomodel->drag+offset); 102 penta_melting[j]=*(iomodel->melting+offset); 103 penta_accumulation[j]=*(iomodel->accumulation+offset); 104 } 105 penta_friction_type=(int)iomodel->drag_type; 106 penta_p=iomodel->p[i]; 107 penta_q=iomodel->q[i]; 108 penta_shelf=(int)*(iomodel->elementoniceshelf+i); 109 penta_onbed=(bool)*(iomodel->elementonbed+i); 110 penta_onsurface=(int)*(iomodel->elementonsurface+i); 111 penta_onwater=(bool)*(iomodel->elementonwater+i); 112 113 if (*(iomodel->elements_type+2*i+0)==MacAyealFormulationEnum()){ //elements of type 3 are macayeal type penta. we collapse the formulation on their base. 114 penta_collapse=1; 79 this->properties.Init(6,penta_node_ids,this->id,iomodel); 80 81 //elements of type 3 are macayeal type penta. we collapse the formulation on their base. 82 if (*(iomodel->elements_type+2*i+0)==MacAyealFormulationEnum()){ 83 this->properties.collapse=1; 115 84 } 116 85 else{ 117 penta_collapse=0; 118 } 119 120 this->properties.Init(6,penta_h, penta_s, penta_b, penta_k, penta_melting, penta_accumulation, NULL, penta_friction_type, penta_p, penta_q, penta_shelf, penta_onbed, penta_onwater, penta_onsurface, penta_collapse, UNDEF); 121 86 this->properties.collapse=0; 87 } 122 88 123 89 }
Note:
See TracChangeset
for help on using the changeset viewer.