Ejemplo n.º 1
0
    virtual void  Serialize(MemStream::Mode mode,
                            MemStream &buff,
                            avtIVPSolver *solver,
                            SerializeFlags serializeFlags)
    {
        // Have the base class serialize its part
        avtStateRecorderIntegralCurve::Serialize(mode, buff, solver, serializeFlags);

        buff.io(mode, numSteps);
        buff.io(mode, maxSteps);
        buff.io(mode, terminatedBecauseOfMaxSteps);
    }
    virtual void Serialize(MemStream::Mode mode, MemStream &buff,
                                avtIVPSolver *solver)

    {
        avtIntegralCurve::Serialize(mode, buff, solver);
        buff.io(mode, dist);
        buff.io(mode, idx[0]);
        buff.io(mode, idx[1]);
        buff.io(mode, last_loc[0]);
        buff.io(mode, last_loc[1]);
        buff.io(mode, numSteps);
    }
Ejemplo n.º 3
0
// ****************************************************************************
//  Method: avtLCSIC::Serialize
//
//  Purpose:
//      Serializes a LCS so it can be sent to another processor.
//
//  Programmer: Allen Sanderson
//  Creation:   August 14, 2013
//
//  Modifications:
//
// ****************************************************************************
void avtLCSIC::Serialize(MemStream::Mode mode, MemStream &buff,
                          avtIVPSolver *solver, SerializeFlags serializeFlags)
{
    avtIntegralCurve::Serialize(mode,buff,solver,serializeFlags);

    buff.io(mode, numSteps);
    buff.io(mode, maxSteps);
    buff.io(mode, doDistance);
    buff.io(mode, maxDistance);
    buff.io(mode, doTime);
    buff.io(mode, maxTime);
    buff.io(mode, distance);
    buff.io(mode, terminatedBecauseOfMaxSteps);
    buff.io(mode, p_start);
    buff.io(mode, p_end);
}
void
avtStateRecorderIntegralCurve::Serialize(MemStream::Mode mode, MemStream &buff, 
                                         avtIVPSolver *solver, SerializeFlags serializeFlags)
{
    // Have the base class serialize its part
    avtIntegralCurve::Serialize(mode, buff, solver, serializeFlags);

    buff.io(mode, distance);

    buff.io(mode, historyMask);
    unsigned long saveSerializeFlags = serializeFlags | _serializeFlags;
    buff.io(mode, saveSerializeFlags);

    if (DebugStream::Level5())
    {
        debug5<<"  avtStateRecorderIntegralCurve::Serialize "<<(mode==MemStream::READ?"READ":"WRITE")<<" saveSerializeFlags= "<<saveSerializeFlags<<endl;
    }
    // R/W the steps.
    if (saveSerializeFlags & SERIALIZE_STEPS)
        buff.io(mode, history);

    if (saveSerializeFlags & SERIALIZE_INC_SEQ)
    {
        if (mode == MemStream::WRITE)
        {
            long seqCnt = sequenceCnt+1;
            buff.io(mode, seqCnt);
        }
        else
            buff.io(mode, sequenceCnt);
    }
    else
        buff.io(mode, sequenceCnt);

    if (DebugStream::Level5())
    {
        debug5 << "DONE: avtStateRecorderIntegralCurve::Serialize. sz= "<<buff.len() << endl;
    }
}
Ejemplo n.º 5
0
void
avtIntegralCurve::Serialize(MemStream::Mode mode, MemStream &buff, 
                            avtIVPSolver *solver, SerializeFlags serializeFlags)
{
    if (DebugStream::Level5())
    {
        debug5 << "  avtIntegralCurve::Serialize "
               << (mode==MemStream::READ?"READ":"WRITE")<<endl;
    }
    buff.io(mode, id);
    buff.io(mode, direction);
    buff.io(mode, blockList);
    buff.io(mode, status);
    buff.io(mode, counter);
    buff.io(mode, originatingRank);
    
    if (solver)
    {
        if (mode == MemStream::WRITE)
        {
            avtIVPState solverState;

            ivp->GetState(solverState);
            solverState.Serialize(mode, buff);
        }
        else
        {
            // TODO:
            //ivp->Serialize( mode, buff );

            avtIVPState solverState;
            solverState.Serialize(mode, buff);

            if (ivp)
                delete ivp;

            ivp = solver->Clone();
            ivp->PutState(solverState);
        }
    }

    
#ifdef USE_IC_STATE_TRACKING
    if (mode == MemStream::WRITE)
    {
        trk<<"Serialize"<<endl;
        trk.close();
    }
    else
    {
        trk<<flush;
        trk.close();
        char tmp[64];
        sprintf(tmp, "IC_%d.txt", (int)id);
        trk.open(tmp, ofstream::app);
        trk<<"De-serialize"<<endl;
    }
#endif

    if (DebugStream::Level5())
    {
        debug5 << "avtIntegralCurve::Serialize() size is " 
               << buff.len() << endl;
    }
}