Public Member Functions | Public Attributes | List of all members
GrainDistance Struct Reference

This struct is used to hold distance information to other grains in the simulation. More...

#include <GrainTracker.h>

Public Member Functions

 GrainDistance (Real distance, std::size_t var_index)
 GrainDistance (Real distance, std::size_t var_index, std::size_t grain_index, unsigned int grain_id)
 GrainDistance (const GrainDistance &f)=default
GrainDistanceoperator= (const GrainDistance &f)=default
 GrainDistance (GrainDistance &&f)=default
GrainDistanceoperator= (GrainDistance &&f)=default
bool operator< (const GrainDistance &rhs) const

Public Attributes

Real _distance
std::size_t _var_index
std::size_t _grain_index
unsigned int _grain_id

Detailed Description

This struct is used to hold distance information to other grains in the simulation.

It is used for sorting and during the remapping algorithm.

Definition at line 263 of file GrainTracker.h.

Constructor & Destructor Documentation

◆ GrainDistance() [1/4]

GrainDistance::GrainDistance ( Real  distance,
std::size_t  var_index 

Definition at line 1798 of file GrainTracker.C.

1799  : GrainDistance(distance,
1800  var_index,
1801  std::numeric_limits<std::size_t>::max(),
1802  std::numeric_limits<unsigned int>::max())
1803 {
1804 }
GrainDistance(Real distance, std::size_t var_index)

◆ GrainDistance() [2/4]

GrainDistance::GrainDistance ( Real  distance,
std::size_t  var_index,
std::size_t  grain_index,
unsigned int  grain_id 

Definition at line 1806 of file GrainTracker.C.

1810  : _distance(distance), _var_index(var_index), _grain_index(grain_index), _grain_id(grain_id)
1811 {
1812 }
std::size_t _var_index
Definition: GrainTracker.h:283
std::size_t _grain_index
Definition: GrainTracker.h:284
unsigned int _grain_id
Definition: GrainTracker.h:285

◆ GrainDistance() [3/4]

GrainDistance::GrainDistance ( const GrainDistance f)

◆ GrainDistance() [4/4]

GrainDistance::GrainDistance ( GrainDistance &&  f)

Member Function Documentation

◆ operator<()

bool GrainDistance::operator< ( const GrainDistance rhs) const

Definition at line 1815 of file GrainTracker.C.

1816 {
1817  return _distance < rhs._distance;
1818 }

◆ operator=() [1/2]

GrainDistance& GrainDistance::operator= ( const GrainDistance f)

◆ operator=() [2/2]

GrainDistance& GrainDistance::operator= ( GrainDistance &&  f)

Member Data Documentation

◆ _distance

Real GrainDistance::_distance

Definition at line 282 of file GrainTracker.h.

Referenced by GrainTracker::computeMinDistancesFromGrain(), and operator<().

◆ _grain_id

unsigned int GrainDistance::_grain_id

Definition at line 285 of file GrainTracker.h.

◆ _grain_index

std::size_t GrainDistance::_grain_index

Definition at line 284 of file GrainTracker.h.

◆ _var_index

std::size_t GrainDistance::_var_index

Definition at line 283 of file GrainTracker.h.

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