Metrics
- tissue_forge.metrics.relative_position(pos: fVector3, origin: fVector3, comp_bc: bool const & = True) TissueForge::FVector3
Computes the relative position with respect to an origin while optionally account for boundary conditions.
If boundaries along a dimension are periodic, then this chooses the relative coordinate closest to the origin.
- Parameters:
pos (
FVector3
) – absolute positionorigin (
FVector3
) – origincomp_bc (boolean) – flag to compensate for boundary conditions; default true
- Return type:
FVector3
- Returns:
FVector3 relative position with respect to the given origin
- tissue_forge.metrics.neighborhood_particles(position: fVector3, dist: FloatP_t const &, comp_bc: bool const & = True) TissueForge::ParticleList
find all particles in a neighborhood defined by a point and distance
- tissue_forge.metrics.calculate_virial(origin: FloatP_t *, radius: FloatP_t, typeIds: std::set< short, std::less< short >, std::allocator< short > > const &, tensor: FloatP_t *) HRESULT
[in] origin of the sphere where we will comptute the local virial tensor. [in] include all partices a given radius in calculation. [in] vector of type ids to indlude in calculation, if empty, includes all particles. [out] result vector, writes a 3x3 matrix in a row-major in the given location.
If periodoc, we don’t include the periodic image cells, because we only calculate the forces within the simulation volume.
- tissue_forge.metrics.particles_virial(parts: int32_t *, nr_parts: uint16_t, flags: uint32_t, tensor: FloatP_t *) HRESULT
calculate the virial tensor for a specific list of particles. currently uses center of mass as origin, may change in the future with different flags.
flags currently ignored.
- tissue_forge.metrics.particles_radius_of_gyration(parts: int32_t *, nr_parts: uint16_t, result: FloatP_t *) HRESULT
- Parameters:
result: – pointer to float to store result.
- tissue_forge.metrics.particles_center_of_mass(parts: int32_t *, nr_parts: uint16_t, result: FloatP_t *) HRESULT
- Parameters:
result: – pointer to float[3] to store result
- tissue_forge.metrics.particles_center_of_geometry(parts: int32_t *, nr_parts: uint16_t, result: FloatP_t *) HRESULT
- Parameters:
result: – pointer to float[3] to store result.
- tissue_forge.metrics.particles_moment_of_inertia(parts: int32_t *, nr_parts: uint16_t, result: FloatP_t *) HRESULT
- Parameters:
result: – pointer to float[9] to store result.
- tissue_forge.metrics.cartesian_to_spherical(postion: fVector3, origin: fVector3) TissueForge::FVector3
converts cartesian to spherical, writes spherical coords in to result array. return FVector3{radius, theta, phi};
- tissue_forge.metrics.particle_neighbors(part: Particle, radius: FloatP_t, typeIds: std::set< short, std::less< short >, std::allocator< short > > const *, nr_parts: uint16_t *, parts: int32_t **) HRESULT
Searches and enumerates a location of space for all particles there.
Allocates a buffer, and stores the results there.
- Parameters:
part (
Particle
) – the particleradius (float) – [optional] the radius of the neighborhood
typeIds (std::set< short,std::less< short >,std::allocator< short > >) – [optional] set of type ids to include. If not given, gets all other parts within radius.
nr_parts (int) – [out] number of parts
parts (int) – [out] newly allocated buffer of particle ids.
- tissue_forge.metrics.eigenvals(*args) TissueForge::FVector4
Overload 1:
Compute the eigenvalues of a 3x3 matrix
- Parameters:
mat (
FMatrix3
) – the matrixsymmetric (boolean) – flag signifying whether the matrix is symmetric
- Return type:
FVector3
- Returns:
eigenvalues
Overload 2:
Compute the eigenvalues of a 4x4 matrix
- Parameters:
mat (
FMatrix4
) – the matrixsymmetric (boolean) – flag signifying whether the matrix is symmetric
- Return type:
FVector4
- Returns:
eigenvalues
- tissue_forge.metrics.eigenvecs_vals(*args) std::pair< TissueForge::FVector4,TissueForge::FMatrix4 >
Overload 1:
Compute the eigenvectors and eigenvalues of a 3x3 matrix
- Parameters:
mat (
FMatrix3
) – the matrixsymmetric (boolean) – flag signifying whether the matrix is symmetric
- Return type:
std::pair< TissueForge::FVector3,TissueForge::FMatrix3 >
- Returns:
eigenvalues, eigenvectors
Overload 2:
Compute the eigenvectors and eigenvalues of a 4x4 matrix
- Parameters:
mat (
FMatrix4
) – the matrixsymmetric (boolean) – flag signifying whether the matrix is symmetric
- Return type:
std::pair< TissueForge::FVector4,TissueForge::FMatrix4 >
- Returns:
eigenvalues, eigenvectors