MFEM v4.7.0
Finite element discretization library
|
Class that implements the particle topology. More...
#include <material_metrics.hpp>
Public Member Functions | |
ParticleTopology (real_t length_x, real_t length_y, real_t length_z, std::vector< real_t > &random_positions, std::vector< real_t > &random_rotations) | |
real_t | ComputeMetric (const Vector &x) final |
Public Member Functions inherited from mfem::MaterialTopology | |
virtual | ~MaterialTopology ()=default |
Class that implements the particle topology.
Definition at line 47 of file material_metrics.hpp.
|
inline |
Constructor. The length of the vectors random_positions and random_rotations must be 3x and 9x number_of_particles, respectively. They implicitly define the number of the particles.
[in] | (length_x,length_y,length_z) | - particle shape |
[in] | random_positions | - vector with random positions for particles |
[in] | random_rotations | - vector with random rotations for particles |
Definition at line 56 of file material_metrics.hpp.
Compute the metric rho describing the particle topology. For a vector x, this function returns the shortest distance to any of the particles. The individual is computed as || A_k (x-x_k) ||_2. (A allows do distort the particle shape.)
Implements mfem::MaterialTopology.
Definition at line 17 of file material_metrics.cpp.