Exemplo n.º 1
0
openfluid::base::ExceptionContext SimulationDrivenWare::computeWareContext(const std::string& CodeLoc) const
{
  openfluid::base::ExceptionContext Context;


  if (mp_SimStatus->getCurrentStage() == openfluid::base::SimulationStatus::INITIALIZERUN ||
      mp_SimStatus->getCurrentStage() == openfluid::base::SimulationStatus::RUNSTEP)
  {
    Context = openfluid::ware::WareException::computeContext(OPENFLUID_GetWareType(),
                                                             OPENFLUID_GetWareID(),
                                                             mp_SimStatus->getCurrentStage(),
                                                             mp_SimStatus->getCurrentTimeIndex());
  }
  else
  {
    Context = openfluid::ware::WareException::computeContext(OPENFLUID_GetWareType(),
                                                             OPENFLUID_GetWareID(),
                                                             mp_SimStatus->getCurrentStage());
  }

  if (!CodeLoc.empty())
    Context.addCodeLocation(CodeLoc);

  return Context;
}
void DummyModalSpatialSimple::update(openfluid::builderext::FluidXUpdateFlags::Flags /*UpdateFlags*/)
{
  std::string DirStr;

  OPENFLUID_GetRunEnvironment("dir.input",DirStr);
  std::cout << OPENFLUID_GetWareID() << ", IN: " << DirStr << std::endl;

  OPENFLUID_GetRunEnvironment("dir.output",DirStr);
  std::cout << OPENFLUID_GetWareID() << ", OUT: " << DirStr << std::endl;
}
Exemplo n.º 3
0
void PluggableWare::OPENFLUID_RaiseError(const std::string& Msg)
{
  throw WareException(openfluid::ware::WareException::computeContext(m_WareType,OPENFLUID_GetWareID()),Msg);
}