MFEM  v4.6.0
Finite element discretization library
Public Member Functions | List of all members
mfem::ParticleTopology Class Reference

Class that implements the particle topology. More...

#include <material_metrics.hpp>

Inheritance diagram for mfem::ParticleTopology:
Collaboration diagram for mfem::ParticleTopology:

Public Member Functions

 ParticleTopology (double length_x, double length_y, double length_z, std::vector< double > &random_positions, std::vector< double > &random_rotations)
double 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 ( double  length_x,
double  length_y,
double  length_z,
std::vector< double > &  random_positions,
std::vector< double > &  random_rotations 

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.

Member Function Documentation

◆ ComputeMetric()

double mfem::ParticleTopology::ComputeMetric ( const Vector x)

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: