Skip to content

Commit

Permalink
IOSS: More iwyu
Browse files Browse the repository at this point in the history
  • Loading branch information
gsjaardema committed Oct 30, 2023
1 parent ed22dbe commit 960d566
Show file tree
Hide file tree
Showing 73 changed files with 610 additions and 443 deletions.
47 changes: 35 additions & 12 deletions packages/seacas/libraries/ioss/src/cgns/Iocgns_DatabaseIO.C
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,19 @@
// See packages/seacas/LICENSE for details

#include <Ioss_CodeTypes.h>
#include <Ioss_Sort.h>
#include <Ioss_Utils.h>
#include <array>
#include <bitset>
#include <cgns/Iocgns_DatabaseIO.h>
#include <cgns/Iocgns_Utils.h>
#include <cgnslib.h>
#include <cstddef>
#include <ctime>
#include <fmt/core.h>
#include <fmt/ostream.h>
#include <fstream>
#include <iostream>
#include <numeric>
#include <string>
#if !defined(__IOSS_WINDOWS__)
#include <sys/select.h>
#endif
#include <tokenize.h>
#include <vector>

#include <cgnslib.h>
#ifndef CG_BUILD_PARALLEL
#include <cgnsconfig.h>
#endif
Expand All @@ -43,11 +37,40 @@
#error "Could not include cgnslib.h"
#endif

#include "Ioss_CommSet.h"
#include "Ioss_DBUsage.h"
#include "Ioss_DataSize.h"
#include "Ioss_DatabaseIO.h"
#include "Ioss_EdgeBlock.h"
#include "Ioss_EdgeSet.h"
#include "Ioss_ElementBlock.h"
#include "Ioss_ElementSet.h"
#include "Ioss_ElementTopology.h"
#include "Ioss_EntityBlock.h"
#include "Ioss_EntityType.h"
#include "Ioss_FaceBlock.h"
#include "Ioss_FaceGenerator.h"
#include "Ioss_FaceSet.h"
#include "Ioss_Field.h"
#include "Ioss_FileInfo.h"
#include "Ioss_Hex8.h"
#include "Ioss_Quad4.h"
#include "Ioss_GroupingEntity.h"
#include "Ioss_Map.h"
#include "Ioss_MeshType.h"
#include "Ioss_NodeBlock.h"
#include "Ioss_NodeSet.h"
#include "Ioss_ParallelUtils.h"
#include "Ioss_Property.h"
#include "Ioss_PropertyManager.h"
#include "Ioss_Region.h"
#include "Ioss_SideBlock.h"
#include "Ioss_SideSet.h"
#include "Ioss_SmartAssert.h"
#include "Ioss_SubSystem.h"
#include "Ioss_State.h"
#include "Ioss_StructuredBlock.h"
#include "Ioss_VariableType.h"
#include "Ioss_ZoneConnectivity.h"
#include "robin_hash.h"
#include "robin_set.h"

// extern char hdf5_access[64];

Expand Down
17 changes: 10 additions & 7 deletions packages/seacas/libraries/ioss/src/cgns/Iocgns_DatabaseIO.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,24 @@

#pragma once

#include "iocgns_export.h"

#include <Ioss_CodeTypes.h>
#include <Ioss_DBUsage.h> // for DatabaseUsage
#include <Ioss_DatabaseIO.h> // for DatabaseIO
#include <Ioss_FaceGenerator.h>
#include <Ioss_IOFactory.h> // for IOFactory
#include <Ioss_Map.h> // for Map
#include <Ioss_State.h> // for State
#include <cstddef> // for size_t
#include <cstdint> // for int64_t
#include <iostream> // for ostream
#include <cgns/Iocgns_Defines.h>
#include <cgnslib.h>
#include <cgnstypes.h>
#include <cstddef> // for size_t
#include <cstdint> // for int64_t
#include <iostream> // for ostream
#include <map>
#include <string> // for string
#include <vector>

#include <cgns/Iocgns_Defines.h>
#include <cgnslib.h>
#include "iocgns_export.h"

