Changeset 4343
- Timestamp:
- 06/30/10 11:39:55 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Elements/Penta.cpp
r4328 r4343 4232 4232 Input* original_input=NULL; 4233 4233 4234 /*Extrude the original input: */4235 original_input=(Input*)this->inputs->GetInput(enum_type);4236 original_input->Extrude();4237 4238 4234 /*recover parameters: */ 4239 4235 inputs->GetParameterValue(&onbed,ElementOnBedEnum); … … 4243 4239 if(onbed==1 & onsurface==0){ 4244 4240 4245 /*this element is on the bed. We are going to, follow the upper element until we reach the surface. At each upper element, 4246 * we'll add the input of the lower element*/ 4247 4248 penta=this; 4241 /*OK, we are on bed. we will follow the steps: 4242 * 1: find input and extrude it. 4243 * 2: follow the upper element until we reach the surface 4244 * 3: for each element, we will add a copy of the extruded input*/ 4245 4246 /*Step1: Extrude the original input: */ 4249 4247 original_input=(Input*)this->inputs->GetInput(enum_type); 4250 4248 if(!original_input) ISSMERROR("%s%s"," could not find input with enum:",EnumAsString(enum_type)); 4251 4249 original_input->Extrude(); 4250 4251 /*Step 2: this input has been extruded for this element, now follow the upper element*/ 4252 penta=this; 4252 4253 for(;;){ 4253 4254 4254 4255 /* get upper Penta*/ 4255 4256 penta=penta->GetUpperElement(); 4256 4257 /*Add input of the basal element*/ 4257 ISSMASSERT(penta->Id()!=this->id); 4258 4259 /*Add input of the basal element to penta->inputs*/ 4258 4260 Input* copy=NULL; 4259 4261 copy=(Input*)original_input->copy(); 4260 inputs->AddObject((Input*)copy); 4261 4262 penta->inputs->AddInput((Input*)copy); 4262 4263 4263 4264 /*Stop if we have reached the surface*/ 4264 4265 if (penta->IsOnSurface()) break; 4265 ISSMASSERT(penta->Id()!=this->id);4266 4266 4267 4267 }
Note:
See TracChangeset
for help on using the changeset viewer.