CASM  1.1.0
A Clusters Approach to Statistical Mechanics
CASM::ConfigEnumStrain Class Reference

#include <ConfigEnumStrain.hh>

+ Inheritance diagram for CASM::ConfigEnumStrain:

Detailed Description

Enumerate strained Configurations

Definition at line 54 of file ConfigEnumStrain.hh.

Public Types

typedef InputEnumIterator< Configuration, true > iterator
 
typedef ValueType value_type
 
typedef CASM_TMP::ConstSwitch< IsConst, ValueType > & reference
 
typedef long step_type
 

Public Member Functions

 ConfigEnumStrain (ConfigEnumInput const &initial_state, ConfigEnumStrainParams const &params)
 
 ConfigEnumStrain (ConfigEnumInput const &initial_state, std::vector< SymRepTools_v2::SubWedge > const &wedges, Eigen::VectorXd min_val, Eigen::VectorXd max_val, Eigen::VectorXd inc_val, DoFKey const &strain_key, bool auto_range, bool trim_corners)
 
std::string name () const override
 Derived enumerators must implement name, via ENUM_MEMBERS. More...
 
Index subwedge_index () const
 
Eigen::VectorXd normal_coordinate () const
 
iterator begin ()
 
iterator end ()
 
reference current () const
 Access the current ObjectType by reference. More...
 
virtual std::string name () const=0
 Derived enumerators must implement name, via ENUM_MEMBERS. More...
 
virtual jsonParser source (step_type step) const
 
virtual jsonParser source (step_type step) const
 
step_type step () const
 Increments with each enumerated object. More...
 
step_type step () const
 Increments with each enumerated object. More...
 
bool valid () const
 Returns false if enumeration is complete. More...
 
bool valid () const
 Returns false if enumeration is complete. More...
 

Static Public Attributes

static const std::string enumerator_name = "ConfigEnumStrain"
 

Protected Member Functions

void _initialize (CASM_TMP::ConstSwitch< IsConst, value_type > *_initial)
 
void _initialize ()
 
void _set_current_ptr (CASM_TMP::ConstSwitch< IsConst, value_type > *_new)
 Change the pointer. More...
 
void _decrement_step ()
 Decrement current step value. More...
 
void _increment_step ()
 Increment current step value. More...
 
void _invalidate ()
 Call if enumeration complete. More...
 
void _set_step (step_type val)
 Set current step value. More...
 
void _set_step (step_type val)
 Set current step value. More...
 
void _validate ()
 Used if random access enumerator step is moved into valid range. More...
 

Private Member Functions

void increment () override
 Implements increment over all strain states. More...
 
const PermuteIterator_perm_begin ()
 
const PermuteIterator_perm_end ()
 

Private Attributes

DoFKey m_strain_key
 
bool m_trim_corners
 
Configuration m_current
 
EigenCounter< Eigen::VectorXd > m_counter
 
Index m_equiv_ind
 
std::vector< SymRepTools_v2::SubWedgem_wedges
 
PermuteIterator m_perm_begin
 
PermuteIterator m_perm_end
 
Eigen::MatrixXd m_shape_factor
 
friend InputEnumIteratorBase< ValueType, IsConst >
 
CASM_TMP::ConstSwitch< IsConst, value_type > * m_current_ptr
 
bool m_valid
 
step_type m_step
 

Member Typedef Documentation

◆ iterator

Definition at line 204 of file InputEnumerator.hh.

◆ reference

template<typename ValueType , bool IsConst = true>
typedef CASM_TMP::ConstSwitch<IsConst, ValueType>& CASM::ValEnumerator< ValueType, IsConst >::reference
inherited

Definition at line 174 of file Enumerator.hh.

◆ step_type

template<typename ValueType , bool IsConst = true>
typedef long CASM::EnumeratorBase::step_type
inherited

Definition at line 107 of file Enumerator.hh.

◆ value_type

template<typename ValueType , bool IsConst = true>
typedef ValueType CASM::ValEnumerator< ValueType, IsConst >::value_type
inherited

Definition at line 173 of file Enumerator.hh.

Constructor & Destructor Documentation

◆ ConfigEnumStrain() [1/2]

CASM::ConfigEnumStrain::ConfigEnumStrain ( ConfigEnumInput const &  initial_state,
ConfigEnumStrainParams const &  params 
)

Definition at line 30 of file ConfigEnumStrain.cc.

◆ ConfigEnumStrain() [2/2]

