[Richards] Write adapters without copying parameters

parent d249c310
......@@ -265,39 +265,36 @@ void RichardsSimulation<Traits>::write_data () const
{
if (vtkwriter)
{
// create adapters
auto head = get_matric_head();
auto wflux = std::make_shared<GFWaterFlux>(gfs, u, fparam);
auto cond = std::make_shared<GFConductivity>(gv, fparam);
auto wc = std::make_shared<GFWaterContent>(head, gv, fparam);
auto sat = std::make_shared<GFSaturation>(head, gv, fparam);
if (inifile.get<bool>("output.vertexData")) {
vtkwriter->template addVertexData<GFMatricHead>
(get_matric_head(),"head");
vtkwriter->template addVertexData<GFWaterFlux>
(get_water_flux(),"flux");
vtkwriter->template addVertexData<GFConductivity>
(get_conductivity(),"K_0");
vtkwriter->template addVertexData<GFWaterContent>
(get_water_content(),"theta_w");
vtkwriter->template addVertexData<GFSaturation>
(get_saturation(),"Theta");
vtkwriter->template addVertexData<GFMatricHead>(head,"head");
vtkwriter->template addVertexData<GFWaterFlux>(wflux,"flux");
vtkwriter->template addVertexData<GFConductivity>(cond,"K_0");
vtkwriter->template addVertexData<GFWaterContent>(wc,"theta_w");
vtkwriter->template addVertexData<GFSaturation>(sat,"Theta");
if constexpr (enable_rt_engine)
if (enable_fluxrc) {
auto wfluxr = get_water_flux_reconstructed();
auto RT_name = "flux_RT" + std::to_string(flux_order);
vtkwriter->template addVertexData<GFFluxReconstruction>
(get_water_flux_reconstructed(),RT_name);
vtkwriter->template addVertexData<GFFluxReconstruction>(wfluxr,RT_name);
}
} else {
vtkwriter->template addCellData<GFMatricHead>
(get_matric_head(),"head");
vtkwriter->template addCellData<GFWaterFlux>
(get_water_flux(),"flux");
vtkwriter->template addCellData<GFConductivity>
(get_conductivity(),"K_0");
vtkwriter->template addCellData<GFWaterContent>
(get_water_content(),"theta_w");
vtkwriter->template addCellData<GFSaturation>
(get_saturation(),"Theta");
vtkwriter->template addCellData<GFMatricHead>(head,"head");
vtkwriter->template addCellData<GFWaterFlux>(wflux,"flux");
vtkwriter->template addCellData<GFConductivity>(cond,"K_0");
vtkwriter->template addCellData<GFWaterContent>(wc,"theta_w");
vtkwriter->template addCellData<GFSaturation>(sat,"Theta");
if constexpr (enable_rt_engine)
if (enable_fluxrc) {
auto wfluxr = get_water_flux_reconstructed();
auto RT_name = "flux_RT" + std::to_string(flux_order);
vtkwriter->template addCellData<GFFluxReconstruction>
(get_water_flux_reconstructed(),RT_name);
vtkwriter->template addCellData<GFFluxReconstruction>(wfluxr,RT_name);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment