Exemplo n.º 1
0
void basicIO::dumpDEMdata() const
{
    if (time_.outputTime())
    {
        // make time directory
        if (parOutput_) lagPath_=buildFilePath(dirName_);
        else
        {
            Info << "createTimeDir(path_), path="<<path_ << endl;
            Info << "lagPath_=createTimeDir(fileName(lagPath_/lagrangian)), lagPath="<<path_ << endl;
        	lagPath_=createTimeDir(path_);
        	lagPath_=createTimeDir(fileName(lagPath_/"lagrangian"));
        }
        // calc the number of particles on proc
        int count(0);
        for(int index = 0;index < particleCloud_.numberOfParticles(); ++index)
            if (particleCloud_.cellIDs()[index][0] > -1) count++;
        nPProc_=count;
        
        // stream data to file
        streamDataToPath(lagPath_, particleCloud_.positions(), "positions","vector","Cloud<passiveParticle>","0");
        streamDataToPath(lagPath_, particleCloud_.velocities(), "v","vector","vectorField","");
        streamDataToPath(lagPath_, particleCloud_.radii(), "r","scalar","scalarField","");
    }
}
Exemplo n.º 2
0
int sophIO::dumpDEMdataAtCrash() const
{
    int npProcs(-1);

    //if (time_.outputTime())
    {
        npProcs=basicIO::dumpDEMdata();

        // stream data to file
        streamDataToPath(lagPath_, particleCloud_.voidfractions(),npProcs,"voidfractions","scalar","scalarField","");
        streamDataToPath(lagPath_, particleCloud_.impForces(),npProcs,"impForces","vector","vectorField","");
        streamDataToPath(lagPath_, particleCloud_.expForces(),npProcs,"expForces","vector","vectorField","");
        streamDataToPath(lagPath_, particleCloud_.DEMForces(),npProcs,"DEMForces","vector","vectorField","");
    }
    return npProcs;
}