Changeset 23499
- Timestamp:
- 11/30/18 20:53:27 (6 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/FemModel.cpp
r23495 r23499 4670 4670 for (int i=0;i<nodes->Size();i++){ 4671 4671 Node* node=xDynamicCast<Node*>(nodes->GetObjectByOffset(i)); 4672 if(node->InAnalysis(HydrologyDCEfficientAnalysisEnum)){ 4673 if(serial_active[node->Sid()]==1.){ 4674 node->Activate(); 4675 if(!node->IsClone()) counter++; 4676 } 4677 else{ 4678 node->Deactivate(); 4679 } 4672 _assert_(node->InAnalysis(HydrologyDCEfficientAnalysisEnum)); 4673 if(serial_active[node->Sid()]==1.){ 4674 node->Activate(); 4675 if(!node->IsClone()) counter++; 4676 } 4677 else{ 4678 node->Deactivate(); 4680 4679 } 4681 4680 } … … 4745 4744 for (int i=0;i<nodes->Size();i++){ 4746 4745 Node* node=xDynamicCast<Node*>(nodes->GetObjectByOffset(i)); 4747 if(node->InAnalysis(HydrologyDCInefficientAnalysisEnum)){ 4748 if(serial_active[node->Sid()]==1.){ 4749 node->Activate(); 4750 if(!node->IsClone()) counter++; 4751 } 4752 else{ 4753 node->Deactivate(); 4754 } 4746 _assert_(node->InAnalysis(HydrologyDCInefficientAnalysisEnum)); 4747 if(serial_active[node->Sid()]==1.){ 4748 node->Activate(); 4749 if(!node->IsClone()) counter++; 4750 } 4751 else{ 4752 node->Deactivate(); 4755 4753 } 4756 4754 } … … 4795 4793 for (int i=0;i<nodes->Size();i++){ 4796 4794 Node* node=xDynamicCast<Node*>(nodes->GetObjectByOffset(i)); 4797 if(node->InAnalysis(L2ProjectionEPLAnalysisEnum)){ 4798 if(serial_active[node->Sid()]==1.){ 4799 node->Activate(); 4800 if(!node->IsClone()) counter++; 4801 } 4802 else{ 4803 node->Deactivate(); 4804 } 4795 _assert_(node->InAnalysis(L2ProjectionEPLAnalysisEnum)); 4796 if(serial_active[node->Sid()]==1.){ 4797 node->Activate(); 4798 if(!node->IsClone()) counter++; 4799 } 4800 else{ 4801 node->Deactivate(); 4805 4802 } 4806 4803 } -
issm/trunk-jpl/src/c/classes/Nodes.cpp
r23173 r23499 52 52 53 53 /*Check that this node corresponds to our analysis currently being carried out: */ 54 if(node->InAnalysis(analysis_type)){ 55 node->DistributeDofs(&dofcount,setenum); 56 } 54 _assert_(node->InAnalysis(analysis_type)); 55 node->DistributeDofs(&dofcount,setenum); 57 56 } 58 57 … … 73 72 /*Check that this node corresponds to our analysis currently being carried out: */ 74 73 Node* node=xDynamicCast<Node*>(this->GetObjectByOffset(i)); 75 if (node->InAnalysis(analysis_type)){ 76 node->OffsetDofs(dofcount,setenum); 77 } 74 _assert_(node->InAnalysis(analysis_type)); 75 node->OffsetDofs(dofcount,setenum); 78 76 } 79 77 … … 90 88 for(i=0;i<this->Size();i++){ 91 89 Node* node=xDynamicCast<Node*>(this->GetObjectByOffset(i)); 92 if (node->InAnalysis(analysis_type)){ 93 node->ShowTrueDofs(truedofs,maxdofspernode,setenum);//give maxdofspernode, column size, so that nodes can index into truedofs 94 } 90 _assert_(node->InAnalysis(analysis_type)); 91 node->ShowTrueDofs(truedofs,maxdofspernode,setenum);//give maxdofspernode, column size, so that nodes can index into truedofs 95 92 } 96 93 … … 100 97 for(i=0;i<this->Size();i++){ 101 98 Node* node=xDynamicCast<Node*>(this->GetObjectByOffset(i)); 102 if (node->InAnalysis(analysis_type)){ 103 node->UpdateCloneDofs(alltruedofs,maxdofspernode,setenum); 104 } 99 _assert_(node->InAnalysis(analysis_type)); 100 node->UpdateCloneDofs(alltruedofs,maxdofspernode,setenum); 105 101 } 106 102 … … 108 104 for(i=0;i<this->Size();i++){ 109 105 Node* node=xDynamicCast<Node*>(this->GetObjectByOffset(i)); 110 if (node->InAnalysis(analysis_type)){ 111 node->ReindexingDone(); 112 } 106 _assert_(node->InAnalysis(analysis_type)); 107 node->ReindexingDone(); 113 108 } 114 109 … … 149 144 150 145 Node* node=xDynamicCast<Node*>(this->GetObjectByOffset(i)); 151 152 /*Check that this node corresponds to our analysis currently being carried out: */ 153 if (node->InAnalysis(analysis_type)){ 154 155 /*For this object, decide whether it is a clone: */ 156 node->SetClone(minranks); 157 } 146 _assert_(node->InAnalysis(analysis_type)); 147 148 /*For this object, decide whether it is a clone: */ 149 node->SetClone(minranks); 158 150 } 159 151 … … 203 195 204 196 Node* node=xDynamicCast<Node*>(this->GetObjectByOffset(i)); 205 206 /*Check that this node corresponds to our analysis currently being carried out: */ 207 if (node->InAnalysis(analysis_type)){ 208 209 numdofs=node->GetNumberOfDofs(NoneApproximationEnum,setenum); 210 if(numdofs>max)max=numdofs; 211 } 197 _assert_(node->InAnalysis(analysis_type)); 198 199 numdofs=node->GetNumberOfDofs(NoneApproximationEnum,setenum); 200 if(numdofs>max)max=numdofs; 212 201 } 213 202 … … 239 228 240 229 Node* node=xDynamicCast<Node*>(this->GetObjectByOffset(i)); 241 242 /*Check that this node corresponds to our analysis currently being carried out: */ 243 if (node->InAnalysis(analysis_type)){ 244 245 /*Ok, this object is a node, ask it to plug values into partition: */ 246 if (!node->IsClone()){ 247 numdofs+=node->GetNumberOfDofs(NoneApproximationEnum,setenum); 248 } 230 _assert_(node->InAnalysis(analysis_type)); 231 232 /*Ok, this object is a node, ask it to plug values into partition: */ 233 if (!node->IsClone()){ 234 numdofs+=node->GetNumberOfDofs(NoneApproximationEnum,setenum); 249 235 } 250 236 } … … 285 271 286 272 Node* node=xDynamicCast<Node*>(this->GetObjectByOffset(i)); 287 288 /*Check that this node corresponds to our analysis currently being carried out: */ 289 if (node->InAnalysis(analysis_type)){ 290 291 sid=node->Sid(); 292 if (sid>max_sid)max_sid=sid; 293 } 273 _assert_(node->InAnalysis(analysis_type)); 274 275 sid=node->Sid(); 276 if(sid>max_sid)max_sid=sid; 294 277 } 295 278 … … 317 300 318 301 Node* node=xDynamicCast<Node*>(this->GetObjectByOffset(i)); 319 320 /*Check that this node corresponds to our analysis currently being carried out: */ 321 if (node->InAnalysis(analysis_type)){ 322 /*Plug rank into ranks, according to sid: */ 323 sid=node->Sid(); 324 ranks[sid]=my_rank; 325 } 302 _assert_(node->InAnalysis(analysis_type)); 303 304 /*Plug rank into ranks, according to sid: */ 305 sid=node->Sid(); 306 ranks[sid]=my_rank; 326 307 } 327 308 } … … 336 317 337 318 Node* node=xDynamicCast<Node*>(this->GetObjectByOffset(i)); 338 339 /*Check that this node corresponds to our analysis currently being carried out: */ 340 if(node->InAnalysis(analysis_type)){ 341 if(node->RequiresDofReindexing()){ 342 flag = 1; 343 break; 344 } 319 _assert_(node->InAnalysis(analysis_type)); 320 321 if(node->RequiresDofReindexing()){ 322 flag = 1; 323 break; 345 324 } 346 325 } -
issm/trunk-jpl/src/c/modules/AllocateSystemMatricesx/AllocateSystemMatricesx.cpp
r23490 r23499 191 191 for(i=0;i<femmodel->nodes->Size();i++){ 192 192 Node* node=xDynamicCast<Node*>(femmodel->nodes->GetObjectByOffset(i)); 193 if(node->InAnalysis(configuration_type)){ 194 195 /*Reinitialize flags to false*/ 196 j=0; 197 while(j<localnumnodes){ 198 if(flagsindices[j]>=0){ 199 flags[flagsindices[j]] = false; 200 flagsindices[j] = -1; 201 j++; 202 } 203 else{ 204 break; 205 } 206 } 207 208 //for(j=0;j<localnumnodes;j++) flags[j]=false; 209 210 /*Loop over elements that hold node number i*/ 211 //if(head_e[node->Lid()]==-1 && head_l[node->Lid()]==-1){ 212 // printf("[%i] vertex %i\n",IssmComm::GetRank(),node->Lid()+1); 213 //} 214 for(j=head_e[node->Lid()];j!=-1;j=next_e[j]){ 215 offset=count2offset_e[j]; 216 element=xDynamicCast<Element*>(femmodel->elements->GetObjectByOffset(offset)); 217 element->SetwiseNodeConnectivity(&d_nz,&o_nz,node,flags,flagsindices,set1enum,set2enum); 218 if(node->IsClone()){ 219 connectivity_clone[node->Sid()]+=d_nz+o_nz; 220 } 221 else{ 222 d_connectivity[node->Sid()]+=d_nz; 223 o_connectivity[node->Sid()]+=o_nz; 224 } 225 } 226 for(j=head_l[node->Lid()];j!=-1;j=next_l[j]){ 227 offset=count2offset_l[j]; 228 load=xDynamicCast<Load*>(femmodel->loads->GetObjectByOffset(offset)); 229 load->SetwiseNodeConnectivity(&d_nz,&o_nz,node,flags,flagsindices,set1enum,set2enum); 230 if(node->IsClone()){ 231 connectivity_clone[node->Sid()]+=d_nz+o_nz; 232 } 233 else{ 234 d_connectivity[node->Sid()]+=d_nz; 235 o_connectivity[node->Sid()]+=o_nz; 236 } 193 _assert_(node->InAnalysis(configuration_type)); 194 195 /*Reinitialize flags to false*/ 196 j=0; 197 while(j<localnumnodes){ 198 if(flagsindices[j]>=0){ 199 flags[flagsindices[j]] = false; 200 flagsindices[j] = -1; 201 j++; 202 } 203 else{ 204 break; 205 } 206 } 207 208 //for(j=0;j<localnumnodes;j++) flags[j]=false; 209 210 /*Loop over elements that hold node number i*/ 211 //if(head_e[node->Lid()]==-1 && head_l[node->Lid()]==-1){ 212 // printf("[%i] vertex %i\n",IssmComm::GetRank(),node->Lid()+1); 213 //} 214 for(j=head_e[node->Lid()];j!=-1;j=next_e[j]){ 215 offset=count2offset_e[j]; 216 element=xDynamicCast<Element*>(femmodel->elements->GetObjectByOffset(offset)); 217 element->SetwiseNodeConnectivity(&d_nz,&o_nz,node,flags,flagsindices,set1enum,set2enum); 218 if(node->IsClone()){ 219 connectivity_clone[node->Sid()]+=d_nz+o_nz; 220 } 221 else{ 222 d_connectivity[node->Sid()]+=d_nz; 223 o_connectivity[node->Sid()]+=o_nz; 224 } 225 } 226 for(j=head_l[node->Lid()];j!=-1;j=next_l[j]){ 227 offset=count2offset_l[j]; 228 load=xDynamicCast<Load*>(femmodel->loads->GetObjectByOffset(offset)); 229 load->SetwiseNodeConnectivity(&d_nz,&o_nz,node,flags,flagsindices,set1enum,set2enum); 230 if(node->IsClone()){ 231 connectivity_clone[node->Sid()]+=d_nz+o_nz; 232 } 233 else{ 234 d_connectivity[node->Sid()]+=d_nz; 235 o_connectivity[node->Sid()]+=o_nz; 237 236 } 238 237 } … … 257 256 for(i=0;i<femmodel->nodes->Size();i++){ 258 257 Node* node=xDynamicCast<Node*>(femmodel->nodes->GetObjectByOffset(i)); 259 if(node->InAnalysis(configuration_type) && !node->IsClone()){ 258 if(!node->IsClone()){ 259 _assert_(node->InAnalysis(configuration_type)); 260 260 for(j=0;j<node->indexing.fsize;j++){ 261 261 _assert_(count<m); -
issm/trunk-jpl/src/c/modules/CreateNodalConstraintsx/CreateNodalConstraintsx.cpp
r15104 r23499 33 33 for(int i=0;i<nodes->Size();i++){ 34 34 Node* node=(Node*)nodes->GetObjectByOffset(i); 35 if (node->InAnalysis(configuration_type)){ 36 node->CreateNodalConstraints(ys); 37 } 35 _assert_(node->InAnalysis(configuration_type)); 36 node->CreateNodalConstraints(ys); 38 37 } 39 38 -
issm/trunk-jpl/src/c/modules/Reducevectorgtofx/Reducevectorgtofx.cpp
r15104 r23499 44 44 /*Go through all nodes, and ask them to retrieve values from ug, and plug them into uf: */ 45 45 for(int i=0;i<nodes->Size();i++){ 46 Node* node=(Node*)nodes->GetObjectByOffset(i); 47 _assert_(node->InAnalysis(configuration_type)); 46 48 47 Node* node=(Node*)nodes->GetObjectByOffset(i); 48 49 /*Check that this node corresponds to our analysis currently being carried out: */ 50 if (node->InAnalysis(configuration_type)){ 51 52 /*For this object, reduce values for enum set Fset: */ 53 node->VecReduce(uf,ug_serial,FsetEnum); 54 } 49 /*For this object, reduce values for enum set Fset: */ 50 node->VecReduce(uf,ug_serial,FsetEnum); 55 51 } 56 52 } -
issm/trunk-jpl/src/c/modules/VecMergex/VecMergex.cpp
r14999 r23499 27 27 28 28 Node* node=(Node*)nodes->GetObjectByOffset(i); 29 _assert_(node->InAnalysis(configuration_type)); 29 30 30 /*Check that this node corresponds to our configuration currently being carried out: */ 31 if (node->InAnalysis(configuration_type)){ 32 33 /*For this object, merge values for enum set SetEnum: */ 34 node->VecMerge(ug,uf_serial,SetEnum); 35 } 31 /*For this object, merge values for enum set SetEnum: */ 32 node->VecMerge(ug,uf_serial,SetEnum); 36 33 } 37 34 }
Note:
See TracChangeset
for help on using the changeset viewer.