From 91d3d9d3112ad75e1c5e37c1ed4cb346d1e24cee Mon Sep 17 00:00:00 2001 From: rideout Date: Wed, 8 May 2002 14:11:21 +0000 Subject: Correctly handle the static conformal factor, respecting the value of the conformal_storage parameter, and the fact that storage for conformal_state is only allocated if metric_type == "static conformal". git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinInitialData/IDBrillData/trunk@69 a678b1cf-93e1-4b43-a69d-d43939e66649 --- param.ccl | 4 ++++ src/setupbrilldata3D.F | 29 ++++++++++++++++++----------- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/param.ccl b/param.ccl index 7f5277e..8e6558c 100644 --- a/param.ccl +++ b/param.ccl @@ -10,6 +10,10 @@ EXTENDS KEYWORD initial_data USES KEYWORD metric_type +shares: StaticConformal + +USES KEYWORD conformal_storage + private: diff --git a/src/setupbrilldata3D.F b/src/setupbrilldata3D.F index d9377c0..5a20e21 100644 --- a/src/setupbrilldata3D.F +++ b/src/setupbrilldata3D.F @@ -82,27 +82,34 @@ c Set up conformal metric. if (CCTK_EQUALS(metric_type,"static conformal")) then - conformal_state = 3 + conformal_state = 1 do k=1,nz do j=1,ny do i=1,nx psi(i,j,k) = one - psix(i,j,k) = zero - psiy(i,j,k) = zero - psiz(i,j,k) = zero - psixx(i,j,k) = zero - psiyy(i,j,k) = zero - psizz(i,j,k) = zero - psixy(i,j,k) = zero - psixz(i,j,k) = zero - psiyz(i,j,k) = zero + if (CCTK_Equals(conformal_storage,"factor").ne.1) then +c (.not. CCTK_EQUALS gives a parse error, I have no idea why) + psix(i,j,k) = zero + psiy(i,j,k) = zero + psiz(i,j,k) = zero + conformal_state = 2 + end if + if (CCTK_EQUALS(conformal_storage,"factor+derivs+2nd derivs")) then + psixx(i,j,k) = zero + psiyy(i,j,k) = zero + psizz(i,j,k) = zero + psixy(i,j,k) = zero + psixz(i,j,k) = zero + psiyz(i,j,k) = zero + conformal_state=3 + end if end do end do end do else - conformal_state = 0 +c conformal_state = 0 -- metric_type "physical" does not allocate storage for conformal_state! end if -- cgit v1.2.3