Commit 0ec525f9 authored by Xavier Garrido's avatar Xavier Garrido
Browse files

add class engine as data member

parent fe84949f
......@@ -5,6 +5,9 @@
#include <iostream>
#include <cmath>
// CAMEL libraries
#include "Class/MnClassEngine.hh"
namespace cib {
cib_interface::cib_interface()
......@@ -17,8 +20,14 @@ namespace cib {
}
void cib_interface::initialize(// File to be parsed)
)
ClassEngine * klass_
)
{
if (_initialized_) {
throw std::logic_error("cib_interface::initialize: CIB model already initialized !");
}
_klass_ = klass_;
// law == "lognormal_sigevol"
_parameters_.Meffmax = 8753289339381.791;
_parameters_.etamax = 0.4028353504978569;
......@@ -102,7 +111,6 @@ namespace cib {
{
cib::array2d sfr_mhdot;
_compute_sfr_mhdot_(mhalo_, sfr_mhdot);
cib::dump(sfr_mhdot);
// cib::array2d mhdot;
// _compute_Mdot_(mhalo_, mhdot);
// cib::array1d ob = this->_cosmo_->Ob;
......
......@@ -3,6 +3,10 @@
#include "Astro/utils.h"
// Forward declaration
class ClassEngine;
namespace cib {
struct cib_parameters {
......@@ -25,7 +29,7 @@ namespace cib {
~cib_interface();
/// Initialize method
void initialize();
void initialize(ClassEngine* klass_);
/// Update CIB parameters
void update(const cib::cib_parameters & parameters_);
......@@ -47,6 +51,9 @@ namespace cib {
/// Initalized flag
bool _initialized_;
/// Class engine
ClassEngine * _klass_;
/// CIB parameter model
cib_parameters _parameters_;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment