Changeset 15198
- Timestamp:
- 06/06/13 10:35:32 (12 years ago)
- Location:
- issm/trunk-jpl/src/c/classes
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/DofIndexing.cpp
r15104 r15198 27 27 this->ssize = UNDEF; 28 28 this->clone = false; 29 this->active = true; 29 30 this->f_set = NULL; 30 31 this->s_set = NULL; … … 47 48 DofIndexing::DofIndexing(DofIndexing* in){ //copy constructor 48 49 49 this->gsize = in->gsize; 50 this->fsize = in->fsize; 51 this->ssize = in->ssize; 52 this->clone = in->clone; 50 this->gsize = in->gsize; 51 this->fsize = in->fsize; 52 this->ssize = in->ssize; 53 this->clone = in->clone; 54 this->active = in->active; 53 55 54 56 if(this->gsize>0){ … … 158 160 } 159 161 /*}}}*/ 162 /*FUNCTION DofIndexing::Deactivate{{{*/ 163 void DofIndexing::Deactivate(void){ 164 this->active = false; 165 166 /*Constrain to 0. at this point*/ 167 for(int i=0;i<this->gsize;i++){ 168 this->f_set[i] = false; 169 this->s_set[i] = true; 170 this->svalues[i] = 0.; 171 } 172 return; 173 } 174 /*}}}*/ 160 175 161 176 /*Some of the Object functionality: */ … … 164 179 165 180 _printf_("DofIndexing:\n"); 166 _printf_(" gsize: " << gsize << "\n"); 167 _printf_(" clone: " << clone << "\n"); 181 _printf_(" gsize: " << gsize << "\n"); 182 _printf_(" clone: " << clone << "\n"); 183 _printf_(" active: " << active << "\n"); 168 184 } 169 185 /*}}}*/ … … 174 190 175 191 _printf_("DofIndexing:\n"); 176 _printf_(" gsize: " << gsize << "\n"); 177 _printf_(" fsize: " << fsize << "\n"); 178 _printf_(" ssize: " << ssize << "\n"); 179 _printf_(" clone: " << clone << "\n"); 192 _printf_(" gsize: " << gsize << "\n"); 193 _printf_(" fsize: " << fsize << "\n"); 194 _printf_(" ssize: " << ssize << "\n"); 195 _printf_(" clone: " << clone << "\n"); 196 _printf_(" active: " << active << "\n"); 180 197 181 198 _printf_(" set membership: f,s sets \n"); -
issm/trunk-jpl/src/c/classes/DofIndexing.h
r14915 r15198 4 4 5 5 #ifndef _DOFINDEXING_H_ 6 #define 6 #define _DOFINDEXING_H_ 7 7 8 8 #include "../shared/Numerics/types.h" … … 19 19 /*partitioning: */ 20 20 bool clone; //this node is replicated from another one 21 bool active; //Is this node active or inactive (all dofs are constrained) 21 22 22 23 /*boundary conditions sets: */ … … 48 49 /*DofIndexing management: {{{*/ 49 50 DofIndexing* Spawn(int* indices, int numindices); 51 void Deactivate(void); 50 52 /*}}}*/ 51 53 -
issm/trunk-jpl/src/c/classes/Node.cpp
r15104 r15198 68 68 if (!iomodel->Data(MaskVertexonwaterEnum)) _error_("iomodel->nodeonwater is NULL"); 69 69 if (reCast<bool>(iomodel->Data(MaskVertexonwaterEnum)[io_index])){ 70 for(k=1;k<=gsize;k++){ 71 this->FreezeDof(k); 72 } 70 this->Deactivate(); 73 71 } 74 72 … … 86 84 _assert_(iomodel->Data(FlowequationVertexEquationEnum)); 87 85 if (iomodel->Data(FlowequationVertexEquationEnum)[io_index]==MacAyealApproximationEnum && !reCast<int>(iomodel->Data(MeshVertexonbedEnum)[io_index])){ 88 for(k=1;k<=gsize;k++) this->FreezeDof(k);86 this->Deactivate(); 89 87 } 90 88 if (iomodel->Data(FlowequationVertexEquationEnum)[io_index]==L1L2ApproximationEnum && !reCast<int>(iomodel->Data(MeshVertexonbedEnum)[io_index])){ 91 for(k=1;k<=gsize;k++) this->FreezeDof(k);89 this->Deactivate(); 92 90 } 93 91 if (iomodel->Data(FlowequationVertexEquationEnum)[io_index]==MacAyealPattynApproximationEnum && reCast<int>(iomodel->Data(FlowequationBordermacayealEnum)[io_index])){ 94 92 if(!reCast<int>(iomodel->Data(MeshVertexonbedEnum)[io_index])){ 95 for(k=1;k<=gsize;k++) this->FreezeDof(k);93 this->Deactivate(); 96 94 } 97 95 } … … 104 102 /*spc all nodes on hutter*/ 105 103 if (iomodel->Data(FlowequationVertexEquationEnum)[io_index]==HutterApproximationEnum){ 106 for(k=1;k<=gsize;k++){ 107 this->FreezeDof(k); 108 } 104 this->Deactivate(); 109 105 } 110 106 } … … 116 112 /*Constrain all nodes that are not Hutter*/ 117 113 if (reCast<int>(iomodel->Data(FlowequationVertexEquationEnum)[io_index])!=HutterApproximationEnum){ 118 for(k=1;k<=gsize;k++){ 119 this->FreezeDof(k); 120 } 114 this->Deactivate(); 121 115 } 122 116 } … … 134 128 _assert_(iomodel->Data(MeshVertexonbedEnum)); 135 129 if (!(reCast<bool>(iomodel->Data(MeshVertexonbedEnum)[io_index]))){ 136 for(k=1;k<=gsize;k++){ 137 this->FreezeDof(k); 138 } 130 this->Deactivate(); 139 131 } 140 132 } … … 497 489 498 490 DofInSSet(dof-1); //with 0 displacement for this dof. 491 492 } 493 /*}}}*/ 494 /*FUNCTION Node::Deactivate{{{*/ 495 void Node::Deactivate(void){ 496 497 indexing.Deactivate(); 499 498 500 499 } -
issm/trunk-jpl/src/c/classes/Node.h
r15067 r15198 87 87 void GetLocalDofList(int* poutdoflist,int approximation_enum,int setenum); 88 88 void FreezeDof(int dof); 89 void Deactivate(void); 89 90 int IsFloating(); 90 91 int IsGrounded();
Note:
See TracChangeset
for help on using the changeset viewer.