Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,19 @@ target_include_directories( integratorxx
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag("-Wno-missing-braces" INTEGRATORXX_HAS_NO_MISSING_BRACES )
if( INTEGRATORXX_HAS_NO_MISSING_BRACES )
target_compile_options( integratorxx INTERFACE $<$<COMPILE_LANGUAGE:CXX>: -Wno-missing-braces> )
target_compile_options( integratorxx ${INTEGRATORXX_TARGET_TYPE} $<$<COMPILE_LANGUAGE:CXX>: -Wno-missing-braces> )
endif()

# MSVC: define _USE_MATH_DEFINES for M_PI etc., and /bigobj for large TUs
if(MSVC)
target_compile_definitions( integratorxx ${INTEGRATORXX_TARGET_TYPE} _USE_MATH_DEFINES )
target_compile_options( integratorxx ${INTEGRATORXX_TARGET_TYPE} /bigobj )
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options( integratorxx ${INTEGRATORXX_TARGET_TYPE}
-Wno-unused-but-set-variable
-Wno-suggest-override
)
endif()
endif()


Expand Down
10 changes: 5 additions & 5 deletions include/integratorxx/batch/spherical_micro_batcher.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ bool point_in_box(
const cartesian_pt_t<T>& pt
) {

if( pt[0] > up[0] or pt[0] < lo[0] ) return false;
else if( pt[1] > up[1] or pt[1] < lo[1] ) return false;
else if( pt[2] > up[2] or pt[2] < lo[2] ) return false;
if( pt[0] > up[0] || pt[0] < lo[0] ) return false;
else if( pt[1] > up[1] || pt[1] < lo[1] ) return false;
else if( pt[2] > up[2] || pt[2] < lo[2] ) return false;
else return true;

}
Expand Down Expand Up @@ -281,7 +281,7 @@ class SphericalMicroBatcher {
}

bool operator==( iterator other ){ return idx_it == other.idx_it; }
bool operator!=( iterator other ){ return not (*this == other); }
bool operator!=( iterator other ){ return !(*this == other); }



Expand Down Expand Up @@ -352,7 +352,7 @@ class SphericalMicroBatcher {
}

bool operator==( iterator other ){ return idx_it == other.idx_it; }
bool operator!=( iterator other ){ return not (*this == other); }
bool operator!=( iterator other ){ return !(*this == other); }
Comment on lines 354 to +355



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ class RadialGridPartition {
}

bool operator==(rgp_iterator other) const {
return idx_it == other.idx_it and quad_it == other.quad_it;
return idx_it == other.idx_it && quad_it == other.quad_it;
}
bool operator!=(rgp_iterator other) const { return not (*this == other); }
bool operator!=(rgp_iterator other) const { return !(*this == other); }

value_type operator*() {
return std::make_pair( std::make_pair(*idx_it, *(idx_it+1)), *quad_it );
Expand Down
8 changes: 4 additions & 4 deletions include/integratorxx/generators/spherical_factory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ struct PruningRegion {

/// Check equality of `PruningRegion` instances
inline bool operator==(const PruningRegion& other) const noexcept {
return other.idx_st == idx_st and
other.idx_en == idx_en and
return other.idx_st == idx_st &&
other.idx_en == idx_en &&
other.angular_size == angular_size;
}
};
Expand Down Expand Up @@ -85,8 +85,8 @@ struct PrunedSphericalGridSpecification {
}

inline bool operator==(const PrunedSphericalGridSpecification& other) const noexcept {
return radial_quad == other.radial_quad and
(radial_traits ? (other.radial_traits and radial_traits->compare(*other.radial_traits)) : !other.radial_traits) and
return radial_quad == other.radial_quad &&
(radial_traits ? (other.radial_traits && radial_traits->compare(*other.radial_traits)) : !other.radial_traits) &&
pruning_regions == other.pruning_regions;
}
};
Expand Down
2 changes: 1 addition & 1 deletion include/integratorxx/quadrature.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ class Quadrature : public
template <typename... Args,
typename = std::enable_if_t<
// Disable generic construction for copy/move to and from base type
detail::all_are_not< Quadrature<Derived>, std::decay_t<Args>... >::value and
detail::all_are_not< Quadrature<Derived>, std::decay_t<Args>... >::value &&
detail::all_are_not< Derived , std::decay_t<Args>... >::value
>
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ struct quadrature_traits<
}
} // end while

if(not converged) {
if(!converged) {
throw std::runtime_error(
"Gauss-Legendre Newton Iterations Failed to Converge"
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ struct quadrature_traits<GaussLobatto<PointType, WeightType>> {
}
} // end while

if(not converged) {
if(!converged) {
throw std::runtime_error(
"Gauss-Lobatto Newton Iterations Failed to Converge");
}
Expand Down
2 changes: 1 addition & 1 deletion include/integratorxx/quadratures/radial/becke.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class BeckeRadialTraits : public RadialTraits {
}

bool operator==(const BeckeRadialTraits& other) const noexcept {
return npts_ == other.npts_ and R_ == other.R_;
return npts_ == other.npts_ && R_ == other.R_;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion include/integratorxx/quadratures/radial/mhl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class MurrayHandyLamingRadialTraits : public RadialTraits {
}

bool operator==(const MurrayHandyLamingRadialTraits& other) const noexcept {
return npts_ == other.npts_ and R_ == other.R_;
return npts_ == other.npts_ && R_ == other.R_;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions include/integratorxx/quadratures/radial/muraknowles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ template <typename PointType, typename WeightType>
struct quadrature_traits<
MuraKnowles<PointType,WeightType>,
std::enable_if_t<
std::is_floating_point_v<PointType> and
std::is_floating_point_v<PointType> &&
std::is_floating_point_v<WeightType>
>
> {
Expand Down Expand Up @@ -157,7 +157,7 @@ class MuraKnowlesRadialTraits : public RadialTraits {
}

bool operator==(const MuraKnowlesRadialTraits& other) const noexcept {
return npts_ == other.npts_ and R_ == other.R_;
return npts_ == other.npts_ && R_ == other.R_;
}

template <typename PointType>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class TreutlerAhlrichsRadialTraits : public RadialTraits {
}

bool operator==(const TreutlerAhlrichsRadialTraits& other) const noexcept {
return npts_ == other.npts_ and R_ == other.R_ and alpha_ == other.alpha_;
return npts_ == other.npts_ && R_ == other.R_ && alpha_ == other.alpha_;
}

/**
Expand Down
Loading
Loading