bin_ns_ncp.h
/*
* Definition of Lorene class Bin_ns_ncp
*
*/
/*
* Copyright (c) 2002 Limousin Francois
*
* 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_NS_NCP_H_
#define __BIN_NS_NCP_H_
/*
* $Id: bin_ns_ncp.h,v 1.8 2016/09/19 15:26:22 j_novak Exp $
* $Log: bin_ns_ncp.h,v $
* Revision 1.8 2016/09/19 15:26:22 j_novak
* Correction of several bugs preventing the shared library compilation.
*
* Revision 1.7 2014/10/13 08:52:32 j_novak
* Lorene classes and functions now belong to the namespace Lorene.
*
* Revision 1.6 2004/01/14 15:48:03 f_limousin
* Initial revision
*
* Revision 1.5 2003/06/20 14:06:54 f_limousin
* Add a new argument conf_flat for the constructors and a new function fait_decouple().
*
* Revision 1.4 2003/03/03 19:07:55 f_limousin
* Suppress the member ref_triad.
*
* Revision 1.3 2003/02/12 18:52:53 f_limousin
* Change the arguments of the standard constructor.
*
* Revision 1.2 2003/01/20 09:38:59 f_limousin
* Modification of the standard constructor
*
* Revision 1.1 2003/01/14 14:13:25 f_limousin
* Binary NS with Nonconformally flat metric.
*
* Revision 1.2 2001/12/11 06:44:41 e_gourgoulhon
* template files
*
* $Header: /cvsroot/Lorene/C++/Include/bin_ns_ncp.h,v 1.8 2016/09/19 15:26:22 j_novak Exp $
*
*/
// Lorene headers
//#include "et_bin_ncp.h"
#include "binaire.h"
namespace Lorene {
class Bin_ns_ncp {
// Data :
// -----
protected:
Et_bin_ncp star1 ;
Et_bin_ncp star2 ;
Et_bin_ncp* et[2] ;
double omega ;
double x_axe ;
// Derived data :
// ------------
protected:
mutable double* p_mass_adm ;
mutable double* p_mass_kom ;
mutable Tbl* p_angu_mom ;
mutable double* p_total_ener ;
mutable double* p_virial ;
mutable double* p_virial_gb ;
mutable double* p_virial_fus ;
mutable double* p_ham_constr ;
mutable Tbl* p_mom_constr ;
// Constructors - Destructor
// -------------------------
public:
Bin_ns_ncp(Map& mp1, int nzet1, const Eos& eos1, int irrot1,
Map& mp2, int nzet2, const Eos& eos2, int irrot2,
int relat, int conf_flat, const Metrique& flat1, const Metrique& flat2,
const Tenseur_sym &source1, const Tenseur_sym &source2) ;
Bin_ns_ncp(const Bin_ns_ncp& ) ;
Bin_ns_ncp(Map& mp1, const Eos& eos1, Map& mp2, const Eos& eos2,
const Metrique& flat1, const Metrique& flat2, FILE* fich) ;
~Bin_ns_ncp() ;
// Memory management
// -----------------
protected:
void del_deriv() const ;
void set_der_0x0() const ;
// Mutators / assignment
// ---------------------
public:
void operator=(const Bin_ns_ncp&) ;
Et_bin_ncp& set(int i)
{ assert( (i==1) || (i==2) );
del_deriv() ;
return *et[i-1] ;} ;
double& set_omega() {return omega; } ;
double& set_x_axe() {return x_axe; } ;
// Accessors
// ---------
public:
const Et_bin_ncp& operator()(int i) const
{ assert( (i==1) || (i==2) );
return *et[i-1] ;} ;
double get_omega() const {return omega; } ;
double get_x_axe() const {return x_axe; } ;
double separation() const ;
// Outputs
// -------
public:
void sauve(FILE *) const ;
friend ostream& operator<<(ostream& , const Bin_ns_ncp& ) ;
void display_poly(ostream& ) const ;
void write_global(ostream& ) const ;
private:
ostream& operator>>(ostream& ) const ;
// Computational routines
// ----------------------
public:
double mass_adm() const ;
double mass_kom() const ;
const Tbl& angu_mom() const ;
double total_ener() const ;
double virial() const ;
double virial_gb() const ;
double virial_fus() const ;
double ham_constr() const ;
const Tbl& mom_constr() const ;
void orbit(double fact_omeg_min, double fact_omeg_max, double& xgg1,
double& xgg2) ;
void analytical_omega() ;
void analytical_shift() ;
void fait_decouple () ;
};
ostream& operator<<(ostream& , const Bin_ns_ncp& ) ;
}
#endif
Lorene::Bin_ns_ncp
Extended description of the class for Doc++ documentation.
Definition bin_ns_ncp.h:73
Lorene::Bin_ns_ncp::p_mass_kom
double * p_mass_kom
Total Komar mass of the system.
Definition bin_ns_ncp.h:108
Lorene::Bin_ns_ncp::p_virial_gb
double * p_virial_gb
Virial theorem error by E.Gourgoulhon and S.Bonazzola.
Definition bin_ns_ncp.h:120
Lorene::Bin_ns_ncp::virial_gb
double virial_gb() const
Estimates the relative error on the virial theorem calculated by E.Gourgoulhon and S....
Lorene::Bin_ns_ncp::et
Et_bin_ncp * et[2]
Array of the two stars (to perform loops on the stars): {\tt et[0]} contains the address of {\tt star...
Definition bin_ns_ncp.h:89
Lorene::Bin_ns_ncp::virial
double virial() const
Estimates the relative error on the virial theorem (for a relativistic one, it returns $|1 - M_{\rm K...
Lorene::Bin_ns_ncp::mom_constr
const Tbl & mom_constr() const
Estimates the relative error on the momentum constraint equation by comparing ${\overline\nabla}...
Lorene::Bin_ns_ncp::separation
double separation() const
Returns the coordinate separation of the two stellar centers [{\tt r_unit}].
Lorene::Bin_ns_ncp::operator=
void operator=(const Bin_ns_ncp &)
Assignment to another {\tt Bin_ns_ncp}.
Lorene::Bin_ns_ncp::set
Et_bin_ncp & set(int i)
Read/write of the star no. i.
Definition bin_ns_ncp.h:194
Lorene::Bin_ns_ncp::ham_constr
double ham_constr() const
Estimates the relative error on the Hamiltonian constraint equation by comparing $\underline\Delta\ln...
Lorene::Bin_ns_ncp::angu_mom
const Tbl & angu_mom() const
Total angular momentum.
Lorene::Bin_ns_ncp::get_x_axe
double get_x_axe() const
Returns the absolute coordinate X of the rotation axis [{\tt r_unit}].
Definition bin_ns_ncp.h:218
Lorene::Bin_ns_ncp::virial_fus
double virial_fus() const
Estimates the relative error on the virial theorem calculated by J.L.Friedman, K.Uryu,...
Lorene::Bin_ns_ncp::x_axe
double x_axe
Absolute X coordinate of the rotation axis.
Definition bin_ns_ncp.h:98
Lorene::Bin_ns_ncp::omega
double omega
Angular velocity with respect to an asymptotically inertial observer.
Definition bin_ns_ncp.h:94
Lorene::Bin_ns_ncp::operator>>
ostream & operator>>(ostream &) const
Operator >> (function called by the operator <<).
Lorene::Bin_ns_ncp::Bin_ns_ncp
Bin_ns_ncp(Map &mp1, int nzet1, const Eos &eos1, int irrot1, Map &mp2, int nzet2, const Eos &eos2, int irrot2, int relat, int conf_flat, const Metrique &flat1, const Metrique &flat2, const Tenseur_sym &source1, const Tenseur_sym &source2)
Standard constructor.
Lorene::Bin_ns_ncp::write_global
void write_global(ostream &) const
Write global quantities in a formatted file.
Lorene::Bin_ns_ncp::analytical_shift
void analytical_shift()
Sets some analytical template for the shift vector (via the members {\tt w_shift} and {\tt khi_shift}...
Lorene::Bin_ns_ncp::p_angu_mom
Tbl * p_angu_mom
Total angular momentum of the system.
Definition bin_ns_ncp.h:111
Lorene::Bin_ns_ncp::del_deriv
void del_deriv() const
Destructor.
Lorene::Bin_ns_ncp::p_mass_adm
double * p_mass_adm
Total ADM mass of the system.
Definition bin_ns_ncp.h:105
Lorene::Bin_ns_ncp::fait_decouple
void fait_decouple()
Calculates {tt decouple} which is used to obtain {\tt a_car_auto} by the formula : {\tt a_car_auto}...
Lorene::Bin_ns_ncp::Bin_ns_ncp
Bin_ns_ncp(Map &mp1, const Eos &eos1, Map &mp2, const Eos &eos2, const Metrique &flat1, const Metrique &flat2, FILE *fich)
Copy constructor.
Lorene::Bin_ns_ncp::mass_kom
double mass_kom() const
Total Komar mass.
Lorene::Bin_ns_ncp::p_virial_fus
double * p_virial_fus
Virial theorem error by J.L.Friedman, K.Uryu, and M.Shibata.
Definition bin_ns_ncp.h:123
Lorene::Bin_ns_ncp::analytical_omega
void analytical_omega()
Sets the orbital angular velocity to some 2-PN analytical value (Keplerian value in the Newtonian cas...
Lorene::Bin_ns_ncp::operator<<
friend ostream & operator<<(ostream &, const Bin_ns_ncp &)
Save in a file.
Lorene::Bin_ns_ncp::p_total_ener
double * p_total_ener
Total energy of the system.
Definition bin_ns_ncp.h:114
Lorene::Bin_ns_ncp::p_mom_constr
Tbl * p_mom_constr
Relative error on the momentum constraint.
Definition bin_ns_ncp.h:129
Lorene::Bin_ns_ncp::operator()
const Et_bin_ncp & operator()(int i) const
Returns a reference to the star no. i.
Definition bin_ns_ncp.h:210
Lorene::Bin_ns_ncp::p_ham_constr
double * p_ham_constr
Relative error on the Hamiltonian constraint.
Definition bin_ns_ncp.h:126
Lorene::Bin_ns_ncp::set_der_0x0
void set_der_0x0() const
Sets to {\tt 0x0} all the pointers on derived quantities.
Lorene::Bin_ns_ncp::total_ener
double total_ener() const
Total energy (excluding the rest mass energy).
Lorene::Bin_ns_ncp::star2
Et_bin_ncp star2
Second star ncp of the system.
Definition bin_ns_ncp.h:83
Lorene::Bin_ns_ncp::get_omega
double get_omega() const
Returns the orbital angular velocity [{\tt f_unit}].
Definition bin_ns_ncp.h:215
Lorene::Bin_ns_ncp::mass_adm
double mass_adm() const
Total ADM mass.
Lorene::Bin_ns_ncp::p_virial
double * p_virial
Virial theorem error.
Definition bin_ns_ncp.h:117
Lorene::Bin_ns_ncp::orbit
void orbit(double fact_omeg_min, double fact_omeg_max, double &xgg1, double &xgg2)
Computes the orbital angular velocity {\tt omega} and the position of the rotation axis {\tt x_axe}...
Lorene::Bin_ns_ncp::display_poly
void display_poly(ostream &) const
Display in polytropic units.
Lorene::Bin_ns_ncp::star1
Et_bin_ncp star1
First star ncp of the system.
Definition bin_ns_ncp.h:80
Lorene::Bin_ns_ncp::set_omega
double & set_omega()
Sets the orbital angular velocity [{\tt f_unit}].
Definition bin_ns_ncp.h:200
Lorene::Bin_ns_ncp::set_x_axe
double & set_x_axe()
Sets the absolute coordinate X of the rotation axis [{\tt r_unit}].
Definition bin_ns_ncp.h:203
Lorene::Eos
Equation of state base class.
Definition eos.h:190
Lorene::Tbl
Basic array class.
Definition tbl.h:161
Lorene::Tenseur_sym
Class intended to describe tensors with a symmetry on the two last indices *** DEPRECATED : use class...
Definition tenseur.h:1253
Lorene
Lorene prototypes.
Definition app_hor.h:64
Lorene::Map
Map(const Mg3d &)
Constructor from a multi-domain 3D grid.
Definition map.C:139