Skip to content

Commit 613b4b9

Browse files
committed
Fixes after rebase
1 parent 8d2f682 commit 613b4b9

File tree

5 files changed

+20
-19
lines changed

5 files changed

+20
-19
lines changed

Examples/KerrBH/Main_KerrBH.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ int runGRChombo(int argc, char *argv[])
4646
// Note: 'interpolator' needs to be in scope when gr_amr.run() is called,
4747
// otherwise pointer is lost
4848
AMRInterpolator<Lagrange<4>> interpolator(
49-
gr_amr, sim_params.origin, sim_params.dx, sim_params.verbosity);
49+
gr_amr, sim_params.origin, sim_params.dx, sim_params.boundary_params,
50+
sim_params.verbosity);
5051
gr_amr.set_interpolator(&interpolator);
5152

5253
using Clock = std::chrono::steady_clock;

Examples/KerrBH/params_cheap.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ plot_interval = 0
8282
num_plot_vars = 0
8383
dt_multiplier = 0.25
8484
stop_time = 10.0
85-
max_steps = 2
85+
max_steps = 1
8686

8787
#Lapse evolution
8888
lapse_power = 1.0
@@ -114,4 +114,4 @@ extraction_levels = 1 1 0
114114
num_points_phi = 50
115115
num_points_theta = 52
116116
extraction_extrapolation_order = 3
117-
extraction_extrapolation_radii = 2 0 1
117+
extraction_extrapolation_radii = 0 1 2

Source/AMRInterpolator/SurfaceExtraction.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ template <class SurfaceGeometry> class SurfaceExtraction
194194
const std::vector<double> &a_integrals,
195195
const std::string &a_label = "") const;
196196

197-
protected:
197+
protected:
198198
// returns empty vector if no extrapolation is done
199199
std::vector<double> richardson_extrapolation(
200200
const std::vector<std::vector<double>> &integrals) const;

Source/AMRInterpolator/SurfaceExtraction.impl.hpp

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,8 @@ void SurfaceExtraction<SurfaceGeometry>::write_integrals(
403403
{
404404
if (procID() == 0)
405405
{
406-
std::vector<double> extrapolations = richardson_extrapolation(a_integrals);
406+
std::vector<double> extrapolations =
407+
richardson_extrapolation(a_integrals);
407408
bool extrapolation_done = extrapolations.size() > 0;
408409

409410
const int num_integrals_per_surface = a_integrals.size();
@@ -439,7 +440,8 @@ void SurfaceExtraction<SurfaceGeometry>::write_integrals(
439440
for (int iintegral = 0; iintegral < num_integrals_per_surface;
440441
++iintegral)
441442
{
442-
for (int isurface = 0; isurface < m_params.num_surfaces; ++isurface)
443+
for (int isurface = 0; isurface < m_params.num_surfaces;
444+
++isurface)
443445
{
444446
int idx = isurface * num_integrals_per_surface + iintegral;
445447
if (a_labels.empty())
@@ -451,8 +453,9 @@ void SurfaceExtraction<SurfaceGeometry>::write_integrals(
451453
}
452454
if (extrapolation_done)
453455
{
454-
int idx = m_params.num_surfaces * num_integrals_per_surface +
455-
iintegral;
456+
int idx =
457+
m_params.num_surfaces * num_integrals_per_surface +
458+
iintegral;
456459
header1_strings[idx] = a_labels[iintegral];
457460
header2_strings[idx] = "Infinity";
458461
}
@@ -468,17 +471,18 @@ void SurfaceExtraction<SurfaceGeometry>::write_integrals(
468471
// make vector of data for writing
469472
std::vector<double> data_for_writing(num_integrals_per_surface *
470473
total_num_surfaces);
471-
for (int iintegral = 0; iintegral < num_integrals_per_surface; ++iintegral)
472-
{
474+
for (int iintegral = 0; iintegral < num_integrals_per_surface;
475+
++iintegral)
476+
{
473477
for (int isurface = 0; isurface < m_params.num_surfaces; ++isurface)
474478
{
475479
int idx = isurface * num_integrals_per_surface + iintegral;
476480
data_for_writing[idx] = a_integrals[iintegral][isurface];
477481
}
478482
if (extrapolation_done)
479483
{
480-
int idx =
481-
m_params.num_surfaces * num_integrals_per_surface + iintegral;
484+
int idx = m_params.num_surfaces * num_integrals_per_surface +
485+
iintegral;
482486
data_for_writing[idx] = extrapolations[iintegral];
483487
}
484488
}
@@ -535,8 +539,6 @@ SurfaceExtraction<SurfaceGeometry>::richardson_extrapolation(
535539
const std::vector<std::vector<double>> &integrals) const
536540
{
537541
CH_TIME("SurfaceExtraction::richardson_extrapolation");
538-
int num_comps = integrals.size();
539-
int num_surfaces = m_params.num_surfaces;
540542

541543
// already validated the radii
542544
int extrapolation_order = m_params.radii_idxs_for_extrapolation.size();
@@ -546,6 +548,7 @@ SurfaceExtraction<SurfaceGeometry>::richardson_extrapolation(
546548
return std::vector<double>();
547549
}
548550

551+
int num_comps = integrals.size();
549552
std::vector<double> extrapolations(num_comps);
550553

551554
if (extrapolation_order == 3)

Source/CCZ4/ADMQuantities.hpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ class ADMQuantities
3838

3939
ADMQuantities(const std::array<double, CH_SPACEDIM> &a_center, double a_dx,
4040
int a_c_Madm = -1, int a_c_Jadm = -1, double a_G_Newton = 1.0)
41-
: m_deriv(a_dx), m_center(a_center), m_G_Newton(a_G_Newton), m_dir(Z),
42-
m_c_Madm(a_c_Madm), m_c_Jadm(a_c_Jadm)
41+
: m_deriv(a_dx), m_center(a_center), m_G_Newton(a_G_Newton),
42+
m_c_Madm(a_c_Madm), m_c_Jadm(a_c_Jadm), m_dir(Z)
4343
{
4444
}
4545

@@ -59,10 +59,7 @@ class ADMQuantities
5959

6060
// Surface element for integration
6161
Coordinates<data_t> coords(current_cell, m_deriv.m_dx, m_center);
62-
data_t r = coords.get_radius();
6362
Tensor<1, data_t> x = {coords.x, coords.y, coords.z};
64-
// This is multiplied by r^2 as SphericalExtraction assumes it is
65-
// normalised as such.
6663
Tensor<1, data_t> dS_U = x;
6764

6865
data_t dS_norm = 0.;

0 commit comments

Comments
 (0)