Changeset 15254 for trunk/psLib/src/astro/psCoord.c
- Timestamp:
- Oct 9, 2007, 9:27:04 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/astro/psCoord.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/astro/psCoord.c
r15050 r15254 10 10 * @author GLG, MHPCC 11 11 * 12 * @version $Revision: 1.14 0$ $Name: not supported by cvs2svn $13 * @date $Date: 2007- 09-28 00:37:27$12 * @version $Revision: 1.141 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2007-10-09 19:25:44 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 765 765 for (psS32 j = 0 ; j < orderY+1 ; j++) { 766 766 myPT->x->coeff[i][j] = 0.0; 767 myPT->x->mask[i][j] = 0;768 767 myPT->y->coeff[i][j] = 0.0; 769 myPT->y->mask[i][j] = 0; 768 myPT->x->coeffMask[i][j] = PS_POLY_MASK_NONE; 769 myPT->y->coeffMask[i][j] = PS_POLY_MASK_NONE; 770 770 } 771 771 } … … 807 807 for (psS32 t2y = 0 ; t2y < (trans2->x->nY + 1) ; t2y++) { 808 808 psTrace("psLib.astro", 6, "X: -------------------- (t2x, t2y) (%d, %d) --------------------\n", t2x, t2y); 809 if (trans2->x->mask[t2x][t2y] == 0) { 810 psTrace("psLib.astro", 6, "In this iteration, we raise trans1->x to the %d power and trans1->y to the %d-power.\n", t2x, t2y); 811 psPolynomial2D *newPoly = multiplyDPoly2D(trans1XPolys[t2x], trans1YPolys[t2y]); 812 813 if (psTraceGetLevel("psLib.astro") >= 6) { 814 PS_POLY_PRINT_2D(newPoly); 815 } 816 817 // Set the appropriate coeffs in myPT->x 818 for (psS32 i = 0 ; i < (1 + newPoly->nX) ; i++) { 819 for (psS32 j = 0 ; j < (1 + newPoly->nY) ; j++) { 820 myPT->x->coeff[i][j]+= newPoly->coeff[i][j] * trans2->x->coeff[t2x][t2y]; 821 } 822 } 823 824 if (psTraceGetLevel("psLib.astro") >= 6) { 825 PS_POLY_PRINT_2D(myPT->x); 826 } 827 psFree(newPoly); 828 } 809 if (trans2->x->coeffMask[t2x][t2y] & PS_POLY_MASK_SET) { 810 continue; 811 } 812 813 psTrace("psLib.astro", 6, "In this iteration, we raise trans1->x to the %d power and trans1->y to the %d-power.\n", t2x, t2y); 814 psPolynomial2D *newPoly = multiplyDPoly2D(trans1XPolys[t2x], trans1YPolys[t2y]); 815 816 if (psTraceGetLevel("psLib.astro") >= 6) { 817 PS_POLY_PRINT_2D(newPoly); 818 } 819 820 // Set the appropriate coeffs in myPT->x 821 for (psS32 i = 0 ; i < (1 + newPoly->nX) ; i++) { 822 for (psS32 j = 0 ; j < (1 + newPoly->nY) ; j++) { 823 myPT->x->coeff[i][j]+= newPoly->coeff[i][j] * trans2->x->coeff[t2x][t2y]; 824 } 825 } 826 827 if (psTraceGetLevel("psLib.astro") >= 6) { 828 PS_POLY_PRINT_2D(myPT->x); 829 } 830 psFree(newPoly); 829 831 } 830 832 } … … 841 843 for (psS32 t2y = 0 ; t2y < (trans2->y->nY + 1) ; t2y++) { 842 844 psTrace("psLib.astro", 5, "Y: -------------------- (t2x, t2y) (%d, %d) --------------------\n", t2x, t2y); 843 if (trans2->y->mask[t2x][t2y] == 0) { 844 psTrace("psLib.astro", 5, "In this iteration, we raise trans1->x to the %d power and trans1->y to the %d-power.\n", t2x, t2y); 845 psPolynomial2D *newPoly = multiplyDPoly2D(trans1XPolys[t2x], trans1YPolys[t2y]); 846 847 if (psTraceGetLevel("psLib.astro") >= 6) { 848 PS_POLY_PRINT_2D(newPoly); 849 } 850 851 // Set the appropriate coeffs in myPT->x 852 for (psS32 i = 0 ; i < (1 + newPoly->nX) ; i++) { 853 for (psS32 j = 0 ; j < (1 + newPoly->nY) ; j++) { 854 myPT->y->coeff[i][j]+= newPoly->coeff[i][j] * trans2->y->coeff[t2x][t2y]; 855 } 856 } 857 if (psTraceGetLevel("psLib.astro") >= 6) { 858 PS_POLY_PRINT_2D(myPT->x); 859 } 860 psFree(newPoly); 861 } 845 if (trans2->y->coeffMask[t2x][t2y] & PS_POLY_MASK_SET) { 846 continue; 847 } 848 psTrace("psLib.astro", 5, "In this iteration, we raise trans1->x to the %d power and trans1->y to the %d-power.\n", t2x, t2y); 849 psPolynomial2D *newPoly = multiplyDPoly2D(trans1XPolys[t2x], trans1YPolys[t2y]); 850 851 if (psTraceGetLevel("psLib.astro") >= 6) { 852 PS_POLY_PRINT_2D(newPoly); 853 } 854 855 // Set the appropriate coeffs in myPT->x 856 for (psS32 i = 0 ; i < (1 + newPoly->nX) ; i++) { 857 for (psS32 j = 0 ; j < (1 + newPoly->nY) ; j++) { 858 myPT->y->coeff[i][j]+= newPoly->coeff[i][j] * trans2->y->coeff[t2x][t2y]; 859 } 860 } 861 if (psTraceGetLevel("psLib.astro") >= 6) { 862 PS_POLY_PRINT_2D(myPT->x); 863 } 864 psFree(newPoly); 862 865 } 863 866 }
Note:
See TracChangeset
for help on using the changeset viewer.
