Develop #14
@ -18,6 +18,7 @@
|
|||||||
#include "Particle.hpp"
|
#include "Particle.hpp"
|
||||||
#include "constants.hpp"
|
#include "constants.hpp"
|
||||||
#include "typedefs.hpp"
|
#include "typedefs.hpp"
|
||||||
|
#include "utils.hpp"
|
||||||
|
|
||||||
#pragma omp declare reduction(+ : vec_3d : omp_out += omp_in) \
|
#pragma omp declare reduction(+ : vec_3d : omp_out += omp_in) \
|
||||||
initializer(omp_priv = omp_orig)
|
initializer(omp_priv = omp_orig)
|
||||||
@ -62,7 +63,7 @@ private:
|
|||||||
*
|
*
|
||||||
* @param i Index i for \f$k_{r,i,j}\f$
|
* @param i Index i for \f$k_{r,i,j}\f$
|
||||||
* @param j Index j for \f$k_{r,i,j}\f$
|
* @param j Index j for \f$k_{r,i,j}\f$
|
||||||
* @param dt the step length (delta time)
|
* @param dt The step length (delta time)
|
||||||
*
|
*
|
||||||
* @return vec_3d
|
* @return vec_3d
|
||||||
* */
|
* */
|
||||||
@ -192,6 +193,8 @@ public:
|
|||||||
* @param steps The amount of steps for the whole simulation
|
* @param steps The amount of steps for the whole simulation
|
||||||
* @param method The method to use when moving forward a timestep
|
* @param method The method to use when moving forward a timestep
|
||||||
* @param particle_interaction Turn particle interactions on/off
|
* @param particle_interaction Turn particle interactions on/off
|
||||||
|
*
|
||||||
|
* @return simulation_t
|
||||||
* */
|
* */
|
||||||
simulation_t simulate(double time, unsigned int steps,
|
simulation_t simulate(double time, unsigned int steps,
|
||||||
std::string method = "rk4",
|
std::string method = "rk4",
|
||||||
|
|||||||
@ -15,8 +15,8 @@
|
|||||||
#ifndef __TYPEDEFS__
|
#ifndef __TYPEDEFS__
|
||||||
#define __TYPEDEFS__
|
#define __TYPEDEFS__
|
||||||
|
|
||||||
#include <vector>
|
|
||||||
#include <armadillo>
|
#include <armadillo>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
/** @brief Typedef for the column of the result vector from simulating
|
/** @brief Typedef for the column of the result vector from simulating
|
||||||
* particles.
|
* particles.
|
||||||
|
|||||||
@ -19,6 +19,7 @@
|
|||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <sys/stat.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
/** @def DEBUG(msg)
|
/** @def DEBUG(msg)
|
||||||
@ -46,7 +47,7 @@
|
|||||||
__LINE__, msg)
|
__LINE__, msg)
|
||||||
|
|
||||||
/** @def __METHOD_NAME__
|
/** @def __METHOD_NAME__
|
||||||
* @brief Get the name of the current method/function.
|
* @brief Get the name of the current method/function without the return type.
|
||||||
* */
|
* */
|
||||||
#define __METHOD_NAME__ methodName(__PRETTY_FUNCTION__)
|
#define __METHOD_NAME__ methodName(__PRETTY_FUNCTION__)
|
||||||
|
|
||||||
@ -110,7 +111,7 @@ void m_assert(bool expr,
|
|||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
* */
|
* */
|
||||||
bool arma_vector_close_to(arma::vec &a, arma::vec &b, double tol=1e-8);
|
bool close_to(arma::vec &a, arma::vec &b, double tol=1e-8);
|
||||||
|
|
||||||
|
|
||||||
/** @brief Takes in the __PRETTY_FUNCTION__ string and removes the return type.
|
/** @brief Takes in the __PRETTY_FUNCTION__ string and removes the return type.
|
||||||
@ -141,7 +142,7 @@ static inline std::string methodName(const std::string& pretty_function)
|
|||||||
* @param path The path to be created
|
* @param path The path to be created
|
||||||
* @param mode The mode/permissions for all the new directories
|
* @param mode The mode/permissions for all the new directories
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool Success/Fail
|
||||||
* */
|
* */
|
||||||
bool mkpath(std::string path, int mode = 0777);
|
bool mkpath(std::string path, int mode = 0777);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user