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 241 of file GrainTracker.h.

Constructor & Destructor Documentation

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

Definition at line 1531 of file GrainTracker.C.

1532  : GrainDistance(distance,
1533  var_index,
1534  std::numeric_limits<std::size_t>::max(),
1535  std::numeric_limits<unsigned int>::max())
1536 {
1537 }
GrainDistance(Real distance, std::size_t var_index)
GrainDistance::GrainDistance ( Real  distance,
std::size_t  var_index,
std::size_t  grain_index,
unsigned int  grain_id 

Definition at line 1539 of file GrainTracker.C.

1543  : _distance(distance), _var_index(var_index), _grain_index(grain_index), _grain_id(grain_id)
1544 {
1545 }
std::size_t _var_index
Definition: GrainTracker.h:261
std::size_t _grain_index
Definition: GrainTracker.h:262
unsigned int _grain_id
Definition: GrainTracker.h:263
GrainDistance::GrainDistance ( const GrainDistance f)
GrainDistance::GrainDistance ( GrainDistance &&  f)

Member Function Documentation

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

Definition at line 1548 of file GrainTracker.C.

1549 {
1550  return _distance < rhs._distance;
1551 }
GrainDistance& GrainDistance::operator= ( const GrainDistance f)
GrainDistance& GrainDistance::operator= ( GrainDistance &&  f)

Member Data Documentation

Real GrainDistance::_distance

Definition at line 260 of file GrainTracker.h.

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

unsigned int GrainDistance::_grain_id

Definition at line 263 of file GrainTracker.h.

std::size_t GrainDistance::_grain_index

Definition at line 262 of file GrainTracker.h.

std::size_t GrainDistance::_var_index

Definition at line 261 of file GrainTracker.h.

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