Commit 37644437 authored by Tobias Meisel's avatar Tobias Meisel Committed by Lars Bilke

[MeL/IO] Remove Vtk based XdmfWriter

parent b708b0e2
/**
* \file
* \author Tobias Meisel
* \date 2020-10-06
* \brief Implementation of WriteXdmf3 function.
*
* \copyright
* Copyright (c) 2012-2020, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*/
#include "writeXdmf.h"
#include <vtkNew.h>
#include <vtkSmartPointer.h>
#include <vtkXdmf3Writer.h>
#include "MeshLib/Vtk/VtkMappedMeshSource.h"
namespace MeshLib
{
namespace IO
{
bool writeXdmf3(const MeshLib::Mesh& mesh,
std::filesystem::path const& file_path)
{
vtkSmartPointer<vtkXdmf3Writer> writer =
vtkSmartPointer<vtkXdmf3Writer>::New();
writer->SetFileName(file_path.string().c_str());
vtkNew<MeshLib::VtkMappedMeshSource> vtkSource;
vtkSource->SetMesh(&mesh);
vtkSource->Update();
writer->SetInputData(vtkSource->GetOutput());
writer->Write();
return true;
}
} // end namespace IO
} // end namespace MeshLib
\ No newline at end of file
/**
* \file
* \author Tobias Meisel
* \date 2020-10-06
* \brief Writes MeshLib:Mesh to a Xdmf formated file
*
* \copyright
* Copyright (c) 2012-2020, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*
*/
#pragma once
#include <filesystem>
namespace MeshLib
{
class Mesh;
namespace IO
{
/// Writes mesh to XDMF file.
/// \return True on success, false on error
/// \param mesh Mesh holds all data to be written.
/// \param file_name File name.
bool writeXdmf3(MeshLib::Mesh const& mesh, std::filesystem::path const& file_path);
} // end namespace IO
} // end namespace MeshLib
\ No newline at end of file
......@@ -20,7 +20,6 @@
#include "IntegrationPointWriter.h"
#include "MathLib/LinAlg/LinAlg.h"
#include "MeshLib/IO/VtkIO/VtuInterface.h"
#include "MeshLib/IO/XDMF/writeXdmf.h"
#include "NumLib/DOF/LocalToGlobalIndexMap.h"
/// Copies the ogs_version string containing the release number and the git
......
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