Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions online-docs/pages/User guide/Handling errors/error-table.rst
Original file line number Diff line number Diff line change
Expand Up @@ -313,10 +313,6 @@ Following is a list of COMPAS error numbers, corresponding symbolic name, and me
Unknown rotational velocity prescription
#. UNKNOWN_ZETA_PRESCRIPTION |br|
Unknown stellar ZETA prescription
#. UNSUPPORTED_PULSAR_BIRTH_MAGNETIC_FIELD_DISTRIBUTION |br|
Unsupported pulsar birth magnetic field distribution
#. UNSUPPORTED_PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION |br|
Unsupported pulsar birth spin period distribution
#. WARNING |br|
Unspecified warning
#. WHITE_DWARF_TOO_MASSIVE |br|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1057,7 +1057,7 @@ Default = FALSE

**--pulsar-birth-magnetic-field-distribution** |br|
Pulsar birth magnetic field distribution. |br|
Options: { ZERO, FIXED, FLATINLOG, UNIFORM, LOGNORMAL } |br|
Options: { ZERO, FLATINLOG, UNIFORM, LOGNORMAL } |br|
Default = ZERO

**--pulsar-birth-magnetic-field-distribution-max** |br|
Expand All @@ -1070,7 +1070,7 @@ Default = 11.0

**--pulsar-birth-spin-period-distribution** |br|
Pulsar birth spin period distribution. |br|
Options: { ZERO, FIXED, UNIFORM, NORMAL } |br|
Options: { ZERO, UNIFORM, NORMAL } |br|
Default = ZERO

