Exemplo n.º 1
0
void SolidRotationTestCase::calcSolution(double time,
                                         const TimeLevelIndex<2> &timeIdx,
                                         AdvectionManager &advectionManager) {
    calcSolution(time, timeIdx, *q.front());
    advectionManager.input(timeIdx, q);
    REPORT_NOTICE("Overwrite tracers with the true solution.");
}
Exemplo n.º 2
0
void DataTest::
setInitialCondition(AdvectionManager &advectionManager) {
    TimeLevelIndex<2> timeIdx;
    io.open(dataIdx);
    double *q = new double[numTracer*_mesh->totalNumGrid(CENTER)];
    int j = 0;
    for (arma::uword t = 0; t < numTracer; ++t) {
        io.input<double>(dataIdx, timeIdx, {&advectionManager.density(t)});
        for (arma::uword i = 0; i < _mesh->totalNumGrid(CENTER); ++i) {
            q[j++] = advectionManager.density(t)(timeIdx, i);
        }
    }
    io.close(dataIdx);
    advectionManager.input(timeIdx, q);
    setVelocityField(timeIdx);
} // setInitialCondition