/[escript]/trunk/finley/src/Mesh_read.c
ViewVC logotype

Diff of /trunk/finley/src/Mesh_read.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2385 by gross, Wed Apr 15 03:52:38 2009 UTC revision 2511 by gross, Thu Jul 2 05:16:19 2009 UTC
# Line 352  Finley_Mesh* Finley_Mesh_read_MPI(char* Line 352  Finley_Mesh* Finley_Mesh_read_MPI(char*
352    
353      if (mpi_info->rank == 0) {  /* Master */      if (mpi_info->rank == 0) {  /* Master */
354        for (;;) {            /* Infinite loop */        for (;;) {            /* Infinite loop */
355                #pragma omp parallel for private (i0) schedule(static)
356          for (i0=0; i0<chunkSize*3+1; i0++) tempInts[i0] = -1;          for (i0=0; i0<chunkSize*3+1; i0++) tempInts[i0] = -1;
357                #pragma omp parallel for private (i0) schedule(static)
358          for (i0=0; i0<chunkSize*numDim; i0++) tempCoords[i0] = -1.0;          for (i0=0; i0<chunkSize*numDim; i0++) tempCoords[i0] = -1.0;
359          chunkNodes = 0;          chunkNodes = 0;
360          for (i1=0; i1<chunkSize; i1++) {          for (i1=0; i1<chunkSize; i1++) {
# Line 426  Finley_Mesh* Finley_Mesh_read_MPI(char* Line 428  Finley_Mesh* Finley_Mesh_read_MPI(char*
428      /* Copy node data from tempMem to mesh_p */      /* Copy node data from tempMem to mesh_p */
429          Finley_NodeFile_allocTable(mesh_p->Nodes, chunkNodes);          Finley_NodeFile_allocTable(mesh_p->Nodes, chunkNodes);
430          if (Finley_noError()) {          if (Finley_noError()) {
431              #pragma omp parallel for private (i0, i1) schedule(static)
432        for (i0=0; i0<chunkNodes; i0++) {        for (i0=0; i0<chunkNodes; i0++) {
433          mesh_p->Nodes->Id[i0]               = tempInts[0+i0];          mesh_p->Nodes->Id[i0]               = tempInts[0+i0];
434          mesh_p->Nodes->globalDegreesOfFreedom[i0]       = tempInts[chunkSize+i0];          mesh_p->Nodes->globalDegreesOfFreedom[i0]       = tempInts[chunkSize+i0];
# Line 479  Finley_Mesh* Finley_Mesh_read_MPI(char* Line 482  Finley_Mesh* Finley_Mesh_read_MPI(char*
482      /* Elements are specified as a list of integers...only need one message instead of two as with the nodes */      /* Elements are specified as a list of integers...only need one message instead of two as with the nodes */
483      if (mpi_info->rank == 0) {  /* Master */      if (mpi_info->rank == 0) {  /* Master */
484        for (;;) {            /* Infinite loop */        for (;;) {            /* Infinite loop */
485                #pragma omp parallel for private (i0) schedule(static)
486          for (i0=0; i0<chunkSize*(2+numNodes)+1; i0++) tempInts[i0] = -1;          for (i0=0; i0<chunkSize*(2+numNodes)+1; i0++) tempInts[i0] = -1;
487          chunkEle = 0;          chunkEle = 0;
488          for (i0=0; i0<chunkSize; i0++) {          for (i0=0; i0<chunkSize; i0++) {
# Line 530  Finley_Mesh* Finley_Mesh_read_MPI(char* Line 534  Finley_Mesh* Finley_Mesh_read_MPI(char*
534          mesh_p->Elements->minColor=0;          mesh_p->Elements->minColor=0;
535          mesh_p->Elements->maxColor=chunkEle-1;          mesh_p->Elements->maxColor=chunkEle-1;
536          if (Finley_noError()) {          if (Finley_noError()) {
537            #pragma omp parallel for private (i0, i1)            #pragma omp parallel for private (i0, i1) schedule(static)
538        for (i0=0; i0<chunkEle; i0++) {        for (i0=0; i0<chunkEle; i0++) {
539          mesh_p->Elements->Id[i0]    = tempInts[i0*(2+numNodes)+0];          mesh_p->Elements->Id[i0]    = tempInts[i0*(2+numNodes)+0];
540          mesh_p->Elements->Tag[i0]   = tempInts[i0*(2+numNodes)+1];          mesh_p->Elements->Tag[i0]   = tempInts[i0*(2+numNodes)+1];
# Line 585  Finley_Mesh* Finley_Mesh_read_MPI(char* Line 589  Finley_Mesh* Finley_Mesh_read_MPI(char*
589      /* Elements are specified as a list of integers...only need one message instead of two as with the nodes */      /* Elements are specified as a list of integers...only need one message instead of two as with the nodes */
590      if (mpi_info->rank == 0) {  /* Master */      if (mpi_info->rank == 0) {  /* Master */
591        for (;;) {            /* Infinite loop */        for (;;) {            /* Infinite loop */
592                #pragma omp parallel for private (i0) schedule(static)
593          for (i0=0; i0<chunkSize*(2+numNodes)+1; i0++) tempInts[i0] = -1;          for (i0=0; i0<chunkSize*(2+numNodes)+1; i0++) tempInts[i0] = -1;
594          chunkEle = 0;          chunkEle = 0;
595          for (i0=0; i0<chunkSize; i0++) {          for (i0=0; i0<chunkSize; i0++) {
# Line 691  Finley_Mesh* Finley_Mesh_read_MPI(char* Line 696  Finley_Mesh* Finley_Mesh_read_MPI(char*
696      /* Elements are specified as a list of integers...only need one message instead of two as with the nodes */      /* Elements are specified as a list of integers...only need one message instead of two as with the nodes */
697      if (mpi_info->rank == 0) {  /* Master */      if (mpi_info->rank == 0) {  /* Master */
698        for (;;) {            /* Infinite loop */        for (;;) {            /* Infinite loop */
699                #pragma omp parallel for private (i0) schedule(static)
700          for (i0=0; i0<chunkSize*(2+numNodes)+1; i0++) tempInts[i0] = -1;          for (i0=0; i0<chunkSize*(2+numNodes)+1; i0++) tempInts[i0] = -1;
701          chunkEle = 0;          chunkEle = 0;
702          for (i0=0; i0<chunkSize; i0++) {          for (i0=0; i0<chunkSize; i0++) {
# Line 797  Finley_Mesh* Finley_Mesh_read_MPI(char* Line 803  Finley_Mesh* Finley_Mesh_read_MPI(char*
803      /* Elements are specified as a list of integers...only need one message instead of two as with the nodes */      /* Elements are specified as a list of integers...only need one message instead of two as with the nodes */
804      if (mpi_info->rank == 0) {  /* Master */      if (mpi_info->rank == 0) {  /* Master */
805        for (;;) {            /* Infinite loop */        for (;;) {            /* Infinite loop */
806                #pragma omp parallel for private (i0) schedule(static)
807          for (i0=0; i0<chunkSize*(2+numNodes)+1; i0++) tempInts[i0] = -1;          for (i0=0; i0<chunkSize*(2+numNodes)+1; i0++) tempInts[i0] = -1;
808          chunkEle = 0;          chunkEle = 0;
809          for (i0=0; i0<chunkSize; i0++) {          for (i0=0; i0<chunkSize; i0++) {
# Line 848  Finley_Mesh* Finley_Mesh_read_MPI(char* Line 855  Finley_Mesh* Finley_Mesh_read_MPI(char*
855          mesh_p->Points->minColor=0;          mesh_p->Points->minColor=0;
856          mesh_p->Points->maxColor=chunkEle-1;          mesh_p->Points->maxColor=chunkEle-1;
857          if (Finley_noError()) {          if (Finley_noError()) {
858            #pragma omp parallel for private (i0, i1)            #pragma omp parallel for private (i0, i1) schedule(static)
859        for (i0=0; i0<chunkEle; i0++) {        for (i0=0; i0<chunkEle; i0++) {
860          mesh_p->Points->Id[i0]  = tempInts[i0*(2+numNodes)+0];          mesh_p->Points->Id[i0]  = tempInts[i0*(2+numNodes)+0];
861          mesh_p->Points->Tag[i0] = tempInts[i0*(2+numNodes)+1];          mesh_p->Points->Tag[i0] = tempInts[i0*(2+numNodes)+1];

Legend:
Removed from v.2385  
changed lines
  Added in v.2511

  ViewVC Help
Powered by ViewVC 1.1.26