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>;
DEAL_II_NAMESPACE_OPEN
+#ifndef DOXYGEN
namespace Utilities
{
namespace MPI
{
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,
MPI_SUM,
communicator);
AssertThrowMPI(ierr);
-#endif
+# endif
local_range_data = {prefix_sum, prefix_sum + local_size};
// 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());
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
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)
{
// 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;
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);
} // end of namespace Utilities
-
+#endif
// explicit instantiations from .templates.h file
#include "partitioner.inst"
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
{
} // namespace hp
} // namespace internal
-
+#ifndef DOXYGEN
template <int dim, int spacedim>
DEAL_II_CXX20_REQUIRES((concepts::is_valid_dim_spacedim<dim, spacedim>))
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
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) &&
ExcInvalidFEIndex(cell->future_fe_index(), ff.size()));
}
}
-#endif
+# endif
//
// register the new finite element collection
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
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
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)
{
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);
}
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
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);
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> *>(
active_fe_index_transfer->cell_data_transfer
->prepare_for_coarsening_and_refinement(
active_fe_index_transfer->active_fe_indices);
-#endif
+# endif
}
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());
// Free memory.
this->active_fe_index_transfer.reset();
-#endif
+# endif
}
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> *>(
// Attach to transfer object
active_fe_index_transfer->cell_data_transfer->prepare_for_serialization(
active_fe_index_transfer->active_fe_indices);
-#endif
+# endif
}
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> *>(
// Free memory.
active_fe_index_transfer.reset();
-#endif
+# endif
}
{
return finest_level;
}
-
+#endif
/*-------------- Explicit Instantiations -------------------------------*/
#include "dof_handler.inst"
/*------------------------------- FiniteElement ----------------------*/
-
+#ifndef DOXYGEN
template <int dim, int spacedim>
FiniteElement<dim, spacedim>::InternalDataBase::InternalDataBase()
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])) ||
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);
}
/*------------------------------- FiniteElement ----------------------*/
-#ifndef DOXYGEN
+# ifndef DOXYGEN
template <int dim, int spacedim>
std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>
FiniteElement<dim, spacedim>::get_face_data(
(void)fe_internal;
(void)output_data;
}
-#endif
+# endif
}
-
+#endif
/*------------------------------- Explicit Instantiations -------------*/
#include "fe.inst"
DEAL_II_NAMESPACE_OPEN
+#ifndef DOXYGEN
template <int dim, int spacedim>
FE_Poly<dim, spacedim>::FE_Poly(const FE_Poly &fe)
, poly_space(fe.poly_space->clone())
{}
-
+#endif
#include "fe_poly.inst"
} // namespace FE_PolyTensor
} // namespace internal
+#ifndef DOXYGEN
template <int dim, int spacedim>
FE_PolyTensor<dim, spacedim>::FE_PolyTensor(
return out;
}
-
+#endif
// explicit instantiations
#include "fe_poly_tensor.inst"
}
};
-
+#ifndef DOXYGEN
template <int dim, int spacedim>
FE_Q_Base<dim, spacedim>::FE_Q_Base(
if (std::fabs(interpolation_matrix(i, j)) < eps)
interpolation_matrix(i, j) = 0.;
-#ifdef DEBUG
+# ifdef DEBUG
// make sure that the row sum of each of the matrices is 1 at this
// point. this must be so since the shape functions sum up to 1
for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
Assert(std::fabs(sum - 1) < eps, ExcInternalError());
}
-#endif
+# endif
}
else if (dynamic_cast<const FE_Nothing<dim> *>(&x_source_fe))
{
}
}
-#ifdef DEBUG
+# ifdef DEBUG
// make sure that the row sum of each of the matrices is 1 at this
// point. this must be so since the shape functions sum up to 1
for (unsigned int j = 0; j < source_fe.n_dofs_per_face(face_no); ++j)
Assert(std::fabs(sum - 1) < eps, ExcInternalError());
}
-#endif
+# endif
}
else if (dynamic_cast<const FE_Nothing<dim> *>(&source_fe) != nullptr)
{
// evaluations of the Lagrange polynomials are zero or one.
const double eps = 1e-15 * q_degree * dim;
-#ifdef DEBUG
+# ifdef DEBUG
// in DEBUG mode, check that the evaluation of support points in the
// current numbering gives the identity operation
for (unsigned int i = 0; i < q_dofs_per_cell; ++i)
"ill-conditioned such that round-off "
"prevents the sum to be one."));
}
-#endif
+# endif
// to efficiently evaluate the polynomial at the subcell, make use of
// the tensor product structure of this element and only evaluate 1d
// and make sure that the row sum is 1. this must be so since for this
// element, the shape functions add up to one
-#ifdef DEBUG
+# ifdef DEBUG
for (unsigned int row = 0; row < this->n_dofs_per_cell(); ++row)
{
double sum = 0;
"ill-conditioned such that round-off "
"prevents the sum to be one."));
}
-#endif
+# endif
// swap matrices
prolongate.swap(const_cast<FullMatrix<double> &>(
}
unsigned int j_indices[dim];
internal::FE_Q_Base::zero_indices<dim>(j_indices);
-#ifdef DEBUG
+# ifdef DEBUG
double sum_check = 0;
-#endif
+# endif
for (unsigned int j = 0; j < q_dofs_per_cell; j += dofs1d)
{
double val_extra_dim = 1.;
my_restriction(mother_dof, child_dof) = 1.;
else if (std::fabs(val) > eps)
my_restriction(mother_dof, child_dof) = val;
-#ifdef DEBUG
+# ifdef DEBUG
sum_check += val;
-#endif
+# endif
}
internal::FE_Q_Base::increment_indices<dim>(j_indices,
dofs1d);
constant_modes, std::vector<unsigned int>(1, 0));
}
-
+#endif
// explicit instantiations
#include "fe_q_base.inst"
} // namespace internal
/* ----------------------- FESystem::InternalData ------------------- */
+#ifndef DOXYGEN
template <int dim, int spacedim>
FESystem<dim, spacedim>::InternalData::InternalData(
}
}
-#ifdef DEBUG
+# ifdef DEBUG
// check generalized_support_points_index_table for consistency
for (unsigned int i = 0; i < base_elements.size(); ++i)
{
ExcInternalError());
}
}
-#endif /* DEBUG */
+# endif /* DEBUG */
});
// initialize quad dof index permutation in 3d and higher
return mem;
}
-
+#endif
// explicit instantiations
#include "fe_system.inst"
} // namespace internal
/*------------------------------- FEValues -------------------------------*/
+#ifndef DOXYGEN
template <int dim, int spacedim>
const unsigned int FEValues<dim, spacedim>::integral_dimension;
MemoryConsumption::memory_consumption(quadrature));
}
-
+#endif
/*------------------------------- FEFaceValuesBase --------------------------*/
-
+#ifndef DOXYGEN
template <int dim, int spacedim>
FEFaceValuesBase<dim, spacedim>::FEFaceValuesBase(
return (FEValuesBase<dim, spacedim>::memory_consumption() +
MemoryConsumption::memory_consumption(quadrature));
}
-
+#endif
/*------------------------------- FEFaceValues -------------------------------*/
+#ifndef DOXYGEN
+
template <int dim, int spacedim>
const unsigned int FEFaceValues<dim, spacedim>::dimension;
*this->fe_data,
this->finite_element_output);
}
-
+#endif
/*------------------------- Explicit Instantiations --------------------------*/
#include <limits>
DEAL_II_NAMESPACE_OPEN
-
+#ifndef DOXYGEN
template <int dim, int spacedim>
boost::container::small_vector<Point<spacedim>,
-#ifndef DOXYGEN
+# ifndef DOXYGEN
template <int dim, int spacedim>
void
Mapping<dim, spacedim>::fill_fe_face_values(
return std::unique_ptr<typename Mapping<dim, spacedim>::InternalDataBase>();
}
-#endif
+# endif
/* ---------------------------- InternalDataBase --------------------------- */
{
return sizeof(*this);
}
-
+#endif
/* ------------------------------ Global functions ------------------------- */
DEAL_II_NAMESPACE_OPEN
/* -------------------------- Manifold --------------------- */
+#ifndef DOXYGEN
+
template <int dim, int spacedim>
Point<spacedim>
Manifold<dim, spacedim>::project_to_manifold(
make_array_view(weights.begin(), weights.end()));
return (neighbor_point - x1) / epsilon;
}
-
+#endif
/* -------------------------- FlatManifold --------------------- */
namespace internal
} // namespace
} // namespace internal
+#ifndef DOXYGEN
+
template <int dim, int spacedim>
FlatManifold<dim, spacedim>::FlatManifold(
const Tensor<1, spacedim> &periodicity,
// vectors given by grad_F
return internal::normalized_alternating_product(grad_F);
}
-
+#endif
/* -------------------------- ChartManifold --------------------- */
template <int dim, int spacedim, int chartdim>
} // namespace TriangulationImplementation
} // namespace internal
-
+#ifndef DOXYGEN
template <int dim, int spacedim>
DEAL_II_CXX20_REQUIRES((concepts::is_valid_dim_spacedim<dim, spacedim>))
data_serializer.clear();
}
-
template <int dim, int spacedim>
DEAL_II_CXX20_REQUIRES((concepts::is_valid_dim_spacedim<dim, spacedim>))
MPI_Comm Triangulation<dim, spacedim>::get_communicator() const
return {m_ids.begin(), m_ids.end()};
}
+#endif
/*-----------------------------------------------------------------*/
+#ifndef DOXYGEN
template <int dim, int spacedim>
DEAL_II_CXX20_REQUIRES((concepts::is_valid_dim_spacedim<dim, spacedim>))
}
+#endif
/*-------------------- refine/coarsen flags -------------------------*/
-
+#ifndef DOXYGEN
template <int dim, int spacedim>
DEAL_II_CXX20_REQUIRES((concepts::is_valid_dim_spacedim<dim, spacedim>))
}
+#endif
namespace internal
{
}
} // namespace
+#ifndef DOXYGEN
template <int dim, int spacedim>
DEAL_II_CXX20_REQUIRES((concepts::is_valid_dim_spacedim<dim, spacedim>))
Assert(i == v.end(), ExcInternalError());
}
+#endif
namespace
{
}
} // namespace
+#ifndef DOXYGEN
template <int dim, int spacedim>
DEAL_II_CXX20_REQUIRES((concepts::is_valid_dim_spacedim<dim, spacedim>))
load(ia, 0);
}
+#endif
namespace
{
template <typename Iterator>
}
} // namespace
+#ifndef DOXYGEN
template <int dim, int spacedim>
DEAL_II_CXX20_REQUIRES((concepts::is_valid_dim_spacedim<dim, spacedim>))
}
}
+#endif
//---------------- user pointers ----------------------------------------//
}
} // namespace
+#ifndef DOXYGEN
template <int dim, int spacedim>
DEAL_II_CXX20_REQUIRES((concepts::is_valid_dim_spacedim<dim, spacedim>))
}
}
-
+#endif
/*------------------------ Cell iterator functions ------------------------*/
+#ifndef DOXYGEN
template <int dim, int spacedim>
DEAL_II_CXX20_REQUIRES((concepts::is_valid_dim_spacedim<dim, spacedim>))
typename Triangulation<dim, spacedim>::active_cell_iterator>(
begin_active(level), end_active(level));
}
-
+#endif
/*------------------------ Face iterator functions ------------------------*/
+#ifndef DOXYGEN
template <int dim, int spacedim>
DEAL_II_CXX20_REQUIRES((concepts::is_valid_dim_spacedim<dim, spacedim>))
numbers::invalid_unsigned_int);
}
+#endif
/*------------------------ Line iterator functions ------------------------*/
-
+#ifndef DOXYGEN
template <int dim, int spacedim>
DEAL_II_CXX20_REQUIRES((concepts::is_valid_dim_spacedim<dim, spacedim>))
-1);
}
-
+#endif
/*------------------------ Quad iterator functions ------------------------*/
+#ifndef DOXYGEN
template <int dim, int spacedim>
DEAL_II_CXX20_REQUIRES((concepts::is_valid_dim_spacedim<dim, spacedim>))
-1);
}
+#endif
/*------------------------ Hex iterator functions ------------------------*/
+#ifndef DOXYGEN
template <int dim, int spacedim>
DEAL_II_CXX20_REQUIRES((concepts::is_valid_dim_spacedim<dim, spacedim>))
-1);
}
-
+#endif
// -------------------------------- number of cells etc ---------------
} // namespace TriangulationImplementation
} // namespace internal
-
+#ifndef DOXYGEN
template <int dim, int spacedim>
DEAL_II_CXX20_REQUIRES((concepts::is_valid_dim_spacedim<dim, spacedim>))
return number_cache.n_active_lines_level[level];
}
-
+#endif
template <>
unsigned int
return 0;
}
-
+#ifndef DOXYGEN
template <int dim, int spacedim>
DEAL_II_CXX20_REQUIRES((concepts::is_valid_dim_spacedim<dim, spacedim>))
return number_cache.n_quads_level[level];
}
-
+#endif
template <>
unsigned int
return 0;
}
-
+#ifndef DOXYGEN
template <int dim, int spacedim>
DEAL_II_CXX20_REQUIRES((concepts::is_valid_dim_spacedim<dim, spacedim>))
return 0;
}
-
+#endif
template <>
unsigned int
return faces->quads.n_objects();
}
-
+#ifndef DOXYGEN
template <int dim, int spacedim>
DEAL_II_CXX20_REQUIRES((concepts::is_valid_dim_spacedim<dim, spacedim>))
return 0;
}
+#endif
template <>
unsigned int
return number_cache.n_active_hexes_level[level];
}
-
+#ifndef DOXYGEN
template <int dim, int spacedim>
DEAL_II_CXX20_REQUIRES((concepts::is_valid_dim_spacedim<dim, spacedim>))
return vertices_used;
}
-
+#endif
template <>
unsigned int
return 2;
}
+#ifndef DOXYGEN
template <int dim, int spacedim>
DEAL_II_CXX20_REQUIRES((concepts::is_valid_dim_spacedim<dim, spacedim>))
update_periodic_face_map();
-#ifdef DEBUG
+# ifdef DEBUG
// In debug mode, we want to check for some consistency of the
// result of this function. Because there are multiple exit
}
}
}
-#endif
+# endif
}
internal::TriangulationImplementation::Implementation::compute_number_cache(
*this, levels.size(), number_cache);
-#ifdef DEBUG
+# ifdef DEBUG
for (const auto &level : levels)
monitor_memory(level->cells, dim);
// since the cell-accessors should have caught this)
for (const auto &cell : this->cell_iterators())
Assert(!cell->refine_flag_set(), ExcInternalError());
-#endif
+# endif
return cells_with_distorted_children;
}
while (continue_iterating == true);
}
-
+#endif
// TODO: merge the following 3 functions since they are the same
template <>
}
} // namespace
-
+#ifndef DOXYGEN
template <int dim, int spacedim>
DEAL_II_CXX20_REQUIRES((concepts::is_valid_dim_spacedim<dim, spacedim>))
bool Triangulation<dim, spacedim>::prepare_coarsening_and_refinement()
Triangulation<dim, spacedim>::DistortedCellList::~DistortedCellList() noexcept =
default;
+#endif
// explicit instantiations
#include "tria.inst"
/*-------------------- Static variables: TriaAccessorBase -------------------*/
+#ifndef DOXYGEN
template <int structdim, int dim, int spacedim>
const unsigned int TriaAccessorBase<structdim, dim, spacedim>::dimension;
const unsigned int
TriaAccessorBase<structdim, dim, spacedim>::structure_dimension;
-
+#endif
/*------------------------ Functions: TriaAccessor ---------------------------*/
+#ifndef DOXYGEN
template <int structdim, int dim, int spacedim>
void
return std::numeric_limits<double>::signaling_NaN();
}
-
+#endif
template <>
double
import_from_ghosted_array_finish(op, src, dst);
}
-
+# ifndef DOXYGEN
// Partitioner
import_from_ghosted_array_start(op, src, dst);
import_from_ghosted_array_finish(op, src, dst);
}
-
+# endif
} // namespace PETScWrappers
// Explicit instantiations