**--pulsar-birth-spin-period-distribution-max** |br|
Expand Down
79 changes: 2 additions & 77 deletions src/BaseBinaryStar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -477,42 +477,6 @@ void BaseBinaryStar::SetRemainingValues() {
m_RLOFDetails.propsPreMT = &m_RLOFDetails.props2;


// BeBinary details - properties 1
// m_BeBinaryDetails.props1.id = -1l;
//
// m_BeBinaryDetails.props1.dt = DEFAULT_INITIAL_DOUBLE_VALUE;
// m_BeBinaryDetails.props1.totalTime = DEFAULT_INITIAL_DOUBLE_VALUE;
//
// m_BeBinaryDetails.props1.massNS = DEFAULT_INITIAL_DOUBLE_VALUE;
//
// m_BeBinaryDetails.props1.companionMass = DEFAULT_INITIAL_DOUBLE_VALUE;
// m_BeBinaryDetails.props1.companionLuminosity = DEFAULT_INITIAL_DOUBLE_VALUE;
// m_BeBinaryDetails.props1.companionTeff = DEFAULT_INITIAL_DOUBLE_VALUE;
// m_BeBinaryDetails.props1.companionRadius = DEFAULT_INITIAL_DOUBLE_VALUE;
//
// m_BeBinaryDetails.props1.semiMajorAxis = DEFAULT_INITIAL_DOUBLE_VALUE;
// m_BeBinaryDetails.props1.eccentricity = DEFAULT_INITIAL_DOUBLE_VALUE;

// BeBinary details - properties 2
// m_BeBinaryDetails.props2.id = -1l;
//
// m_BeBinaryDetails.props2.dt = DEFAULT_INITIAL_DOUBLE_VALUE;
// m_BeBinaryDetails.props2.totalTime = DEFAULT_INITIAL_DOUBLE_VALUE;
//
// m_BeBinaryDetails.props2.massNS = DEFAULT_INITIAL_DOUBLE_VALUE;
//
// m_BeBinaryDetails.props2.companionMass = DEFAULT_INITIAL_DOUBLE_VALUE;
// m_BeBinaryDetails.props2.companionLuminosity = DEFAULT_INITIAL_DOUBLE_VALUE;
// m_BeBinaryDetails.props2.companionTeff = DEFAULT_INITIAL_DOUBLE_VALUE;
// m_BeBinaryDetails.props2.companionRadius = DEFAULT_INITIAL_DOUBLE_VALUE;
//
// m_BeBinaryDetails.props2.semiMajorAxis = DEFAULT_INITIAL_DOUBLE_VALUE;
// m_BeBinaryDetails.props2.eccentricity = DEFAULT_INITIAL_DOUBLE_VALUE;

// BeBinary details - current/prev props pointers
// m_BeBinaryDetails.currentProps = &m_BeBinaryDetails.props1;
// m_BeBinaryDetails.previousProps = &m_BeBinaryDetails.props2;

// pointers

m_Donor = nullptr;
Expand Down Expand Up @@ -912,43 +876,6 @@ void BaseBinaryStar::StashRLOFProperties(const MT_TIMING p_Which) {
}


/*
* Squirrel BeBinaries properties away
*
* Various binary property values are stashed into the m_BeBinaryDetails.currentProps struct for use/printing later
* The existing m_BeBinaryDetails.currentProps struct is copied to the m_BeBinaryDetails.previousProps struct first
* (actually there is no copying - just switch pointers...)
*
*
* void StashBeBinaryProperties()
*/
//void BaseBinaryStar::StashBeBinaryProperties() {
//
// if (!OPTIONS->BeBinaries() || !IsBeBinary()) return; // nothing to do;
//
// // switch previous<->current (preserves existing current as (new) previous)
// BeBinaryPropertiesT* tmp = m_BeBinaryDetails.previousProps; // save pointer to existing previous props
// m_BeBinaryDetails.previousProps = m_BeBinaryDetails.currentProps; // existing current props become new previous props (values will be preserved)
// m_BeBinaryDetails.currentProps = tmp; // new current props points at existing previous (values will be replaced)
//
// // now save (new) current
// m_BeBinaryDetails.currentProps->id = m_ObjectId; // object id
// m_BeBinaryDetails.currentProps->dt = m_Dt; // timestep
// m_BeBinaryDetails.currentProps->totalTime = m_BeBinaryDetails.previousProps->dt + m_Dt; // total time - accumulate, don't just replace
// m_BeBinaryDetails.currentProps->semiMajorAxis = m_SemiMajorAxis * AU_TO_RSOL; // semi-major axis - change units to Rsol
// m_BeBinaryDetails.currentProps->eccentricity = m_Eccentricity; // eccentricity
//
// BinaryConstituentStar* neutronStar = m_Star1->IsOneOf({ STELLAR_TYPE::NEUTRON_STAR }) ? m_Star1 : m_Star2; // pointer to neutron star
// BinaryConstituentStar* companionStar = m_Star1->IsOneOf({ STELLAR_TYPE::NEUTRON_STAR }) ? m_Star2 : m_Star1; // pointer to companion
//
// m_BeBinaryDetails.currentProps->massNS = neutronStar->Mass(); // neutron star mass
// m_BeBinaryDetails.currentProps->companionMass = companionStar->Mass(); // companion mass
// m_BeBinaryDetails.currentProps->companionLuminosity = companionStar->Luminosity(); // companion luminosity
// m_BeBinaryDetails.currentProps->companionTeff = companionStar->Temperature(); // companion temperature
// m_BeBinaryDetails.currentProps->companionRadius = companionStar->Radius(); // companion radius
//}


/*
* Calculate (or set) pre common envelope values for the binary:
*
Expand Down Expand Up @@ -2791,7 +2718,7 @@ EVOLUTION_STATUS BaseBinaryStar::Evolve() {
else { // no - not using user-provided timesteps
// if user selects to emit GWs, calculate the effects of radiation
// - note that this is placed before the call to ChooseTimestep() because when
// emitting GWs the timestep is a function of graviational radiation
// emitting GWs the timestep is a function of gravitational radiation
if (OPTIONS->EmitGravitationalRadiation()) {
CalculateGravitationalRadiation();
}
Expand Down Expand Up @@ -2853,8 +2780,6 @@ EVOLUTION_STATUS BaseBinaryStar::Evolve() {
if (HasOneOf({ STELLAR_TYPE::NEUTRON_STAR })) {
(void)PrintPulsarEvolutionParameters(PULSAR_RECORD_TYPE::POST_BINARY_TIMESTEP); // print (log) pulsar evolution parameters
}

//(void)PrintBeBinary(); // print (log) BeBinary properties

if (IsDCO() && !IsUnbound()) { // bound double compact object?
if (m_DCOFormationTime == DEFAULT_INITIAL_DOUBLE_VALUE) { // DCO not yet evaluated -- to ensure that the coalescence is only resolved once
Expand Down Expand Up @@ -2899,7 +2824,7 @@ EVOLUTION_STATUS BaseBinaryStar::Evolve() {

// if user selects to emit GWs, calculate the effects of radiation
// - note that this is placed before the call to ChooseTimestep() because when
// emitting GWs the timestep is a function of graviational radiation
// emitting GWs the timestep is a function of gravitational radiation
if (OPTIONS->EmitGravitationalRadiation()) {
CalculateGravitationalRadiation();
}
Expand Down
10 changes: 0 additions & 10 deletions src/BaseBinaryStar.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@ class BaseBinaryStar {

m_RandomSeed = p_Star.m_RandomSeed;

// m_BeBinaryDetails = p_Star.m_BeBinaryDetails;

// m_BeBinaryDetails.currentProps = p_Star.m_BeBinaryDetails.currentProps == &(p_Star.m_BeBinaryDetails.props1) ? &(m_BeBinaryDetails.props1) : &(m_BeBinaryDetails.props2);
// m_BeBinaryDetails.previousProps = p_Star.m_BeBinaryDetails.previousProps == &(p_Star.m_BeBinaryDetails.props1) ? &(m_BeBinaryDetails.props1) : &(m_BeBinaryDetails.props2);

m_CircularizationTimescale = p_Star.m_CircularizationTimescale;

m_CEDetails = p_Star.m_CEDetails;
Expand Down Expand Up @@ -162,7 +157,6 @@ class BaseBinaryStar {


// getters - alphabetically
// BeBinaryDetailsT BeBinaryDetails() const { return m_BeBinaryDetails; }
bool CEAtLeastOnce() const { return m_CEDetails.CEEcount > 0; }
unsigned int CEEventCount() const { return m_CEDetails.CEEcount; }
double CircularizationTimescale() const { return m_CircularizationTimescale; }
Expand All @@ -186,7 +180,6 @@ class BaseBinaryStar {
bool ImmediateRLOFPostCEE() const { return m_RLOFDetails.immediateRLOFPostCEE; }
STELLAR_TYPE InitialStellarType1() const { return m_Star1->InitialStellarType(); }
STELLAR_TYPE InitialStellarType2() const { return m_Star2->InitialStellarType(); }
bool IsBeBinary() const { return HasOneOf({STELLAR_TYPE::NEUTRON_STAR}) && HasOneOf({STELLAR_TYPE::MS_LTE_07, STELLAR_TYPE::MS_GT_07}); }
bool IsHMXRBinary() const;
bool IsBHandBH() const { return HasTwoOf({STELLAR_TYPE::BLACK_HOLE}); }
bool IsDCO() const { return HasTwoOf({STELLAR_TYPE::NEUTRON_STAR, STELLAR_TYPE::BLACK_HOLE}); }
Expand Down Expand Up @@ -298,8 +291,6 @@ class BaseBinaryStar {

unsigned long int m_RandomSeed; // Random seed for this binary

// BeBinaryDetailsT m_BeBinaryDetails; // BeBinary details

BinaryCEDetailsT m_CEDetails; // Common Event details

double m_CircularizationTimescale;
Expand Down Expand Up @@ -492,7 +483,6 @@ class BaseBinaryStar {
const double p_RocheLobe1to2,
const double p_RocheLobe2to1);

void StashBeBinaryProperties();
void StashRLOFProperties(const MT_TIMING p_Which);

void UpdateSystemicVelocity(Vector3d p_newVelocity) { m_SystemicVelocity += p_newVelocity; }
Expand Down
4 changes: 0 additions & 4 deletions src/ErrorCatalog.h
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,6 @@ enum class ERROR: int {
UNKNOWN_VROT_PRESCRIPTION, // unknown rorational velocity prescription
UNKNOWN_WR_MASS_LOSS_PRESCRIPTION, // unknown WR mass loss prescription
UNKNOWN_ZETA_PRESCRIPTION, // unknown stellar ZETA prescription
UNSUPPORTED_PULSAR_BIRTH_MAGNETIC_FIELD_DISTRIBUTION, // unsupported pulsar birth magnetic field distribution
UNSUPPORTED_PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION, // unsupported pulsar birth spin period distribution
WARNING, // unspecified warning
WHITE_DWARF_TOO_MASSIVE, // a white dwarf exceeds the Chandrasekhar mass limit

Expand Down Expand Up @@ -367,8 +365,6 @@ const COMPASUnorderedMap<ERROR, std::tuple<ERROR_SCOPE, std::string>> ERROR_CATA
{ ERROR::UNKNOWN_VMS_MASS_LOSS_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown VMS mass loss prescription" }},
{ ERROR::UNKNOWN_VROT_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown rotational velocity prescription" }},
{ ERROR::UNKNOWN_ZETA_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown stellar ZETA prescription" }},
{ ERROR::UNSUPPORTED_PULSAR_BIRTH_MAGNETIC_FIELD_DISTRIBUTION, { ERROR_SCOPE::ALWAYS, "Unsupported pulsar birth magnetic field distribution" }},
{ ERROR::UNSUPPORTED_PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION, { ERROR_SCOPE::ALWAYS, "Unsupported pulsar birth spin period distribution" }},
{ ERROR::WARNING, { ERROR_SCOPE::ALWAYS, "Warning!" }},
{ ERROR::WHITE_DWARF_TOO_MASSIVE, { ERROR_SCOPE::ALWAYS, "This white dwarf exceeds the Chandrasekhar mass limit" }},
{ ERROR::UNKNOWN_WR_MASS_LOSS_PRESCRIPTION, { ERROR_SCOPE::ALWAYS, "Unknown WR mass loss prescription" }}
Expand Down
18 changes: 0 additions & 18 deletions src/NS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,15 +152,6 @@ double NS::CalculateBirthSpinPeriod() {
pSpin = 0.0;
break;

// JR: Unsupported? This is the only places in the code PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION::FIXED
// appears - can we remove FIXED from the available options so the user can't choose it (deprecate it)?
// If we ever decide to support it we can put it back in then. It doesn't seem right to present it to
// users as an option only to say we don't support it once they choose it. **Ilya**
case PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION::FIXED: // FIXED constant value as used in default model in Oslowski et al 2011 https://arxiv.org/abs/0903.3538
SHOW_WARN_STATIC(ERROR::UNSUPPORTED_PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION, "Using spin = 0.0"); // show warning
pSpin = 0.0;
break;

case PULSAR_BIRTH_SPIN_PERIOD_DISTRIBUTION::UNIFORM: { // UNIFORM distribution between minimum and maximum value as in Oslowski et al 2011 https://arxiv.org/abs/0903.3538 (default Pmin = and Pmax = )
// and also Kiel et al 2008 https://arxiv.org/abs/0805.0059 (default Pmin = 10 ms and Pmax 100 ms, section 3.4)
double maximum = OPTIONS->PulsarBirthSpinPeriodDistributionMax();
Expand Down Expand Up @@ -215,15 +206,6 @@ double NS::CalculateBirthMagneticField() {
log10B = 0.0;
break;

// JR: Unsupported? This is the only places in the code PULSAR_BIRTH_MAGNETIC_FIELD_DISTRIBUTION::FIXED
// appears - can we remove FIXED from the available options so the user can't choose it (deprecate it)?
// If we ever decide to support it we can put it back in then. It doesn't seem right to present it to
// users as an option only to say we don't support it once they choose it. **Ilya**
case PULSAR_BIRTH_MAGNETIC_FIELD_DISTRIBUTION::FIXED: // FIXED - set to a fixed constant value
SHOW_WARN(ERROR::UNSUPPORTED_PULSAR_BIRTH_MAGNETIC_FIELD_DISTRIBUTION, "Using 0.0"); // show warning
log10B = 0.0;
break;

case PULSAR_BIRTH_MAGNETIC_FIELD_DISTRIBUTION::FLATINLOG: { // FLAT IN LOG distribution from Oslowski et al 2011 https://arxiv.org/abs/0903.3538 (log10B0min = , log10B0max = )

double maximum = OPTIONS->PulsarBirthMagneticFieldDistributionMax();
Expand Down
Loading