namespace Ioss {
class Assembly;
Expand All @@ -44,6 +45,8 @@ namespace Ioss {
class SideSet;
class EntityBlock;
class StructuredBlock;
class Map;
class PropertyManager;
} // namespace Ioss

/** \brief A namespace for the CGNS database format.
Expand Down
11 changes: 5 additions & 6 deletions packages/seacas/libraries/ioss/src/cgns/Iocgns_IOFactory.C
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@
//
// See packages/seacas/LICENSE for details

#include "Ioss_DBUsage.h" // for DatabaseUsage
#include "Ioss_IOFactory.h" // for IOFactory
#include <cgns/Iocgns_DatabaseIO.h> // for DatabaseIO -- serial
#include <cgns/Iocgns_IOFactory.h>
#include <cgns/Iocgns_Utils.h>
#include <cstddef> // for nullptr
#include <string> // for string
#include <tokenize.h>
#include <cgnstypes.h>
#include <string> // for string

#include <cgnsconfig.h>
#include "Ioss_CodeTypes.h"
#include "Ioss_DBUsage.h" // for DatabaseUsage
#include "Ioss_IOFactory.h" // for IOFactory
#if CG_BUILD_PARALLEL
#include <cgns/Iocgns_ParallelDatabaseIO.h> // for DatabaseIO -- parallel
#endif
Expand Down
6 changes: 3 additions & 3 deletions packages/seacas/libraries/ioss/src/cgns/Iocgns_IOFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@

#pragma once

#include "iocgns_export.h"

#include "Ioss_DatabaseIO.h" // for DatabaseIO
#include <Ioss_CodeTypes.h>
#include <Ioss_DBUsage.h> // for DatabaseUsage
#include <Ioss_IOFactory.h> // for IOFactory
#include <string> // for string

#include "Ioss_DatabaseIO.h" // for DatabaseIO
#include "iocgns_export.h"

namespace Ioss {
class PropertyManager;
} // namespace Ioss
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,21 @@

#include <Ioss_CodeTypes.h>
#include <Ioss_SmartAssert.h>
#include <algorithm>
#include <assert.h>
#include <cgns/Iocgns_StructuredZoneData.h>
#include <fmt/core.h>
#include <fmt/format.h>
#include <stdlib.h>
#if !defined __NVCC__
#include <fmt/color.h>
#endif
#include <cmath>
#include <fmt/ostream.h>
#include <string>
#include <tokenize.h>

#include "Ioss_Utils.h"

namespace {
struct Range
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@
*/
#pragma once

#include "iocgns_export.h"

#include <Ioss_CodeTypes.h>
#include <Ioss_StructuredBlock.h>
#include <cstddef>
#include <cstdint>
#include <string>
#include <utility>
#include <vector>

#include "Ioss_ZoneConnectivity.h"
#include "iocgns_export.h"

namespace Iocgns {
enum Ordinal {
Expand Down
43 changes: 33 additions & 10 deletions packages/seacas/libraries/ioss/src/cgns/Iocgns_Utils.C
Original file line number Diff line number Diff line change
Expand Up @@ -27,29 +27,52 @@
#include <Ioss_Tet10.h>
#include <Ioss_Tet4.h>
#include <Ioss_Tri3.h>
#include <Ioss_Tri4.h>
#include <Ioss_Tri6.h>
#include <Ioss_Unknown.h>
#include <Ioss_Utils.h>
#include <Ioss_Wedge15.h>
#include <Ioss_Wedge18.h>
#include <Ioss_Wedge6.h>

#include <assert.h>
#include <fmt/chrono.h>
#include <fmt/core.h>
#include <fmt/format.h>
#include <stdint.h>
#include <stdlib.h>
#if !defined __NVCC__
#include <fmt/color.h>
#endif
#include <cgns/Iocgns_StructuredZoneData.h>
#include <cgns/Iocgns_Utils.h>
#include <cgnstypes.h>
#include <cmath>
#include <cstring>
#include <ctime>
#include <fmt/ostream.h>
#include <limits>
#include <numeric>
#include <ostream>
#include <set>
#include <string>
#include <tokenize.h>

#include <cgns/Iocgns_StructuredZoneData.h>
#include <cgns/Iocgns_Utils.h>

#include <cgnsconfig.h>
#include <cgnstypes.h>
#include "Ioss_DatabaseIO.h"
#include "Ioss_ElementBlock.h"
#include "Ioss_ElementTopology.h"
#include "Ioss_EntityBlock.h"
#include "Ioss_EntityType.h"
#include "Ioss_GroupingEntity.h"
#include "Ioss_MeshType.h"
#include "Ioss_NodeBlock.h"
#include "Ioss_ParallelUtils.h"
#include "Ioss_Property.h"
#include "Ioss_Region.h"
#include "Ioss_SideBlock.h"
#include "Ioss_SideSet.h"
#include "Ioss_VariableType.h"
#include "Ioss_ZoneConnectivity.h"
#include "robin_hash.h"
#include "robin_set.h"
#if CG_BUILD_PARALLEL
#include <pcgnslib.h>
#else
Expand Down Expand Up @@ -2567,10 +2590,10 @@ void Iocgns::Utils::decompose_model(std::vector<Iocgns::StructuredZoneData *> &z
fmt::print(Ioss::DebugOut(), "{}",
fmt::format(
#if !defined __NVCC__
fg(fmt::color::red),
fg(fmt::color::red),
#endif
"\nProcessor {} work: {}, workload ratio: {} (exceeds)", i,
fmt::group_digits(work_vector[i]), workload_ratio));
"\nProcessor {} work: {}, workload ratio: {} (exceeds)", i,
fmt::group_digits(work_vector[i]), workload_ratio));
}
}
else {
Expand Down
23 changes: 21 additions & 2 deletions packages/seacas/libraries/ioss/src/cgns/Iocgns_Utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

#pragma once

#include "iocgns_export.h"

#include <Ioss_CodeTypes.h>
#include <Ioss_DatabaseIO.h>
#include <Ioss_ElementTopology.h>
Expand All @@ -17,10 +15,31 @@
#include <Ioss_SideSet.h>
#include <Ioss_StructuredBlock.h>
#include <Ioss_Utils.h>
#include <array>
#include <cgns/Iocgns_Defines.h>
#include <cgnslib.h>
#include <cgnstypes.h>
#include <map>
#include <ostream>
#include <stddef.h>
#include <string>
#include <vector>

#include "Ioss_Field.h"
#include "iocgns_export.h"

namespace Iocgns {
class Utils;
} // namespace Iocgns
namespace Ioss {
class Assembly;
class DatabaseIO;
class EntityBlock;
class GroupingEntity;
class Region;
class StructuredBlock;
enum class MeshType;
} // namespace Ioss

// Used in Iocgns_DatabaseIO.C and Iocgns_ParallelDatabase.C
// non-Member function -- can't access m_cgnsFilePtr; make sure cgns_file_ptr is passed in...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <fmt/ostream.h>
#include <limits>
#include <map>
#include <netcdf_meta.h>
#include <numeric>
#include <sstream>
#include <stdexcept>
Expand Down
38 changes: 11 additions & 27 deletions packages/seacas/libraries/ioss/src/gen_struc/Iogs_DatabaseIO.C
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,20 @@
//
// See packages/seacas/LICENSE for details

#include <Ioss_CodeTypes.h> // for Int64Vector, IntVector
#include <Ioss_SideBlock.h> // for SideBlock
#include <Ioss_Utils.h> // for Utils, IOSS_ERROR
#include <cassert> // for assert
#include <cmath> // for sqrt
#include <gen_struc/Iogs_DatabaseIO.h>
#include <gen_struc/Iogs_GeneratedMesh.h> // for GeneratedMesh
#include <iostream> // for ostringstream, operator<<, etc
#include <stdlib.h>
#include <string> // for string, operator==, etc

#include "Ioss_CommSet.h" // for CommSet
#include "Ioss_DBUsage.h" // for DatabaseUsage
#include "Ioss_DatabaseIO.h" // for DatabaseIO
#include "Ioss_ElementBlock.h" // for ElementBlock
#include "Ioss_EntityType.h" // for EntityType, etc
#include "Ioss_Field.h" // for Field, etc
#include "Ioss_GroupingEntity.h" // for GroupingEntity
Expand All @@ -21,32 +31,6 @@
#include "Ioss_SideSet.h" // for SideSet
#include "Ioss_StructuredBlock.h"
#include "Ioss_VariableType.h" // for VariableType
#include <Ioss_CodeTypes.h> // for Int64Vector, IntVector
#include <Ioss_SideBlock.h> // for SideBlock
#include <Ioss_Utils.h> // for Utils, IOSS_ERROR
#include <algorithm> // for copy
#include <cassert> // for assert
#include <cmath> // for sqrt
#include <gen_struc/Iogs_DatabaseIO.h>
#include <gen_struc/Iogs_GeneratedMesh.h> // for GeneratedMesh
#include <iostream> // for ostringstream, operator<<, etc
#include <string> // for string, operator==, etc
#include <utility> // for pair
namespace Ioss {
class EdgeBlock;
} // namespace Ioss
namespace Ioss {
class EdgeSet;
} // namespace Ioss
namespace Ioss {
class ElementSet;
} // namespace Ioss
namespace Ioss {
class FaceBlock;
} // namespace Ioss
namespace Ioss {
class FaceSet;
} // namespace Ioss

namespace {
template <typename INT>
Expand Down
Loading

0 comments on commit 960d566

Please sign in to comment.