aboutsummaryrefslogtreecommitdiff
path: root/src/patch/test_coords.cc
diff options
context:
space:
mode:
authorjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2001-08-18 12:54:27 +0000
committerjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2001-08-18 12:54:27 +0000
commita9ce37d0f1e16c7d695a959a3f86cbae53e0ba60 (patch)
tree311049f5ab55a78583163e80ef297d3754a6cd12 /src/patch/test_coords.cc
parente9efe3105511387c4743a7d18b42b451375e4523 (diff)
make local var names unique to avoid gcc warnings,
also use [2-9] suffixxes instead of doubled 1st letters git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@275 f88db872-0e4f-0410-b76b-b9085cfa78c5
Diffstat (limited to 'src/patch/test_coords.cc')
-rw-r--r--src/patch/test_coords.cc93
1 files changed, 44 insertions, 49 deletions
diff --git a/src/patch/test_coords.cc b/src/patch/test_coords.cc
index 1bc7ea6..6b5b705 100644
--- a/src/patch/test_coords.cc
+++ b/src/patch/test_coords.cc
@@ -14,6 +14,7 @@
using jtutil::error_exit;
using jtutil::radians_of_degrees;
using jtutil::degrees_of_radians;
+using namespace local_coords;
//******************************************************************************
@@ -111,70 +112,64 @@ printf("\n");
// ((mu,nu,phi)) --> the 3rd
if (mu_flag && nu_flag)
then printf("phi_of_mu_nu() ==> phi=%g\n",
- degrees_of_radians(local_coords::phi_of_mu_nu(mu,nu)));
+ degrees_of_radians(phi_of_mu_nu(mu,nu)));
if (mu_flag && phi_flag)
then printf("nu_of_mu_phi() ==> nu=%g\n",
- degrees_of_radians(local_coords::nu_of_mu_phi(mu,phi)));
+ degrees_of_radians(nu_of_mu_phi(mu,phi)));
if (nu_flag && phi_flag)
then printf("mu_of_nu_phi() ==> mu=%g\n",
- degrees_of_radians(local_coords::mu_of_nu_phi(nu,phi)));
+ degrees_of_radians(mu_of_nu_phi(nu,phi)));
// (r,(mu,nu,phi)) --> (x,y,z)
if (r_flag && mu_flag && nu_flag)
then {
- fp xx, yy, zz;
- local_coords::xyz_of_r_mu_nu(r,mu,nu, xx,yy,zz);
- printf("xyz_of_r_mu_nu() ==> x=%g y=%g z=%g\n", xx,yy,zz);
+ fp x2, y2, z2;
+ xyz_of_r_mu_nu(r,mu,nu, x2,y2,z2);
+ printf("xyz_of_r_mu_nu() ==> x=%g y=%g z=%g\n", x2,y2,z2);
}
if (r_flag && mu_flag && phi_flag)
then {
- fp xx, yy, zz;
- local_coords::xyz_of_r_mu_phi(r,mu,phi, xx,yy,zz);
- printf("xyz_of_r_mu_phi() ==> x=%g y=%g z=%g\n", xx,yy,zz);
+ fp x2, y2, z2;
+ xyz_of_r_mu_phi(r,mu,phi, x2,y2,z2);
+ printf("xyz_of_r_mu_phi() ==> x=%g y=%g z=%g\n", x2,y2,z2);
}
if (r_flag && nu_flag && phi_flag)
then {
- fp xx, yy, zz;
- local_coords::xyz_of_r_nu_phi(r,nu,phi, xx,yy,zz);
- printf("xyz_of_r_nu_phi() ==> x=%g y=%g z=%g\n", xx,yy,zz);
+ fp x2, y2, z2;
+ xyz_of_r_nu_phi(r,nu,phi, x2,y2,z2);
+ printf("xyz_of_r_nu_phi() ==> x=%g y=%g z=%g\n", x2,y2,z2);
}
// (x,y,z) --> (r,(mu,nu,phi))
if (x_flag && y_flag && z_flag)
then {
- fp rr, mmu, nnu;
- local_coords::r_mu_nu_of_xyz(x,y,z, rr,mmu,nnu);
- printf("r_mu_nu_of_xyz() ==> r=%g mu=%g nu=%g\n",
- rr,degrees_of_radians(mmu),degrees_of_radians(nnu));
- }
-if (x_flag && y_flag && z_flag)
- then {
- fp rr, mmu, pphi;
- local_coords::r_mu_phi_of_xyz(x,y,z, rr,mmu,pphi);
- printf("r_mu_phi_of_xyz() ==> r=%g mu=%g phi=%g\n",
- rr,degrees_of_radians(mmu),degrees_of_radians(pphi));
- }
-if (x_flag && y_flag && z_flag)
- then {
- fp rr, nnu, pphi;
- local_coords::r_nu_phi_of_xyz(x,y,z, rr,nnu,pphi);
- printf("r_nu_phi_of_xyz() ==> r=%g nu=%g phi=%g\n",
- rr,degrees_of_radians(nnu),degrees_of_radians(pphi));
+ fp r2 = r_of_xyz(x,y,z);
+ fp mu2 = mu_of_yz(y,z);
+ fp nu2 = nu_of_xz(x,z);
+ fp phi2 = phi_of_xy(x,y);
+ printf("*_of_xyz() ==> r=%g mu=%g nu=%g phi=%g\n",
+ r2,
+ degrees_of_radians(mu2),
+ degrees_of_radians(nu2),
+ degrees_of_radians(phi2));
}
// usual polar spherical (r,theta,phi) <--> (x,y,z)
if (r_flag && theta_flag && phi_flag)
then {
- fp xx, yy, zz;
- local_coords::xyz_of_r_theta_phi(r,theta,phi, xx,yy,zz);
- printf("xyz_of_r_theta_phi() ==> x=%g y=%g z=%g\n", xx,yy,zz);
+ fp x2, y2, z2;
+ xyz_of_r_theta_phi(r,theta,phi, x2,y2,z2);
+ printf("xyz_of_r_theta_phi() ==> x=%g y=%g z=%g\n", x2,y2,z2);
}
if (x_flag && y_flag && z_flag)
then {
- fp rr, ttheta, pphi;
- local_coords::r_theta_phi_of_xyz(x,y,z, rr,ttheta,pphi);
- printf("r_theta_phi_of_xyz() ==> r=%g theta=%g phi=%g\n",
- rr,degrees_of_radians(ttheta),degrees_of_radians(pphi));
+ fp r2 = r_of_xyz(x,y,z);
+ fp theta2 = theta_of_xyz(x,y,z);
+ fp phi2 = phi_of_xy(x,y);
+ printf("*_of_xyz() ==> r=%g theta=%g phi=%g\n",
+ r2,
+ degrees_of_radians(theta2),
+ degrees_of_radians(phi2));
}
// ((mu,nu,phi)) --> usual polar spherical (theta,phi)
@@ -182,21 +177,21 @@ if (x_flag && y_flag && z_flag)
if (mu_flag && nu_flag)
then {
fp ps_theta, ps_phi;
- local_coords::theta_phi_of_mu_nu(mu,nu, ps_theta,ps_phi);
+ theta_phi_of_mu_nu(mu,nu, ps_theta,ps_phi);
printf("theta_phi_of_mu_nu() ==> ps_theta=%g ps_phi=%g\n",
degrees_of_radians(ps_theta),degrees_of_radians(ps_phi));
}
if (mu_flag && phi_flag)
then {
fp ps_theta, ps_phi;
- local_coords::theta_phi_of_mu_phi(mu,phi, ps_theta,ps_phi);
+ theta_phi_of_mu_phi(mu,phi, ps_theta,ps_phi);
printf("theta_phi_of_mu_phi() ==> ps_theta=%g ps_phi=%g\n",
degrees_of_radians(ps_theta),degrees_of_radians(ps_phi));
}
if (nu_flag && phi_flag)
then {
fp ps_theta, ps_phi;
- local_coords::theta_phi_of_nu_phi(nu,phi, ps_theta,ps_phi);
+ theta_phi_of_nu_phi(nu,phi, ps_theta,ps_phi);
printf("theta_phi_of_nu_phi() ==> ps_theta=%g ps_phi=%g\n",
degrees_of_radians(ps_theta),degrees_of_radians(ps_phi));
}
@@ -205,24 +200,24 @@ if (nu_flag && phi_flag)
// ... note phi is the same coordinate in both systems
if (theta_flag && phi_flag)
then {
- fp mmu, nnu;
- local_coords::mu_nu_of_theta_phi(theta,phi, mmu,nnu);
+ fp mu2, nu2;
+ mu_nu_of_theta_phi(theta,phi, mu2,nu2);
printf("mu_nu_of_theta_phi() ==> mu=%g nu=%g\n",
- degrees_of_radians(mmu),degrees_of_radians(nnu));
+ degrees_of_radians(mu2),degrees_of_radians(nu2));
}
if (theta_flag && phi_flag)
then {
- fp mmu, mnp_phi;
- local_coords::mu_phi_of_theta_phi(theta,phi, mmu,mnp_phi);
+ fp mu2, mnp_phi;
+ mu_phi_of_theta_phi(theta,phi, mu2,mnp_phi);
printf("mu_phi_of_theta_phi() ==> mu=%g mnp_phi=%g\n",
- degrees_of_radians(mmu),degrees_of_radians(mnp_phi));
+ degrees_of_radians(mu2),degrees_of_radians(mnp_phi));
}
if (theta_flag && phi_flag)
then {
- fp nnu, mnp_phi;
- local_coords::nu_phi_of_theta_phi(theta,phi, nnu,mnp_phi);
+ fp nu2, mnp_phi;
+ nu_phi_of_theta_phi(theta,phi, nu2,mnp_phi);
printf("nu_phi_of_theta_phi() ==> nu=%g mnp_phi=%g\n",
- degrees_of_radians(nnu),degrees_of_radians(mnp_phi));
+ degrees_of_radians(nu2),degrees_of_radians(mnp_phi));
}
return 0;