void StructuredMesh::init(int nx, int ny, int nz) { vec full, half; int n[3] = {nx, ny, nz}; double dx; for (int m = 0; m < domain->getNumDim(); ++m) { if (domain->getAxisStartBndType(m) == PERIODIC) { full.resize(n[m]); half.resize(n[m]); dx = domain->getAxisSpan(m)/n[m]; for (int i = 0; i < n[m]; ++i) { full[i] = domain->getAxisStart(m)+i*dx; half[i] = full[i]+0.5*dx; } } else if (domain->getAxisStartBndType(m) == POLE && domain->getAxisEndBndType(m) == POLE) { full.resize(n[m]); half.resize(n[m]-1); dx = domain->getAxisSpan(m)/(n[m]-1); for (int i = 0; i < n[m]; ++i) { full[i] = domain->getAxisStart(m)+i*dx; } for (int i = 0; i < n[m]-1; ++i) { half[i] = full[i]+0.5*dx; } } else { REPORT_ERROR("Under construction!"); } setGridCoords(m, n[m], full, half); } setCellVolumes(); }
IntegrationTest::IntegrationTest(const std::string& basename1, const std::string& basename2, double absTolerance, double relTolerance): ECLFilesComparator(ECL_UNIFIED_RESTART_FILE, basename1, basename2, absTolerance, relTolerance) { std::cout << "\nUsing cell volumes and keyword values from case " << basename2 << " as reference." << std::endl << std::endl; setCellVolumes(); }