|
Tissue Forge C++ 0.2.1
Interactive, particle-based physics, chemistry and biology modeling and simulation environment
|
Include Python header, disable linking to pythonX_d.lib on Windows in debug mode. More...
Namespaces | |
| namespace | cuda |
| Tissue Forge GPU acceleration on CUDA-supporting devices. | |
| namespace | event |
| Tissue Forge event system. | |
| namespace | io |
| Tissue Forge I/O. | |
| namespace | metrics |
| Tissue Forge simulation metrics. | |
| namespace | models |
| Application-specific Tissue Forge models and methods. | |
| namespace | py |
| Tissue Forge Python language support. | |
| namespace | rendering |
| Tissue Forge rendering and visualization. | |
| namespace | shaders |
| Tissue Forge shaders. | |
| namespace | state |
| Tissue Forge state dynamics modeling features. | |
| namespace | types |
| Native Tissue Forge type definitions. | |
| namespace | util |
| Tissue Forge utilities. | |
Classes | |
| struct | Angle |
| A bond concerning an angle. More... | |
| struct | AngleHandle |
| A handle to an angle bond. More... | |
| struct | Berendsen |
| Berendsen force. More... | |
| struct | Bond |
| Bonds apply a potential to a particular set of particles. More... | |
| struct | BondHandle |
| Handle to a bond. More... | |
| struct | BoundaryCondition |
| A condition on a boundary of the universe. More... | |
| struct | BoundaryConditions |
The BoundaryConditions class serves as a container for the six instances of the :class:BoundaryCondition object. More... | |
| struct | BoundaryConditionsArgsContainer |
| struct | btree |
| struct | btree_node |
| struct | cellpair |
| struct | celltuple |
| struct | Cluster |
The cluster analogue to :class:Particle. More... | |
| struct | ClusterParticleHandle |
The cluster analogue to :class:ParticleHandle. More... | |
| struct | ClusterParticleType |
The cluster analogue to :class:ParticleType. More... | |
| struct | CustomForce |
| A custom force function. More... | |
| struct | Dihedral |
| struct | DihedralHandle |
| A handle to a dihedral bond. More... | |
| struct | DPDPotential |
| struct | engine |
| struct | engine_comm |
| struct | engine_set |
| struct | Error |
| struct | exclusion |
| struct | Flux |
| struct | Fluxes |
| A flux is defined between a pair of types, and acts on the state vector between a pair of instances. More... | |
| struct | Force |
| Force is a metatype, in that Tissue Forge has lots of different instances of force functions, that have different attributes, but only have one base type. More... | |
| struct | ForceSum |
| struct | Friction |
| Friction force. More... | |
| struct | Gaussian |
| Random force. More... | |
| class | Logger |
| class | LoggingBuffer |
| struct | Pair |
| struct | Particle |
| struct | ParticleHandle |
| A handle to a particle. More... | |
| struct | ParticleList |
| A special list with convenience methods for working with sets of particles. More... | |
| struct | ParticleType |
| Structure containing information on each particle type. More... | |
| struct | ParticleTypeList |
| A special list with convenience methods for working with sets of particle types. More... | |
| struct | Potential |
| A Potential object is a compiled interpolation of a given function. The Universe applies potentials to particles to calculate the net force on them. More... | |
| struct | queue |
| struct | rigid |
| struct | runner |
| struct | runner_fifo |
| struct | SecreteUptake |
| struct | Simulator |
| The Simulator is the entry point to simulation, this is the very first object that needs to be initialized before any other method can be called. All the methods of the Simulator are static, but the constructor needs to be called first to initialize everything. More... | |
| struct | space |
| struct | space_cell |
| the space_cell structure More... | |
| struct | SubEngine |
| A SubEngine is a singleton object that injects dynamics into the Tissue Forge engine. It does not necessarily integrate any object in time, but can also simply add to the dynamics of existing Tissue Forge objects. Tissue Forge supports an arbitrary number of subengines with multi-threading and GPU support. More... | |
| struct | task |
| class | ThreadPool |
| struct | TypeIdPair |
| struct | Universe |
| The universe is a top level singleton object, and is automatically initialized when the simulator loads. The universe is a representation of the physical universe that we are simulating, and is the repository for all physical object representations. More... | |
| struct | UniverseConfig |
| Initialize an engine with the given data. More... | |
| struct | verlet_entry |
Typedefs | |
| typedef enum TissueForge::AngleFlags | AngleFlags |
| typedef struct TissueForge::Angle | Angle |
| A bond concerning an angle. | |
| typedef enum TissueForge::BondFlags | BondFlags |
| typedef std::vector< Pair > | PairList |
| typedef struct TissueForge::Bond | Bond |
| Bonds apply a potential to a particular set of particles. | |
| typedef enum TissueForge::DihedralFlags | DihedralFlags |
| typedef struct TissueForge::Dihedral | Dihedral |
| typedef struct TissueForge::engine | engine |
| typedef struct TissueForge::engine_set | engine_set |
| typedef struct TissueForge::engine_comm | engine_comm |
| typedef struct TissueForge::exclusion | exclusion |
| typedef void(* | Force_EvalFcn) (struct Force *, struct Particle *, FPTYPE *) |
| using | UserForceFuncType = FVector3(*)(CustomForce*) |
| typedef enum TissueForge::ParticleTypeFlags | ParticleTypeFlags |
| typedef enum TissueForge::ParticleDynamics | ParticleDynamics |
| typedef enum TissueForge::ParticleFlags | ParticleFlags |
| typedef void(* | PotentialEval_ByParticle) (struct Potential *p, struct Particle *part_i, FPTYPE *dx, FPTYPE r2, FPTYPE *e, FPTYPE *f) |
| Potential function on a particle. | |
| typedef void(* | PotentialEval_ByParticles) (struct Potential *p, struct Particle *part_i, struct Particle *part_j, FPTYPE *dx, FPTYPE r2, FPTYPE *e, FPTYPE *f) |
| Pair potential function. | |
| typedef void(* | PotentialEval_ByParticles3) (struct Potential *p, struct Particle *part_i, struct Particle *part_j, struct Particle *part_k, FPTYPE ctheta, FPTYPE *e, FPTYPE *fi, FPTYPE *fk) |
| Like PotentialEval_ByParticles, but with three particles. | |
| typedef void(* | PotentialEval_ByParticles4) (struct Potential *p, struct Particle *part_i, struct Particle *part_j, struct Particle *part_k, struct Particle *part_l, FPTYPE cphi, FPTYPE *e, FPTYPE *fi, FPTYPE *fl) |
| Like PotentialEval_ByParticles, but with four particles. | |
| typedef struct Potential *(* | PotentialCreate) (struct Potential *partial_potential, struct ParticleType *a, struct ParticleType *b) |
| typedef void(* | PotentialClear) (struct Potential *p) |
| Callback issues when potential is cleared. | |
| typedef struct TissueForge::queue | queue |
| typedef struct TissueForge::rigid | rigid |
| typedef struct TissueForge::runner_fifo | runner_fifo |
| typedef struct TissueForge::runner | runner |
| typedef struct TissueForge::space | space |
| typedef struct TissueForge::space_cell | space_cell |
| the space_cell structure | |
| typedef struct TissueForge::task | task |
| typedef std::mt19937 | RandomType |
| typedef void(* | ErrorCallback) (const Error &err) |
| typedef HRESULT(* | LoggerCallback) (LogEvent, std::ostream *) |
| typedef types::TVector2< double > | dVector2 |
| typedef types::TVector3< double > | dVector3 |
| typedef types::TVector4< double > | dVector4 |
| typedef types::TVector2< float > | fVector2 |
| typedef types::TVector3< float > | fVector3 |
| typedef types::TVector4< float > | fVector4 |
| typedef types::TVector2< FloatP_t > | FVector2 |
| typedef types::TVector3< FloatP_t > | FVector3 |
| typedef types::TVector4< FloatP_t > | FVector4 |
| typedef types::TVector2< int > | iVector2 |
| typedef types::TVector3< int > | iVector3 |
| typedef types::TVector4< int > | iVector4 |
| typedef types::TVector2< unsigned int > | uiVector2 |
| typedef types::TVector3< unsigned int > | uiVector3 |
| typedef types::TVector4< unsigned int > | uiVector4 |
| typedef types::TMatrix3< double > | dMatrix3 |
| typedef types::TMatrix4< double > | dMatrix4 |
| typedef types::TMatrix3< float > | fMatrix3 |
| typedef types::TMatrix4< float > | fMatrix4 |
| typedef types::TMatrix3< FloatP_t > | FMatrix3 |
| typedef types::TMatrix4< FloatP_t > | FMatrix4 |
| typedef types::TQuaternion< double > | dQuaternion |
| typedef types::TQuaternion< float > | fQuaternion |
| typedef types::TQuaternion< FloatP_t > | FQuaternion |
Enumerations | |
| enum | MDCErrorCode : int { MDCERR_ok = 0 , MDCERR_io , MDCERR_null , MDCERR_malloc , MDCERR_range , MDCERR_space , MDCERR_pthread , MDCERR_runner , MDCERR_cell , MDCERR_domain , MDCERR_nompi , MDCERR_mpi , MDCERR_reader , MDCERR_potential , MDCERR_cuda , MDCERR_nocuda , MDCERR_cudasp , MDCERR_maxparts , MDCERR_queue , MDCERR_rigid , MDCERR_subengine , MDCERR_id , MDCERR_angsspot , MDCERR_dihsspot , MDCERR_engine , MDCERR_spe , MDCERR_mfc , MDCERR_unavail , MDCERR_fifo , MDCERR_verlet_overflow , MDCERR_tasktype , MDCERR_maxpairs , MDCERR_nrtasks , MDCERR_task , MDCERR_taskmaxunlock , MDCERR_notcluster , MDCERR_wrongptype , MDCERR_initorder , MDCERR_bond , MDCERR_angle , MDCERR_dihedral , MDCERR_exclusion , MDCERR_sets , MDCERR_toofast , MDCERR_index , MDCERR_large_state , MDCERR_min_types , MDCERR_bad_el_input , MDCERR_verify , MDCERR_badprop , MDCERR_particle , MDCERR_nyi , MDCERR_ivalsmax , MDCERR_fullqueue , MDCERR_lock , MDCERR_force , MDCERR_LAST } |
| enum | AngleFlags { ANGLE_NONE = 0 , ANGLE_ACTIVE = 1 << 0 } |
| enum | BondFlags { BOND_NONE = 0 , BOND_ACTIVE = 1 << 0 } |
| enum | BoundaryConditionKind : unsigned int { BOUNDARY_VELOCITY = 1 << 0 , BOUNDARY_PERIODIC = 1 << 1 , BOUNDARY_FREESLIP = 1 << 2 , BOUNDARY_POTENTIAL = 1 << 3 , BOUNDARY_NO_SLIP = 1 << 4 , BOUNDARY_RESETTING = 1 << 5 , BOUNDARY_ACTIVE = BOUNDARY_FREESLIP | BOUNDARY_VELOCITY | BOUNDARY_POTENTIAL } |
| enum | DihedralFlags { DIHEDRAL_NONE = 0 , DIHEDRAL_ACTIVE = 1 << 0 } |
| enum | EngineFlags { engine_flag_none = 0 , engine_flag_static = 1 << 0 , engine_flag_localparts = 1 << 1 , engine_flag_cuda = 1 << 2 , engine_flag_explepot = 1 << 3 , engine_flag_verlet = 1 << 4 , engine_flag_verlet_pairwise = 1 << 5 , engine_flag_affinity = 1 << 6 , engine_flag_prefetch = 1 << 7 , engine_flag_verlet_pseudo = 1 << 8 , engine_flag_shake = 1 << 9 , engine_flag_mpi = 1 << 10 , engine_flag_parbonded = 1 << 11 , engine_flag_async = 1 << 12 , engine_flag_sets = 1 << 13 , engine_flag_nullpart = 1 << 14 , engine_flag_initialized = 1 << 15 , engine_flag_velocity_clamp = 1 << 16 } |
| enum | EngineIntegrator { FORWARD_EULER , RUNGE_KUTTA_4 } |
| enum | { engine_timer_step = 0 , engine_timer_kinetic , engine_timer_prepare , engine_timer_verlet , engine_timer_exchange1 , engine_timer_nonbond , engine_timer_bonded , engine_timer_bonded_sort , engine_timer_bonds , engine_timer_angles , engine_timer_dihedrals , engine_timer_exclusions , engine_timer_advance , engine_timer_rigid , engine_timer_exchange2 , engine_timer_shuffle , engine_timer_cuda_load , engine_timer_cuda_unload , engine_timer_cuda_dopairs , engine_timer_render , engine_timer_image_data , engine_timer_render_total , engine_timer_total , engine_timer_last } |
| enum | { ENGINE_TIMER_STEP = 1 << 0 , ENGINE_TIMER_PREPARE = 1 << 1 , ENGINE_TIMER_VERLET = 1 << 2 , ENGINE_TIMER_EXCHANGE1 = 1 << 3 , ENGINE_TIMER_NONBOND = 1 << 4 , ENGINE_TIMER_BONDED = 1 << 5 , ENGINE_TIMER_BONDED_SORT = 1 << 6 , ENGINE_TIMER_BONDS = 1 << 7 , ENGINE_TIMER_ANGLES = 1 << 8 , ENGINE_TIMER_DIHEDRALS = 1 << 9 , ENGINE_TIMER_EXCLUSIONS = 1 << 10 , ENGINE_TIMER_ADVANCE = 1 << 11 , ENGINE_TIMER_RIGID = 1 << 12 , ENGINE_TIMER_EXCHANGE2 = 1 << 13 , ENGINE_TIMER_SHUFFLE = 1 << 14 , ENGINE_TIMER_CUDA_LOAD = 1 << 15 , ENGINE_TIMER_CUDA_UNLOAD = 1 << 16 , ENGINE_TIMER_CUDA_DOPAIRS = 1 << 17 , ENGINE_TIMER_RENDER = 1 << 18 , ENGINE_TIMER_LAST = 1 << 19 } |
| enum | { INTEGRATOR_UPDATE_PERSISTENTFORCE = 1 << 0 , INTEGRATOR_FLUX_SUBSTEP = 1 << 1 } |
| enum | FluxKind { FLUX_FICK = 0 , FLUX_SECRETE = 1 , FLUX_UPTAKE = 2 } |
| enum | FORCE_KIND { FORCE_ONEBODY , FORCE_PAIRWISE } |
| enum | FORCE_TYPE { FORCE_FORCE = 0 , FORCE_BERENDSEN = 1 << 0 , FORCE_GAUSSIAN = 1 << 1 , FORCE_FRICTION = 1 << 2 , FORCE_SUM = 1 << 3 , FORCE_CUSTOM = 1 << 4 } |
| enum | ParticleTypeFlags { PARTICLE_TYPE_NONE = 0 , PARTICLE_TYPE_INERTIAL = 1 << 0 , PARTICLE_TYPE_DISSAPATIVE = 1 << 1 } |
| enum | ParticleDynamics { PARTICLE_NEWTONIAN = 0 , PARTICLE_OVERDAMPED = 1 } |
| enum | ParticleFlags { PARTICLE_NONE = 0 , PARTICLE_GHOST = 1 << 0 , PARTICLE_CLUSTER = 1 << 1 , PARTICLE_BOUND = 1 << 2 , PARTICLE_FROZEN_X = 1 << 3 , PARTICLE_FROZEN_Y = 1 << 4 , PARTICLE_FROZEN_Z = 1 << 5 , PARTICLE_FROZEN = PARTICLE_FROZEN_X | PARTICLE_FROZEN_Y | PARTICLE_FROZEN_Z , PARTICLE_LARGE = 1 << 6 } |
| enum | ParticleListFlags { PARTICLELIST_OWNDATA = 1 << 0 , PARTICLELIST_MUTABLE = 1 << 1 } |
| enum | PotentialFlags { POTENTIAL_NONE = 0 , POTENTIAL_LJ126 = 1 << 0 , POTENTIAL_EWALD = 1 << 1 , POTENTIAL_COULOMB = 1 << 2 , POTENTIAL_SINGLE = 1 << 3 , POTENTIAL_R2 = 1 << 4 , POTENTIAL_R = 1 << 5 , POTENTIAL_ANGLE = 1 << 6 , POTENTIAL_HARMONIC = 1 << 7 , POTENTIAL_DIHEDRAL = 1 << 8 , POTENTIAL_SWITCH = 1 << 9 , POTENTIAL_REACTIVE = 1 << 10 , POTENTIAL_SCALED = 1 << 11 , POTENTIAL_SHIFTED = 1 << 12 , POTENTIAL_BOUND = 1 << 13 , POTENTIAL_SUM = 1 << 14 , POTENTIAL_PERIODIC = 1 << 15 , POTENTIAL_COULOMBR = 1 << 16 } |
| enum | PotentialKind { POTENTIAL_KIND_POTENTIAL , POTENTIAL_KIND_DPD , POTENTIAL_KIND_BYPARTICLES , POTENTIAL_KIND_COMBINATION } |
| enum | PeriodicFlags { space_periodic_none = 0 , space_periodic_x = 1 << 0 , space_periodic_y = 1 << 1 , space_periodic_z = 1 << 2 , space_periodic_full = (1 << 0) | (1 << 1) | (1 << 2) , space_periodic_ghost_x = 1 << 3 , space_periodic_ghost_y = 1 << 4 , space_periodic_ghost_z = 1 << 5 , space_periodic_ghost_full = (1 << 3) | (1 << 4) | (1 << 5) , SPACE_FREESLIP_X = 1 << 6 , SPACE_FREESLIP_Y = 1 << 7 , SPACE_FREESLIP_Z = 1 << 8 , SPACE_FREESLIP_FULL = (1 << 6) | (1 << 7) | (1 << 8) } |
| enum | CellFlags { cell_flag_none = 0 , cell_flag_ghost = 1 << 0 , cell_flag_wait = 1 << 1 , cell_flag_waited = 1 << 2 , cell_flag_marked = 1 << 3 , cell_flag_large = 1 << 4 , cell_active_top = 1 << 5 , cell_active_bottom = 1 << 6 , cell_active_left = 1 << 7 , cell_active_right = 1 << 8 , cell_active_front = 1 << 9 , cell_active_back = 1 << 10 , cell_periodic_top = 1 << 11 , cell_periodic_bottom = 1 << 12 , cell_periodic_left = 1 << 13 , cell_periodic_right = 1 << 14 , cell_periodic_front = 1 << 15 , cell_periodic_back = 1 << 16 , cell_periodic_x = cell_periodic_left | cell_periodic_right , cell_periodic_y = cell_periodic_front | cell_periodic_back , cell_periodic_z = cell_periodic_top | cell_periodic_bottom , cell_active_x = cell_active_left | cell_active_right , cell_active_y = cell_active_front | cell_active_back , cell_active_z = cell_active_top | cell_active_bottom , cell_active_any } |
| enum class | PointsType : unsigned int { Sphere , SolidSphere , Disk , SolidCube , Cube , Ring } |
| enum | LogLevel { LOG_CURRENT = 0 , LOG_FATAL = 1 , LOG_CRITICAL , LOG_ERROR , LOG_WARNING , LOG_NOTICE , LOG_INFORMATION , LOG_DEBUG , LOG_TRACE } |
| enum | LogEvent { LOG_OUTPUTSTREAM_CHANGED , LOG_LEVEL_CHANGED , LOG_CALLBACK_SET } |
| enum | StyleFlags { STYLE_VISIBLE = 1 << 0 , STYLE_STACKALLOC = 1 << 1 } |
Functions | |
| template<> | |
| Magnum::Vector2 | cast (PyObject *obj) |
| template<> | |
| Magnum::Vector3 | cast (PyObject *obj) |
| template<> | |
| Magnum::Vector4 | cast (PyObject *obj) |
| template<> | |
| Magnum::Vector2i | cast (PyObject *obj) |
| template<> | |
| Magnum::Vector3i | cast (PyObject *obj) |
| template<> | |
| fVector2 | cast (PyObject *obj) |
| template<> | |
| fVector3 | cast (PyObject *obj) |
| template<> | |
| fVector4 | cast (PyObject *obj) |
| template<> | |
| dVector2 | cast (PyObject *obj) |
| template<> | |
| dVector3 | cast (PyObject *obj) |
| template<> | |
| dVector4 | cast (PyObject *obj) |
| template<> | |
| iVector2 | cast (PyObject *obj) |
| template<> | |
| iVector3 | cast (PyObject *obj) |
| template<> | |
| PyObject * | cast< int16_t, PyObject * > (const int16_t &i) |
| template<> | |
| PyObject * | cast< uint16_t, PyObject * > (const uint16_t &i) |
| template<> | |
| PyObject * | cast< uint32_t, PyObject * > (const uint32_t &i) |
| template<> | |
| PyObject * | cast< uint64_t, PyObject * > (const uint64_t &i) |
| template<> | |
| PyObject * | cast< float, PyObject * > (const float &f) |
| template<> | |
| PyObject * | cast< double, PyObject * > (const double &f) |
| template<> | |
| float | cast (PyObject *obj) |
| template<> | |
| double | cast (PyObject *obj) |
| template<> | |
| PyObject * | cast< bool, PyObject * > (const bool &f) |
| template<> | |
| bool | cast (PyObject *obj) |
| template<> | |
| PyObject * | cast< int, PyObject * > (const int &i) |
| template<> | |
| int | cast (PyObject *obj) |
| template<> | |
| PyObject * | cast< std::string, PyObject * > (const std::string &s) |
| template<> | |
| std::string | cast (PyObject *o) |
| template<> | |
| int16_t | cast (PyObject *o) |
| template<> | |
| uint16_t | cast (PyObject *o) |
| template<> | |
| uint32_t | cast (PyObject *o) |
| template<> | |
| uint64_t | cast (PyObject *o) |
| FPTYPE | fptype_r2 (FPTYPE *x1, FPTYPE *x2, FPTYPE *dx) |
| Inlined function to compute the distance^2 between two vectors. | |
| HRESULT | Angle_Destroy (Angle *a) |
| Destroys an angle. | |
| HRESULT | Angle_DestroyAll () |
| Destroys all angles in the universe. | |
| HRESULT | angle_eval (struct Angle *a, int N, struct engine *e, FPTYPE *epot_out) |
| Evaluate a list of angleed interactions. | |
| HRESULT | angle_evalf (struct Angle *a, int N, struct engine *e, FPTYPE *f, FPTYPE *epot_out) |
| Evaluate a list of angleed interactions. | |
| std::vector< int32_t > | Angle_IdsForParticle (int32_t pid) |
| bool | operator< (const TissueForge::AngleHandle &lhs, const TissueForge::AngleHandle &rhs) |
| bool | operator> (const TissueForge::AngleHandle &lhs, const TissueForge::AngleHandle &rhs) |
| bool | operator<= (const TissueForge::AngleHandle &lhs, const TissueForge::AngleHandle &rhs) |
| bool | operator>= (const TissueForge::AngleHandle &lhs, const TissueForge::AngleHandle &rhs) |
| bool | operator== (const TissueForge::AngleHandle &lhs, const TissueForge::AngleHandle &rhs) |
| bool | operator!= (const TissueForge::AngleHandle &lhs, const TissueForge::AngleHandle &rhs) |
| bool | contains_bond (const std::vector< BondHandle > &bonds, int a, int b) |
| HRESULT | Bond_Destroy (Bond *b) |
| HRESULT | Bond_DestroyAll () |
| Deletes all bonds in the universe. | |
| HRESULT | Bond_Energy (Bond *b, FPTYPE *epot_out) |
| HRESULT | bond_eval (Bond *b, int N, struct engine *e, FPTYPE *epot_out) |
| Evaluate a list of bonded interactions. | |
| HRESULT | bond_evalf (Bond *b, int N, struct engine *e, FPTYPE *f, FPTYPE *epot_out) |
| Evaluate a list of bonded interactions. | |
| std::vector< int32_t > | Bond_IdsForParticle (int32_t pid) |
| int | insert_bond (std::vector< BondHandle > &bonds, int a, int b, Potential *pot, ParticleList *parts) |
| bool | operator< (const TissueForge::BondHandle &lhs, const TissueForge::BondHandle &rhs) |
| bool | operator> (const TissueForge::BondHandle &lhs, const TissueForge::BondHandle &rhs) |
| bool | operator<= (const TissueForge::BondHandle &lhs, const TissueForge::BondHandle &rhs) |
| bool | operator>= (const TissueForge::BondHandle &lhs, const TissueForge::BondHandle &rhs) |
| bool | operator== (const TissueForge::BondHandle &lhs, const TissueForge::BondHandle &rhs) |
| bool | operator!= (const TissueForge::BondHandle &lhs, const TissueForge::BondHandle &rhs) |
| void | apply_boundary_particle_crossing (struct Particle *p, const int *delta, const struct space_cell *source_cell, const struct space_cell *dest_cell) |
| HRESULT | Cluster_AddParticle (struct Cluster *cluster, struct Particle *part) |
| HRESULT | Cluster_ComputeAggregateQuantities (struct Cluster *cluster) |
| Particle * | Cluster_CreateParticle (Cluster *cluster, ParticleType *particleType, FVector3 *position=NULL, FVector3 *velocity=NULL) |
| ClusterParticleType * | ClusterParticleType_FindFromName (const char *name) |
| Get a registered cluster type by type name. | |
| HRESULT | _Cluster_init () |
| Cluster * | Cluster_fromString (const std::string &str) |
| Create a cluster from a JSON string representation. | |
| ClusterParticleType * | ClusterParticleType_fromString (const std::string &str) |
| Create a cluster type from a JSON string representation. | |
| HRESULT | Dihedral_Destroy (Dihedral *d) |
| Destroys a dihedral. | |
| HRESULT | Dihedral_DestroyAll () |
| Destroys all dihedrals in the universe. | |
| HRESULT | dihedral_eval (struct Dihedral *d, int N, struct engine *e, FPTYPE *epot_out) |
| Evaluate a list of dihedraled interactions. | |
| HRESULT | dihedral_evalf (struct Dihedral *d, int N, struct engine *e, FPTYPE *f, FPTYPE *epot_out) |
| Evaluate a list of dihedraled interactions. | |
| std::vector< int32_t > | Dihedral_IdsForParticle (int32_t pid) |
| bool | operator< (const TissueForge::DihedralHandle &lhs, const TissueForge::DihedralHandle &rhs) |
| bool | operator> (const TissueForge::DihedralHandle &lhs, const TissueForge::DihedralHandle &rhs) |
| bool | operator<= (const TissueForge::DihedralHandle &lhs, const TissueForge::DihedralHandle &rhs) |
| bool | operator>= (const TissueForge::DihedralHandle &lhs, const TissueForge::DihedralHandle &rhs) |
| bool | operator== (const TissueForge::DihedralHandle &lhs, const TissueForge::DihedralHandle &rhs) |
| bool | operator!= (const TissueForge::DihedralHandle &lhs, const TissueForge::DihedralHandle &rhs) |
| DPDPotential * | DPDPotential_fromStr (const std::string &str) |
| HRESULT | engine_addpot (struct engine *e, struct Potential *p, int i, int j) |
| Add an interaction potential. | |
| HRESULT | engine_addfluxes (struct engine *e, struct Fluxes *f, int i, int j) |
| Add fluxes to a particle of particle types. | |
| Fluxes * | engine_getfluxes (struct engine *e, int i, int j) |
| Get a fluxes between two particles. | |
| HRESULT | engine_add_singlebody_force (struct engine *e, struct Force *p, int typeId) |
| int | engine_angle_alloc (struct engine *e, Angle **out) |
| HRESULT | engine_angle_eval (struct engine *e) |
| Compute the angled interactions stored in this engine. | |
| HRESULT | engine_barrier (struct engine *e) |
Barrier routine to hold the runners back. | |
| HRESULT | engine_bond_eval (struct engine *e) |
| Compute the bonded interactions stored in this engine. | |
| HRESULT | engine_bonded_eval (struct engine *e) |
| Compute all bonded interactions stored in this engine. | |
| HRESULT | engine_bonded_eval_sets (struct engine *e) |
| Compute all bonded interactions stored in this engine. | |
| HRESULT | engine_bonded_sets (struct engine *e, int max_sets) |
| Assemble non-conflicting sets of bonded interactions. | |
| int | engine_dihedral_alloc (struct engine *e, Dihedral **out) |
| HRESULT | engine_dihedral_eval (struct engine *e) |
| Compute the dihedral interactions stored in this engine. | |
| HRESULT | engine_exclusion_add (struct engine *e, int i, int j) |
| Add a exclusioned interaction to the engine. | |
| HRESULT | engine_exclusion_eval (struct engine *e) |
| Compute the exclusioned interactions stored in this engine. | |
| HRESULT | engine_exclusion_shrink (struct engine *e) |
| Remove duplicate exclusions. | |
| HRESULT | engine_finalize (struct engine *e) |
| Kill all runners and de-allocate the data of an engine. | |
| HRESULT | engine_flush_ghosts (struct engine *e) |
| Clear all particles from this engine's ghost cells. | |
| HRESULT | engine_flush (struct engine *e) |
| Clear all particles from this engine. | |
| int | engine_gettype (struct engine *e, char *name) |
| Look for a given type by name. | |
| int | engine_gettype2 (struct engine *e, char *name2) |
| Look for a given type by its second name. | |
| int | engine_bond_alloc (struct engine *e, struct Bond **result) |
| struct ParticleType * | engine_type (int id) |
| HRESULT | engine_addpart (struct engine *e, struct Particle *p, FPTYPE *x, struct Particle **result) |
| Add a #part to a space at the given coordinates. The given particle p is only used for the attributes, it itself is not added, rather a new memory block is allocated, and the contents of p get copied in there. | |
| HRESULT | engine_addparts (struct engine *e, int nr_parts, struct Particle **parts, FPTYPE **x) |
| Add parts to space at given coordinates. | |
| int | engine_addtype (struct engine *e, FPTYPE mass, FPTYPE charge, const char *name, const char *name2) |
| Add a type definition. | |
| HRESULT | engine_init (struct engine *e, const FPTYPE *origin, const FPTYPE *dim, int *cells, FPTYPE cutoff, BoundaryConditionsArgsContainer *boundaryConditions, int max_type, unsigned int flags, unsigned int nr_fluxsteps) |
| Initialize an engine with the given data. | |
| HRESULT | engine_reset (struct engine *e) |
| HRESULT | engine_load_ghosts (struct engine *e, FPTYPE *x, FPTYPE *v, int *type, int *pid, int *vid, FPTYPE *q, unsigned int *flags, int N) |
| Load a set of particle data as ghosts. | |
| HRESULT | engine_load (struct engine *e, FPTYPE *x, FPTYPE *v, int *type, int *pid, int *vid, FPTYPE *charge, unsigned int *flags, int N) |
| Load a set of particle data. | |
| HRESULT | engine_nonbond_eval (struct engine *e) |
| Compute the nonbonded interactions in the current step. | |
| HRESULT | engine_fluxonly_eval (struct engine *e) |
| Compute the flux interaction only in the current step. | |
| HRESULT | engine_rigid_add (struct engine *e, int pid, int pjd, FPTYPE d) |
| Add a rigid constraint to the engine. | |
| HRESULT | engine_rigid_eval (struct engine *e) |
| Resolve the constraints. | |
| HRESULT | engine_rigid_sort (struct engine *e) |
| Split the rigids into local, semilocal and non-local. | |
| HRESULT | engine_rigid_unsort (struct engine *e) |
| Shuffle the rigid constraints randomly. | |
| HRESULT | engine_shuffle (struct engine *e) |
| Re-shuffle the particles in the engine. | |
| HRESULT | engine_split_bisect (struct engine *e, int N, int particle_flags) |
| Split the computational domain over a number of nodes using bisection. | |
| HRESULT | engine_split (struct engine *e) |
| Set-up the engine for distributed-memory parallel operation. | |
| HRESULT | engine_start (struct engine *e, int nr_runners, int nr_queues) |
| Start the runners in the given engine. | |
| HRESULT | engine_step (struct engine *e) |
| Run the engine for a single time step. | |
| HRESULT | engine_timers_reset (struct engine *e) |
| Set all the engine timers to 0. | |
| int | engine_unload_marked (struct engine *e, FPTYPE *x, FPTYPE *v, int *type, int *pid, int *vid, FPTYPE *q, unsigned int *flags, FPTYPE *epot, int N) |
| Unload a set of particle data from the marked cells of an engine. | |
| int | engine_unload_strays (struct engine *e, FPTYPE *x, FPTYPE *v, int *type, int *pid, int *vid, FPTYPE *q, unsigned int *flags, FPTYPE *epot, int N) |
| Unload real particles that may have wandered into a ghost cell. | |
| int | engine_unload (struct engine *e, FPTYPE *x, FPTYPE *v, int *type, int *pid, int *vid, FPTYPE *charge, unsigned int *flags, FPTYPE *epot, int N) |
| Unload a set of particle data from the engine. | |
| HRESULT | engine_verlet_update (struct engine *e) |
| Check if the Verlet-list needs to be updated. | |
| int | engine_next_partid (struct engine *e) |
| HRESULT | engine_next_partids (struct engine *e, int nr_ids, int *ids) |
| HRESULT | engine_force_prep (struct engine *e) |
| HRESULT | engine_force (struct engine *e) |
| HRESULT | engine_del_particle (struct engine *e, int pid) |
| FPTYPE | engine_steps_per_second () |
| void | engine_dump () |
| FPTYPE | engine_kinetic_energy (struct engine *e) |
| FPTYPE | engine_temperature (struct engine *e) |
| FVector3 | engine_origin () |
| FVector3 | engine_dimensions () |
| FVector3 | engine_center () |
| struct engine * | engine_get () |
| Particle * | Particle_FromId (int id) |
| HRESULT | exclusion_eval (struct exclusion *b, int N, struct engine *e, FPTYPE *epot_out) |
| Evaluate a list of exclusioned interactions. | |
| HRESULT | exclusion_evalf (struct exclusion *b, int N, struct engine *e, FPTYPE *f, FPTYPE *epot_out) |
| Evaluate a list of exclusioned interactions. | |
| HRESULT | Fluxes_integrate (space_cell *cell, FPTYPE dt=-1.0) |
| HRESULT | Fluxes_integrate (int cellId) |
| Force * | Force_add (Force *f1, Force *f2) |
| ForceSum * | ForceSum_fromStr (const std::string &str) |
| Berendsen * | Berendsen_fromStr (const std::string &str) |
| Gaussian * | Gaussian_fromStr (const std::string &str) |
| Friction * | Friction_fromStr (const std::string &str) |
| HRESULT | Particle_Verify () |
| ParticleType * | Particle_GetType () |
| ParticleType * | Cluster_GetType () |
| ParticleType * | ParticleType_ForEngine (struct engine *e, FPTYPE mass, FPTYPE charge, const char *name, const char *name2) |
| ParticleType * | ParticleType_New (const char *_name) |
| ParticleType * | ParticleType_FindFromName (const char *name) |
| Get a registered particle type by type name. | |
| Particle * | Particle_Get (ParticleHandle *pypart) |
| ParticleHandle * | Particle_split (Particle *self, const FVector3 &childDirection, const FPTYPE &childRatio, const std::vector< FPTYPE > *speciesRatios=NULL, ParticleType *parentType=NULL, ParticleType *childType=NULL) |
| ParticleHandle * | Particle_New (ParticleType *type, FVector3 *positn=NULL, FVector3 *velocity=NULL, int *clusterId=NULL) |
| std::vector< int > | Particles_New (std::vector< ParticleType * > types, std::vector< FVector3 > *positions=NULL, std::vector< FVector3 > *velocities=NULL, std::vector< int > *clusterIds=NULL) |
| std::vector< int > | Particles_New (ParticleType *type, unsigned int nr_parts=0, std::vector< FVector3 > *positions=NULL, std::vector< FVector3 > *velocities=NULL, std::vector< int > *clusterIds=NULL) |
| HRESULT | Particle_Become (Particle *part, ParticleType *type) |
| bool | ParticleType_checkRegistered (ParticleType *type) |
| HRESULT | _Particle_init () |
| bool | operator< (const TissueForge::ParticleHandle &lhs, const TissueForge::ParticleHandle &rhs) |
| bool | operator> (const TissueForge::ParticleHandle &lhs, const TissueForge::ParticleHandle &rhs) |
| bool | operator<= (const TissueForge::ParticleHandle &lhs, const TissueForge::ParticleHandle &rhs) |
| bool | operator>= (const TissueForge::ParticleHandle &lhs, const TissueForge::ParticleHandle &rhs) |
| bool | operator== (const TissueForge::ParticleHandle &lhs, const TissueForge::ParticleHandle &rhs) |
| bool | operator!= (const TissueForge::ParticleHandle &lhs, const TissueForge::ParticleHandle &rhs) |
| bool | operator< (const TissueForge::ParticleType &lhs, const TissueForge::ParticleType &rhs) |
| bool | operator> (const TissueForge::ParticleType &lhs, const TissueForge::ParticleType &rhs) |
| bool | operator<= (const TissueForge::ParticleType &lhs, const TissueForge::ParticleType &rhs) |
| bool | operator>= (const TissueForge::ParticleType &lhs, const TissueForge::ParticleType &rhs) |
| bool | operator== (const TissueForge::ParticleType &lhs, const TissueForge::ParticleType &rhs) |
| bool | operator!= (const TissueForge::ParticleType &lhs, const TissueForge::ParticleType &rhs) |
| void | potential_clear (struct Potential *p) |
| Free the memory associated with the given potential. | |
| HRESULT | potential_init (struct Potential *p, FPTYPE(*f)(FPTYPE), FPTYPE(*fp)(FPTYPE), FPTYPE(*f6p)(FPTYPE), FPTYPE a, FPTYPE b, FPTYPE tol) |
| Construct a #potential from the given function. | |
| HRESULT | potential_getcoeffs (FPTYPE(*f)(FPTYPE), FPTYPE(*fp)(FPTYPE), FPTYPE *xi, int n, FPTYPE *c, FPTYPE *err) |
| FPTYPE | potential_getalpha (FPTYPE(*f6p)(FPTYPE), FPTYPE a, FPTYPE b) |
| HRESULT | queue_init (struct queue *q, int size, struct space *s, struct task *tasks) |
| Initialize a task queue. | |
| void | queue_reset (struct queue *q) |
| Reset the queue. | |
| int | queue_insert (struct queue *q, struct task *t) |
| Add an index to the given queue. | |
| struct task * | queue_get (struct queue *q, int rid, int keep) |
| Get a task from the queue. | |
| HRESULT | rigid_eval_shake (struct rigid *r, int N, struct engine *e) |
| Evaluate (SHAKE) a list of rigid constraints. | |
| HRESULT | rigid_eval_pshake (struct rigid *r, int N, struct engine *e, int a_update) |
| Evaluate (P-SHAKE) a list of rigid constraints. | |
| HRESULT | runner_init (struct runner *r, struct engine *e, int id) |
| Initialize the runner associated to the given engine. | |
| HRESULT | runner_run (struct runner *r) |
| void | runner_sort_ascending (unsigned int *parts, int N) |
| Sort the particles in ascending order using QuickSort. | |
| void | runner_sort_descending (unsigned int *parts, int N) |
| Sort the particles in descending order using QuickSort. | |
| HRESULT | runner_verlet_eval (struct runner *r, struct space_cell *c, FPTYPE *f_out) |
| Compute the interactions between the particles in the given space_cell using the verlet list. | |
| HRESULT | runner_verlet_fill (struct runner *r, struct space_cell *cell_i, struct space_cell *cell_j, FPTYPE *pshift) |
| Fill in the Verlet list entries for the given space_cell pair. | |
| HRESULT | runner_dosort (struct runner *r, struct space_cell *c, int flags) |
| Fill in the pairwise Verlet list entries for the given cell pair if needed and compute the interactions. | |
| HRESULT | runner_dopair (struct runner *r, struct space_cell *cell_i, struct space_cell *cell_j, int sid) |
| Compute the pairwise interactions for the given pair. | |
| HRESULT | runner_dopair_fluxonly (struct runner *r, struct space_cell *cell_i, struct space_cell *cell_j, int sid) |
| Compute the pairwise fluxes for the given pair. | |
| HRESULT | runner_doself (struct runner *r, struct space_cell *cell_i) |
| Compute the self-interactions for the given cell. | |
| HRESULT | runner_doself_fluxonly (struct runner *r, struct space_cell *cell_i) |
| Compute the self-fluxes for the given cell. | |
| HRESULT | Secrete_AmountToParticles (struct state::SpeciesValue *species, FPTYPE amount, uint16_t nr_parts, int32_t *parts, FPTYPE *secreted) |
| HRESULT | Secrete_AmountWithinDistance (struct state::SpeciesValue *species, FPTYPE amount, FPTYPE radius, const std::set< short int > *typeIds, FPTYPE *secreted) |
| HRESULT | space_init (struct space *s, const FPTYPE *origin, const FPTYPE *dim, FPTYPE *L, FPTYPE cutoff, const struct BoundaryConditions *bc) |
| Initialize the space with the given dimensions. | |
| int | space_getsid (struct space *s, struct space_cell **ci, struct space_cell **cj, FPTYPE *shift) |
| Get the sort-ID and flip the cells if necessary. | |
| HRESULT | space_shuffle (struct space *s) |
| Run through the cells of a space and make sure every particle is in its place. | |
| HRESULT | space_shuffle_local (struct space *s) |
| Run through the non-ghost cells of a space and make sure every particle is in its place. | |
| HRESULT | space_growparts (struct space *s, unsigned int size_incr) |
| Grow the parts allocated to a space. | |
| HRESULT | space_addpart (struct space *s, struct Particle *p, FPTYPE *x, struct Particle **result) |
| Add a #part to a space at the given coordinates. The given particle p is only used for the attributes, it itself is not added, rather a new memory block is allocated, and the contents of p get copied in there. | |
| HRESULT | space_addparts (struct space *s, int nr_parts, struct Particle **parts, FPTYPE **xparts) |
| int | space_get_cellids_for_pos (struct space *s, FPTYPE *x, int *cellids) |
| HRESULT | space_del_particle (struct space *s, int pid) |
| HRESULT | space_update_style (struct space *s) |
| HRESULT | space_prepare_tasks (struct space *s) |
| Prepare the tasks before a time step. | |
| HRESULT | space_prepare (struct space *s) |
| Prepare the space before a time step. | |
| HRESULT | space_getpos (struct space *s, int id, FPTYPE *x) |
| Get the absolute position of a particle. | |
| HRESULT | space_setpos (struct space *s, int id, FPTYPE *x) |
| Set the absolute position of a particle. | |
| HRESULT | space_flush (struct space *s) |
| Clear all particles from this space. | |
| HRESULT | space_flush_ghosts (struct space *s) |
| Clear all particles from the ghost cells in this space. | |
| struct task * | space_addtask (struct space *s, int type, int subtype, int flags, int i, int j) |
| Add a task to the given space. | |
| HRESULT | space_verlet_init (struct space *s, int list_global) |
| Initialize the Verlet-list data structures. | |
| int | space_gettuple (struct space *s, struct celltuple **out, int wait) |
| Get the next free celltuple from the space. | |
| int | space_getcell (struct space *s, struct space_cell **out) |
| Get the next unprocessed cell from the spaece. | |
| int | space_verlet_force (struct space *s, FPTYPE *f, FPTYPE epot) |
| Collect forces and potential energies. | |
| HRESULT | space_releasepair (struct space *s, int ci, int cj) |
| Free the cells involved in the current pair. | |
| HRESULT | space_cell_init (struct space_cell *c, int *loc, FPTYPE *origin, FPTYPE *dim) |
| Initialize the given cell. | |
| struct Particle * | space_cell_add (struct space_cell *c, struct Particle *p, struct Particle **partlist) |
| Add a particle to a cell. | |
| HRESULT | space_cell_remove (struct space_cell *c, struct Particle *p, struct Particle **partlist) |
| Remove a particle from a cell. | |
| struct Particle * | space_cell_add_incomming (struct space_cell *c, struct Particle *p) |
| Add a particle to the incomming array of a cell. | |
| int | space_cell_add_incomming_multiple (struct space_cell *c, struct Particle *p, int count) |
| Add one or more particles to the incomming array of a cell. | |
| HRESULT | space_cell_welcome (struct space_cell *c, struct Particle **partlist) |
| Move particles from the incomming buffer to the cell. | |
| HRESULT | space_cell_load (struct space_cell *c, struct Particle *parts, int nr_parts, struct Particle **partlist, struct space_cell **celllist) |
| Load a block of particles to the cell. | |
| FPTYPE | space_cell_gaussian (int cell_id) |
| HRESULT | space_cell_flush (struct space_cell *c, struct Particle **partlist, struct space_cell **celllist) |
| Flush all the parts from a #cell. | |
| HRESULT | task_addunlock (struct task *ta, struct task *tb) |
| Add a task dependency. | |
| bool | apply_update_pos_vel (Particle *p, space_cell *c, const FPTYPE *h, int *delta) |
| bool | boundary_potential_eval_ex (const struct space_cell *cell, Potential *pot, Particle *part, BoundaryCondition *bc, FPTYPE *dx, FPTYPE r2, FPTYPE *epot) |
| bool | boundary_eval (BoundaryConditions *bc, const struct space_cell *cell, Particle *part, FPTYPE *epot) |
| TF_ALWAYS_INLINE bool | dpd_eval (DPDPotential *p, FPTYPE gaussian, Particle *pi, Particle *pj, FPTYPE *dx, FPTYPE r2, FPTYPE *energy) |
| TF_ALWAYS_INLINE bool | dpd_boundary_eval (DPDPotential *p, FPTYPE gaussian, Particle *pi, FPTYPE &rj, const FPTYPE *velocity, const FPTYPE *dx, FPTYPE r2, FPTYPE *energy) |
| HRESULT | engine_advance (struct engine *e) |
| Update the particle velocities and positions, re-shuffle if appropriate. | |
| FPTYPE | flux_fick (Flux *flux, int i, FPTYPE si, FPTYPE sj) |
| FPTYPE | flux_secrete (Flux *flux, int i, FPTYPE si, FPTYPE sj) |
| FPTYPE | flux_uptake (Flux *flux, int i, FPTYPE si, FPTYPE sj) |
| void | flux_eval_ex (struct Fluxes *f, FPTYPE r2, Particle *part_i, Particle *part_j) |
| Fluxes * | get_fluxes (const Particle *a, const Particle *b) |
| TF_ALWAYS_INLINE FPTYPE | potential_eval_adjust_distance (struct Potential *p, FPTYPE ri, FPTYPE rj, FPTYPE r) |
| TF_ALWAYS_INLINE FPTYPE | potential_eval_adjust_distance2 (struct Potential *p, FPTYPE ri, FPTYPE rj, FPTYPE r2) |
| TF_ALWAYS_INLINE void | potential_eval (struct Potential *p, FPTYPE r2, FPTYPE *e, FPTYPE *f) |
| Evaluates the given potential at the given point (interpolated). | |
| TF_ALWAYS_INLINE bool | potential_eval_ex (struct Potential *p, FPTYPE ri, FPTYPE rj, FPTYPE r2, FPTYPE *e, FPTYPE *f) |
| TF_ALWAYS_INLINE void | potential_eval_r (struct Potential *p, FPTYPE r, FPTYPE *e, FPTYPE *f) |
| Evaluates the given potential at the given point (interpolated). | |
| TF_ALWAYS_INLINE bool | potential_eval_super_ex (const space_cell *cell, Potential *pot, Particle *part_i, Particle *part_j, FPTYPE *dx, FPTYPE r2, FPTYPE *epot) |
| TF_ALWAYS_INLINE void | potential_eval_expl (struct Potential *p, FPTYPE r2, FPTYPE *e, FPTYPE *f) |
| Evaluates the given potential at the given radius explicitly. | |
| TF_ALWAYS_INLINE void | potential_eval_vec_4single (struct Potential *p[4], float *r2, float *e, float *f) |
| Evaluates the given potential at a set of points (interpolated). | |
| TF_ALWAYS_INLINE void | potential_eval_vec_4single_old (struct Potential *p[4], float *r2, float *e, float *f) |
| Evaluates the given potential at a set of points (interpolated). | |
| TF_ALWAYS_INLINE void | potential_eval_vec_4single_r (struct Potential *p[4], float *r_in, float *e, float *f) |
| Evaluates the given potential at a set of points (interpolated). | |
| TF_ALWAYS_INLINE void | potential_eval_vec_8single (struct Potential *p[8], float *r2, float *e, float *f) |
| Evaluates the given potential at a set of points (interpolated). | |
| TF_ALWAYS_INLINE void | potential_eval_vec_8single_r (struct Potential *p[8], float *r2, float *e, float *f) |
| TF_ALWAYS_INLINE void | potential_eval_vec_2double (struct Potential *p[2], FPTYPE *r2, FPTYPE *e, FPTYPE *f) |
| Evaluates the given potential at a set of points (interpolated). | |
| TF_ALWAYS_INLINE void | potential_eval_vec_4double (struct Potential *p[4], FPTYPE *r2, FPTYPE *e, FPTYPE *f) |
| Evaluates the given potential at a set of points (interpolated). | |
| TF_ALWAYS_INLINE void | potential_eval_vec_4double_r (struct Potential *p[4], FPTYPE *r_in, FPTYPE *e, FPTYPE *f) |
| Evaluates the given potential at a set of points (interpolated). | |
| TF_ALWAYS_INLINE Potential * | get_potential (const Particle *a, const Particle *b) |
| TF_ALWAYS_INLINE FPTYPE | w_cubic_spline (FPTYPE r2, FPTYPE h) |
| TF_ALWAYS_INLINE FPTYPE | grad_w_cubic_spline (FPTYPE r2, FPTYPE h) |
| TF_ALWAYS_INLINE FPTYPE | W (FPTYPE r2, FPTYPE h) |
| TF_ALWAYS_INLINE FPTYPE | grad_W (FPTYPE r2, FPTYPE h) |
| int | btree_init (struct btree *b) |
| struct btree_node * | btree_getnode (struct btree *b) |
| int | btree_insert (struct btree *b, int key, void *data) |
| int | btree_map (struct btree *b, int(*func)(void *, void *), void *data) |
| int | btree_find (struct btree *b, int key, void **res) |
| int | btree_releasenode (struct btree *b, struct btree_node *n) |
| int | btree_delete (struct btree *b, int key, void **res) |
| std::vector< fVector4 > | parsePlaneEquation (const std::vector< std::tuple< fVector3, fVector3 > > &clipPlanes) |
| RandomType & | randomEngine () |
| unsigned int | getSeed () |
| Get the current seed for the pseudo-random number generator. | |
| HRESULT | setSeed (const unsigned int *_seed=0) |
| Set the current seed for the pseudo-random number generator. | |
| std::vector< std::string > | color3Names () |
| Get the names of all available colors. | |
| FVector4 | planeEquation (const FVector3 &normal, const FVector3 &point) |
| Get the coefficients of a plane equation for a normal vector and point. | |
| std::tuple< FVector3 FVector3 > | planeEquation (const FVector4 &planeEq) |
| Get the plane normal and a plane point from the coefficients of a plane equation. | |
| FVector3 | randomPoint (const PointsType &kind, const FloatP_t &dr=0, const FloatP_t &phi0=0, const FloatP_t &phi1=M_PI) |
| Get the coordinates of a random point in a kind of shape. | |
| std::vector< FVector3 > | randomPoints (const PointsType &kind, const int &n=1, const FloatP_t &dr=0, const FloatP_t &phi0=0, const FloatP_t &phi1=M_PI) |
| Get the coordinates of random points in a kind of shape. | |
| std::vector< FVector3 > | points (const PointsType &kind, const unsigned int &n=1) |
| Get the coordinates of uniform points in a kind of shape. | |
| std::vector< FVector3 > | filledCubeUniform (const FVector3 &corner1, const FVector3 &corner2, const unsigned int &nParticlesX=2, const unsigned int &nParticlesY=2, const unsigned int &nParticlesZ=2) |
| Get the coordinates of a uniformly filled cube. | |
| std::vector< FVector3 > | filledCubeRandom (const FVector3 &corner1, const FVector3 &corner2, const int &nParticles) |
| Get the coordinates of a randomly filled cube. | |
| HRESULT | icosphere (const int subdivisions, FloatP_t phi0, FloatP_t phi1, std::vector< FVector3 > &verts, std::vector< int32_t > &inds) |
| Get the coordinates of an icosphere. | |
| FVector3 | randomVector (FloatP_t mean, FloatP_t std) |
| Generates a randomly oriented vector with random magnitude with given mean and standard deviation according to a normal distribution. | |
| FVector3 | randomUnitVector () |
| Generates a randomly oriented unit vector. | |
| template<class T> | |
| std::enable_if<!std::numeric_limits< T >::is_integer, bool >::type | almost_equal (T x, T y, int ulp=2) |
| void * | aligned_Malloc (size_t size, size_t alignment) |
| void | aligned_Free (void *mem) |
| unsigned int | addErrorCallback (ErrorCallback &cb) |
| Register an error callback. | |
| HRESULT | removeErrorCallback (const unsigned int &cb_id) |
| Remove an error callback from the registry. | |
| HRESULT | clearErrorCallbacks () |
| Remove all error callbacks from the registry. | |
| HRESULT | errSet (HRESULT code, const char *msg, int line, const char *file, const char *func) |
| HRESULT | expSet (const std::exception &, const char *msg, int line, const char *file, const char *func) |
| bool | errOccurred () |
| void | errClear () |
| std::string | errStr (const Error &err) |
| std::vector< Error > | errGetAll () |
| Error | errGetFirst () |
| void | errClearFirst () |
| Error | errPopFirst () |
| bool | isTerminalInteractiveShell () |
| Test whether running interactively. | |
| HRESULT | setIsTerminalInteractiveShell (const bool &_interactive) |
| Set whether running interactively. | |
| HRESULT | Simulator_init (const std::vector< std::string > &argv) |
| HRESULT | Simulator_init (Simulator::Config &conf, const std::vector< std::string > &appArgv=std::vector< std::string >()) |
| HRESULT | initSimConfigFromFile (Simulator::Config &conf) |
| HRESULT | universe_init (const UniverseConfig &conf) |
| HRESULT | modules_init () |
| template<class IndexType, class Function> | |
| void | parallel_for (IndexType endIdx, Function &&func) |
| HRESULT | Universe_Step (FloatP_t until, FloatP_t dt) |
| int | Universe_Flag (Universe::Flags flag) |
| HRESULT | Universe_SetFlag (Universe::Flags flag, int value) |
| Universe * | getUniverse () |
| template<typename T, typename S> | |
| S | cast (const T &) |
| template<typename T, typename S> | |
| S | cast (T *) |
| template<> | |
| std::string | cast (const int &t) |
| template<> | |
| std::string | cast (const long &t) |
| template<> | |
| std::string | cast (const long long &t) |
| template<> | |
| std::string | cast (const unsigned int &t) |
| template<> | |
| std::string | cast (const unsigned long &t) |
| template<> | |
| std::string | cast (const unsigned long long &t) |
| template<> | |
| std::string | cast (const bool &t) |
| template<> | |
| std::string | cast (const float &t) |
| template<> | |
| std::string | cast (const double &t) |
| template<> | |
| std::string | cast (const long double &t) |
| template<> | |
| int | cast (const std::string &s) |
| template<> | |
| long | cast (const std::string &s) |
| template<> | |
| long long | cast (const std::string &s) |
| template<> | |
| unsigned int | cast (const std::string &s) |
| template<> | |
| unsigned long | cast (const std::string &s) |
| template<> | |
| unsigned long long | cast (const std::string &s) |
| template<> | |
| bool | cast (const std::string &s) |
| template<> | |
| float | cast (const std::string &s) |
| template<> | |
| double | cast (const std::string &s) |
| template<> | |
| long double | cast (const std::string &s) |
| template<typename T, typename S> | |
| bool | check (const T &) |
| template<typename T> | |
| bool | check (const std::string &) |
| template<> | |
| bool | check< int > (const std::string &s) |
| template<> | |
| bool | check< long > (const std::string &s) |
| template<> | |
| bool | check< long long > (const std::string &s) |
| template<> | |
| bool | check< unsigned int > (const std::string &s) |
| template<> | |
| bool | check< unsigned long > (const std::string &s) |
| template<> | |
| bool | check< unsigned long long > (const std::string &s) |
| template<> | |
| bool | check< bool > (const std::string &s) |
| template<> | |
| bool | check< float > (const std::string &s) |
| template<> | |
| bool | check< double > (const std::string &s) |
| template<> | |
| bool | check< long double > (const std::string &s) |
| template<> | |
| Magnum::GL::Version | cast (const std::int32_t &) |
| template<> | |
| std::int32_t | cast (const Magnum::GL::Version &) |
| std::string | version_str () |
| Installation version. | |
| std::string | systemNameStr () |
| System name. | |
| std::string | systemVersionStr () |
| System version. | |
| std::string | compilerIdStr () |
| Compiler id. | |
| std::string | compilerVersionStr () |
| Compiler version. | |
| std::string | buildDate () |
| Build data. | |
| std::string | buildTime () |
| Build time. | |
| bool | hasCuda () |
| Flag for whether the installation supports CUDA. | |
| HRESULT | initialize (int args) |
| Initialization method that may be a mandatory first call, depending on the runtime scenario. | |
| HRESULT | close () |
| Closes the main window, while the application / simulation continues to run. | |
| HRESULT | show () |
Shows any windows that were specified in the config. Does not start the universe time propagation unlike run. | |
| HRESULT | init (const std::vector< std::string > &argv) |
| HRESULT | init (Simulator::Config &conf, const std::vector< std::string > &appArgv=std::vector< std::string >()) |
| 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, and can use a different timestep of dt. | |
| HRESULT | stop () |
| Stops the universe time evolution. This essentially freezes the universe, everything remains the same, except time no longer moves forward. | |
| HRESULT | start () |
Starts the universe time evolution, and advanced the universe forward by timesteps in dt. All methods to build and manipulate universe objects are valid whether the universe time evolution is running or stopped. | |
| HRESULT | run (FloatP_t et=-1) |
| Runs the event loop until all windows close or simulation time expires. Automatically performs universe time propogation. | |
Variables | |
| engine | _Engine |
| unsigned int * | Particle_Colors |
| struct Potential | potential_null |
| ticks | runner_timers [] |
| const char | cell_sortlistID [27] |
| const FPTYPE | cell_shift [13 *3] |
| const char | cell_flip [27] |
| int | btree_err |
| Universe | _Universe |
Include Python header, disable linking to pythonX_d.lib on Windows in debug mode.
The root Tissue Forge namespace.
| typedef struct TissueForge::Angle TissueForge::Angle |
A bond concerning an angle.
If you're building a model, you should probably instead be working with a AngleHandle.
| typedef struct TissueForge::Bond TissueForge::Bond |
Bonds apply a potential to a particular set of particles.
If you're building a model, you should probably instead be working with a BondHandle.
| typedef struct TissueForge::Dihedral TissueForge::Dihedral |
The dihedral structure
| typedef struct TissueForge::engine TissueForge::engine |
The engine structure.
| typedef struct TissueForge::engine_comm TissueForge::engine_comm |
Structure storing which cells to send/receive to/from another node.
| typedef struct TissueForge::engine_set TissueForge::engine_set |
Structure storing grouped sets of bonded interactions.
| typedef void(* TissueForge::ErrorCallback) (const Error &err) |
Called on every occurrence of an error
| typedef struct TissueForge::exclusion TissueForge::exclusion |
The exclusion structure
single body force function.
| typedef void(* TissueForge::PotentialEval_ByParticle) (struct Potential *p, struct Particle *part_i, FPTYPE *dx, FPTYPE r2, FPTYPE *e, FPTYPE *f) |
Potential function on a particle.
Includes pre-computed relative position and distance of an arbitrary point w.r.t. ith particle.
Computes the potential and force in global frame on the ith particle.
| typedef void(* TissueForge::PotentialEval_ByParticles) (struct Potential *p, struct Particle *part_i, struct Particle *part_j, FPTYPE *dx, FPTYPE r2, FPTYPE *e, FPTYPE *f) |
Pair potential function.
Includes pre-computed relative position and distance of jth particle w.r.t. ith particle.
Computes the potential and force in global frame on the ith particle.
| typedef struct TissueForge::queue TissueForge::queue |
The queue structure
| typedef struct TissueForge::rigid TissueForge::rigid |
The rigid structure
| typedef struct TissueForge::space TissueForge::space |
The space structure
| typedef struct TissueForge::space_cell TissueForge::space_cell |
the space_cell structure
The space_cell represents a rectangular region of space, and physically stores all particle data. A set of cells form a uniform rectangular grid.
Simulation box divided into cells with size equal to or slightly larger than the largest non-bonded force cutoff distance. Each particle only interacts with others in its own cell or adjacent cells
| typedef struct TissueForge::task TissueForge::task |
The task structure
| anonymous enum |
Timmer IDs.
| anonymous enum |
Timmer IDs.
Cell flags
| HRESULT TissueForge::_Cluster_init | ( | ) |
internal function to initalize the particle and particle types
| HRESULT TissueForge::_Particle_init | ( | ) |
mandatory internal function to initalize the particle and particle types
sets the engine.types[0] particle.
The engine.types array is assumed to be allocated, but not initialized.
| unsigned int TissueForge::addErrorCallback | ( | ErrorCallback & | cb | ) |
Register an error callback.
| cb | callback to register |
| HRESULT TissueForge::Angle_DestroyAll | ( | ) |
Destroys all angles in the universe.
Automatically updates when running on a CUDA device.
Evaluate a list of angleed interactions.
| a | Pointer to an array of #angle. |
| N | Nr of angles in b. |
| e | Pointer to the engine in which these angles are evaluated. |
| epot_out | Pointer to a FPTYPE in which to aggregate the potential energy. |
| HRESULT TissueForge::angle_evalf | ( | struct Angle * | a, |
| int | N, | ||
| struct engine * | e, | ||
| FPTYPE * | f, | ||
| FPTYPE * | epot_out ) |
Evaluate a list of angleed interactions.
| a | Pointer to an array of #angle. |
| N | Nr of angles in b. |
| e | Pointer to the engine in which these angles are evaluated. |
| epot_out | Pointer to a FPTYPE in which to aggregate the potential energy. |
This function differs from angle_eval in that the forces are added to the array f instead of directly in the particle data.
| std::vector< int32_t > TissueForge::Angle_IdsForParticle | ( | int32_t | pid | ) |
find all the angles that interact with the given particle id
| void TissueForge::apply_boundary_particle_crossing | ( | struct Particle * | p, |
| const int * | delta, | ||
| const struct space_cell * | source_cell, | ||
| const struct space_cell * | dest_cell ) |
a particle moved from one cell to another, this checks if its a periodic crossing, and adjusts any particle state values if the boundaries say so.
deletes, marks a bond ready for deleteion, removes the potential, other vars, clears the bond, and makes is ready to be over-written.
Automatically updates when running on a CUDA device.
| HRESULT TissueForge::Bond_DestroyAll | ( | ) |
Deletes all bonds in the universe.
Automatically updates when running on a CUDA device.
Evaluate a list of bonded interactions.
| b | Pointer to an array of #bond. |
| N | Nr of bonds in b. |
| e | Pointer to the engine in which these bonds are evaluated. |
| epot_out | Pointer to a FPTYPE in which to aggregate the potential energy. |
| HRESULT TissueForge::bond_evalf | ( | Bond * | b, |
| int | N, | ||
| struct engine * | e, | ||
| FPTYPE * | f, | ||
| FPTYPE * | epot_out ) |
Evaluate a list of bonded interactions.
| bonds | Pointer to an array of #bond. |
| N | Nr of bonds in b. |
| e | Pointer to the engine in which these bonds are evaluated. |
| forces | An array of FPTYPE in which to aggregate the resulting forces. |
| epot_out | Pointer to a FPTYPE in which to aggregate the potential energy. |
This function differs from bond_eval in that the forces are added to the array f instead of directly in the particle data.
| std::vector< int32_t > TissueForge::Bond_IdsForParticle | ( | int32_t | pid | ) |
find all the bonds that interact with the given particle id
| std::string TissueForge::buildDate | ( | ) |
Build data.
| std::string TissueForge::buildTime | ( | ) |
Build time.
adds an existing particle to the cluster.
Computes the aggregate quanties such as total mass, position, acceleration, etc... from the contained particles.
| Particle * TissueForge::Cluster_CreateParticle | ( | Cluster * | cluster, |
| ParticleType * | particleType, | ||
| FVector3 * | position = NULL, | ||
| FVector3 * | velocity = NULL ) |
creates a new particle, and adds it to the cluster.
| Cluster * TissueForge::Cluster_fromString | ( | const std::string & | str | ) |
Create a cluster from a JSON string representation.
| str |
| ClusterParticleType * TissueForge::ClusterParticleType_FindFromName | ( | const char * | name | ) |
Get a registered cluster type by type name.
| name | name of cluster type |
| ClusterParticleType * TissueForge::ClusterParticleType_fromString | ( | const std::string & | str | ) |
Create a cluster type from a JSON string representation.
| str |
| std::vector< std::string > TissueForge::color3Names | ( | ) |
Get the names of all available colors.
| std::string TissueForge::compilerIdStr | ( | ) |
Compiler id.
| std::string TissueForge::compilerVersionStr | ( | ) |
Compiler version.
Destroys a dihedral.
| d | dihedral to destroy |
| HRESULT TissueForge::dihedral_eval | ( | struct Dihedral * | d, |
| int | N, | ||
| struct engine * | e, | ||
| FPTYPE * | epot_out ) |
Evaluate a list of dihedraled interactions.
| b | Pointer to an array of #dihedral. |
| N | Nr of dihedrals in b. |
| e | Pointer to the engine in which these dihedrals are evaluated. |
| epot_out | Pointer to a FPTYPE in which to aggregate the potential energy. |
| HRESULT TissueForge::dihedral_evalf | ( | struct Dihedral * | d, |
| int | N, | ||
| struct engine * | e, | ||
| FPTYPE * | f, | ||
| FPTYPE * | epot_out ) |
Evaluate a list of dihedraled interactions.
| b | Pointer to an array of #dihedral. |
| N | Nr of dihedrals in b. |
| e | Pointer to the engine in which these dihedrals are evaluated. |
| epot_out | Pointer to a FPTYPE in which to aggregate the potential energy. |
This function differs from dihedral_eval in that the forces are added to the array f instead of directly in the particle data.
| std::vector< int32_t > TissueForge::Dihedral_IdsForParticle | ( | int32_t | pid | ) |
find all the dihedrals that interact with the given particle id
| HRESULT TissueForge::engine_add_singlebody_force | ( | struct engine * | e, |
| struct Force * | p, | ||
| int | typeId ) |
Add a single body force to the engine.
Add fluxes to a particle of particle types.
| e | The engine. |
| f | The #flux |
| i | ID of particle type for this interaction. |
| j | ID of second particle type for this interaction. |
| HRESULT TissueForge::engine_addpart | ( | struct engine * | e, |
| struct Particle * | p, | ||
| FPTYPE * | x, | ||
| struct Particle ** | result ) |
Add a #part to a space at the given coordinates. The given particle p is only used for the attributes, it itself is not added, rather a new memory block is allocated, and the contents of p get copied in there.
| e | The engine. |
| p | The #part to be added. |
| x | A pointer to an array of three FPTYPEs containing the particle position. |
| result | pointer to the newly allocated particle. |
Inserts a #part p into the space s at the position x. Note that since particle positions in #part are relative to the cell, that data in p is overwritten and x is used.
This is the single, central function that actually allocates particle space, and inserts a new particle into the engine.
| HRESULT TissueForge::engine_addparts | ( | struct engine * | e, |
| int | nr_parts, | ||
| struct Particle ** | parts, | ||
| FPTYPE ** | x ) |
Add parts to space at given coordinates.
| e | The engine. |
| nr_parts | Number of parts to add |
| parts | pointers to newly allocated particles |
| x | positions |
| int TissueForge::engine_addtype | ( | struct engine * | e, |
| FPTYPE | mass, | ||
| FPTYPE | charge, | ||
| const char * | name, | ||
| const char * | name2 ) |
Add a type definition.
| e | The engine. |
| mass | The particle type mass. |
| charge | The particle type charge. |
| name | Particle name, can be NULL. |
| name2 | Particle second name, can be NULL. |
The particle type ID must be an integer greater or equal to 0 and less than the value max_type specified in engine_init.
Update the particle velocities and positions, re-shuffle if appropriate.
| e | The engine on which to run. |
allocates a new angle, returns its id.
Compute the angled interactions stored in this engine.
| e | The engine. |
allocates a new bond, returns a pointer to it. returns index of new object.
Compute the bonded interactions stored in this engine.
| e | The engine. |
Compute all bonded interactions stored in this engine.
| e | The engine. |
Does the same as engine_bond_eval, engine_angle_eval and #engine_dihedral eval, yet all in one go to avoid excessive updates of the particle forces.
Compute all bonded interactions stored in this engine.
| e | The engine. |
Does the same as engine_bond_eval, engine_angle_eval and #engine_dihedral eval, yet all in one go to avoid excessive updates of the particle forces.
Assemble non-conflicting sets of bonded interactions.
| e | The engine. |
Deletes a particle from the engine based on particle id.
Afterwards, the particle id will point to a null entry in the partlist.
Note, the next newly created particle will re-use this ID (assuming the engine_next_partid is used to determine the next id.)
allocates a new dihedral, returns its id.
Compute the dihedral interactions stored in this engine.
| e | The engine. |
Add a exclusioned interaction to the engine.
| e | The engine. |
| i | The ID of the first #part. |
| j | The ID of the second #part. |
Compute the exclusioned interactions stored in this engine.
| e | The engine. |
Remove duplicate exclusions.
| e | The engine. |
Kill all runners and de-allocate the data of an engine.
| e | the engine to finalize. |
internal method to calculate forces on all objects
internal method to clear data before calculating forces on all objects
Get a fluxes between two particles.
| e | The engine. |
| i | ID of particle type of the flux. |
| j | ID of second particle type of the flux. |
| int TissueForge::engine_gettype | ( | struct engine * | e, |
| char * | name ) |
Look for a given type by name.
| e | The engine. |
| name | The type name. |
| int TissueForge::engine_gettype2 | ( | struct engine * | e, |
| char * | name2 ) |
Look for a given type by its second name.
| e | The engine. |
| name2 | The type name2. |
| HRESULT TissueForge::engine_init | ( | struct engine * | e, |
| const FPTYPE * | origin, | ||
| const FPTYPE * | dim, | ||
| int * | cells, | ||
| FPTYPE | cutoff, | ||
| BoundaryConditionsArgsContainer * | boundaryConditions, | ||
| int | max_type, | ||
| unsigned int | flags, | ||
| unsigned int | nr_fluxsteps ) |
Initialize an engine with the given data.
The number of spatial cells in each cartesion dimension is floor( dim[i] / L[i] ), or the physical size of the space in that dimension divided by the minimum size size of each cell.
| e | The engine to initialize. |
| origin | An array of three FPTYPEs containing the cartesian origin of the space. |
| dim | An array of three FPTYPEs containing the size of the space. |
| cells | length 3 integer vector of number of cells in each direction. |
| cutoff | The maximum interaction cutoff to use. |
| boundaryConditions | boundary conditions argument container |
| max_type | The maximum number of particle types that will be used by this engine. |
| flags | Bit-mask containing the flags for this engine. |
| nr_fluxsteps | Number of flux steps |
| HRESULT TissueForge::engine_load | ( | struct engine * | e, |
| FPTYPE * | x, | ||
| FPTYPE * | v, | ||
| int * | type, | ||
| int * | pid, | ||
| int * | vid, | ||
| FPTYPE * | charge, | ||
| unsigned int * | flags, | ||
| int | N ) |
Load a set of particle data.
| e | The engine. |
| x | An N times 3 array of the particle positions. |
| v | An N times 3 array of the particle velocities. |
| type | A vector of length N of the particle type IDs. |
| pid | A vector of length N of the particle IDs. |
| vid | A vector of length N of the particle virtual IDs. |
| q | A vector of length N of the individual particle charges. |
| flags | A vector of length N of the particle flags. |
| N | the number of particles to load. |
If the parameters v, flags, vid or q are NULL, then these values are set to zero.
| HRESULT TissueForge::engine_load_ghosts | ( | struct engine * | e, |
| FPTYPE * | x, | ||
| FPTYPE * | v, | ||
| int * | type, | ||
| int * | pid, | ||
| int * | vid, | ||
| FPTYPE * | q, | ||
| unsigned int * | flags, | ||
| int | N ) |
Load a set of particle data as ghosts.
| e | The engine. |
| x | An N times 3 array of the particle positions. |
| v | An N times 3 array of the particle velocities. |
| type | A vector of length N of the particle type IDs. |
| pid | A vector of length N of the particle IDs. |
| vid | A vector of length N of the particle virtual IDs. |
| q | A vector of length N of the individual particle charges. |
| flags | A vector of length N of the particle flags. |
| N | the number of particles to load. |
If the parameters v, flags, vid or q are NULL, then these values are set to zero.
| int TissueForge::engine_next_partid | ( | struct engine * | e | ) |
gets the next available particle id to use when creating a new particle.
gets the next available particle ids to use when creating a new particle.
clears all the uaer allocated objects, resets to state when created.
Add a rigid constraint to the engine.
| e | The engine. |
| pid | The ID of the first #part. |
| pjd | The ID of the second #part. |
Beware that currently all particles have to have been inserted before the rigid constraints are added!
Resolve the constraints.
| e | The engine. |
Note that if in parallel, engine_rigid_sort should be called before this routine.
Split the rigids into local, semilocal and non-local.
| e | The engine. |
Shuffle the rigid constraints randomly.
| e | The engine. |
Re-shuffle the particles in the engine.
| e | The engine on which to run. |
Set-up the engine for distributed-memory parallel operation.
| e | The engine to set-up. |
This function assumes that engine_split_bisect or some similar function has already been called and that #nodeID, #nr_nodes as well as the #cell nodeIDs have been set.
Split the computational domain over a number of nodes using bisection.
| e | The engine to split up. |
| N | The number of computational nodes. |
Run the engine for a single time step.
| e | The engine on which to run. |
This routine advances the timestep counter by one, prepares the space for a timestep, releases the runner's associated with the engine and waits for them to finnish.
Once all the runner's are done, the particle velocities and positions are updated and the particles are re-sorted in the space.
Set all the engine timers to 0.
| e | The engine. |
| struct ParticleType * TissueForge::engine_type | ( | int | id | ) |
External C apps should call this to get a particle type ptr.
| int TissueForge::engine_unload | ( | struct engine * | e, |
| FPTYPE * | x, | ||
| FPTYPE * | v, | ||
| int * | type, | ||
| int * | pid, | ||
| int * | vid, | ||
| FPTYPE * | charge, | ||
| unsigned int * | flags, | ||
| FPTYPE * | epot, | ||
| int | N ) |
Unload a set of particle data from the engine.
| e | The engine. |
| x | An N times 3 array of the particle positions. |
| v | An N times 3 array of the particle velocities. |
| type | A vector of length N of the particle type IDs. |
| pid | A vector of length N of the particle IDs. |
| vid | A vector of length N of the particle virtual IDs. |
| q | A vector of length N of the individual particle charges. |
| flags | A vector of length N of the particle flags. |
| epot | A pointer to a #FPTYPE in which to store the total potential energy. |
| N | the maximum number of particles. |
The fields x, v, type, pid, vid, q, epot and/or flags may be NULL.
| int TissueForge::engine_unload_marked | ( | struct engine * | e, |
| FPTYPE * | x, | ||
| FPTYPE * | v, | ||
| int * | type, | ||
| int * | pid, | ||
| int * | vid, | ||
| FPTYPE * | q, | ||
| unsigned int * | flags, | ||
| FPTYPE * | epot, | ||
| int | N ) |
Unload a set of particle data from the marked cells of an engine.
| e | The engine. |
| x | An N times 3 array of the particle positions. |
| v | An N times 3 array of the particle velocities. |
| type | A vector of length N of the particle type IDs. |
| pid | A vector of length N of the particle IDs. |
| vid | A vector of length N of the particle virtual IDs. |
| q | A vector of length N of the individual particle charges. |
| flags | A vector of length N of the particle flags. |
| epot | A pointer to a #FPTYPE in which to store the total potential energy. |
| N | the maximum number of particles. |
The fields x, v, type, pid, vid, q, epot and/or flags may be NULL.
| int TissueForge::engine_unload_strays | ( | struct engine * | e, |
| FPTYPE * | x, | ||
| FPTYPE * | v, | ||
| int * | type, | ||
| int * | pid, | ||
| int * | vid, | ||
| FPTYPE * | q, | ||
| unsigned int * | flags, | ||
| FPTYPE * | epot, | ||
| int | N ) |
Unload real particles that may have wandered into a ghost cell.
| e | The engine. |
| x | An N times 3 array of the particle positions. |
| v | An N times 3 array of the particle velocities. |
| type | A vector of length N of the particle type IDs. |
| pid | A vector of length N of the particle IDs. |
| vid | A vector of length N of the particle virtual IDs. |
| q | A vector of length N of the individual particle charges. |
| flags | A vector of length N of the particle flags. |
| epot | A pointer to a #FPTYPE in which to store the total potential energy. |
| N | the maximum number of particles. |
The fields x, v, type, vid, pid, q, epot and/or flags may be NULL.
Check if the Verlet-list needs to be updated.
| e | The engine. |
| void TissueForge::errClear | ( | ) |
Clear the error indicators. If no error indicator is set, there is no effect.
| void TissueForge::errClearFirst | ( | ) |
Clear the first error
| std::vector< Error > TissueForge::errGetAll | ( | ) |
Get all error indicators
| Error TissueForge::errGetFirst | ( | ) |
Get the first error
| bool TissueForge::errOccurred | ( | ) |
Check whether there is an error indicator.
| Error TissueForge::errPopFirst | ( | ) |
Get and clear the first error
| HRESULT TissueForge::errSet | ( | HRESULT | code, |
| const char * | msg, | ||
| int | line, | ||
| const char * | file, | ||
| const char * | func ) |
Set the error indicator. If there is a previous error indicator, then the previous indicator is moved down the stack.
| std::string TissueForge::errStr | ( | const Error & | err | ) |
Get a string representation of an error.
| HRESULT TissueForge::expSet | ( | const std::exception & | , |
| const char * | msg, | ||
| int | line, | ||
| const char * | file, | ||
| const char * | func ) |
Set the error indicator. If there is a previous error indicator, then the previous indicator is moved down the stack.
| std::vector< FVector3 > TissueForge::filledCubeRandom | ( | const FVector3 & | corner1, |
| const FVector3 & | corner2, | ||
| const int & | nParticles ) |
Get the coordinates of a randomly filled cube.
| corner1 | first corner of cube |
| corner2 | second corner of cube |
| nParticles | number of points in the cube |
| std::vector< FVector3 > TissueForge::filledCubeUniform | ( | const FVector3 & | corner1, |
| const FVector3 & | corner2, | ||
| const unsigned int & | nParticlesX = 2, | ||
| const unsigned int & | nParticlesY = 2, | ||
| const unsigned int & | nParticlesZ = 2 ) |
Get the coordinates of a uniformly filled cube.
| corner1 | first corner of cube |
| corner2 | second corner of cube |
| nParticlesX | number of particles along x-direction of filling axes (>=2) |
| nParticlesY | number of particles along y-direction of filling axes (>=2) |
| nParticlesZ | number of particles along z-direction of filling axes (>=2) |
| HRESULT TissueForge::Fluxes_integrate | ( | int | cellId | ) |
integrate all of the fluxes for a space cell.
| HRESULT TissueForge::Fluxes_integrate | ( | space_cell * | cell, |
| FPTYPE | dt = -1.0 ) |
integrate all of the fluxes for a space cell.
|
inline |
Inlined function to compute the distance^2 between two vectors.
| x1 | The first vector. |
| x2 | The second vector. |
| dx | An array in which x1 - x2 will be stored. |
x1 and x2.Depending on the processor features, this function will use SSE registers and horizontal adds.
| bool TissueForge::hasCuda | ( | ) |
Flag for whether the installation supports CUDA.
| HRESULT TissueForge::icosphere | ( | const int | subdivisions, |
| FloatP_t | phi0, | ||
| FloatP_t | phi1, | ||
| std::vector< FVector3 > & | verts, | ||
| std::vector< int32_t > & | inds ) |
Get the coordinates of an icosphere.
| subdivisions | number of subdivisions |
| phi0 | angle lower bound |
| phi1 | angle upper bound |
| verts | returned vertices |
| inds | returned indices |
| HRESULT TissueForge::init | ( | const std::vector< std::string > & | argv | ) |
main simulator init method
| HRESULT TissueForge::init | ( | Simulator::Config & | conf, |
| const std::vector< std::string > & | appArgv = std::vector< std::string >() ) |
main simulator init method
| HRESULT TissueForge::Particle_Become | ( | Particle * | part, |
| ParticleType * | type ) |
Change the type of one particle to another.
removes the particle from it's current type's list of objects, and adds it to the new types list.
changes the type pointer in the C Particle, and also changes the type pointer in the Python PyParticle handle.
| Particle * TissueForge::Particle_Get | ( | ParticleHandle * | pypart | ) |
checks if a python object is a particle, and returns the corresponding particle pointer, NULL otherwise
| HRESULT TissueForge::Particle_Verify | ( | ) |
iterates over all parts and does a verify
| ParticleType * TissueForge::ParticleType_FindFromName | ( | const char * | name | ) |
Get a registered particle type by type name.
| name | name of particle type |
| ParticleType * TissueForge::ParticleType_ForEngine | ( | struct engine * | e, |
| FPTYPE | mass, | ||
| FPTYPE | charge, | ||
| const char * | name, | ||
| const char * | name2 ) |
Creates a new ParticleType for the given particle data pointer.
This creates a matching python type for an existing particle data, and is usually called when new types are created from C.
| ParticleType * TissueForge::ParticleType_New | ( | const char * | _name | ) |
Creates and initializes a new particle type, adds it to the global engine
creates both a new type, and a new data entry in the engine.
Get the coefficients of a plane equation for a normal vector and point.
| normal | plane normal |
| point | plane point |
Get the plane normal and a plane point from the coefficients of a plane equation.
| planeEq | coefficients of a plane equation |
| std::vector< FVector3 > TissueForge::points | ( | const PointsType & | kind, |
| const unsigned int & | n = 1 ) |
Get the coordinates of uniform points in a kind of shape.
Currently supports ring and sphere.
| kind | kind of shape |
| n | number of points |
| void TissueForge::potential_clear | ( | struct Potential * | p | ) |
Free the memory associated with the given potential.
| p | Pointer to the #potential to clear. |
| TF_ALWAYS_INLINE void TissueForge::potential_eval | ( | struct Potential * | p, |
| FPTYPE | r2, | ||
| FPTYPE * | e, | ||
| FPTYPE * | f ) |
Evaluates the given potential at the given point (interpolated).
| p | The #potential to be evaluated. |
| r2 | The radius at which it is to be evaluated, squared. |
| e | Pointer to a floating-point value in which to store the interaction energy. |
| f | Pointer to a floating-point value in which to store the magnitude of the interaction force divided by r. |
Note that for efficiency reasons, this function does not check if any of the parameters are NULL or if sqrt(r2) is within the interval of the #potential p.
| TF_ALWAYS_INLINE void TissueForge::potential_eval_expl | ( | struct Potential * | p, |
| FPTYPE | r2, | ||
| FPTYPE * | e, | ||
| FPTYPE * | f ) |
Evaluates the given potential at the given radius explicitly.
| p | The #potential to be evaluated. |
| r2 | The radius squared. |
| e | A pointer to a floating point value in which to store the interaction energy. |
| f | A pointer to a floating point value in which to store the magnitude of the interaction force |
Assumes that the parameters for the potential forms given in the value flags of the #potential p are stored in the array alpha of p.
This way of evaluating a potential is not extremely efficient and is intended for comparison and debugging purposes.
Note that for performance reasons, this function does not check its input arguments for NULL.
| TF_ALWAYS_INLINE void TissueForge::potential_eval_r | ( | struct Potential * | p, |
| FPTYPE | r, | ||
| FPTYPE * | e, | ||
| FPTYPE * | f ) |
Evaluates the given potential at the given point (interpolated).
| p | The #potential to be evaluated. |
| r | The radius at which it is to be evaluated. |
| e | Pointer to a floating-point value in which to store the interaction energy. |
| f | Pointer to a floating-point value in which to store the magnitude of the interaction force. |
Note that for efficiency reasons, this function does not check if any of the parameters are NULL or if sqrt(r2) is within the interval of the #potential p.
| TF_ALWAYS_INLINE void TissueForge::potential_eval_vec_2double | ( | struct Potential * | p[2], |
| FPTYPE * | r2, | ||
| FPTYPE * | e, | ||
| FPTYPE * | f ) |
Evaluates the given potential at a set of points (interpolated).
| p | Pointer to an array of pointers to the #potentials to be evaluated. |
| r2 | Pointer to an array of the radii at which the potentials are to be evaluated, squared. |
| e | Pointer to an array of floating-point values in which to store the interaction energies. |
| f | Pointer to an array of floating-point values in which to store the magnitude of the interaction forces. |
Note that for efficiency reasons, this function does not check if any of the parameters are NULL or if sqrt(r2) is within the interval of the #potential p.
Computes two double-precision interactions simultaneously using vectorized instructions.
This function is only available if mdcore was compiled with SSE2 and double precision! If mdcore was not compiled with SSE2 enabled, this function simply calls potential_eval on each entry.
| TF_ALWAYS_INLINE void TissueForge::potential_eval_vec_4double | ( | struct Potential * | p[4], |
| FPTYPE * | r2, | ||
| FPTYPE * | e, | ||
| FPTYPE * | f ) |
Evaluates the given potential at a set of points (interpolated).
| p | Pointer to an array of pointers to the #potentials to be evaluated. |
| r2 | Pointer to an array of the radii at which the potentials are to be evaluated, squared. |
| e | Pointer to an array of floating-point values in which to store the interaction energies. |
| f | Pointer to an array of floating-point values in which to store the magnitude of the interaction forces. |
Note that for efficiency reasons, this function does not check if any of the parameters are NULL or if sqrt(r2) is within the interval of the #potential p.
Computes four double-precision interactions simultaneously using vectorized instructions.
This function is only available if mdcore was compiled with SSE2 and double precision! If mdcore was not compiled with SSE2 enabled, this function simply calls potential_eval on each entry.
| TF_ALWAYS_INLINE void TissueForge::potential_eval_vec_4double_r | ( | struct Potential * | p[4], |
| FPTYPE * | r_in, | ||
| FPTYPE * | e, | ||
| FPTYPE * | f ) |
Evaluates the given potential at a set of points (interpolated).
| p | Pointer to an array of pointers to the #potentials to be evaluated. |
| r_in | Pointer to an array of the radii at which the potentials are to be evaluated. |
| e | Pointer to an array of floating-point values in which to store the interaction energies. |
| f | Pointer to an array of floating-point values in which to store the magnitude of the interaction forces. |
Note that for efficiency reasons, this function does not check if any of the parameters are NULL or if sqrt(r2) is within the interval of the #potential p.
Computes four double-precision interactions simultaneously using vectorized instructions.
This function is only available if mdcore was compiled with SSE2 and double precision! If mdcore was not compiled with SSE2 enabled, this function simply calls potential_eval on each entry.
| TF_ALWAYS_INLINE void TissueForge::potential_eval_vec_4single | ( | struct Potential * | p[4], |
| float * | r2, | ||
| float * | e, | ||
| float * | f ) |
Evaluates the given potential at a set of points (interpolated).
| p | Pointer to an array of pointers to the #potentials to be evaluated. |
| r2 | Pointer to an array of the radii at which the potentials are to be evaluated, squared. |
| e | Pointer to an array of floating-point values in which to store the interaction energies. |
| f | Pointer to an array of floating-point values in which to store the magnitude of the interaction forces. |
Note that for efficiency reasons, this function does not check if any of the parameters are NULL or if sqrt(r2) is within the interval of the #potential p.
Computes four single-precision interactions simultaneously using vectorized instructions.
This function is only available if mdcore was compiled with SSE or AltiVec and single precision! If mdcore was not compiled with SSE or AltiVec, this function simply calls potential_eval on each entry.
| TF_ALWAYS_INLINE void TissueForge::potential_eval_vec_4single_old | ( | struct Potential * | p[4], |
| float * | r2, | ||
| float * | e, | ||
| float * | f ) |
Evaluates the given potential at a set of points (interpolated).
| p | Pointer to an array of pointers to the #potentials to be evaluated. |
| r2 | Pointer to an array of the radii at which the potentials are to be evaluated, squared. |
| e | Pointer to an array of floating-point values in which to store the interaction energies. |
| f | Pointer to an array of floating-point values in which to store the magnitude of the interaction forces. |
Note that for efficiency reasons, this function does not check if any of the parameters are NULL or if sqrt(r2) is within the interval of the #potential p.
Computes four single-precision interactions simultaneously using vectorized instructions.
This function is only available if mdcore was compiled with SSE or AltiVec and single precision! If mdcore was not compiled with SSE or AltiVec, this function simply calls potential_eval on each entry.
| TF_ALWAYS_INLINE void TissueForge::potential_eval_vec_4single_r | ( | struct Potential * | p[4], |
| float * | r_in, | ||
| float * | e, | ||
| float * | f ) |
Evaluates the given potential at a set of points (interpolated).
| p | Pointer to an array of pointers to the #potentials to be evaluated. |
| r_in | Pointer to an array of the radii at which the potentials are to be evaluated. |
| e | Pointer to an array of floating-point values in which to store the interaction energies. |
| f | Pointer to an array of floating-point values in which to store the magnitude of the interaction forces. |
Note that for efficiency reasons, this function does not check if any of the parameters are NULL or if sqrt(r2) is within the interval of the #potential p.
Computes four single-precision interactions simultaneously using vectorized instructions.
This function is only available if mdcore was compiled with SSE or AltiVec and single precision! If mdcore was not compiled with SSE or AltiVec, this function simply calls potential_eval on each entry.
| TF_ALWAYS_INLINE void TissueForge::potential_eval_vec_8single | ( | struct Potential * | p[8], |
| float * | r2, | ||
| float * | e, | ||
| float * | f ) |
Evaluates the given potential at a set of points (interpolated).
| p | Pointer to an array of pointers to the #potentials to be evaluated. |
| r2 | Pointer to an array of the radii at which the potentials are to be evaluated, squared. |
| e | Pointer to an array of floating-point values in which to store the interaction energies. |
| f | Pointer to an array of floating-point values in which to store the magnitude of the interaction forces. |
Note that for efficiency reasons, this function does not check if any of the parameters are NULL or if sqrt(r2) is within the interval of the #potential p.
Computes eight single-precision interactions simultaneously using vectorized instructions.
This function is only available if mdcore was compiled with SSE or AltiVec and single precision! If mdcore was not compiled with SSE or AltiVec, this function simply calls potential_eval on each entry.
| HRESULT TissueForge::potential_init | ( | struct Potential * | p, |
| FPTYPE(* | f )(FPTYPE), | ||
| FPTYPE(* | fp )(FPTYPE), | ||
| FPTYPE(* | f6p )(FPTYPE), | ||
| FPTYPE | a, | ||
| FPTYPE | b, | ||
| FPTYPE | tol ) |
Construct a #potential from the given function.
| p | A pointer to an empty #potential. |
| f | A pointer to the potential function to be interpolated. |
| fp | A pointer to the first derivative of f. |
| f6p | A pointer to the sixth derivative of f. |
| a | The smallest radius for which the potential will be constructed. |
| b | The largest radius for which the potential will be constructed. |
| tol | The absolute tolerance to which the interpolation should match the exact potential. |
Computes an interpolated potential function from f in [a,b] to the locally relative tolerance tol.
The sixth derivative f6p is used to compute the optimal node distribution. If f6p is NULL, the derivative is approximated numerically.
The zeroth interval contains a linear extension of f for values < a.
| HRESULT TissueForge::queue_init | ( | struct queue * | q, |
| int | size, | ||
| struct space * | s, | ||
| struct task * | tasks ) |
Initialize a task queue.
| q | The queue to initialize. |
| size | The maximum number of cellpairs in this queue. |
| s | The space with which this queue is associated. |
| tasks | An array containing the task to which the queue indices will refer to. |
Initializes a queue of the maximum given size. The initial queue is empty and can be filled with pair ids.
Add an index to the given queue.
| q | The queue. |
| thing | The thing to be inserted. |
Inserts a task into the queue at the location of the next pointer and moves all remaining tasks up by one. Thus, if the queue is executing, the inserted task is considered to already have been taken.
| FVector3 TissueForge::randomPoint | ( | const PointsType & | kind, |
| const FloatP_t & | dr = 0, | ||
| const FloatP_t & | phi0 = 0, | ||
| const FloatP_t & | phi1 = M_PI ) |
Get the coordinates of a random point in a kind of shape.
Currently supports sphere, disk, solid cube and solid sphere.
| kind | kind of shape |
| dr | thickness parameter; only applicable to solid sphere kind |
| phi0 | angle lower bound; only applicable to solid sphere kind |
| phi1 | angle upper bound; only applicable to solid sphere kind |
| std::vector< FVector3 > TissueForge::randomPoints | ( | const PointsType & | kind, |
| const int & | n = 1, | ||
| const FloatP_t & | dr = 0, | ||
| const FloatP_t & | phi0 = 0, | ||
| const FloatP_t & | phi1 = M_PI ) |
Get the coordinates of random points in a kind of shape.
Currently supports sphere, disk, solid cube and solid sphere.
| kind | kind of shape |
| n | number of points |
| dr | thickness parameter; only applicable to solid sphere kind |
| phi0 | angle lower bound; only applicable to solid sphere kind |
| phi1 | angle upper bound; only applicable to solid sphere kind |
| FVector3 TissueForge::randomUnitVector | ( | ) |
Generates a randomly oriented unit vector.
| FVector3 TissueForge::randomVector | ( | FloatP_t | mean, |
| FloatP_t | std ) |
Generates a randomly oriented vector with random magnitude with given mean and standard deviation according to a normal distribution.
| mean | magnitude mean |
| std | magnitude standard deviation |
| HRESULT TissueForge::removeErrorCallback | ( | const unsigned int & | cb_id | ) |
Remove an error callback from the registry.
| cb_id | id of registered callback |
| HRESULT TissueForge::run | ( | FloatP_t | et = -1 | ) |
Runs the event loop until all windows close or simulation time expires. Automatically performs universe time propogation.
| et | period to execute, in units of simulation time; a negative number runs infinitely |
| HRESULT TissueForge::runner_dopair | ( | struct runner * | r, |
| struct space_cell * | cell_i, | ||
| struct space_cell * | cell_j, | ||
| int | sid ) |
Compute the pairwise interactions for the given pair.
| r | The runner computing the pair. |
| cell_i | The first cell. |
| cell_j | The second cell. |
| shift | A pointer to an array of three floating point values containing the vector separating the centers of cell_i and cell_j. |
Computes the interactions between all the particles in cell_i and all the particles in cell_j. cell_i and cell_j may be the same cell.
| HRESULT TissueForge::runner_dopair_fluxonly | ( | struct runner * | r, |
| struct space_cell * | cell_i, | ||
| struct space_cell * | cell_j, | ||
| int | sid ) |
Compute the pairwise fluxes for the given pair.
| r | The runner computing the pair. |
| cell_i | The first cell. |
| cell_j | The second cell. |
| shift | A pointer to an array of three floating point values containing the vector separating the centers of cell_i and cell_j. |
Computes the fluxes between all the particles in cell_i and all the particles in cell_j. cell_i and cell_j may be the same cell.
| HRESULT TissueForge::runner_doself | ( | struct runner * | r, |
| struct space_cell * | cell_i ) |
Compute the self-interactions for the given cell.
| r | The runner computing the pair. |
| cell_i | The first cell. |
| HRESULT TissueForge::runner_doself_fluxonly | ( | struct runner * | r, |
| struct space_cell * | cell_i ) |
Compute the self-fluxes for the given cell.
| r | The runner computing the pair. |
| cell_i | The first cell. |
| HRESULT TissueForge::runner_dosort | ( | struct runner * | r, |
| struct space_cell * | c, | ||
| int | flags ) |
Fill in the pairwise Verlet list entries for the given cell pair if needed and compute the interactions.
| r | The runner computing the pair. |
| c | The cell. |
| flags | Bitmask for the sorting directions. |
This routine differs from #runner_dopair_verlet in that instead of storing a Verlet table, the sorted particle ids are stored. This requires only (size_i + size_j) entries as opposed to size_i*size_j for the Verlet table, yet may be less efficient since particles within the skin along the cell-pair axis are inspected, as opposed to particles simply within the skin of each other.
| void TissueForge::runner_sort_ascending | ( | unsigned int * | parts, |
| int | N ) |
Sort the particles in ascending order using QuickSort.
| parts | The particle IDs and distances in compact form |
| N | The number of particles. |
The particle data is assumed to contain the distance in the lower 16 bits and the particle ID in the upper 16 bits.
| void TissueForge::runner_sort_descending | ( | unsigned int * | parts, |
| int | N ) |
Sort the particles in descending order using QuickSort.
| parts | The particle IDs and distances in compact form |
| N | The number of particles. |
The particle data is assumed to contain the distance in the lower 16 bits and the particle ID in the upper 16 bits.
| HRESULT TissueForge::runner_verlet_eval | ( | struct runner * | r, |
| struct space_cell * | c, | ||
| FPTYPE * | f_out ) |
Compute the interactions between the particles in the given space_cell using the verlet list.
| r | The runner. |
| c | The #cell containing the particles to traverse. |
| f | A pointer to an array of #FPTYPE in which to aggregate the interaction forces. |
| HRESULT TissueForge::runner_verlet_fill | ( | struct runner * | r, |
| struct space_cell * | cell_i, | ||
| struct space_cell * | cell_j, | ||
| FPTYPE * | pshift ) |
Fill in the Verlet list entries for the given space_cell pair.
| r | The runner computing the pair. |
| cell_i | The first cell. |
| cell_j | The second cell. |
| pshift | A pointer to an array of three floating point values containing the vector separating the centers of cell_i and cell_j. |
| HRESULT TissueForge::setSeed | ( | const unsigned int * | _seed = 0 | ) |
| HRESULT TissueForge::Simulator_init | ( | const std::vector< std::string > & | argv | ) |
main simulator init method
| HRESULT TissueForge::Simulator_init | ( | Simulator::Config & | conf, |
| const std::vector< std::string > & | appArgv = std::vector< std::string >() ) |
main simulator init method
| HRESULT TissueForge::space_addpart | ( | struct space * | s, |
| struct Particle * | p, | ||
| FPTYPE * | x, | ||
| struct Particle ** | result ) |
Add a #part to a space at the given coordinates. The given particle p is only used for the attributes, it itself is not added, rather a new memory block is allocated, and the contents of p get copied in there.
| s | The space to which p should be added. |
| p | The #part to be added. |
| x | A pointer to an array of three FPTYPEs containing the particle position. |
| result | pointer to the newly allocated particle. |
Inserts a #part p into the space s at the position x. Note that since particle positions in #part are relative to the cell, that data in p is overwritten and x is used.
This is a PRIVATE function, literally only the engine should call this. Does NOT manage ref count on particle types in the engine.
| struct Particle * TissueForge::space_cell_add | ( | struct space_cell * | c, |
| struct Particle * | p, | ||
| struct Particle ** | partlist ) |
Add a particle to a cell.
| c | The #cell to which the particle should be added. |
| p | The #particle to add to the cell |
This routine assumes the particle position has already been adjusted to the cell c.
| struct Particle * TissueForge::space_cell_add_incomming | ( | struct space_cell * | c, |
| struct Particle * | p ) |
Add a particle to the incomming array of a cell.
| c | The #cell to which the particle should be added. |
| p | The #particle to add to the cell |
This routine assumes the particle position has already been adjusted to the cell c.
| int TissueForge::space_cell_add_incomming_multiple | ( | struct space_cell * | c, |
| struct Particle * | p, | ||
| int | count ) |
Add one or more particles to the incomming array of a cell.
| c | The #cell to which the particle should be added. |
| p | The #particle to add to the cell |
This routine assumes the particle position have already been adjusted to the cell c.
| HRESULT TissueForge::space_cell_flush | ( | struct space_cell * | c, |
| struct Particle ** | partlist, | ||
| struct space_cell ** | celllist ) |
Flush all the parts from a #cell.
| c | The #cell to flush. |
| partlist | A pointer to the partlist to set the part indices. |
| celllist | A pointer to the celllist to set the part indices. |
| FPTYPE TissueForge::space_cell_gaussian | ( | int | cell_id | ) |
only one thead at a time can access a cell, so create a big list of random generators that are access by the cell id.
| HRESULT TissueForge::space_cell_init | ( | struct space_cell * | c, |
| int * | loc, | ||
| FPTYPE * | origin, | ||
| FPTYPE * | dim ) |
Initialize the given cell.
| c | The #cell to initialize. |
| loc | Array containing the location of this cell in the space. |
| origin | The origin of the cell in global coordinates |
| dim | The cell dimensions. |
| HRESULT TissueForge::space_cell_load | ( | struct space_cell * | c, |
| struct Particle * | parts, | ||
| int | nr_parts, | ||
| struct Particle ** | partlist, | ||
| struct space_cell ** | celllist ) |
Load a block of particles to the cell.
| c | The #cell. |
| parts | Pointer to a block of #part. |
| nr_parts | The number of parts to load. |
| partlist | A pointer to the partlist to set the part indices. |
| celllist | A pointer to the celllist to set the part indices. |
| HRESULT TissueForge::space_cell_remove | ( | struct space_cell * | c, |
| struct Particle * | p, | ||
| struct Particle ** | partlist ) |
Remove a particle from a cell.
| c | The #cell from which the particle should be removed. |
| p | The #particle to remove from the cell. |
| partlist | Optional #particle array to update. |
| HRESULT TissueForge::space_cell_welcome | ( | struct space_cell * | c, |
| struct Particle ** | partlist ) |
Move particles from the incomming buffer to the cell.
| c | The #cell. |
| partlist | A pointer to the partlist to set the part indices. |
Deletes a particle from the space, and sets the partlist[pid] to null.
this will decrement the python pointer in p, and overwrite the memeory pointed to by p. Any pointer to this will no longer be valid.
Note, pid is the global particle id, and is the index in partlist of the particle.
| int TissueForge::space_get_cellids_for_pos | ( | struct space * | s, |
| FPTYPE * | x, | ||
| int * | cellids ) |
get the cell id for a position, negative on failure
| s | the space |
| x | the position |
| cellids | [optional] get the (i,j,k) indices of the space cell. returns the absolute cell id (index into array). |
| int TissueForge::space_getcell | ( | struct space * | s, |
| struct space_cell ** | out ) |
Get the next unprocessed cell from the spaece.
| s | The space. |
| out | Pointer to a pointer to #cell in which to store the results. |
1 if a cell was found, 0 if the list is empty or < 0 on error. Get the absolute position of a particle.
| s | The space in which the particle resides. |
| id | The local id of the #part. |
| x | A pointer to a vector of at least three FPTYPEs in which to store the particle position. |
| int TissueForge::space_getsid | ( | struct space * | s, |
| struct space_cell ** | ci, | ||
| struct space_cell ** | cj, | ||
| FPTYPE * | shift ) |
Get the sort-ID and flip the cells if necessary.
| s | The space. |
| ci | FPTYPE pointer to the first #cell. |
| cj | FPTYPE pointer to the second #cell. |
| HRESULT TissueForge::space_init | ( | struct space * | s, |
| const FPTYPE * | origin, | ||
| const FPTYPE * | dim, | ||
| FPTYPE * | L, | ||
| FPTYPE | cutoff, | ||
| const struct BoundaryConditions * | bc ) |
Initialize the space with the given dimensions.
| s | The space to initialize. |
| origin | Pointer to an array of three FPTYPEs specifying the origin of the rectangular domain. |
| dim | Pointer to an array of three FPTYPEs specifying the length of the rectangular domain along each dimension. |
| L | The minimum cell edge length, in each dimension. |
| cutoff | A FPTYPE-precision value containing the maximum cutoff lenght that will be used in the potentials. |
| period | Unsigned integer containing the flags space_periodic_x, space_periodic_y and/or space_periodic_z or space_periodic_full. |
This routine initializes the fields of the space s, creates the cells and generates the cell-pair list.
Free the cells involved in the current pair.
| s | The space to operate on. |
| ci | ID of the first cell. |
| cj | ID of the second cell. |
Decreases the taboo-counter of the cells involved in the pair and signals any runner that might be waiting. Note that only a single waiting runner is released per released cell and therefore, if two different cells become free, the condition cellpairs_avail is signaled twice.
Set the absolute position of a particle.
| s | The space in which the particle resides. |
| id | The local id of the #part. |
| x | A pointer to a vector of at least three FPTYPEs in which to store the particle position. |
A style was changed, so need to update any counts the space object has.
| int TissueForge::space_verlet_force | ( | struct space * | s, |
| FPTYPE * | f, | ||
| FPTYPE | epot ) |
Collect forces and potential energies.
| s | The space. |
| maxcount | The maximum number of entries. |
| from | Pointer to an integer which will contain the index to the first entry on success. |
| to | Pointer to an integer which will contain the index to the last entry on success. |
Initialize the Verlet-list data structures.
| s | The space. |
| HRESULT TissueForge::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, and can use a different timestep of dt.
| until | period to execute, in units of simulation time (default executes one time step). |
| dt | overrides the existing time step, and uses this value for time stepping; currently not supported. |
| std::string TissueForge::systemNameStr | ( | ) |
System name.
| std::string TissueForge::systemVersionStr | ( | ) |
System version.
| int TissueForge::Universe_Flag | ( | Universe::Flags | flag | ) |
get a flag value
| HRESULT TissueForge::Universe_SetFlag | ( | Universe::Flags | flag, |
| int | value ) |
sets / clears a flag value
| HRESULT TissueForge::Universe_Step | ( | FloatP_t | until, |
| FloatP_t | dt ) |
runs the universe a pre-determined period of time, until. can use micro time steps of 'dt' which override the saved universe dt.
if until is 0, it is ignored and the universe.dt is used. if dt is 0, it is ignored, and the universe.dt is used as a single time step.
| std::string TissueForge::version_str | ( | ) |
Installation version.
|
extern |
Single static instance of the md engine per process.
Even for MPI enabled, as each MPI process will initialize the engine with different comm and rank.
|
extern |
The single global instance of the universe
|
extern |
ID of the last error
| unsigned int* TissueForge::Particle_Colors |
The the particle type type
| struct Potential TissueForge::potential_null |
Fictitious null potential.