You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
856 B
45 lines
856 B
//
|
|
// Created by cflin on 4/7/23.
|
|
//
|
|
|
|
#ifndef RIGIDIPC_SIMTARGETOPTION_H
|
|
#define RIGIDIPC_SIMTARGETOPTION_H
|
|
|
|
namespace ssim {
|
|
|
|
class SimTargetOption {
|
|
public:
|
|
enum Target {
|
|
U_NORM = 0, UX, UY, UZ, S_NORM, S_VON_Mises,/*primary stress*/SX, SY, SZ, COMPLIANCE, ENUM_SIZE
|
|
};
|
|
|
|
SimTargetOption(int init_state = 0) : state(init_state) {}
|
|
|
|
void set_option(int option) {
|
|
state |= (1 << option);
|
|
}
|
|
|
|
void unset_option(int option) {
|
|
state &= ~(1 << option);
|
|
}
|
|
|
|
bool is_option_set(int option) const {
|
|
return state & (1 << option);
|
|
}
|
|
|
|
void clear() {
|
|
state = 0;
|
|
}
|
|
|
|
void set() {
|
|
state = INT_MAX;
|
|
}
|
|
|
|
private:
|
|
int state;
|
|
};
|
|
|
|
|
|
} // ssim
|
|
|
|
#endif //RIGIDIPC_SIMTARGETOPTION_H
|
|
|