25#ifndef _SOURCE_TFUNIVERSE_H_
26#define _SOURCE_TFUNIVERSE_H_
28#include "TissueForge_private.h"
29#ifdef TF_FPTYPE_SINGLE
30#include <mdcore_single.h>
32#include <mdcore_double.h>
35#include <unordered_map>
59 SHOW_PERF_STATS = 1 << 1,
62 IPYTHON_MSGLOOP = 1 << 2,
65 POLLING_MSGLOOP = 1 << 3,
82 bool isRunning =
false;
117 static HRESULT step(
const FloatP_t &until=0,
const FloatP_t &dt=0);
157 static std::vector<std::vector<std::vector<ParticleList> > >
grid(
iVector3 shape);
162 static std::vector<BondHandle>
bonds();
167 static std::vector<AngleHandle>
angles();
276 FloatP_t max_distance;
279 uint32_t timers_mask;
281 long timer_output_period;
287 boundaryConditionsPtr = _bcArgs;
291 if(boundaryConditionsPtr) {
292 delete boundaryConditionsPtr;
293 boundaryConditionsPtr = 0;
Definition tfMatrix3.h:35
HRESULT toFile(const T &dataElement, const MetaData &metaData, IOElement &fileElement)
Convert an object to an intermediate I/O object.
HRESULT fromFile(const IOElement &fileElement, const MetaData &metaData, T *dataElement)
Instantiate an object from an intermediate I/O object.
Include Python header, disable linking to pythonX_d.lib on Windows in debug mode.
Definition tfAngleConfig.h:26
HRESULT Universe_Step(FloatP_t until, FloatP_t dt)
int Universe_Flag(Universe::Flags flag)
HRESULT Universe_SetFlag(Universe::Flags flag, int value)
Definition tfBoundaryConditions.h:224
The BoundaryConditions class serves as a container for the six instances of the :class:BoundaryCondit...
Definition tfBoundaryConditions.h:117
A special list with convenience methods for working with sets of particles.
Definition tfParticleList.h:52
Initialize an #engine with the given data.
Definition tfUniverse.h:243
long start_step
Definition tfUniverse.h:259
FVector3 dim
Definition tfUniverse.h:245
int threads
Definition tfUniverse.h:264
unsigned int nr_fluxsteps
Definition tfUniverse.h:267
FloatP_t cutoff
Definition tfUniverse.h:251
iVector3 spaceGridSize
Definition tfUniverse.h:248
EngineIntegrator integrator
Definition tfUniverse.h:270
FloatP_t dt
Definition tfUniverse.h:256
The universe is a top level singleton object, and is automatically initialized when the simulator loa...
Definition tfUniverse.h:54
static FVector3 dim()
Gets the dimensions of the universe.
static std::vector< AngleHandle > angles()
Get all angles in the universe.
static FloatP_t getKineticEnergy()
Get the current system kinetic energy.
static FMatrix3 * virial(FVector3 *origin=NULL, FloatP_t *radius=NULL, std::vector< ParticleType * > *types=NULL)
Computes the virial tensor for the either the entire simulation domain, or a specific local virial te...
static unsigned int getNumFluxSteps()
Get the number of flux steps per simulation step.
static std::vector< int32_t > particleIds()
Gets all particles in the universe.
static HRESULT stop()
Stops the universe time evolution. This essentially freezes the universe, everything remains the same...
static void resetSpecies()
Reset all species in all particles.
static HRESULT start()
Starts the universe time evolution, and advanced the universe forward by timesteps in dt....
static std::vector< DihedralHandle > dihedrals()
Get all dihedrals in the universe.
static HRESULT step(const FloatP_t &until=0, const FloatP_t &dt=0)
Performs a single time step dt of the universe if no arguments are given. Optionally runs until until...
static FloatP_t getTime()
Get the current time.
static FloatP_t volume()
Gets the volume of the universe.
static std::vector< BondHandle > bonds()
Get all bonds in the universe.
static FVector3 getCenter()
static FloatP_t getTemperature()
Get the universe temperature.
static std::string getName()
Get the name of the model / script.
static FloatP_t getCutoff()
Get the global interaction cutoff distance.
static int getNumTypes()
Get the current number of registered particle types.
static ParticleList particles()
Gets all particles in the universe.
static BoundaryConditions * getBoundaryConditions()
static std::vector< std::vector< std::vector< ParticleList > > > grid(iVector3 shape)
Gets a three-dimesional array of particle lists, of all the particles in the system.
static FloatP_t getDt()
Get the period of a time step.
Definition tfEventList.h:36
Definition tfEventList.h:59
int32_t HRESULT
Definition tf_port.h:255