[Commits] [svn:einsteintoolkit] EOS_Omni/trunk/src/nuc_eos_cxx/ (Rev. 102)
rhaas at tapir.caltech.edu
rhaas at tapir.caltech.edu
Wed Mar 12 22:01:59 CDT 2014
User: rhaas
Date: 2014/03/12 10:01 PM
Modified:
/trunk/src/nuc_eos_cxx/
helpers.hh, nuc_eos.hh, readtable.cc
Log:
EOS_Omni: move actual table data into namespace of its own
From: Roland Haas <rhaas at tapir.caltech.edu>
File Changes:
Directory: /trunk/src/nuc_eos_cxx/
==================================
File [modified]: helpers.hh
Delta lines: +9 -0
===================================================================
--- trunk/src/nuc_eos_cxx/helpers.hh 2014-03-13 03:01:55 UTC (rev 101)
+++ trunk/src/nuc_eos_cxx/helpers.hh 2014-03-13 03:01:59 UTC (rev 102)
@@ -79,6 +79,7 @@
int* restrict idx)
{
using namespace nuc_eos;
+ using namespace nuc_eos_private;
int ix = 1 + (int)( (x - logrho[0] - 1.0e-10) * drhoi );
int iy = 1 + (int)( (y - logtemp[0] - 1.0e-10) * dtempi );
@@ -115,6 +116,7 @@
int* restrict idx)
{
using namespace nuc_eos;
+ using namespace nuc_eos_private;
int ix = 1 + (int)( (x - logrho[0] - 1.0e-10) * drhoi );
int iy = 1;
@@ -150,6 +152,7 @@
int* restrict idx)
{
using namespace nuc_eos;
+ using namespace nuc_eos_private;
int ix = 1 + (int)( (x - logrho[0] - 1.0e-10) * drhoi );
int iy = 1;
@@ -185,6 +188,7 @@
const int iv)
{
using namespace nuc_eos;
+ using namespace nuc_eos_private;
// helper variables
double fh[8], a[8];
@@ -230,6 +234,7 @@
const int iv)
{
using namespace nuc_eos;
+ using namespace nuc_eos_private;
// helper variables
double fh[8], a[8];
@@ -276,6 +281,7 @@
{
using namespace nuc_eos;
+ using namespace nuc_eos_private;
// helper variables
double fh[8], a[8];
@@ -351,6 +357,7 @@
// iv is the index of the variable we do the bisection on
using namespace nuc_eos;
+ using namespace nuc_eos_private;
int bcount = 0;
int maxbcount = 80;
@@ -464,6 +471,7 @@
int *keyerrt) {
using namespace nuc_eos;
+ using namespace nuc_eos_private;
// local variables
const int itmax = 200; // use at most 10 iterations, then go to bisection
@@ -617,6 +625,7 @@
int *keyerrt) {
using namespace nuc_eos;
+ using namespace nuc_eos_private;
// local variables
const int itmax = 200; // use at most 10 iterations, then go to bisection
File [modified]: nuc_eos.hh
Delta lines: +27 -20
===================================================================
--- trunk/src/nuc_eos_cxx/nuc_eos.hh 2014-03-13 03:01:55 UTC (rev 101)
+++ trunk/src/nuc_eos_cxx/nuc_eos.hh 2014-03-13 03:01:59 UTC (rev 102)
@@ -20,28 +20,8 @@
namespace nuc_eos {
- extern int nrho;
- extern int ntemp;
- extern int nye;
-
- extern double * restrict alltables;
- extern double * restrict epstable;
- extern double * restrict logrho;
- extern double * restrict logtemp;
extern double temp0, temp1;
- extern double dlintemp,dlintempi;
- extern double drholintempi;
- extern double dlintempyei;
- extern double drholintempyei;
- extern double * restrict yes;
extern double energy_shift;
- extern double dtemp, dtempi;
- extern double drho, drhoi;
- extern double dye, dyei;
- extern double drhotempi;
- extern double drhoyei;
- extern double dtempyei;
- extern double drhotempyei;
// min and max values
@@ -77,4 +57,31 @@
i_Xh, i_Xn, i_Xp, i_Abar, i_Zbar, i_Gamma};
}
+namespace nuc_eos_private {
+
+// table data
+
+ extern int nrho;
+ extern int ntemp;
+ extern int nye;
+
+ extern double * restrict alltables;
+ extern double * restrict epstable;
+ extern double * restrict logrho;
+ extern double * restrict logtemp;
+ extern double dlintemp,dlintempi;
+ extern double drholintempi;
+ extern double dlintempyei;
+ extern double drholintempyei;
+ extern double * restrict yes;
+ extern double dtemp, dtempi;
+ extern double drho, drhoi;
+ extern double dye, dyei;
+ extern double drhotempi;
+ extern double drhoyei;
+ extern double dtempyei;
+ extern double drhotempyei;
+
+}
+
#endif // NUC_EOS_HH
File [modified]: readtable.cc
Delta lines: +13 -10
===================================================================
--- trunk/src/nuc_eos_cxx/readtable.cc 2014-03-13 03:01:55 UTC (rev 101)
+++ trunk/src/nuc_eos_cxx/readtable.cc 2014-03-13 03:01:59 UTC (rev 102)
@@ -32,6 +32,18 @@
// define the variables
namespace nuc_eos {
+ double temp0, temp1;
+ double energy_shift;
+
+ double eos_rhomax, eos_rhomin;
+ double eos_tempmin, eos_tempmax;
+ double eos_yemin, eos_yemax;
+
+ double c2p_tempmin;
+ double c2p_tempmax;
+
+}
+namespace nuc_eos_private {
int nrho;
int ntemp;
int nye;
@@ -40,13 +52,11 @@
double * restrict epstable;
double * restrict logrho;
double * restrict logtemp;
- double temp0, temp1;
double dlintemp, dlintempi;
double drholintempi;
double dlintempyei;
double drholintempyei;
double * restrict yes;
- double energy_shift;
double dtemp, dtempi;
double drho, drhoi;
double dye, dyei;
@@ -54,14 +64,6 @@
double drhoyei;
double dtempyei;
double drhotempyei;
-
- double eos_rhomax, eos_rhomin;
- double eos_tempmin, eos_tempmax;
- double eos_yemin, eos_yemax;
-
- double c2p_tempmin;
- double c2p_tempmax;
-
}
@@ -75,6 +77,7 @@
void nuc_eos_C_ReadTable(char* nuceos_table_name)
{
using namespace nuc_eos;
+ using namespace nuc_eos_private;
CCTK_VInfo(CCTK_THORNSTRING,"*******************************");
CCTK_VInfo(CCTK_THORNSTRING,"Reading nuc_eos table file:");
More information about the Commits
mailing list