Changeset 16232
- Timestamp:
- 09/23/13 10:34:20 (11 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/bamg/AdjacentTriangle.cpp
r13622 r16232 44 44 } 45 45 /*}}}*/ 46 /*FUNCTION AdjacentTriangle::OppositeVertex {{{*/47 BamgVertex* AdjacentTriangle::OppositeVertex() const {48 return t->vertices[bamg::OppositeVertex[a]];49 }50 /*}}}*/51 46 /*FUNCTION AdjacentTriangle::det {{{*/ 52 47 Icoor2 & AdjacentTriangle::det() const { -
issm/trunk-jpl/src/c/bamg/AdjacentTriangle.h
r15066 r16232 38 38 AdjacentTriangle Adj() const; 39 39 BamgVertex* EdgeVertex(const int & i) const; 40 BamgVertex* OppositeVertex() const;41 40 Icoor2& det() const; 42 41 }; -
issm/trunk-jpl/src/c/classes/Loads/Riftfront.cpp
r16231 r16232 733 733 } 734 734 /*}}}*/ 735 /*FUNCTION Riftfront::MaxPenetration {{{*/736 int Riftfront::MaxPenetration(IssmDouble* ppenetration){737 738 IssmDouble penetration;739 IssmDouble vx1;740 IssmDouble vy1;741 IssmDouble vx2;742 IssmDouble vy2;743 744 /*Objects: */745 Tria *tria1 = NULL;746 Tria *tria2 = NULL;747 748 /*enum of element? */749 if(elements[0]->ObjectEnum()!=TriaEnum)_error_("only Tria element allowed for Riftfront load!");750 751 /*recover elements on both side of rift: */752 tria1=(Tria*)elements[0];753 tria2=(Tria*)elements[1];754 755 /*recover velocity: */756 tria1->GetInputValue(&vx1,nodes[0],VxEnum);757 tria2->GetInputValue(&vx2,nodes[1],VxEnum);758 tria1->GetInputValue(&vy1,nodes[0],VyEnum);759 tria2->GetInputValue(&vy2,nodes[1],VyEnum);760 761 /*Node1 faces node2, compute penetration of 2 into 1 (V2-V1).N (with N normal vector, and V velocity vector: */762 penetration=(vx2-vx1)*normal[0]+(vy2-vy1)*normal[1];763 764 /*Now, we return penetration only if we are active!: */765 if(this->active==0) penetration=-1.;766 767 /*If we are zigzag locked, same thing: */768 if(this->counter>this->penalty_lock) penetration=-1.;769 770 /*assign output pointer: */771 *ppenetration=penetration;772 return 1;773 }774 /*}}}*/775 /*FUNCTION Riftfront::Penetration {{{*/776 int Riftfront::Penetration(IssmDouble* ppenetration){777 778 IssmDouble vx1;779 IssmDouble vy1;780 IssmDouble vx2;781 IssmDouble vy2;782 783 IssmDouble penetration;784 785 /*Objects: */786 Tria *tria1 = NULL;787 Tria *tria2 = NULL;788 789 /*enum of element? */790 if(elements[0]->ObjectEnum()!=TriaEnum)_error_("only Tria element allowed for Riftfront load!");791 792 /*recover elements on both side of rift: */793 tria1=(Tria*)elements[0];794 tria2=(Tria*)elements[1];795 796 /*First recover velocity: */797 tria1->GetInputValue(&vx1,nodes[0],VxEnum);798 tria2->GetInputValue(&vx2,nodes[1],VxEnum);799 tria1->GetInputValue(&vy1,nodes[0],VyEnum);800 tria2->GetInputValue(&vy2,nodes[1],VyEnum);801 802 /*Node 1 faces node 2, compute penetration of 2 into 1 (V2-V1).N (with N normal vector, and V velocity vector: */803 penetration=(vx2-vx1)*normal[0]+(vy2-vy1)*normal[1];804 805 /*Now, we return penetration only if we are active!: */806 if(this->active==0)penetration=0;807 808 /*assign output pointer: */809 *ppenetration=penetration;810 return 1;811 }812 /*}}}*/813 735 /*FUNCTION Riftfront::PotentialUnstableConstraint {{{*/ 814 736 int Riftfront::PotentialUnstableConstraint(int* punstable){ -
issm/trunk-jpl/src/c/classes/Loads/Riftfront.h
r16231 r16232 93 93 void FreezeConstraints(void); 94 94 bool IsFrozen(void); 95 int Penetration(IssmDouble* ppenetration);96 int MaxPenetration(IssmDouble* ppenetration);97 95 int PotentialUnstableConstraint(int* punstable); 98 96 bool IsInput(int name);
Note:
See TracChangeset
for help on using the changeset viewer.