Changeset 12574
- Timestamp:
- 06/27/12 15:27:39 (13 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified issm/trunk-jpl/src/c/modules/ModelProcessorx/NodesPartitioning.cpp ¶
r12571 r12574 69 69 bool* my_nodes=NULL; 70 70 71 int 72 int 73 IssmDoublee1,e2;74 int 75 int 76 IssmDouble* edges=NULL;77 IssmDouble* elements=NULL;71 int i1,i2; 72 int cols; 73 int e1,e2; 74 int pos; 75 int numberofedges; 76 int *edges = NULL; 77 int *elements = NULL; 78 78 79 79 /*Fetch parameters: */ … … 125 125 * we must clone the nodes on this partition so that the loads (Numericalflux) 126 126 * will have access to their properties (dofs,...)*/ 127 if(my_elements[ reCast<int>(e1)] && !xIsNan<IssmDouble>(e2) && !my_elements[reCast<int>(e2)]){127 if(my_elements[e1] && e2!=-2 && !my_elements[e2]){ 128 128 129 129 /*1: Get vertices ids*/ 130 i1= reCast<int>(edges[4*i+0]);131 i2= reCast<int>(edges[4*i+1]);130 i1=edges[4*i+0]; 131 i2=edges[4*i+1]; 132 132 133 133 /*2: Get the column where these ids are located in the index*/ 134 134 pos=UNDEF; 135 135 for(j=0;j<3;j++){ 136 if ( reCast<int>(elements[3*(reCast<int>(e2))+j])==i1) pos=j;136 if (elements[3*e2+j]==i1) pos=j; 137 137 } 138 138 … … 140 140 * we can now create the corresponding nodes:*/ 141 141 if (pos==0){ 142 my_nodes[ reCast<int>(e2)*3+0]=true;143 my_nodes[ reCast<int>(e2)*3+2]=true;142 my_nodes[e2*3+0]=true; 143 my_nodes[e2*3+2]=true; 144 144 } 145 145 else if(pos==1){ 146 my_nodes[ reCast<int>(e2)*3+1]=true;147 my_nodes[ reCast<int>(e2)*3+0]=true;146 my_nodes[e2*3+1]=true; 147 my_nodes[e2*3+0]=true; 148 148 } 149 149 else if (pos==2){ 150 my_nodes[ reCast<int>(e2)*3+2]=true;151 my_nodes[ reCast<int>(e2)*3+1]=true;150 my_nodes[e2*3+2]=true; 151 my_nodes[e2*3+1]=true; 152 152 } 153 153 else{ … … 158 158 159 159 /*Free data: */ 160 xDelete< IssmDouble>(elements);161 xDelete< IssmDouble>(edges);160 xDelete<int>(elements); 161 xDelete<int>(edges); 162 162 163 163 /*Assign output pointers:*/ -
TabularUnified issm/trunk-jpl/src/c/objects/Bamg/Mesh.cpp ¶
r12520 r12574 618 618 double* elemedge=NULL; 619 619 elemedge=xNew<double>(3*nbt); 620 for (i=0;i<3*nbt;i++) elemedge[i]= NAN;620 for (i=0;i<3*nbt;i++) elemedge[i]=-2.;//will become -1 621 621 k=0; 622 622 for (i=0;i<nbt;i++){ -
TabularUnified issm/trunk-jpl/src/c/objects/IoModel.cpp ¶
r12552 r12574 474 474 extern int my_rank; 475 475 extern int num_procs; 476 477 476 478 477 /*output: */ … … 496 495 /*Assign output pointers: */ 497 496 *pinteger=integer; 498 499 497 } 500 498 /*}}}*/ -
TabularUnified issm/trunk-jpl/src/c/objects/Loads/Numericalflux.cpp ¶
r12557 r12574 59 59 numericalflux_mparid=numberofelements+1; //matlab indexing 60 60 61 /*First, see wether this is an internal or boundary edge (if e2= NaN)*/62 if ( xIsNan<IssmDouble>((IssmDouble)iomodel->Data(MeshEdgesEnum)[4*i+3])){ //edges are [node1 node2 elem1 elem2]61 /*First, see wether this is an internal or boundary edge (if e2=-1)*/ 62 if (iomodel->Data(MeshEdgesEnum)[4*i+3]==-1.){ //edges are [node1 node2 elem1 elem2] 63 63 /* Boundary edge, only one element */ 64 64 e1=reCast<int>(iomodel->Data(MeshEdgesEnum)[4*i+2]); … … 67 67 num_nodes=2; 68 68 numericalflux_type=BoundaryEnum; 69 numericalflux_elem_ids[0]= reCast<int>(e1);69 numericalflux_elem_ids[0]=e1; 70 70 } 71 71 else{ … … 76 76 num_nodes=4; 77 77 numericalflux_type=InternalEnum; 78 numericalflux_elem_ids[0]= reCast<int>(e1);79 numericalflux_elem_ids[1]= reCast<int>(e2);78 numericalflux_elem_ids[0]=e1; 79 numericalflux_elem_ids[1]=e2; 80 80 } 81 81
Note:
See TracChangeset
for help on using the changeset viewer.