Fast Methods for Cosmological Simulations
FastSim serves as a tool for quick N-body simulations in modified gravity.
grid.cpp File Reference
#include "grid.h"
#include <iostream>
#include <boost/log/trivial.hpp>
Include dependency graph for grid.cpp:

Go to the source code of this file.

Macros

#define BOOST_LOG_DYN_LINK   1
 

Functions

size_t power (size_t a, size_t b)
 

Macro Definition Documentation

#define BOOST_LOG_DYN_LINK   1

Definition at line 4 of file grid.cpp.

Function Documentation

size_t power ( size_t  a,
size_t  b 
)
inline

Definition at line 8 of file grid.cpp.

References pow().

Referenced by Grid< NDIM, T >::read_from_file().

8  {
9  size_t res = 1;
10  for(size_t i = 0; i < b; i++) {
11  res *= a;
12  }
13 #ifdef _BOUNDSCHECK
14  assert( (pow(1.0*a,1.0*b) - double(res)) < 0.5);
15 #endif
16  return res;
17 }
float pow(float base, unsigned long int exp)
Definition: precision.hpp:39