MFEM v4.7.0
Finite element discretization library
Loading...
Searching...
No Matches
mfem::ParticleTopology Class Reference

Class that implements the particle topology. More...

#include <material_metrics.hpp>

Inheritance diagram for mfem::ParticleTopology:
[legend]
Collaboration diagram for mfem::ParticleTopology:
[legend]

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
 

Detailed Description

Class that implements the particle topology.

Definition at line 47 of file material_metrics.hpp.

Constructor & Destructor Documentation

◆ ParticleTopology()

mfem::ParticleTopology::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 )
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.

Parameters
[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.

Member Function Documentation

◆ ComputeMetric()

real_t mfem::ParticleTopology::ComputeMetric ( const Vector & x)
finalvirtual

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.


The documentation for this class was generated from the following files: