我正在处理一段使用DUNE的代码。 https://www.dune-project.org/ 某些计算的数据正在使用VTKWriter写入文件。但是,运行时会抛出以下错误:
Entered constructor of deformation object:
Filename: moving_domain_dim2_degree1_u-00000.vtu could not be opened
Exception: basic_ios::clear: iostream error
terminate called after throwing an instance of 'std::ios_base::failure[abi:cxx11]'
what(): basic_ios::clear: iostream error
Aborted (core dumped)
VTK的背景如下:
auto stationaryVTKWriter_u = std::make_shared<Dune::SubsamplingVTKWriter<typename Geogridtype::LeafGridView>>(geogv,degree-1);
std::string basename_u;
basename_u = basename + "_u";
Dune::VTKSequenceWriter<GeoGV> vtkwriter_u(stationaryVTKWriter_u,basename_u,"","");
typedef Dune::PDELab::DiscreteGridFunction<FS,Vec_u> DGF_U;
DGF_U xdgf_u(fs,x_u);
vtkwriter_u.addVertexData(std::make_shared<Dune::PDELab::VTKGridFunctionAdapter<DGF_U> >(xdgf_u,"x_h"));
// time loop
NumberType time = 0.0;
vtkwriter_u.write(time,Dune::VTK::appendedraw);
感谢任何帮助。