Changeset 4983 for issm/trunk/src/c/objects/Elements/Penta.cpp
- Timestamp:
- 08/04/10 13:17:11 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Elements/Penta.cpp
r4978 r4983 5632 5632 } 5633 5633 /*}}}*/ 5634 /*FUNCTION Penta::VecExtrude {{{1*/5635 void Penta::VecExtrude(Vec vector,double* vector_serial,int iscollapsed){5636 5637 /* node data: */5638 int i;5639 Node* node=NULL;5640 int extrude=0;5641 5642 /*inputs: */5643 bool collapse;5644 bool onbed;5645 5646 /*retrieve inputs :*/5647 inputs->GetParameterValue(&collapse,CollapseEnum);5648 inputs->GetParameterValue(&onbed,ElementOnBedEnum);5649 5650 /*Figure out if we should extrude for this element: */5651 if (iscollapsed){5652 /*From higher level, we are told to extrude only elements that have the collapse flag on: */5653 if (collapse)extrude=1;5654 else extrude=0;5655 }5656 else{5657 /*From higher level, we are told to extrude all elements: */5658 extrude=1;5659 }5660 5661 /*Now, extrusion starts from the bed on, so double check this element is on5662 * the bedrock: */5663 if(onbed==0)extrude=0;5664 5665 /*Go on and extrude vector: */5666 if (extrude){5667 5668 /* node data: */5669 int dof1;5670 double vectorel;5671 5672 /*this penta is a collapsed macayeal. For each node on the base of this penta,5673 * we grab the vector. Once we know the vector, we follow the upper nodes,5674 * inserting the same vector value into vector, until we reach the surface: */5675 for(i=0;i<3;i++){5676 5677 node=nodes[i]; //base nodes5678 dof1=node->GetDofList1();5679 5680 /*get vector for this base node: */5681 vectorel=vector_serial[dof1];5682 5683 //go throvectorn all nodes which sit on top of this node, until we reach the surface,5684 //and plvector vector in vector5685 for(;;){5686 5687 dof1=node->GetDofList1();5688 VecSetValues(vector,1,&dof1,&vectorel,INSERT_VALUES);5689 5690 if (node->IsOnSurface())break;5691 /*get next node: */5692 node=node->GetUpperNode();5693 }5694 }5695 }5696 }5697 /*}}}*/
Note:
See TracChangeset
for help on using the changeset viewer.