Skip to content
Snippets Groups Projects
Commit 219db39d authored by Jakub Klinkovský's avatar Jakub Klinkovský Committed by Jakub Klinkovský
Browse files

Added convenient overload of the loadMesh function for non-distributed meshes

parent a0133466
No related branches found
No related tags found
1 merge request!49Bug fixes
......@@ -19,6 +19,7 @@
#include <TNL/Meshes/Readers/VTKReader.h>
#include <TNL/Meshes/TypeResolver/GridTypeResolver.h>
#include <TNL/Meshes/TypeResolver/MeshTypeResolver.h>
#include <TNL/Communicators/NoDistrCommunicator.h>
// TODO: implement this in TNL::String
inline bool ends_with( const std::string& value, const std::string& ending )
......@@ -278,5 +279,16 @@ decomposeMesh( const Config::ParameterContainer& parameters,
return true;
}
// convenient overload for non-distributed meshes
template< typename Mesh >
bool
loadMesh( const String& fileName, Mesh& mesh )
{
using Communicator = TNL::Communicators::NoDistrCommunicator;
using DistributedMesh = DistributedMeshes::DistributedMesh< Mesh>;
DistributedMesh distributedMesh;
return loadMesh< Communicator >( fileName, mesh, distributedMesh );
}
} // namespace Meshes
} // namespace TNL
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