Skip to content

Commit

Permalink
Fix *.cc Doxygen template warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jpthiele committed Sep 22, 2023
1 parent a5a7ecd commit 27b6676
Show file tree
Hide file tree
Showing 14 changed files with 131 additions and 98 deletions.
3 changes: 2 additions & 1 deletion source/base/numbers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ namespace numbers
template <typename number>
constexpr bool NumberTraits<number>::is_complex;

#ifndef DOXYGEN
template <typename number>
constexpr bool NumberTraits<std::complex<number>>::is_complex;

#endif
// explicit instantiations
template struct NumberTraits<double>;
template struct NumberTraits<float>;
Expand Down
19 changes: 10 additions & 9 deletions source/base/partitioner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

DEAL_II_NAMESPACE_OPEN

#ifndef DOXYGEN
namespace Utilities
{
namespace MPI
Expand Down Expand Up @@ -79,7 +80,7 @@ namespace Utilities
{
types::global_dof_index prefix_sum = 0;

#ifdef DEAL_II_WITH_MPI
# ifdef DEAL_II_WITH_MPI
const int ierr =
MPI_Exscan(&local_size,
&prefix_sum,
Expand All @@ -88,7 +89,7 @@ namespace Utilities
MPI_SUM,
communicator);
AssertThrowMPI(ierr);
#endif
# endif

local_range_data = {prefix_sum, prefix_sum + local_size};

Expand Down Expand Up @@ -216,7 +217,7 @@ namespace Utilities

// find out the end index for each processor and communicate it (this
// implies the start index for the next processor)
#ifdef DEAL_II_WITH_MPI
# ifdef DEAL_II_WITH_MPI
if (n_procs < 2)
{
Assert(ghost_indices_data.n_elements() == 0, ExcInternalError());
Expand Down Expand Up @@ -339,7 +340,7 @@ namespace Utilities
local_range_data.first);
}

# ifdef DEBUG
# ifdef DEBUG

// simple check: the number of processors to which we want to send
// ghosts and the processors to which ghosts reference should be the
Expand Down Expand Up @@ -387,9 +388,9 @@ namespace Utilities
for (unsigned int i = 0; i < ghost_indices.size(); ++i)
AssertDimension(ghost_indices[i], ghost_indices_ref[i]);

# endif
# endif

#endif // #ifdef DEAL_II_WITH_MPI
# endif // #ifdef DEAL_II_WITH_MPI

if (larger_ghost_index_set.size() == 0)
{
Expand Down Expand Up @@ -471,7 +472,7 @@ namespace Utilities
// processor
if (&part == this)
return true;
#ifdef DEAL_II_WITH_MPI
# ifdef DEAL_II_WITH_MPI
if (Utilities::MPI::job_supports_mpi())
{
int communicators_same = 0;
Expand All @@ -483,7 +484,7 @@ namespace Utilities
communicators_same == MPI_CONGRUENT))
return false;
}
#endif
# endif
return (global_size == part.global_size &&
local_range_data == part.local_range_data &&
ghost_indices_data == part.ghost_indices_data);
Expand Down Expand Up @@ -569,7 +570,7 @@ namespace Utilities

} // end of namespace Utilities


#endif

// explicit instantiations from .templates.h file
#include "partitioner.inst"
Expand Down
52 changes: 26 additions & 26 deletions source/dofs/dof_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,11 @@

DEAL_II_NAMESPACE_OPEN

#ifndef DOXYGEN
template <int dim, int spacedim>
DEAL_II_CXX20_REQUIRES((concepts::is_valid_dim_spacedim<dim, spacedim>))
const types::fe_index DoFHandler<dim, spacedim>::default_fe_index;

#endif

namespace internal
{
Expand Down Expand Up @@ -1714,7 +1715,7 @@ namespace internal
} // namespace hp
} // namespace internal


#ifndef DOXYGEN

template <int dim, int spacedim>
DEAL_II_CXX20_REQUIRES((concepts::is_valid_dim_spacedim<dim, spacedim>))
Expand Down Expand Up @@ -1799,10 +1800,9 @@ void DoFHandler<dim, spacedim>::reinit(const Triangulation<dim, spacedim> &tria)
this->create_active_fe_table();
}



#endif
/*------------------------ Cell iterator functions ------------------------*/

#ifndef DOXYGEN
template <int dim, int spacedim>
DEAL_II_CXX20_REQUIRES((concepts::is_valid_dim_spacedim<dim, spacedim>))
typename DoFHandler<dim, spacedim>::cell_iterator
Expand Down Expand Up @@ -2168,7 +2168,7 @@ void DoFHandler<dim, spacedim>::distribute_dofs(
ExcMessage("The given hp::FECollection contains more finite elements "
"than the DoFHandler can cover with active FE indices."));

