Skip to content

Commit 3319de4

Browse files
committed
AutoDiff API proto working on BSSN, need to add a n-rank method
1 parent 1b7d2f5 commit 3319de4

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

includes/Tensorium/DiffGeometry/BSSN/BSSNSetup.hpp

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,12 @@ namespace tensorium_RG {
8888

8989
auto dgamma_tilde = autodiff(X, dx, dy, dz,
9090
[&](const tensorium::Vector<T>& Xs) {
91-
T a_tmp;
92-
tensorium::Vector<T> b_tmp(3);
93-
tensorium::Tensor<T,2> g_tmp({3, 3});
94-
metric.BSSN(Xs, a_tmp, b_tmp, g_tmp);
95-
T chi_tmp = compute_conformal_factor(metric, g_tmp);
96-
return compute_conformal_metric(metric, g_tmp, chi_tmp);
91+
T a_tmp;
92+
tensorium::Vector<T> b_tmp(3);
93+
tensorium::Tensor<T,2> g_tmp({3, 3});
94+
metric.BSSN(Xs, a_tmp, b_tmp, g_tmp);
95+
T chi_tmp = compute_conformal_factor(metric, g_tmp);
96+
return compute_conformal_metric(metric, g_tmp, chi_tmp);
9797
},
9898
DiffMode::PARTIAL
9999
);
@@ -110,22 +110,22 @@ namespace tensorium_RG {
110110

111111
auto d_beta = autodiff(X, dx, dy, dz,
112112
[&](const tensorium::Vector<T>& Xs) {
113-
T a_tmp;
114-
tensorium::Vector<T> b_tmp(3);
115-
tensorium::Tensor<T,2> g_tmp({3, 3});
116-
metric.BSSN(Xs, a_tmp, b_tmp, g_tmp);
117-
return b_tmp;
113+
T a_tmp;
114+
tensorium::Vector<T> b_tmp(3);
115+
tensorium::Tensor<T,2> g_tmp({3, 3});
116+
metric.BSSN(Xs, a_tmp, b_tmp, g_tmp);
117+
return b_tmp;
118118
},
119119
DiffMode::PARTIAL
120120
);
121121

122122
auto dgamma_phys = autodiff(X, dx, dy, dz,
123123
[&](const tensorium::Vector<T>& Xs) {
124-
T a_tmp;
125-
tensorium::Vector<T> b_tmp(3);
126-
tensorium::Tensor<T,2> g_tmp({3, 3});
127-
metric.BSSN(Xs, a_tmp, b_tmp, g_tmp);
128-
return g_tmp;
124+
T a_tmp;
125+
tensorium::Vector<T> b_tmp(3);
126+
tensorium::Tensor<T,2> g_tmp({3, 3});
127+
metric.BSSN(Xs, a_tmp, b_tmp, g_tmp);
128+
return g_tmp;
129129
},
130130
DiffMode::PARTIAL
131131
);

0 commit comments

Comments
 (0)