Skip to content

Commit

Permalink
Moved enum into StateStruct
Browse files Browse the repository at this point in the history
  • Loading branch information
bartgol committed May 8, 2023
1 parent e04f482 commit d9afc77
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/Albany_Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3205,7 +3205,7 @@ Application::loadWorksetBucketInfo(PHAL::Workset& workset, const int& ws,
// Sidesets are integrated within the Cells
loadWorksetSidesetInfo(workset, ws);

workset.stateArrayPtr = &disc->getStateArrays(StateArrays::ELEM)[ws];
workset.stateArrayPtr = &disc->getStateArrays(StateStruct::ElemState)[ws];
}

void
Expand Down
12 changes: 6 additions & 6 deletions src/Albany_StateInfoStruct.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@ using StateArrayVec = std::vector<StateArray>;

struct StateArrays
{
enum StateArrayType
{
ELEM,
NODE
};

StateArrayVec elemStateArrays;
StateArrayVec nodeStateArrays;
};
Expand All @@ -61,6 +55,12 @@ struct StateArrays

struct StateStruct
{
enum StateType
{
ElemState = 1,
NodeState
};

enum MeshFieldEntity
{
WorksetValue,
Expand Down
4 changes: 2 additions & 2 deletions src/disc/Albany_AbstractDiscretization.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,8 @@ class AbstractDiscretization
getStateArrays() = 0;

//! Get stateArray of given type
StateArrayVec& getStateArrays(const StateArrays::StateArrayType type) {
if (type==StateArrays::ELEM) {
StateArrayVec& getStateArrays(const StateStruct::StateType type) {
if (type==StateStruct::ElemState) {
return getStateArrays().elemStateArrays;
} else {
return getStateArrays().nodeStateArrays;
Expand Down

0 comments on commit d9afc77

Please sign in to comment.