Skip to content

Commit

Permalink
Z4coo: remove unused files
Browse files Browse the repository at this point in the history
  • Loading branch information
lwJi committed Jul 11, 2024
1 parent 9a9210d commit 12612fa
Show file tree
Hide file tree
Showing 17 changed files with 48 additions and 767 deletions.
1 change: 0 additions & 1 deletion Z4coo/src/constraint.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#endif

#include "derivs.hxx"
#include "physics.hxx"

#include <loop_device.hxx>
#include <simd.hxx>
Expand Down
2 changes: 0 additions & 2 deletions Z4coo/src/enforce.cxx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#include "physics.hxx"

#include <loop_device.hxx>
#include <mat.hxx>
#include <simd.hxx>
Expand Down
2 changes: 0 additions & 2 deletions Z4coo/src/initial1.cxx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#include "physics.hxx"

#include <loop_device.hxx>
#include <mat.hxx>
#include <simd.hxx>
Expand Down
24 changes: 23 additions & 1 deletion Z4coo/src/initial2.cxx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "derivs.hxx"
#include "physics.hxx"

#include <loop_device.hxx>
#include <simd.hxx>
Expand All @@ -16,6 +15,29 @@ using namespace Arith;
using namespace Loop;
using namespace std;

template <typename T, int D>
ARITH_INLINE ARITH_DEVICE ARITH_HOST constexpr vec<smat<T, D>, D>
calc_gammal(const smat<vec<T, D>, D> &dg) {
// Gammal_abc
return vec<smat<T, D>, D>([&](int a) ARITH_INLINE {
return smat<T, D>([&](int b, int c) ARITH_INLINE {
return (dg(a, b)(c) + dg(a, c)(b) - dg(b, c)(a)) / 2;
});
});
}

template <typename T, int D>
ARITH_INLINE ARITH_DEVICE ARITH_HOST constexpr vec<smat<T, D>, D>
calc_gamma(const smat<T, D> &gu, const vec<smat<T, D>, D> &Gammal) {
// Gamma^a_bc
return vec<smat<T, D>, D>([&](int a) ARITH_INLINE {
return smat<T, D>([&](int b, int c) ARITH_INLINE {
return sum<D>([&](int x)
ARITH_INLINE { return gu(a, x) * Gammal(x)(b, c); });
});
});
}

extern "C" void Z4coo_Initial2(CCTK_ARGUMENTS) {
DECLARE_CCTK_ARGUMENTS_Z4coo_Initial2;

Expand Down
99 changes: 0 additions & 99 deletions Z4coo/src/physics.hxx

This file was deleted.

1 change: 0 additions & 1 deletion Z4coo/src/rhs.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
// #define Power(x, y) (Arith::pown((x), (y)))

#include "derivs.hxx"
#include "physics.hxx"

#include <loop_device.hxx>
#include <mat.hxx>
Expand Down
5 changes: 5 additions & 0 deletions Z4coo/wolfram/Z4coo_set_ADM.hxx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/* Z4coo_set_ADM.hxx */
/* Produced with Mathematica */

#ifndef Z4COO_SET_ADM_HXX
#define Z4COO_SET_ADM_HXX

const GF3D2<CCTK_REAL> &local_ADMgam11 = gf_ADMgam(0,0);
const GF3D2<CCTK_REAL> &local_ADMgam12 = gf_ADMgam(0,1);
const GF3D2<CCTK_REAL> &local_ADMgam13 = gf_ADMgam(0,2);
Expand Down Expand Up @@ -118,4 +121,6 @@ beta3

});

#endif // #ifndef Z4COO_SET_ADM_HXX

/* Z4coo_set_ADM.hxx */
53 changes: 0 additions & 53 deletions Z4coo/wolfram/Z4coo_set_ADM.wl

This file was deleted.

19 changes: 10 additions & 9 deletions Z4coo/wolfram/Z4coo_set_constraint.hxx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/* Z4coo_set_constraint.hxx */
/* Produced with Mathematica */

#ifndef Z4COO_SET_CONSTRAINT_HXX
#define Z4COO_SET_CONSTRAINT_HXX

const GF3D2<CCTK_REAL> &local_ZtC1 = gf_ZtC(0);
const GF3D2<CCTK_REAL> &local_ZtC2 = gf_ZtC(1);
const GF3D2<CCTK_REAL> &local_ZtC3 = gf_ZtC(2);
Expand Down Expand Up @@ -43,11 +46,8 @@ const vreal eTt3 = tmp_eTt(2);
const vreal eT11 = tmp_eT(0,0);
const vreal eT12 = tmp_eT(0,1);
const vreal eT13 = tmp_eT(0,2);
const vreal eT21 = tmp_eT(1,0);
const vreal eT22 = tmp_eT(1,1);
const vreal eT23 = tmp_eT(1,2);
const vreal eT31 = tmp_eT(2,0);
const vreal eT32 = tmp_eT(2,1);
const vreal eT33 = tmp_eT(2,2);
const vreal chi = tmp_chi + 1;
const vreal gamt11 = tmp_gamt(0,0) + 1;
Expand Down Expand Up @@ -842,20 +842,19 @@ invgam11*R11 + 2*invgam12*R12 + 2*invgam13*R13 + invgam22*R22 +

vreal rho
=
(Power(beta1,2)*eT11 + beta1*beta2*(eT12 + eT21) + Power(beta2,2)*eT22 +
beta1*beta3*(eT13 + eT31) + beta2*beta3*(eT23 + eT32) +
Power(beta3,2)*eT33 - 2*beta1*eTt1 - 2*beta2*eTt2 - 2*beta3*eTt3 + eTtt)/
Power(alpha,2)
(Power(beta1,2)*eT11 + Power(beta2,2)*eT22 + 2*beta2*beta3*eT23 +
Power(beta3,2)*eT33 + 2*beta1*(beta2*eT12 + beta3*eT13 - eTt1) -
2*beta2*eTt2 - 2*beta3*eTt3 + eTtt)/Power(alpha,2)
;

vreal Sm1
=
(beta1*eT11 + beta2*eT21 + beta3*eT31 - eTt1)/alpha
(beta1*eT11 + beta2*eT12 + beta3*eT13 - eTt1)/alpha
;

vreal Sm2
=
(beta1*eT12 + beta2*eT22 + beta3*eT32 - eTt2)/alpha
(beta1*eT12 + beta2*eT22 + beta3*eT23 - eTt2)/alpha
;

vreal Sm3
Expand Down Expand Up @@ -1030,4 +1029,6 @@ local_MtC3.store(mask, index2,
});
});

#endif // #ifndef Z4COO_SET_CONSTRAINT_HXX

/* Z4coo_set_constraint.hxx */
76 changes: 0 additions & 76 deletions Z4coo/wolfram/Z4coo_set_constraint.wl

This file was deleted.

Loading

0 comments on commit 12612fa

Please sign in to comment.