diff --git a/src/Expression/IpplExpressions.h b/src/Expression/IpplExpressions.h index 632238eb2..5917124d9 100644 --- a/src/Expression/IpplExpressions.h +++ b/src/Expression/IpplExpressions.h @@ -5,7 +5,9 @@ #ifndef IPPL_EXPRESSIONS_H #define IPPL_EXPRESSIONS_H -#include +#include // for KOKKOS_INLINE_FUNCTION, KOKKOS_FUNCTION +#include // for size_t +#include // for false_type, true_type namespace ippl { namespace detail { diff --git a/src/Field/BareField.h b/src/Field/BareField.h index 33908ef53..d0c95dfda 100644 --- a/src/Field/BareField.h +++ b/src/Field/BareField.h @@ -5,21 +5,21 @@ #ifndef IPPL_BARE_FIELD_H #define IPPL_BARE_FIELD_H -#include +#include // for size_t +#include // for std::ostream -#include -#include +#include "Types/IpplTypes.h" // for detail::size_type +#include "Types/ViewTypes.h" // for detail::ViewType -#include "Types/IpplTypes.h" +#include "Utility/Inform.h" // for Inform +#include "Utility/PAssert.h" // for PAssert and PAssert_LE +#include "Utility/ParallelDispatch.h" // for RangePolicy -#include "Utility/IpplInfo.h" -#include "Utility/PAssert.h" -#include "Utility/ViewUtils.h" +#include "Expression/IpplExpressions.h" // for detail::Expression -#include "Expression/IpplExpressions.h" - -#include "Field/HaloCells.h" -#include "FieldLayout/FieldLayout.h" +#include "Field/HaloCells.h" // for detail::HaloCells +#include "FieldLayout/FieldLayout.h" // for FieldLayout +#include "Index/NDIndex.h" // for NDIndex namespace ippl { class Index; @@ -227,7 +227,12 @@ namespace ippl { } // namespace ippl +#ifndef IPPL_BARE_FIELD_HPP #include "Field/BareField.hpp" +#endif // IPPL_BARE_FIELD_HPP + +#ifndef IPPL_BARE_FIELD_OPERATIONS_HPP #include "Field/BareFieldOperations.hpp" +#endif // IPPL_BARE_FIELD_OPERATIONS_HPP -#endif +#endif // IPPL_BARE_FIELD_H diff --git a/src/Field/BareField.hpp b/src/Field/BareField.hpp index 511a4ee3d..5d4c10fb6 100644 --- a/src/Field/BareField.hpp +++ b/src/Field/BareField.hpp @@ -2,7 +2,16 @@ // Class BareField // A BareField consists of multple LFields and represents a field. // -#include "Ippl.h" + +#ifndef IPPL_BARE_FIELD_HPP +#define IPPL_BARE_FIELD_HPP + +// clang-format off +#ifndef IPPL_BARE_FIELD_H +// HACK: cyclic anitpattern, but necessary for proper LSP markup +#include "Field/BareField.h" +#endif +// clang-format on #include #include @@ -223,3 +232,5 @@ namespace ippl { DefineReduction(Prod, prod, valL *= myVal, std::multiplies) } // namespace ippl + +#endif // IPPL_BARE_FIELD_HPP diff --git a/src/Field/BareFieldOperations.hpp b/src/Field/BareFieldOperations.hpp index 909c9a2ac..320179015 100644 --- a/src/Field/BareFieldOperations.hpp +++ b/src/Field/BareFieldOperations.hpp @@ -2,6 +2,19 @@ // File BareFieldOperations // Norms and a scalar product for fields // +#ifndef IPPL_BARE_FIELD_OPERATIONS_HPP +#define IPPL_BARE_FIELD_OPERATIONS_HPP + +// clang-format off +#ifndef IPPL_BARE_FIELD_H +// HACK: cyclic anitpattern, but necessary for proper LSP markup +// FIXME: Use a BareField concept, until then this include is needless +#include "Field/BareField.h" +#endif +// clang-format on + +#include "Utility/IpplTimings.h" +#include "Utility/ParallelDispatch.h" #include @@ -95,3 +108,5 @@ namespace ippl { } } } // namespace ippl + +#endif // IPPL_BARE_FIELD_OPERATIONS_HPP diff --git a/src/FieldLayout/FieldLayout.cpp b/src/FieldLayout/FieldLayout.cpp index dd93863cd..f2d857c0e 100644 --- a/src/FieldLayout/FieldLayout.cpp +++ b/src/FieldLayout/FieldLayout.cpp @@ -1,3 +1,5 @@ +#include + #include "Utility/IpplException.h" namespace ippl { diff --git a/src/FieldLayout/FieldLayout.h b/src/FieldLayout/FieldLayout.h index 780040e8b..accda2405 100644 --- a/src/FieldLayout/FieldLayout.h +++ b/src/FieldLayout/FieldLayout.h @@ -17,7 +17,6 @@ #include "Communicate/Communicator.h" #include "Index/NDIndex.h" -#include "Partition/Partitioner.h" namespace ippl { @@ -399,6 +398,8 @@ namespace ippl { } } // namespace ippl +#ifndef IPPL_FIELD_LAYOUT_HPP #include "FieldLayout/FieldLayout.hpp" +#endif // IPPL_FIELD_LAYOUT_HPP -#endif +#endif // IPPL_FIELD_LAYOUT_H diff --git a/src/FieldLayout/FieldLayout.hpp b/src/FieldLayout/FieldLayout.hpp index 2bcb1bcd1..d5674d9bf 100644 --- a/src/FieldLayout/FieldLayout.hpp +++ b/src/FieldLayout/FieldLayout.hpp @@ -5,16 +5,20 @@ // partitioning. The user may request that a particular dimension not be // partitioned by flagging that axis as 'SERIAL' (instead of 'PARALLEL'). // -#include "Ippl.h" +#ifndef IPPL_FIELD_LAYOUT_HPP +#define IPPL_FIELD_LAYOUT_HPP -#include -#include +// clang-format off +#ifndef IPPL_FIELD_LAYOUT_H +// HACK: cyclic anitpattern, but necessary for proper LSP markup +#include "FieldLayout/FieldLayout.h" +#endif +// clang-format on -#include "Utility/IpplException.h" #include "Utility/IpplTimings.h" #include "Utility/PAssert.h" -#include "FieldLayout/FieldLayout.h" +#include "Partition/Partitioner.h" namespace ippl { @@ -344,3 +348,5 @@ namespace ippl { } } // namespace ippl + +#endif // IPPL_FIELD_LAYOUT_HPP diff --git a/src/FieldLayout/SubFieldLayout.h b/src/FieldLayout/SubFieldLayout.h index 85fdd0151..7e83bf985 100644 --- a/src/FieldLayout/SubFieldLayout.h +++ b/src/FieldLayout/SubFieldLayout.h @@ -7,11 +7,6 @@ #ifndef IPPL_SUB_FIELD_LAYOUT_H #define IPPL_SUB_FIELD_LAYOUT_H -#include -#include -#include -#include - #include "Types/ViewTypes.h" #include "Communicate/Communicator.h" @@ -178,6 +173,8 @@ namespace ippl { }; } // namespace ippl +#ifndef IPPL_SUB_FIELD_LAYOUT_HPP #include "FieldLayout/SubFieldLayout.hpp" +#endif #endif diff --git a/src/FieldLayout/SubFieldLayout.hpp b/src/FieldLayout/SubFieldLayout.hpp index 53ee24c11..a2bc0f6f7 100644 --- a/src/FieldLayout/SubFieldLayout.hpp +++ b/src/FieldLayout/SubFieldLayout.hpp @@ -4,16 +4,15 @@ // It ensures that the sub-region is partitioned in the same way as the original FieldLayout, // maintaining consistent parallel decomposition and neighbor relationships within the sub-region. // -#include "Ippl.h" - -#include -#include - -#include "Utility/IpplException.h" -#include "Utility/IpplTimings.h" -#include "Utility/PAssert.h" +#ifndef IPPL_SUB_FIELD_LAYOUT_HPP +#define IPPL_SUB_FIELD_LAYOUT_HPP +// clang-format off +#ifndef IPPL_SUB_FIELD_LAYOUT_H +// HACK: cyclic anitpattern, but necessary for proper LSP markup #include "FieldLayout/SubFieldLayout.h" +#endif +// clang-format on namespace ippl { @@ -125,4 +124,6 @@ namespace ippl { originDomain_m = domain; } -} // namespace ippl \ No newline at end of file +} // namespace ippl + +#endif // IPPL_SUB_FIELD_LAYOUT_HPP diff --git a/src/Types/Vector.h b/src/Types/Vector.h index 89a96bcad..e87b933c8 100644 --- a/src/Types/Vector.h +++ b/src/Types/Vector.h @@ -2,12 +2,17 @@ // Class Vector // Vector class used for vector fields and particle attributes like the coordinate. // -#ifndef IPPL_Vector_H -#define IPPL_Vector_H +#ifndef IPPL_VECTOR_H +#define IPPL_VECTOR_H -#include +#include // for KOKKOS_INLINE_FUNCTION +#include // for array +#include // for size_t +#include // for initializer_list +#include // for enable_if, true_type +#include // for vector -#include "Expression/IpplExpressions.h" +#include "Expression/IpplExpressions.h" // for Expression, isExpression... namespace ippl { /*! @@ -110,6 +115,8 @@ namespace ippl { KOKKOS_INLINE_FUNCTION Vector max(const Vector& a, const Vector& b); } // namespace ippl +#ifndef IPPL_VECTOR_HPP #include "Vector.hpp" - #endif + +#endif // IPPL_VECTOR_H diff --git a/src/Types/Vector.hpp b/src/Types/Vector.hpp index e961ff45c..3eef5bd44 100644 --- a/src/Types/Vector.hpp +++ b/src/Types/Vector.hpp @@ -2,10 +2,23 @@ // Class Vector // Vector class used for vector fields and particle attributes like the coordinate. // -// #include "Utility/PAssert.h" -#include -#include +#ifndef IPPL_VECTOR_HPP +#define IPPL_VECTOR_HPP + +// clang-format off +#ifndef IPPL_Vector_H +// HACK: cyclic anitpattern, but necessary for proper LSP markup +#include "Vector.h" +#endif +// clang-format on + +#include // for max, min +#include // for operator<<, setw +#include // for basic_ostream, char_traits + +#include "Kokkos_Macros.hpp" // for KOKKOS_INLINE_FUNCTION +#include "Kokkos_MathematicalFunctions.hpp" // for pow, abs namespace ippl { namespace detail { @@ -232,6 +245,7 @@ namespace ippl { } } // namespace ippl +#endif // IPPL_VECTOR_HPP // vi: set et ts=4 sw=4 sts=4: // Local Variables: // mode:c