Changeset e24bbb for pcp/src/output.c
- Timestamp:
- Apr 21, 2008, 3:33:52 PM (17 years ago)
- Children:
- 48cbc9
- Parents:
- d8bb59
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pcp/src/output.c
rd8bb59 re24bbb 1735 1735 int PE, zahl; 1736 1736 double *buffer; 1737 int node = ceil(n_orth/Lat->RealBasisQ[index]*N[index]);1738 1737 MPI_Status status; 1739 1738 int sizes[P->Par.Max_me_comm_ST_Psi], c0, c1; 1739 double nodes[NDIM], node[NDIM]; 1740 1741 for(i=0;i<NDIM;i++) { 1742 nodes[i] = (i == index) ? n_orth : 0.; 1743 node[i] = 0.; 1744 } 1745 RMat33Vec3(node, Lat->ReciBasis, nodes); // transform cartesian coordinates into cell coordinates [0,1]^3 1746 for(i=0;i<NDIM;i++) // now N^3 within node range of discrete grid 1747 node[i] = (int)(node[i]*N[i]/(2.*PI)); 1748 fprintf(stderr,"(%i) n_orth %lg, index %i converted to plane offset vector (%lg, %lg, %lg).\n", P->Par.me, n_orth, index, node[0], node[1], node[2]); 1740 1749 1741 1750 switch (index) { … … 1750 1759 break; 1751 1760 } 1761 fprintf(stderr,"(%i) buffer size %i\n", P->Par.me, zahl); 1752 1762 buffer = Malloc(sizeof(double)*zahl,"PlotRealDensity: buffer"); 1753 1763 … … 1755 1765 c1 = cross(index,1); 1756 1766 // then for every point on the grid in real space ... 1767 i=0; 1757 1768 for (n0=0;n0<N0;n0++) // only local points on x axis 1758 1769 for (n[1]=0;n[1]<N[1];n[1]++) 1759 1770 for (n[2]=0;n[2]<N[2];n[2]++) { 1760 1771 n[0]=n0 + N0*myPE; // global relative coordinate: due to partitoning of x-axis in PEPGamma>1 case 1761 if (n[index] == node) { // only on the correct plane orthogonal to desired axis and at desired node ...1772 if (n[index] == (int)node[index]) { // only on the correct plane orthogonal to desired axis and at desired node ... 1762 1773 fac[0] = (double)n[0]/(double)N[0]; 1763 1774 fac[1] = (double)n[1]/(double)N[1];
Note:
See TracChangeset
for help on using the changeset viewer.