Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doxygen CI: Warnings as Error #3560

Open
wants to merge 9 commits into
base: development
Choose a base branch
from
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
3 changes: 2 additions & 1 deletion .github/workflows/source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@ jobs:
run: .github/workflows/source/check_inputs.py
- name: Doxygen
run: |
sudo apt-get install -y --no-install-recommends doxygen
sudo apt update
sudo apt install -y doxygen texlive-latex-base
.github/workflows/source/doxygen
18 changes: 12 additions & 6 deletions .github/workflows/source/doxygen
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
#!/usr/bin/env bash
#
# Copyright 2020 Axel Huebl
# Copyright 2020-2023 The WarpX Community
#
# License: BSD-3-Clause-LBNL

# search recursive inside a folder if a file contains tabs
#
# @result 0 if no files are found, else 1
#
# Authors: Axel Huebl

set -eu -o pipefail

cd Docs

curl -L -o amrex-doxygen-web.tag.xml \
https://amrex-codes.github.io/amrex/docs_xml/doxygen/amrex-doxygen-web.tag.xml

curl -L -o openpmd-api-doxygen-web.tag.xml \
https://openpmd-api.readthedocs.io/en/latest/_static/doxyhtml/openpmd-api-doxygen-web.tag.xml

# treat all warnings as errors
echo "WARN_AS_ERROR = YES" >> Doxyfile

doxygen
5 changes: 3 additions & 2 deletions Source/FieldSolver/ImplicitSolvers/WarpXSolverVec.H
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <ostream>
#include <vector>

using warpx::fields::FieldType;

// forward declaration
class WarpX;
Expand Down Expand Up @@ -83,8 +84,8 @@ public:

[[nodiscard]] RT dotProduct( const WarpXSolverVec& a_X ) const;

void Copy ( warpx::fields::FieldType a_array_type,
warpx::fields::FieldType a_scalar_type = warpx::fields::FieldType::None,
void Copy ( FieldType a_array_type,
FieldType a_scalar_type = FieldType::None,
bool allow_type_mismatch = false);

inline
Expand Down
4 changes: 2 additions & 2 deletions Source/Particles/Collision/BinaryCollision/DSMC/DSMCFunc.H
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ public:
* @param[in] isSameSpecies whether the two colliding species are the same
*/
DSMCFunc ( const std::string& collision_name,
MultiParticleContainer const * mypc,
bool isSameSpecies );
[[maybe_unused]] MultiParticleContainer const * mypc,
const bool isSameSpecies );

struct Executor {
/**
Expand Down
8 changes: 6 additions & 2 deletions Source/Utils/ParticleUtils.H
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@

namespace ParticleUtils {

// Define shortcuts for frequently-used type names
using ParticleTileType = typename WarpXParticleContainer::ParticleTileType;
using ParticleTileDataType = typename ParticleTileType::ParticleTileDataType;

/**
* \brief Find the particles and count the particles that are in each cell. More specifically
* this function returns an amrex::DenseBins object containing an offset array and a permutation
Expand All @@ -28,9 +32,9 @@ namespace ParticleUtils {
* @param[in] mfi the MultiFAB iterator.
* @param[in] ptile the particle tile.
*/
amrex::DenseBins<typename WarpXParticleContainer::ParticleTileType::ParticleTileDataType>
amrex::DenseBins<ParticleTileDataType>
findParticlesInEachCell (int lev,
amrex::MFIter const & mfi,
const amrex::MFIter & mfi,
WarpXParticleContainer::ParticleTileType & ptile);

/**
Expand Down
8 changes: 3 additions & 5 deletions Source/Utils/ParticleUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,15 @@ namespace ParticleUtils

// Define shortcuts for frequently-used type names
using ParticleType = typename WarpXParticleContainer::ParticleType;
using ParticleTileType = typename WarpXParticleContainer::ParticleTileType;
using ParticleTileDataType = typename ParticleTileType::ParticleTileDataType;
using ParticleBins = DenseBins<ParticleTileDataType>;
using index_type = typename ParticleBins::index_type;

/* Find the particles and count the particles that are in each cell.
Note that this does *not* rearrange particle arrays */
ParticleBins
amrex::DenseBins<ParticleTileDataType>
findParticlesInEachCell (int lev,
MFIter const & mfi,
ParticleTileType & ptile) {
const amrex::MFIter & mfi,
WarpXParticleContainer::ParticleTileType & ptile) {

// Extract particle structures for this tile
int const np = ptile.numParticles();
Expand Down
Loading