CASM::ConfigEnumStrain::ConfigEnumStrain ( ConfigEnumInput const &  initial_state,
std::vector< SymRepTools_v2::SubWedge > const &  wedges,
Eigen::VectorXd  min_val,
Eigen::VectorXd  max_val,
Eigen::VectorXd  inc_val,
DoFKey const &  strain_key,
bool  auto_range,
bool  trim_corners 
)

Definition at line 36 of file ConfigEnumStrain.cc.

Member Function Documentation

◆ _decrement_step()

template<typename ValueType , bool IsConst = true>
void CASM::EnumeratorBase::_decrement_step
inlineprotectedinherited

Decrement current step value.

Definition at line 156 of file Enumerator.hh.

◆ _increment_step()

template<typename ValueType , bool IsConst = true>
void CASM::EnumeratorBase::_increment_step
inlineprotectedinherited

Increment current step value.

Definition at line 153 of file Enumerator.hh.

◆ _initialize() [1/2]

template<typename ValueType , bool IsConst = true>
void CASM::EnumeratorBase::_initialize
inlineprotectedinherited

Initialize

  • Sets step to 0
  • Sets valid to true

Definition at line 144 of file Enumerator.hh.

◆ _initialize() [2/2]

template<typename ValueType , bool IsConst = true>
void CASM::ValEnumerator< ValueType, IsConst >::_initialize ( CASM_TMP::ConstSwitch< IsConst, value_type > *  _initial)
inlineprotectedinherited

Initialize

  • Sets current to point at _initial
  • Sets step to 0
  • Sets valid to true

Definition at line 197 of file Enumerator.hh.

◆ _invalidate()

template<typename ValueType , bool IsConst = true>
void CASM::EnumeratorBase::_invalidate
inlineprotectedinherited

Call if enumeration complete.

Definition at line 159 of file Enumerator.hh.

◆ _perm_begin()

const PermuteIterator& CASM::ConfigEnumStrain::_perm_begin ( )
inlineprivate

Definition at line 100 of file ConfigEnumStrain.hh.

◆ _perm_end()

const PermuteIterator& CASM::ConfigEnumStrain::_perm_end ( )
inlineprivate

Definition at line 101 of file ConfigEnumStrain.hh.

◆ _set_current_ptr()

template<typename ValueType , bool IsConst = true>
void CASM::ValEnumerator< ValueType, IsConst >::_set_current_ptr ( CASM_TMP::ConstSwitch< IsConst, value_type > *  _new)
inlineprotectedinherited

Change the pointer.

Definition at line 215 of file Enumerator.hh.

◆ _set_step() [1/2]

void CASM::EnumeratorBase::_set_step ( step_type  val)
inlineprotectedinherited

Set current step value.

Definition at line 150 of file Enumerator.hh.

◆ _set_step() [2/2]

template<typename ValueType , bool IsConst = true>
void CASM::EnumeratorBase::_set_step
inlineprotectedinherited

Set current step value.

Definition at line 150 of file Enumerator.hh.

◆ _validate()

void CASM::EnumeratorBase::_validate ( )
inlineprotectedinherited

Used if random access enumerator step is moved into valid range.

Definition at line 162 of file Enumerator.hh.

◆ begin()

iterator CASM::InputEnumeratorBase< Configuration , true >::begin ( )
inlineinherited

Definition at line 216 of file InputEnumerator.hh.

◆ current()

template<typename ValueType , bool IsConst = true>
reference CASM::ValEnumerator< ValueType, IsConst >::current ( ) const
inlineinherited

Access the current ObjectType by reference.

Definition at line 211 of file Enumerator.hh.

◆ end()

iterator CASM::InputEnumeratorBase< Configuration , true >::end ( )
inlineinherited

Definition at line 220 of file InputEnumerator.hh.

◆ increment()

void CASM::ConfigEnumStrain::increment ( )
overrideprivatevirtual

Implements increment over all strain states.

Implements CASM::InputEnumeratorBase< Configuration >.

Definition at line 114 of file ConfigEnumStrain.cc.

◆ name() [1/2]

std::string CASM::ConfigEnumStrain::name ( ) const
overridevirtual

Derived enumerators must implement name, via ENUM_MEMBERS.

Implements CASM::EnumeratorBase.

Definition at line 139 of file ConfigEnumStrain.cc.

◆ name() [2/2]

template<typename ValueType , bool IsConst = true>
virtual std::string CASM::EnumeratorBase::name
inherited

