Skip to content
Snippets Groups Projects
Commit 4043ab9b authored by guj's avatar guj
Browse files

clang format

parent 91c00f6d
No related branches found
No related tags found
1 merge request!115Hdf5
...@@ -51,7 +51,6 @@ HDF5NativeWriter::HDF5NativeWriter(const std::string &fileName) ...@@ -51,7 +51,6 @@ HDF5NativeWriter::HDF5NativeWriter(const std::string &fileName)
// read a file collectively // read a file collectively
H5Pset_fapl_mpio(m_FilePropertyListId, MPI_COMM_WORLD, MPI_INFO_NULL); H5Pset_fapl_mpio(m_FilePropertyListId, MPI_COMM_WORLD, MPI_INFO_NULL);
m_FileId = H5Fcreate(fileName.c_str(), H5F_ACC_TRUNC, H5P_DEFAULT, m_FileId = H5Fcreate(fileName.c_str(), H5F_ACC_TRUNC, H5P_DEFAULT,
m_FilePropertyListId); m_FilePropertyListId);
...@@ -193,10 +192,11 @@ IO::IO(const Settings &s, MPI_Comm comm) ...@@ -193,10 +192,11 @@ IO::IO(const Settings &s, MPI_Comm comm)
{ {
m_outputfilename = s.outputfile + ".h5"; m_outputfilename = s.outputfile + ".h5";
if (s.outputfile[0]=='0') { if (s.outputfile[0] == '0')
std::cout<<" no writer. "<<std::endl; {
h5writer = nullptr; std::cout << " no writer. " << std::endl;
return; h5writer = nullptr;
return;
} }
h5writer = std::make_shared<HDF5NativeWriter>(m_outputfilename); h5writer = std::make_shared<HDF5NativeWriter>(m_outputfilename);
...@@ -206,8 +206,9 @@ IO::IO(const Settings &s, MPI_Comm comm) ...@@ -206,8 +206,9 @@ IO::IO(const Settings &s, MPI_Comm comm)
IO::~IO() IO::~IO()
{ {
if (h5writer != nullptr) { if (h5writer != nullptr)
h5writer->Close(); {
h5writer->Close();
} }
// delete h5writer; // delete h5writer;
} }
...@@ -215,7 +216,8 @@ IO::~IO() ...@@ -215,7 +216,8 @@ IO::~IO()
void IO::write(int step, const HeatTransfer &ht, const Settings &s, void IO::write(int step, const HeatTransfer &ht, const Settings &s,
MPI_Comm comm) MPI_Comm comm)
{ {
if (h5writer == nullptr) { if (h5writer == nullptr)
{
return; return;
} }
std::vector<hsize_t> dims = {s.gndx, s.gndy}; std::vector<hsize_t> dims = {s.gndx, s.gndy};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment