-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add BNS initial data executable and SpEC initial Data #6422
base: develop
Are you sure you want to change the base?
Add BNS initial data executable and SpEC initial Data #6422
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found a few potential bugs in the fixed sources that might explain the deviations from SpEC that you see.
Please add a test input file that has the Check: parse
line so the executable gets compiled on CI.
Also, it would be nice to add a test for the SpecData
that's similar to tests/Unit/PointwiseFunctions/AnalyticData/GrMhd/Test_FukaInitialData.cpp
in that you can supply SpEC sample data as an environment variable, and then it checks that the data fulfills the equations (see verify_solution
from tests/Unit/Helpers/PointwiseFunctions/AnalyticSolutions/FirstOrderEllipticSolutionsTestHelpers.hpp
for an example).
static constexpr Options::String help{ | ||
"Find the solution for the velocity potential of" | ||
"an irrotational BNS system using fixed" | ||
"problem on fixed space-time and with a fixed" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing space at the beginning or end of each line. Also, this sentence seems a little off, maybe delete "using fixed problem".
@@ -76,6 +77,7 @@ struct FirstOrderSystem | |||
::Tags::Flux<velocity_potential, tmpl::size_t<3>, Frame::Inertial>>; | |||
|
|||
using background_fields = tmpl::list< | |||
hydro::Tags::RestMassDensity<DataVector>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where is this used?
|
||
#include "PointwiseFunctions/AnalyticData/BnsInitialData/SpecInitialData.hpp" | ||
namespace BnsInitialData::InitialData { | ||
using all_initial_data = tmpl::list<TovStar, SpecInitialData<1>>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where do you get the TovStar
from? The TOV solution is just the trivial
#pragma once | ||
|
||
#include "PointwiseFunctions/AnalyticData/BnsInitialData/SpecInitialData.hpp" | ||
namespace BnsInitialData::InitialData { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name this namespace AnalyticData
please for consistency with the other systems
|
||
#include "PointwiseFunctions/AnalyticData/BnsInitialData/SpecInitialData.hpp" | ||
namespace BnsInitialData::InitialData { | ||
using all_initial_data = tmpl::list<TovStar, SpecInitialData<1>>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and name this all_analytic_data
data_directory_ = rhs.data_directory_; | ||
equation_of_state_ = rhs.equation_of_state_->get_clone(); | ||
density_cutoff_ = rhs.density_cutoff_; | ||
orbital_angular_velocity_ = rhs.orbital_angular_velocity_; | ||
euler_enthalpy_constant_ = rhs.euler_enthalpy_constant_; | ||
spec_exporter_ = | ||
std::make_unique<spec::Exporter>(sys::procs_on_node(sys::my_node()), | ||
data_directory_, vars_to_interpolate_); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace with:
*this = rhs;
* constant read from the input file. | ||
*/ | ||
template <size_t ThermodynamicDim> | ||
class SpecInitialData : public elliptic::analytic_data::Background, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Name this maybe just SpecData
* | ||
* This class loads numerical data written out by the SpEC initial data solver. | ||
* It uses the `spec::Exporter` linked in from SpEC to interpolate to arbitrary | ||
* grid points. The coordinates are assumed to be in SpEC's "grid" frame. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should check if SpEC's grid frame is the one that is deformed to the surface of the star
} | ||
// The velocity potential is used in the initial guess | ||
template <typename DataType> | ||
tuples::TaggedTuple<Tags::VelocityPotential<DataType>> variables( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move the definition of these variables
functions to the cpp file. You can also remove the templating on DataType
and just use DataVector
(if you want).
@@ -116,10 +116,9 @@ void spatial_rotational_killing_vector( | |||
const Scalar<DataType>& sqrt_det_spatial_metric) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove unused argument
Proposed changes
Add an elliptic executable to solve for the velocity potential of a BNS system for use in initial data to evolutions. Additionally add SpEC analytic data for initializing a spacetime/matter distribution for the velocity potential solve.
Upgrade instructions
Code review checklist
make doc
to generate the documentation locally intoBUILD_DIR/docs/html
.Then open
index.html
.code review guide.
bugfix
ornew feature
if appropriate.Further comments