KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
hdf5_data_set_partition_utility.h
Go to the documentation of this file.
1 // | / |
2 // ' / __| _` | __| _ \ __|
3 // . \ | ( | | ( |\__ `
4 // _|\_\_| \__,_|\__|\___/ ____/
5 // Multi-Physics
6 //
7 // License: BSD License
8 // license: HDF5Application/license.txt
9 //
10 // Main author: Michael Andre, https://github.com/msandre
11 //
12 
19 #if !defined(KRATOS_HDF5_DATA_SET_PARTITION_UTILITY_H_INCLUDED)
20 #define KRATOS_HDF5_DATA_SET_PARTITION_UTILITY_H_INCLUDED
21 
22 // System includes
23 #include <string>
24 #include <tuple>
25 
26 // External includes
27 
28 // Project includes
29 #include "includes/define.h"
30 
31 // Application includes
33 #include "custom_io/hdf5_file.h"
34 
35 namespace Kratos
36 {
37 namespace HDF5
38 {
41 
43 
48 void WritePartitionTable(File& rFile, std::string const& rPath, WriteInfo const& rInfo);
49 
51 
54 void WritePartitionTableIndependent(File& rFile, std::string const& rPath, Vector<int> const& rPartition);
55 
56 // Check if a path has a data set partition.
57 bool HasPartitionTable(File& rFile, std::string const& rPath);
58 
59 // Get the start index and block size from an existing partition for this PID.
60 std::tuple<unsigned, unsigned> StartIndexAndBlockSize(File& rFile, std::string const& rPath);
61 
63 } // namespace HDF5.
64 } // namespace Kratos.
65 
66 #endif // KRATOS_HDF5_DATA_SET_PARTITION_UTILITY_H_INCLUDED defined
std::tuple< unsigned, unsigned > StartIndexAndBlockSize(File &rFile, std::string const &rPath)
Definition: hdf5_data_set_partition_utility.cpp:58
bool HasPartitionTable(File &rFile, std::string const &rPath)
Definition: hdf5_data_set_partition_utility.cpp:48
void WritePartitionTableIndependent(File &rFile, std::string const &rPath, Vector< int > const &rPartition)
Write a user-defined partition table of start and end indices (by process rank).
Definition: hdf5_data_set_partition_utility.cpp:37
void WritePartitionTable(File &rFile, std::string const &rPath, WriteInfo const &rInfo)
Write the start and end indices of data blocks (by process rank).
Definition: hdf5_data_set_partition_utility.cpp:13
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21