Beispiel #1
0
Output::Output(const InputParameters & parameters) :
    MooseObject(parameters),
    Restartable(parameters, "Output"),
    MeshChangedInterface(parameters),
    SetupInterface(this),
    _problem_ptr(getParam<FEProblem *>("_fe_problem")),
    _transient(_problem_ptr->isTransient()),
    _use_displaced(getParam<bool>("use_displaced")),
    _es_ptr(_use_displaced ? &_problem_ptr->getDisplacedProblem()->es() : &_problem_ptr->es()),
    _execute_on(getParam<MultiMooseEnum>("execute_on")),
    _time(_problem_ptr->time()),
    _time_old(_problem_ptr->timeOld()),
    _t_step(_problem_ptr->timeStep()),
    _dt(_problem_ptr->dt()),
    _dt_old(_problem_ptr->dtOld()),
    _num(0),
    _interval(getParam<unsigned int>("interval")),
    _sync_times(std::set<Real>(getParam<std::vector<Real> >("sync_times").begin(), getParam<std::vector<Real> >("sync_times").end())),
    _start_time(isParamValid("start_time") ? getParam<Real>("start_time") : -std::numeric_limits<Real>::max()),
    _end_time(isParamValid("end_time") ? getParam<Real>("end_time") : std::numeric_limits<Real>::max()),
    _t_tol(getParam<Real>("time_tolerance")),
    _sync_only(getParam<bool>("sync_only")),
    _initialized(false),
    _allow_output(true),
    _is_advanced(false),
    _advanced_execute_on(_execute_on, parameters)
{
  // Apply the additional output flags
  if (isParamValid("additional_execute_on"))
  {
    MultiMooseEnum add = getParam<MultiMooseEnum>("additional_execute_on");
    for (MooseEnumIterator it = add.begin(); it != add.end(); ++it)
      _execute_on.push_back(*it);
  }
}
Beispiel #2
0
bool
MultiMooseEnum::operator==(const MultiMooseEnum & value) const
{
  // Not the same if the lengths are different
  if (value.size() != size())
    return false;

  // Return false if this enum does not contain an item from the other
  for (MooseEnumIterator it = value.begin(); it != value.end(); ++it)
    if (!contains(*it))
      return false;

  // If you get here, they must be the same
  return true;
}