Go to the documentation of this file.
32 namespace NumericalAlgorithms {
36 template <
int nYieldSurfaces >
61 namespace NumericalAlgorithms {
66 const int numRows = ( 1 << n ) - 1;
67 const int numCols = n;
69 for (
int row = 0; row < numRows; row++ )
70 for (
int col = 0; col < numCols; col++ )
78 for (
int i = 0; i < yieldSurfaceCombinations.rows(); i++ ) {
79 bool alreadyUsed = yieldSurfaceCombinations.row( i )( idxUsedFlag );
80 YieldSurfFlagArr combinationCandidate = yieldSurfaceCombinations.row( i ).head( n );
81 if ( !alreadyUsed && ( combinationCandidate ==
true ).any() ) {
82 activeSurfaces = combinationCandidate;
92 yieldSurfaceCombinations.col( idxUsedFlag ).setConstant(
false );
98 for (
int i = 0; i < yieldSurfaceCombinations.rows(); i++ )
99 if ( ( yieldSurfaceCombinations.row( i ).head( n ) == activeSurfaces ).all() )
100 yieldSurfaceCombinations.row( i )( idxUsedFlag ) =
true;
void markYieldFlagCombinationAsUsed(const YieldSurfFlagArr &activeSurfaces)
set the current combination as used
Definition: YieldSurfaceCombinationManager.h:96
YieldSurfaceCombinationManager()
Definition: YieldSurfaceCombinationManager.h:63
bool getAnotherYieldFlagCombination(YieldSurfFlagArr &activeSurfaces)
get another unused combination of yield surfaces
Definition: YieldSurfaceCombinationManager.h:76
Eigen::Array< bool, 1, nYieldSurfaces > YieldSurfFlagArr
An array to carry active/nonactive states of yield surfaces.
Definition: YieldSurfaceCombinationManager.h:45
Eigen::Array< bool,(1<< nYieldSurfaces) - 1,(nYieldSurfaces+1) > yieldSurfaceCombinations
An array which contains every possible (reasonable) combination of yield surfaces.
Definition: YieldSurfaceCombinationManager.h:43
Definition: YieldSurfaceCombinationManager.h:37
This file includes functions needed for calculations with stress and strain tensors written in voigt ...
Definition: MarmotTesting.h:30
void resetUsedYieldFlagCombinations()
reset all yieldsurfaces as unused
Definition: YieldSurfaceCombinationManager.h:90
Eigen::Array< double, 1, nYieldSurfaces > YieldSurfResArr
An array to carry values of yield functions.
Definition: YieldSurfaceCombinationManager.h:47
const int idxUsedFlag
Column in the YieldSurfFlagArr for marking a combination as used.
Definition: YieldSurfaceCombinationManager.h:39