bin_bhns.h
/*
* Definition of Lorene class Bin_bhns
*
*/
/*
* Copyright (c) 2005-2007 Keisuke Taniguchi
*
* This file is part of LORENE.
*
* LORENE is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation.
*
* LORENE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with LORENE; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#ifndef __BIN_BHNS_H_
#define __BIN_BHNS_H_
/*
* $Id: bin_bhns.h,v 1.3 2014/10/13 08:52:32 j_novak Exp $
* $Log: bin_bhns.h,v $
* Revision 1.3 2014/10/13 08:52:32 j_novak
* Lorene classes and functions now belong to the namespace Lorene.
*
* Revision 1.2 2008/05/15 18:50:06 k_taniguchi
* Addition of new global quantities.
*
* Revision 1.1 2007/06/22 01:03:50 k_taniguchi
* *** empty log message ***
*
*
* $Header: /cvsroot/Lorene/C++/Include/bin_bhns.h,v 1.3 2014/10/13 08:52:32 j_novak Exp $
*
*/
// Lorene headers
#include "hole_bhns.h"
#include "star_bhns.h"
namespace Lorene {
// External classes which appear in the declaration of class Bin_bhns:
class Hole_bhns ;
class Star_bhns ;
class Bin_bhns {
// Data :
// -----
protected:
const Base_vect_cart ref_triad ;
Hole_bhns hole ;
Star_bhns star ;
double omega ;
double separ ;
double x_rot ;
double y_rot ;
// Derived data :
// ------------
protected:
mutable double* p_mass_adm_bhns_surf ;
mutable double* p_mass_adm_bhns_vol ;
mutable double* p_mass_kom_bhns_surf ;
mutable double* p_mass_kom_bhns_vol ;
mutable Tbl* p_line_mom_bhns ;
mutable Tbl* p_angu_mom_bhns ;
mutable double* p_virial_bhns_surf ;
mutable double* p_virial_bhns_vol ;
mutable double* p_xa_barycenter ;
mutable double* p_ya_barycenter ;
mutable double* p_omega_two_points ;
// mutable double* p_ham_constr_bhns ;
// mutable Tbl* p_mom_constr_bhns ;
// Constructors - Destructor
// -------------------------
public:
Bin_bhns(Map& mp_bh, Map& mp_ns, int nzet, const Eos& eos,
bool irrot_ns, bool kerrschild,
bool bc_lapse_nd, bool bc_lapse_fs, bool irrot_bh,
double mass_bh) ;
Bin_bhns(const Bin_bhns& ) ;
Bin_bhns(Map& mp_bh, Map& mp_ns, const Eos& eos, FILE* fich) ;
virtual ~Bin_bhns() ;
// Memory management
// -----------------
protected:
void del_deriv() const ;
void set_der_0x0() const ;
// Mutators / assignment
// ---------------------
public:
void operator=(const Bin_bhns&) ;
Hole_bhns& set_bh()
{ del_deriv() ;
return hole ; } ;
Star_bhns& set_ns()
{ del_deriv() ;
return star ; } ;
double& set_omega() { return omega ; } ;
double& set_separ() { return separ ; } ;
double& set_x_rot() {return x_rot; } ;
double& set_y_rot() {return y_rot; } ;
// Accessors
// ---------
public:
const Hole_bhns& get_bh() const { return hole ; } ;
const Star_bhns& get_ns() const { return star ; } ;
double get_omega() const { return omega ; } ;
double get_separ() const { return separ ; } ;
double get_x_rot() const {return x_rot; } ;
double get_y_rot() const {return y_rot; } ;
// Outputs
// -------
public:
virtual void sauve(FILE *) const ;
friend ostream& operator<<(ostream& , const Bin_bhns& ) ;
void display_poly(ostream& ) const ;
private:
ostream& operator>>(ostream& ) const ;
// Computational routines
// ----------------------
public:
double mass_adm_bhns_surf() const ;
double mass_adm_bhns_vol() const ;
double mass_kom_bhns_surf() const ;
double mass_kom_bhns_vol() const ;
const Tbl& line_mom_bhns() const ;
const Tbl& angu_mom_bhns() const ;
double virial_bhns_surf() const ;
double virial_bhns_vol() const ;
double xa_barycenter() const ;
double ya_barycenter() const ;
double omega_two_points() const ;
// double ham_constr() const ;
// const Tbl& mom_constr() const ;
void orbit_omega(double fact_omeg_min, double fact_omeg_max) ;
void rotation_axis_x(double rot_exp_x) ;
void rotation_axis_y(double thres_rot, double rot_exp_y, double fact) ;
void shift_analytic(double reduce_shift_bh, double reduce_shift_ns) ;
};
ostream& operator<<(ostream& , const Bin_bhns& ) ;
}
#endif
Lorene::Base_vect_cart
Cartesian vectorial bases (triads).
Definition base_vect.h:201
Lorene::Bin_bhns
Class for computing a black hole - neutron star binary system with comparable mass ().
Definition bin_bhns.h:63
Lorene::Bin_bhns::display_poly
void display_poly(ostream &) const
Display in polytropic units.
Definition bin_bhns.C:309
Lorene::Bin_bhns::del_deriv
void del_deriv() const
Deletes all the derived quantities.
Definition bin_bhns.C:142
Lorene::Bin_bhns::p_mass_adm_bhns_surf
double * p_mass_adm_bhns_surf
Total ADM mass of the system calculated by the surface integral at infinity.
Definition bin_bhns.h:97
Lorene::Bin_bhns::operator<<
friend ostream & operator<<(ostream &, const Bin_bhns &)
Display.
Definition bin_bhns.C:224
Lorene::Bin_bhns::sauve
virtual void sauve(FILE *) const
Save in a file.
Definition bin_bhns.C:210
Lorene::Bin_bhns::Bin_bhns
Bin_bhns(Map &mp_bh, Map &mp_ns, int nzet, const Eos &eos, bool irrot_ns, bool kerrschild, bool bc_lapse_nd, bool bc_lapse_fs, bool irrot_bh, double mass_bh)
Relative error on the Hamiltonian constraint.
Definition bin_bhns.C:70
Lorene::Bin_bhns::y_rot
double y_rot
Absolute Y coordinate of the rotation axis.
Definition bin_bhns.h:89
Lorene::Bin_bhns::ref_triad
const Base_vect_cart ref_triad
Cartesian triad of the absolute reference frame.
Definition bin_bhns.h:69
Lorene::Bin_bhns::get_separ
double get_separ() const
Returns the coordinate separation of the binary system [{\tt r_unit}].
Definition bin_bhns.h:236
Lorene::Bin_bhns::p_mass_kom_bhns_surf
double * p_mass_kom_bhns_surf
Total Komar mass of the system calculated by the surface integral at infinity.
Definition bin_bhns.h:107
Lorene::Bin_bhns::hole
Hole_bhns hole
Black hole.
Definition bin_bhns.h:72
Lorene::Bin_bhns::mass_kom_bhns_surf
double mass_kom_bhns_surf() const
Total Komar mass.
Definition bin_bhns_global.C:537
Lorene::Bin_bhns::get_omega
double get_omega() const
Returns the orbital angular velocity [{\tt f_unit}].
Definition bin_bhns.h:231
Lorene::Bin_bhns::ya_barycenter
double ya_barycenter() const
Absolute coordinate Y of the barycenter of the baryon density.
Definition bin_bhns_global.C:2281
Lorene::Bin_bhns::shift_analytic
void shift_analytic(double reduce_shift_bh, double reduce_shift_ns)
Sets some analytical template for the initial shift vector.
Definition bin_bhns_shift_ana.C:59
Lorene::Bin_bhns::set_der_0x0
void set_der_0x0() const
Sets to 0x0 all the pointers on derived quantities.
Definition bin_bhns.C:162
Lorene::Bin_bhns::omega
double omega
Angular velocity with respect to an asymptotically inertial observer.
Definition bin_bhns.h:80
Lorene::Bin_bhns::set_y_rot
double & set_y_rot()
Sets the absolute coordinate Y of the rotation axis [{\tt r_unit}].
Definition bin_bhns.h:218
Lorene::Bin_bhns::p_mass_adm_bhns_vol
double * p_mass_adm_bhns_vol
Total ADM mass of the system calculated by the volume integral and the surface integral at the appare...
Definition bin_bhns.h:102
Lorene::Bin_bhns::p_virial_bhns_vol
double * p_virial_bhns_vol
Virial theorem error calculated by the ADM mass and the Komar mass of the volume integral.
Definition bin_bhns.h:128
Lorene::Bin_bhns::line_mom_bhns
const Tbl & line_mom_bhns() const
Total linear momentum.
Definition bin_bhns_global.C:1133
Lorene::Bin_bhns::p_omega_two_points
double * p_omega_two_points
Orbital angular velocity derived from another method.
Definition bin_bhns.h:137
Lorene::Bin_bhns::xa_barycenter
double xa_barycenter() const
Absolute coordinate X of the barycenter of the baryon density.
Definition bin_bhns_global.C:2205
Lorene::Bin_bhns::separ
double separ
Absolute orbital separation between two centers of BH and NS.
Definition bin_bhns.h:83
Lorene::Bin_bhns::rotation_axis_y
void rotation_axis_y(double thres_rot, double rot_exp_y, double fact)
Computes the position of the rotation axis Y.
Definition bin_bhns_rotaxis.C:101
Lorene::Bin_bhns::p_angu_mom_bhns
Tbl * p_angu_mom_bhns
Total angular momentum of the system.
Definition bin_bhns.h:118
Lorene::Bin_bhns::get_y_rot
double get_y_rot() const
Returns the absolute coordinate Y of the rotation axis [{\tt r_unit}].
Definition bin_bhns.h:246
Lorene::Bin_bhns::get_bh
const Hole_bhns & get_bh() const
Returns a reference to the black hole.
Definition bin_bhns.h:225
Lorene::Bin_bhns::virial_bhns_surf
double virial_bhns_surf() const
Estimates the relative error on the virial theorem $|1 - M_{\rm Komar} / M_{\rm ADM}...
Definition bin_bhns_global.C:2172
Lorene::Bin_bhns::orbit_omega
void orbit_omega(double fact_omeg_min, double fact_omeg_max)
Estimates the relative error on the Hamiltonian constraint.
Definition bin_bhns_orbit.C:68
Lorene::Bin_bhns::angu_mom_bhns
const Tbl & angu_mom_bhns() const
Total angular momentum.
Definition bin_bhns_global.C:1613
Lorene::Bin_bhns::virial_bhns_vol
double virial_bhns_vol() const
Estimates the relative error on the virial theorem $|1 - M_{\rm Komar} / M_{\rm ADM}...
Definition bin_bhns_global.C:2187
Lorene::Bin_bhns::p_ya_barycenter
double * p_ya_barycenter
Absolute coordinate Y of the barycenter of the baryon density.
Definition bin_bhns.h:134
Lorene::Bin_bhns::omega_two_points
double omega_two_points() const
Orbital angular velocity derived from another method.
Definition bin_bhns_omega_tp.C:67
Lorene::Bin_bhns::x_rot
double x_rot
Absolute X coordinate of the rotation axis.
Definition bin_bhns.h:86
Lorene::Bin_bhns::~Bin_bhns
virtual ~Bin_bhns()
Destructor.
Definition bin_bhns.C:130
Lorene::Bin_bhns::set_bh
Hole_bhns & set_bh()
Read/write of the black hole.
Definition bin_bhns.h:199
Lorene::Bin_bhns::operator=
void operator=(const Bin_bhns &)
Assignment to another Bin_bhns.
Definition bin_bhns.C:187
Lorene::Bin_bhns::get_ns
const Star_bhns & get_ns() const
Returns a reference to the neutron star.
Definition bin_bhns.h:228
Lorene::Bin_bhns::set_x_rot
double & set_x_rot()
Sets the absolute coordinate X of the rotation axis [{\tt r_unit}].
Definition bin_bhns.h:215
Lorene::Bin_bhns::p_virial_bhns_surf
double * p_virial_bhns_surf
Virial theorem error calculated by the ADM mass and the Komar mass of the surface integral at infinit...
Definition bin_bhns.h:123
Lorene::Bin_bhns::p_mass_kom_bhns_vol
double * p_mass_kom_bhns_vol
Total Komar mass of the system calculated by the volume integral and the surface integral at the appa...
Definition bin_bhns.h:112
Lorene::Bin_bhns::star
Star_bhns star
Neutron star.
Definition bin_bhns.h:75
Lorene::Bin_bhns::p_xa_barycenter
double * p_xa_barycenter
Absolute coordinate X of the barycenter of the baryon density.
Definition bin_bhns.h:131
Lorene::Bin_bhns::operator>>
ostream & operator>>(ostream &) const
Operator >> (function called by the operator <<).
Definition bin_bhns.C:231
Lorene::Bin_bhns::rotation_axis_x
void rotation_axis_x(double rot_exp_x)
Computes the position of the rotation axis X.
Definition bin_bhns_rotaxis.C:58
Lorene::Bin_bhns::set_separ
double & set_separ()
Sets the orbital separation [{\tt r_unit}].
Definition bin_bhns.h:212
Lorene::Bin_bhns::p_line_mom_bhns
Tbl * p_line_mom_bhns
Total linear momentum of the system.
Definition bin_bhns.h:115
Lorene::Bin_bhns::mass_adm_bhns_surf
double mass_adm_bhns_surf() const
Total ADM mass.
Definition bin_bhns_global.C:68
Lorene::Bin_bhns::set_omega
double & set_omega()
Sets the orbital angular velocity [{\tt f_unit}].
Definition bin_bhns.h:209
Lorene::Bin_bhns::get_x_rot
double get_x_rot() const
Returns the absolute coordinate X of the rotation axis [{\tt r_unit}].
Definition bin_bhns.h:241
Lorene::Bin_bhns::set_ns
Star_bhns & set_ns()
Read/write of the neutron star.
Definition bin_bhns.h:204
Lorene::Eos
Equation of state base class.
Definition eos.h:190
Lorene::Hole_bhns
Class for black holes in black hole-neutron star binaries.
Definition hole_bhns.h:65
Lorene::Star_bhns
Class for stars in black hole-neutron star binaries.
Definition star_bhns.h:59
Lorene::Tbl
Basic array class.
Definition tbl.h:161
Lorene
Lorene prototypes.
Definition app_hor.h:64
Lorene::Map
Map(const Mg3d &)
Constructor from a multi-domain 3D grid.
Definition map.C:139