#ifdef DEBUG
# ifdef DEBUG
// make sure that the provided FE collection is large enough to
// cover all FE indices presently in use on the mesh
if ((hp_cell_active_fe_indices.size() > 0) &&
Expand All @@ -2185,7 +2185,7 @@ void DoFHandler<dim, spacedim>::distribute_dofs(
ExcInvalidFEIndex(cell->future_fe_index(), ff.size()));
}
}
#endif
# endif

//
// register the new finite element collection
Expand Down Expand Up @@ -2410,7 +2410,7 @@ void DoFHandler<dim, spacedim>::renumber_dofs(

AssertDimension(new_numbers.size(), this->n_locally_owned_dofs());

#ifdef DEBUG
# ifdef DEBUG
// assert that the new indices are consecutively numbered if we are
// working on a single processor. this doesn't need to
// hold in the case of a parallel mesh since we map the interval
Expand All @@ -2429,7 +2429,7 @@ void DoFHandler<dim, spacedim>::renumber_dofs(
Assert(new_number < this->n_dofs(),
ExcMessage(
"New DoF index is not less than the total number of dofs."));
#endif
# endif

// uncompress the internal storage scheme of dofs on cells so that
// we can access dofs in turns. uncompress in parallel, starting
Expand Down Expand Up @@ -2464,7 +2464,7 @@ void DoFHandler<dim, spacedim>::renumber_dofs(
ExcMessage(
"You need to distribute DoFs before you can renumber them."));

#ifdef DEBUG
# ifdef DEBUG
if (dynamic_cast<const parallel::shared::Triangulation<dim, spacedim> *>(
&*this->tria) != nullptr)
{
Expand Down Expand Up @@ -2501,7 +2501,7 @@ void DoFHandler<dim, spacedim>::renumber_dofs(
Assert(new_number < this->n_dofs(),
ExcMessage(
"New DoF index is not less than the total number of dofs."));
#endif
# endif

this->number_cache = this->policy->renumber_dofs(new_numbers);
}
Expand All @@ -2525,7 +2525,7 @@ void DoFHandler<dim, spacedim>::renumber_dofs(
AssertDimension(new_numbers.size(),
this->locally_owned_mg_dofs(level).n_elements());

#ifdef DEBUG
# ifdef DEBUG
// assert that the new indices are consecutively numbered if we are working
// on a single processor. this doesn't need to hold in the case of a
// parallel mesh since we map the interval [0...n_dofs(level)) into itself
Expand All @@ -2544,7 +2544,7 @@ void DoFHandler<dim, spacedim>::renumber_dofs(
Assert(new_number < this->n_dofs(level),
ExcMessage(
"New DoF index is not less than the total number of dofs."));
#endif
# endif

this->mg_number_cache[level] =
this->policy->renumber_mg_dofs(level, new_numbers);
Expand Down Expand Up @@ -2904,13 +2904,13 @@ template <int dim, int spacedim>
DEAL_II_CXX20_REQUIRES((concepts::is_valid_dim_spacedim<dim, spacedim>))
void DoFHandler<dim, spacedim>::pre_distributed_transfer_action()
{
#ifndef DEAL_II_WITH_P4EST
# ifndef DEAL_II_WITH_P4EST
Assert(false,
ExcMessage(
"You are attempting to use a functionality that is only available "
"if deal.II was configured to use p4est, but cmake did not find a "
"valid p4est library."));
#else
# else
// the implementation below requires a p:d:T currently
Assert(
(dynamic_cast<const parallel::distributed::Triangulation<dim, spacedim> *>(
Expand Down Expand Up @@ -2962,7 +2962,7 @@ void DoFHandler<dim, spacedim>::pre_distributed_transfer_action()
active_fe_index_transfer->cell_data_transfer
->prepare_for_coarsening_and_refinement(
active_fe_index_transfer->active_fe_indices);
#endif
# endif
}


Expand Down Expand Up @@ -2994,9 +2994,9 @@ template <int dim, int spacedim>
DEAL_II_CXX20_REQUIRES((concepts::is_valid_dim_spacedim<dim, spacedim>))
void DoFHandler<dim, spacedim>::post_distributed_transfer_action()
{
#ifndef DEAL_II_WITH_P4EST
# ifndef DEAL_II_WITH_P4EST
Assert(false, ExcInternalError());
#else
# else
update_active_fe_table();

Assert(this->active_fe_index_transfer != nullptr, ExcInternalError());
Expand All @@ -3017,7 +3017,7 @@ void DoFHandler<dim, spacedim>::post_distributed_transfer_action()

// Free memory.
this->active_fe_index_transfer.reset();
#endif
# endif
}


Expand All @@ -3026,13 +3026,13 @@ template <int dim, int spacedim>
DEAL_II_CXX20_REQUIRES((concepts::is_valid_dim_spacedim<dim, spacedim>))
void DoFHandler<dim, spacedim>::prepare_for_serialization_of_active_fe_indices()
{
#ifndef DEAL_II_WITH_P4EST
# ifndef DEAL_II_WITH_P4EST
Assert(false,
ExcMessage(
"You are attempting to use a functionality that is only available "
"if deal.II was configured to use p4est, but cmake did not find a "
"valid p4est library."));
#else
# else
// the implementation below requires a p:d:T currently
Assert(
(dynamic_cast<const parallel::distributed::Triangulation<dim, spacedim> *>(
Expand Down Expand Up @@ -3075,7 +3075,7 @@ void DoFHandler<dim, spacedim>::prepare_for_serialization_of_active_fe_indices()
// Attach to transfer object
active_fe_index_transfer->cell_data_transfer->prepare_for_serialization(
active_fe_index_transfer->active_fe_indices);
#endif
# endif
}


Expand All @@ -3084,13 +3084,13 @@ template <int dim, int spacedim>
DEAL_II_CXX20_REQUIRES((concepts::is_valid_dim_spacedim<dim, spacedim>))
void DoFHandler<dim, spacedim>::deserialize_active_fe_indices()
{
#ifndef DEAL_II_WITH_P4EST
# ifndef DEAL_II_WITH_P4EST
Assert(false,
ExcMessage(
"You are attempting to use a functionality that is only available "
"if deal.II was configured to use p4est, but cmake did not find a "
"valid p4est library."));
#else
# else
// the implementation below requires a p:d:T currently
Assert(
(dynamic_cast<const parallel::distributed::Triangulation<dim, spacedim> *>(
Expand Down Expand Up @@ -3139,7 +3139,7 @@ void DoFHandler<dim, spacedim>::deserialize_active_fe_indices()

// Free memory.
active_fe_index_transfer.reset();
#endif
# endif
}


Expand Down Expand Up @@ -3194,7 +3194,7 @@ unsigned int DoFHandler<dim, spacedim>::MGVertexDoFs::get_finest_level() const
{
return finest_level;
}

#endif
/*-------------- Explicit Instantiations -------------------------------*/
#include "dof_handler.inst"

Expand Down
12 changes: 6 additions & 6 deletions source/fe/fe.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ DEAL_II_NAMESPACE_OPEN


/*------------------------------- FiniteElement ----------------------*/

#ifndef DOXYGEN

template <int dim, int spacedim>
FiniteElement<dim, spacedim>::InternalDataBase::InternalDataBase()
Expand Down Expand Up @@ -1175,15 +1175,15 @@ FiniteElement<dim, spacedim>::get_sub_fe(const ComponentMask &mask) const
const unsigned int first_selected =
mask.first_selected_component(n_total_components);

#ifdef DEBUG
# ifdef DEBUG
// check that it is contiguous:
for (unsigned int c = 0; c < n_total_components; ++c)
Assert((c < first_selected && (!mask[c])) ||
(c >= first_selected && c < first_selected + n_selected &&
mask[c]) ||
(c >= first_selected + n_selected && !mask[c]),
ExcMessage("Error: the given ComponentMask is not contiguous!"));
#endif
# endif

return get_sub_fe(first_selected, n_selected);
}
Expand Down Expand Up @@ -1275,7 +1275,7 @@ FiniteElement<dim, spacedim>::compute_n_nonzero_components(

/*------------------------------- FiniteElement ----------------------*/

#ifndef DOXYGEN
# ifndef DOXYGEN
template <int dim, int spacedim>
std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>
FiniteElement<dim, spacedim>::get_face_data(
Expand Down Expand Up @@ -1370,7 +1370,7 @@ FiniteElement<dim, spacedim>::fill_fe_face_values(
(void)fe_internal;
(void)output_data;
}
#endif
# endif



Expand Down Expand Up @@ -1406,7 +1406,7 @@ FiniteElement<dim, spacedim>::base_element(const unsigned int index) const
}



#endif
/*------------------------------- Explicit Instantiations -------------*/
#include "fe.inst"

Expand Down
3 changes: 2 additions & 1 deletion source/fe/fe_poly.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,15 @@

DEAL_II_NAMESPACE_OPEN

#ifndef DOXYGEN

template <int dim, int spacedim>
FE_Poly<dim, spacedim>::FE_Poly(const FE_Poly &fe)
: FiniteElement<dim, spacedim>(fe)
, poly_space(fe.poly_space->clone())
{}


#endif

#include "fe_poly.inst"

Expand Down
3 changes: 2 additions & 1 deletion source/fe/fe_poly_tensor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ namespace internal
} // namespace FE_PolyTensor
} // namespace internal

#ifndef DOXYGEN

template <int dim, int spacedim>
FE_PolyTensor<dim, spacedim>::FE_PolyTensor(
Expand Down Expand Up @@ -2504,7 +2505,7 @@ FE_PolyTensor<dim, spacedim>::requires_update_flags(
return out;
}


#endif
// explicit instantiations
#include "fe_poly_tensor.inst"

Expand Down

0 comments on commit 27b6676

Please sign in to comment.