CellModules
MecaCell::GenericConnectionBodyPlugin< Cell, GenericConnection > Struct Template Reference

#include <genericconnectionplugin.hpp>

Public Member Functions

void setNewConnectionCallback (std::function< void(GenericConnection< Cell > *)> f)
 Sets a callback function to be called at each connection creation. Can be used to override the default connection parameters. More...
 
template<typename W >
void preBehaviorUpdate (W *w)
 
template<typename W >
void endUpdate (W *w)
 
void createConnection (const ordered_pair< Cell * > &cells)
 create and register a contact surface connection between twoe cells More...
 
void disconnect (const ordered_pair< Cell * > &cells, GenericConnection< Cell > *conn)
 Disconnect two cells. More...
 
void deleteImpossibleConnections ()
 
template<typename W >
void checkForCellCellConnections (W &world)
 we check for any cell cell collision or adhesion More...
 
template<typename W >
void updateCellCellConnections (W &)
 updates (compute forces) the connections and delete the resolved ones (when cells are not in contact anymore) More...
 
template<typename W >
void preDeleteDeadCellsUpdate (W *w)
 

Public Attributes

const size_t MIN_CHUNK_SIZE = 5
 
const size_t AVG_TASKS_PER_THREAD = 3
 
ordered_hash_map< ordered_pair< Cell * >, std::unique_ptr< GenericConnection< Cell > > > connections
 
std::mutex connectionMutex
 connections. The ordered_hash_map is to enforce determinism. More...
 
bool collisionCheck = true
 
std::function< void(GenericConnection< Cell > *)> newConnectionCallback
 

Detailed Description

template<typename Cell, template< class > class GenericConnection>
struct MecaCell::GenericConnectionBodyPlugin< Cell, GenericConnection >

Definition at line 19 of file genericconnectionplugin.hpp.

Member Function Documentation

◆ checkForCellCellConnections()

template<typename Cell , template< class > class GenericConnection>
template<typename W >
void MecaCell::GenericConnectionBodyPlugin< Cell, GenericConnection >::checkForCellCellConnections ( W &  world)
inline

we check for any cell cell collision or adhesion

Template Parameters
Wworld type
Parameters
worldworld instance

Definition at line 132 of file genericconnectionplugin.hpp.

◆ createConnection()

template<typename Cell , template< class > class GenericConnection>
void MecaCell::GenericConnectionBodyPlugin< Cell, GenericConnection >::createConnection ( const ordered_pair< Cell * > &  cells)
inline

create and register a contact surface connection between twoe cells

Parameters
cellsthe cells that are in contact

Definition at line 98 of file genericconnectionplugin.hpp.

◆ deleteImpossibleConnections()

template<typename Cell , template< class > class GenericConnection>
void MecaCell::GenericConnectionBodyPlugin< Cell, GenericConnection >::deleteImpossibleConnections ( )
inline

Definition at line 122 of file genericconnectionplugin.hpp.

◆ disconnect()

template<typename Cell , template< class > class GenericConnection>
void MecaCell::GenericConnectionBodyPlugin< Cell, GenericConnection >::disconnect ( const ordered_pair< Cell * > &  cells,
GenericConnection< Cell > *  conn 
)
inline

Disconnect two cells.

Parameters
cellsthe pair of cell to disconnect
connthe connection ptr

Definition at line 114 of file genericconnectionplugin.hpp.

◆ endUpdate()

template<typename Cell , template< class > class GenericConnection>
template<typename W >
void MecaCell::GenericConnectionBodyPlugin< Cell, GenericConnection >::endUpdate ( W *  w)
inline

Definition at line 57 of file genericconnectionplugin.hpp.

◆ preBehaviorUpdate()

template<typename Cell , template< class > class GenericConnection>
template<typename W >
void MecaCell::GenericConnectionBodyPlugin< Cell, GenericConnection >::preBehaviorUpdate ( W *  w)
inline

Definition at line 51 of file genericconnectionplugin.hpp.

◆ preDeleteDeadCellsUpdate()

template<typename Cell , template< class > class GenericConnection>
template<typename W >
void MecaCell::GenericConnectionBodyPlugin< Cell, GenericConnection >::preDeleteDeadCellsUpdate ( W *  w)
inline

Definition at line 223 of file genericconnectionplugin.hpp.

◆ setNewConnectionCallback()

template<typename Cell , template< class > class GenericConnection>
void MecaCell::GenericConnectionBodyPlugin< Cell, GenericConnection >::setNewConnectionCallback ( std::function< void(GenericConnection< Cell > *)>  f)
inline

Sets a callback function to be called at each connection creation. Can be used to override the default connection parameters.

Parameters
fa function taking a pointer to the newly created GenericConnection. Void return type.

Definition at line 44 of file genericconnectionplugin.hpp.

◆ updateCellCellConnections()

template<typename Cell , template< class > class GenericConnection>
template<typename W >
void MecaCell::GenericConnectionBodyPlugin< Cell, GenericConnection >::updateCellCellConnections ( W &  )
inline

updates (compute forces) the connections and delete the resolved ones (when cells are not in contact anymore)

Parameters
theworld
Wworld type

Definition at line 206 of file genericconnectionplugin.hpp.

Member Data Documentation

◆ AVG_TASKS_PER_THREAD

template<typename Cell , template< class > class GenericConnection>
const size_t MecaCell::GenericConnectionBodyPlugin< Cell, GenericConnection >::AVG_TASKS_PER_THREAD = 3

Definition at line 21 of file genericconnectionplugin.hpp.

◆ collisionCheck

template<typename Cell , template< class > class GenericConnection>
bool MecaCell::GenericConnectionBodyPlugin< Cell, GenericConnection >::collisionCheck = true

Definition at line 31 of file genericconnectionplugin.hpp.

◆ connectionMutex

template<typename Cell , template< class > class GenericConnection>
std::mutex MecaCell::GenericConnectionBodyPlugin< Cell, GenericConnection >::connectionMutex

connections. The ordered_hash_map is to enforce determinism.

where we keep track of all the

Definition at line 29 of file genericconnectionplugin.hpp.

◆ connections

template<typename Cell , template< class > class GenericConnection>
ordered_hash_map<ordered_pair<Cell *>, std::unique_ptr<GenericConnection<Cell> > > MecaCell::GenericConnectionBodyPlugin< Cell, GenericConnection >::connections

Definition at line 26 of file genericconnectionplugin.hpp.

◆ MIN_CHUNK_SIZE

template<typename Cell , template< class > class GenericConnection>
const size_t MecaCell::GenericConnectionBodyPlugin< Cell, GenericConnection >::MIN_CHUNK_SIZE = 5

Definition at line 20 of file genericconnectionplugin.hpp.

◆ newConnectionCallback

template<typename Cell , template< class > class GenericConnection>
std::function<void(GenericConnection<Cell> *)> MecaCell::GenericConnectionBodyPlugin< Cell, GenericConnection >::newConnectionCallback
Initial value:
=
[](GenericConnection<Cell> *) {}

Definition at line 34 of file genericconnectionplugin.hpp.


The documentation for this struct was generated from the following file: