예제 #1
0
    void visualizePlot(int type, int axis) {
        ofstream f((	resdir + "/plot/" +
                        Utils::doubleToString(ca->getTime())
                        + "_"
                        + getName(type)
                        + "_"
                        + Utils::getAxisName(axis)
                        + ".plot").c_str());
        cout << (	resdir + "/plot/" +
                    Utils::doubleToString(ca->getTime())
                    + "_"
                    + getName(type)
                    + "_"
                    + Utils::getAxisName(axis)
                    + ".plot") << endl;

        f << " set term gif" << endl;
        f << " set autoscale x" << endl;
        f << " set autoscale y" << endl;
        f << " set output \"" + resdir + "/"<<getName(type)<<"/"<<Utils::getAxisName(axis)<<"/"<<ca->getTime()<<"_"<<getName(type)<<"_"
          <<Utils::getAxisName(axis) <<".gif\"" << endl;
        f << " set title \"t=" << ca->getTime() << " [sec], "<<getName(type)<<" [" << getDimention(type) << "]\"" << endl;
        f << " set xlabel \""<<Utils::getAxisName(axis)<<" [Rz]\"" << endl;

        f << " plot ";
        for(int i=0; i<time_drops.size(); i++) {
            f << "'"<<(resdir + "/plot/" + Utils::doubleToString(time_drops[i]) + "_" + getName(type)
                       + "_" + Utils::getAxisName(axis) + ".data")<<"' "<<
              "with linespoints pt " << i+1;
            if(i+1 != time_drops.size()) f << ", ";
        }
        f << endl;

        f.close();
    }
예제 #2
0
    void dropCurrentData() {
        double time = ca->getTime();
        time_drops.push_back(time);

        for(int type=0; type<21; type++) {
            for(int axis=0; axis<3; axis++) {
                if(m[type][axis]) {
                    dropCurrentData(time, type, axis);
                }
            }
        }
    }