Exemplo n.º 1
0
void
Transient::execute()
{
  preExecute();

  // NOTE: if you remove this line, you will see a subset of tests failing. Those tests might have a wrong answer and might need to be regolded.
  // The reason is that we actually move the solution back in time before we actually start solving (which I think is wrong).  So this call here
  // is to maintain backward compatibility and so that MOOSE is giving the same answer.  However, we might remove this call and regold the test
  // in the future eventually.
  if (!_app.isRecovering())
    _problem.copyOldSolutions();

  // Start time loop...
  while (true)
  {
    if (_first != true)
      incrementStepOrReject();

    _first = false;

    if (!keepGoing())
      break;

    computeDT();
    takeStep();
    endStep();

    _steps_taken++;
  }


  postExecute();
}
Exemplo n.º 2
0
int main(int argc, char* argv[])
{
int argi;
char* dumpFile = NULL;
unsigned flags = 0;
char* database, *accPrefix;
struct gbIndex* index;
struct stepInfo runInfo;

gbVerbInit(0);
optionInit(&argc, argv, optionSpecs);
if (argc < 2)
    usage();
if (optionExists("processed"))
    flags |= DO_PROCESSED;
if (optionExists("aligned"))
    flags |= DO_PROCESSED|DO_ALIGNED;
if (optionExists("mrna"))
    flags |= DO_MRNA;
if (optionExists("est"))
    flags |= DO_EST;

dumpFile = optionVal("dump", NULL);
database = optionVal("db", NULL);
accPrefix = optionVal("accPrefix", NULL);

if ((flags & DO_ALIGNED) && (database == NULL))
    errAbort("must specify -db with -aligned");
if (!(flags & (DO_MRNA|DO_EST)))
    errAbort("must specify at least one of -mrna or -est");
if (!(flags & (DO_ALIGNED|DO_PROCESSED)))
    errAbort("must specify at least one of -processed or -aligned");
            
index = gbIndexNew(database, NULL);
runInfo = beginStep(index, NULL, "loading index files");

for (argi = 1; argi < argc; argi++)
    testRelLoad(index, gbIndexMustFindRelease(index, argv[argi]),
                database, flags, accPrefix);

if (dumpFile != NULL)
    {
    FILE* dumpOut = mustOpen(dumpFile, "w");
    gbIndexDump(index, dumpOut);
    if (fclose(dumpOut) != 0)
        errnoAbort("close of dumpfile");
    }
endStep(index, &runInfo);
gbIndexFree(&index);
return 0;
}
Exemplo n.º 3
0
void
AdaptiveTransient::execute()
{
  preExecute();

  // Start time loop...
  while (keepGoing())
  {
    takeStep();
    if (lastSolveConverged())
      endStep();
  }
  postExecute();
}
Exemplo n.º 4
0
ControlWindows::ControlWindows()
{
    m_ui = new Ui::ControlWindows;
    m_ui->setupUi(this);
    
    m_timer.setSingleShot(false);
    m_clock.setSingleShot(false);
    m_clock.setInterval(2000);
    
    connect( m_ui->start, SIGNAL( clicked(bool) ),      this, SLOT( start() ));
    connect( &m_timer, SIGNAL( timeout() ),  this, SLOT( endStep()) );
    connect( this,     SIGNAL( endOfSet() ), this, SLOT(Save()) );
    
    
    
}
Exemplo n.º 5
0
static void testLoad(struct gbSelect* select, unsigned flags)
/* do load testing of part of a release */
{
char desc[512];
struct stepInfo info;
select->type = (flags & DO_MRNA) ? GB_MRNA : GB_EST;
safef(desc, sizeof(desc), "%s %s",
      ((flags & DO_PROCESSED) ? "processed" : "aligned"),
      gbSelectDesc(select));
info = beginStep(select->release->index, select->release, desc);
if (flags & DO_PROCESSED)
    gbReleaseLoadProcessed(select);
else
    {
    select->orgCats = GB_NATIVE|GB_XENO;
    gbReleaseLoadAligned(select);
    }
endStep(select->release->index, &info);
select->type = 0;
}