Esempio n. 1
0
void StateMachineApp::setup() {
    int numStates = getStateCount();
    for(int i = 0; i < numStates; i++) {
        State* newState = createState(i);
        newState->setup();

        states.push_back(newState);
    }

    if(numStates > 0) {
        currentState = states[0];
        currentState->in();
    }

    setupInternal();
}
Esempio n. 2
0
   void setup(NumericVector<Number> &u_initial) {
   // work vectors
   _u_ghosted = &_fe_problem.getNonlinearSystem().sys().add_vector("TimeStepperWorkUGhosted", false, GHOSTED);
   _udot_ghosted = &_fe_problem.getNonlinearSystem().sys().add_vector("TimeStepperWorkUDotGhosted", false, GHOSTED);
   setupInternal(u_initial);
 }