Giter VIP home page Giter VIP logo

esmyrnio / cppstt Goto Github PK

View Code? Open in Web Editor NEW
7.0 1.0 2.0 19.79 MB

Constructs neutron star models in the context of Damour-Esposito-Farese (DEF) scalar tensor theory and R^2 gravity model.

License: MIT License

C++ 99.79% Makefile 0.01% C 0.18% Perl 0.01% HTML 0.01% Python 0.01% M4 0.01% Batchfile 0.01% Shell 0.01% CMake 0.01% SWIG 0.01%
lsoda modified-gravity-theories neutron-star swig tov-solver scalar-tensor-theory

cppstt's Introduction

cppSTT

Description

Code for obtaining neutron star models for tabulated equations of state1, in the context of Damour-Esposito-Farese (DEF) scalar tensor theory model and R^2 gravity model. The system of ODEs is solved by implementing a C++11 version of LSODA2 and a C++ version of the Nelder-Mead method3, which is used for the optimization of the boundary conditions. Both of these libraries are slightly modified to fit the STT class in stt.h. Additionaly, some modules from the BOOST C++ library4 are used to interpolate the tabulated EoS. The code prints the model's parameters e.g. mass, radius, scalar charge, scalar at center and boundary minimization accuracy, for the corresponding input parameters.

The C++ code is wrapped using SWIG5, into a python library which can be imported and used in any way, as shown in swig/test.py.

Usage

Compile, using the provided makefile.

STT.exe takes 5 inputs in total. The parameters are specified using the following flags:

  1. -m theory (DEF or R2)
  2. -f eos name (EoS file name).
  3. -c coupling (model's coupling constant).
  4. -e central density (central energy density in CGS/10^15).

For example,

./STT -m DEF -f ppsly4.cold.rns1.1.txt -c -5.0 -e 1.5
./STT -m R2 -f ppsly4.cold.rns1.1.txt -c 20.0 -e 1.5

typical input parameter space:

  • central density ~ 0.5-4.0 (10^15 gr/cm^3)
  • coupling ~ (-5.0,-4.5) (DEF), (5,10^3) (R^2)

GR solutions may also be obtained simply by choosing "DEF" as theory and setting the coupling to zero.

Footnotes

  1. https://ui.adsabs.harvard.edu/abs/2021PhRvD.103l3004B/abstract (table IX)

  2. https://github.com/dilawar/libsoda-cxx

  3. https://people.sc.fsu.edu/~jburkardt/cpp_src/asa047/asa047.html

  4. https://github.com/boostorg/boost

  5. https://github.com/swig/swig

cppstt's People

Contributors

esmyrnio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

gpappasgr evak47

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.