Derived enumerators must implement name, via ENUM_MEMBERS.

◆ normal_coordinate()

Eigen::VectorXd CASM::ConfigEnumStrain::normal_coordinate ( ) const

Definition at line 145 of file ConfigEnumStrain.cc.

◆ source() [1/2]

virtual jsonParser CASM::EnumeratorBase::source ( step_type  step) const
inlinevirtualinherited

Default Object source just uses step#

Returns:

{
"enumerated_by": "<enumerator_type>",
"step": <step #>
}
step_type step() const
Increments with each enumerated object.
Definition: Enumerator.hh:115

Definition at line 129 of file Enumerator.hh.

◆ source() [2/2]

template<typename ValueType , bool IsConst = true>
virtual jsonParser CASM::EnumeratorBase::source
inlineinherited

Default Object source just uses step#

Returns:

{
"enumerated_by": "<enumerator_type>",
"step": <step #>
}

Definition at line 129 of file Enumerator.hh.

◆ step() [1/2]

step_type CASM::EnumeratorBase::step ( ) const
inlineinherited

Increments with each enumerated object.

Definition at line 115 of file Enumerator.hh.

◆ step() [2/2]

template<typename ValueType , bool IsConst = true>
step_type CASM::EnumeratorBase::step
inlineinherited

Increments with each enumerated object.

Definition at line 115 of file Enumerator.hh.

◆ subwedge_index()

Index CASM::ConfigEnumStrain::subwedge_index ( ) const

Definition at line 143 of file ConfigEnumStrain.cc.

◆ valid() [1/2]

bool CASM::EnumeratorBase::valid ( ) const
inlineinherited

Returns false if enumeration is complete.

Definition at line 118 of file Enumerator.hh.

◆ valid() [2/2]

template<typename ValueType , bool IsConst = true>
bool CASM::EnumeratorBase::valid
inlineinherited

Returns false if enumeration is complete.

Definition at line 118 of file Enumerator.hh.

Member Data Documentation

◆ enumerator_name

const std::string CASM::ConfigEnumStrain::enumerator_name = "ConfigEnumStrain"
static

Definition at line 69 of file ConfigEnumStrain.hh.

◆ InputEnumIteratorBase< ValueType, IsConst >

friend CASM::InputEnumeratorBase< Configuration , true >::InputEnumIteratorBase< Configuration , true >
privateinherited

Definition at line 198 of file InputEnumerator.hh.

◆ m_counter

EigenCounter<Eigen::VectorXd> CASM::ConfigEnumStrain::m_counter
private

Definition at line 87 of file ConfigEnumStrain.hh.

◆ m_current

Configuration CASM::ConfigEnumStrain::m_current
private

Definition at line 84 of file ConfigEnumStrain.hh.

◆ m_current_ptr

template<typename ValueType , bool IsConst = true>
CASM_TMP::ConstSwitch<IsConst, value_type>* CASM::ValEnumerator< ValueType, IsConst >::m_current_ptr
privateinherited

Definition at line 220 of file Enumerator.hh.

◆ m_equiv_ind

Index CASM::ConfigEnumStrain::m_equiv_ind
private

Definition at line 90 of file ConfigEnumStrain.hh.

◆ m_perm_begin

PermuteIterator CASM::ConfigEnumStrain::m_perm_begin
private

Definition at line 97 of file ConfigEnumStrain.hh.

◆ m_perm_end

PermuteIterator CASM::ConfigEnumStrain::m_perm_end
private

Definition at line 97 of file ConfigEnumStrain.hh.

◆ m_shape_factor

Eigen::MatrixXd CASM::ConfigEnumStrain::m_shape_factor
private

Definition at line 98 of file ConfigEnumStrain.hh.

◆ m_step

step_type CASM::EnumeratorBase::m_step
privateinherited

Definition at line 167 of file Enumerator.hh.

◆ m_strain_key

DoFKey CASM::ConfigEnumStrain::m_strain_key
private

Definition at line 80 of file ConfigEnumStrain.hh.

◆ m_trim_corners

bool CASM::ConfigEnumStrain::m_trim_corners
private

Definition at line 82 of file ConfigEnumStrain.hh.

◆ m_valid

bool CASM::EnumeratorBase::m_valid
privateinherited

Definition at line 165 of file Enumerator.hh.

◆ m_wedges

std::vector<SymRepTools_v2::SubWedge> CASM::ConfigEnumStrain::m_wedges
private

Definition at line 92 of file ConfigEnumStrain.hh.


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