void WriteVtk::perform(MultiBlockLattice2D<T,DESCRIPTOR> &lattice, plint nStep) { T dx = controller->getParams().getDeltaX(); T physU = controller->getUnits().physVelocity(); std::string fname = createFileName(prefix, nStep, fileNameLength); VtkImageOutput2D<T> vtkOut(fname, dx); std::auto_ptr<MultiScalarField2D<T> > density = computeDensity(lattice); PressureFromRho p(controller); apply(p,*density); vtkOut.writeData<float>(*density, "pressure", 1); vtkOut.writeData<2,float>(*computeVelocity(lattice), "velocity", physU); pcout << "vtk file " << fname << " written" << std::endl; };
void SuperGeometry2D::writeVti(std::string file) { olb::VtkImageOutput2D<double> vtkOut(file, _h, _x0-_offset*_h, _y0-_offset*_h); vtkOut.writeData<unsigned short,unsigned short>(_geometryData, "geometry"); clout << "wrote vti-File" << std::endl; }