Skip to content

Commit

Permalink
Merge pull request #14942 from drwells/remove-extra-namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
masterleinad committed Mar 23, 2023
2 parents 136878a + 67ac16f commit 92344eb
Show file tree
Hide file tree
Showing 27 changed files with 200 additions and 242 deletions.
4 changes: 2 additions & 2 deletions include/deal.II/distributed/cell_weights.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ namespace parallel
* @param[in] weighting_function The function that determines each
* cell's weight during load balancing.
*/
CellWeights(const dealii::DoFHandler<dim, spacedim> &dof_handler,
const WeightingFunction & weighting_function);
CellWeights(const DoFHandler<dim, spacedim> &dof_handler,
const WeightingFunction & weighting_function);

/**
* Destructor.
Expand Down
15 changes: 0 additions & 15 deletions include/deal.II/dofs/dof_accessor.templates.h
Original file line number Diff line number Diff line change
Expand Up @@ -1980,10 +1980,6 @@ template <int spacedim, bool level_dof_access>
inline unsigned int
DoFAccessor<0, 1, spacedim, level_dof_access>::n_active_fe_indices() const
{
Assert((std::is_same<DoFHandler<1, spacedim>,
dealii::DoFHandler<1, spacedim>>::value == true),
ExcNotImplemented());

return 1;
}

Expand All @@ -1994,10 +1990,6 @@ inline types::fe_index
DoFAccessor<0, 1, spacedim, level_dof_access>::nth_active_fe_index(
const unsigned int /*n*/) const
{
Assert((std::is_same<DoFHandler<1, spacedim>,
dealii::DoFHandler<1, spacedim>>::value == true),
ExcNotImplemented());

return 0;
}

Expand Down Expand Up @@ -2117,13 +2109,6 @@ namespace internal
{
namespace DoFCellAccessorImplementation
{
// make sure we refer to class
// dealii::DoFCellAccessor, not
// namespace
// dealii::internal::DoFCellAccessor
using dealii::DoFCellAccessor;
using dealii::DoFHandler;

/**
* A class with the same purpose as the similarly named class of the
* Triangulation class. See there for more information.
Expand Down
2 changes: 1 addition & 1 deletion include/deal.II/dofs/dof_faces.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ namespace internal
* variables using the DoFHandler::get_dof_index() and corresponding
* setter functions. Knowledge of the actual data format is therefore
* encapsulated to the present hierarchy of classes as well as the
* dealii::DoFHandler class.
* DoFHandler class.
*/
template <int dim>
class DoFFaces
Expand Down
4 changes: 2 additions & 2 deletions include/deal.II/dofs/dof_levels.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ namespace internal
* Note that vertices use a storage scheme that is entirely separate from
* the one used for the cells. The indices of degrees of freedom located
* on vertices are therefore not stored here, but rather in member
* variables of the dealii::DoFHandler class.
* variables of the DoFHandler class.
*
* The indices of degrees of freedom located on lower dimensional objects,
* i.e. on lines for 2d and on quads and lines for 3d are treated
Expand All @@ -57,7 +57,7 @@ namespace internal
* variables using the DoFHandler::get_dof_index() and corresponding
* setter functions. Knowledge of the actual data format is therefore
* encapsulated to the present hierarchy of classes as well as the
* dealii::DoFHandler class.
* DoFHandler class.
*/
template <int dim>
class DoFLevel
Expand Down
46 changes: 20 additions & 26 deletions include/deal.II/dofs/dof_objects.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ namespace internal
*/
template <int dh_dim, int spacedim>
types::global_dof_index &
access_dof_index(const dealii::DoFHandler<dh_dim, spacedim> &dof_handler,
const unsigned int obj_index,
const types::fe_index fe_index,
const unsigned int local_index);
access_dof_index(const DoFHandler<dh_dim, spacedim> &dof_handler,
const unsigned int obj_index,
const types::fe_index fe_index,
const unsigned int local_index);

/**
* Return the value 1. The meaning of this function becomes clear by
Expand All @@ -102,20 +102,18 @@ namespace internal
*/
template <int dh_dim, int spacedim>
unsigned int
n_active_fe_indices(
const dealii::DoFHandler<dh_dim, spacedim> &dof_handler,
const types::global_dof_index index) const;
n_active_fe_indices(const DoFHandler<dh_dim, spacedim> &dof_handler,
const types::global_dof_index index) const;

/**
* Similar to the function above. Assert that the given index is zero,
* and then return true.
*/
template <int dh_dim, int spacedim>
bool
fe_index_is_active(
const dealii::DoFHandler<dh_dim, spacedim> &dof_handler,
const types::global_dof_index index,
const types::fe_index fe_index) const;
fe_index_is_active(const DoFHandler<dh_dim, spacedim> &dof_handler,
const types::global_dof_index index,
const types::fe_index fe_index) const;

/**
* Determine an estimate for the memory consumption (in bytes) of this
Expand Down Expand Up @@ -147,9 +145,8 @@ namespace internal
template <int dim>
template <int dh_dim, int spacedim>
inline unsigned int
DoFObjects<dim>::n_active_fe_indices(
const dealii::DoFHandler<dh_dim, spacedim> &,
const types::global_dof_index) const
DoFObjects<dim>::n_active_fe_indices(const DoFHandler<dh_dim, spacedim> &,
const types::global_dof_index) const
{
return 1;
}
Expand All @@ -159,14 +156,12 @@ namespace internal
template <int dim>
template <int dh_dim, int spacedim>
inline bool
DoFObjects<dim>::fe_index_is_active(
const dealii::DoFHandler<dh_dim, spacedim> &,
const types::global_dof_index,
const types::fe_index fe_index) const
DoFObjects<dim>::fe_index_is_active(const DoFHandler<dh_dim, spacedim> &,
const types::global_dof_index,
const types::fe_index fe_index) const
{
(void)fe_index;
Assert((fe_index ==
dealii::DoFHandler<dh_dim, spacedim>::default_fe_index),
Assert((fe_index == DoFHandler<dh_dim, spacedim>::default_fe_index),
ExcMessage("Only zero fe_index values are allowed for "
"non-hp-DoFHandlers."));
return true;
Expand All @@ -178,14 +173,13 @@ namespace internal
template <int dh_dim, int spacedim>
inline types::global_dof_index &
DoFObjects<dim>::access_dof_index(
const dealii::DoFHandler<dh_dim, spacedim> &dof_handler,
const unsigned int obj_index,
const types::fe_index fe_index,
const unsigned int local_index)
const DoFHandler<dh_dim, spacedim> &dof_handler,
const unsigned int obj_index,
const types::fe_index fe_index,
const unsigned int local_index)
{
(void)fe_index;
Assert((fe_index ==
dealii::DoFHandler<dh_dim, spacedim>::default_fe_index),
Assert((fe_index == DoFHandler<dh_dim, spacedim>::default_fe_index),
ExcMessage("Only the default FE index is allowed for DoFHandler "
"objects without hp capability"));
AssertIndexRange(local_index,
Expand Down
4 changes: 2 additions & 2 deletions include/deal.II/dofs/dof_tools.h
Original file line number Diff line number Diff line change
Expand Up @@ -626,8 +626,8 @@ namespace DoFTools
* in the triangulation. By default flux couplings are added over all internal
* faces. @p face_has_flux_coupling should be a function that takes an
* active_cell_iterator and a face index and should return true if there is a
* flux coupling over the face. When using the ::dealii::DoFHandler we could,
* for example, use
* flux coupling over the face. When using DoFHandler we could, for example,
* use
*
* @code
* auto face_has_flux_coupling =
Expand Down
6 changes: 3 additions & 3 deletions include/deal.II/grid/grid_tools.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ namespace internal

#ifdef _MSC_VER
template <int dim, int spacedim>
class ActiveCellIterator<dim, spacedim, dealii::DoFHandler<dim, spacedim>>
class ActiveCellIterator<dim, spacedim, DoFHandler<dim, spacedim>>
{
public:
using type =
Expand Down Expand Up @@ -3194,7 +3194,7 @@ namespace GridTools
* those processors:
* @code
* using active_cell_iterator =
* typename dealii::DoFHandler<dim,spacedim>::active_cell_iterator;
* typename DoFHandler<dim,spacedim>::active_cell_iterator;
* auto pack = [] (const active_cell_iterator &cell) -> unsigned int
* {
* return cell->active_fe_index();
Expand All @@ -3207,7 +3207,7 @@ namespace GridTools
* };
*
* GridTools::exchange_cell_data_to_ghosts<
* unsigned int, dealii::DoFHandler<dim,spacedim>> (dof_handler,
* unsigned int, DoFHandler<dim,spacedim>> (dof_handler,
* pack,
* unpack);
* @endcode
Expand Down
4 changes: 2 additions & 2 deletions include/deal.II/matrix_free/matrix_free.h
Original file line number Diff line number Diff line change
Expand Up @@ -3123,8 +3123,8 @@ namespace internal
template <int dim, int spacedim>
inline std::vector<IndexSet>
extract_locally_owned_index_sets(
const std::vector<const ::dealii::DoFHandler<dim, spacedim> *> &dofh,
const unsigned int level)
const std::vector<const DoFHandler<dim, spacedim> *> &dofh,
const unsigned int level)
{
std::vector<IndexSet> locally_owned_set;
locally_owned_set.reserve(dofh.size());
Expand Down
6 changes: 3 additions & 3 deletions include/deal.II/matrix_free/matrix_free.templates.h
Original file line number Diff line number Diff line change
Expand Up @@ -1125,9 +1125,9 @@ namespace internal
std::vector<bool>
compute_dof_info(
const std::vector<const dealii::AffineConstraints<number> *> &constraint,
const std::vector<IndexSet> &locally_owned_dofs,
const std::vector<SmartPointer<const dealii::DoFHandler<dim>>> &dof_handler,
const Table<2, MatrixFreeFunctions::ShapeInfo<double>> & shape_infos,
const std::vector<IndexSet> & locally_owned_dofs,
const std::vector<SmartPointer<const DoFHandler<dim>>> &dof_handler,
const Table<2, MatrixFreeFunctions::ShapeInfo<double>> &shape_infos,
const unsigned int cell_level_index_end_local,
const unsigned int mg_level,
const bool hold_all_faces_to_owned_cells,
Expand Down
12 changes: 6 additions & 6 deletions include/deal.II/multigrid/mg_transfer.templates.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ namespace internal
*/
template <int dim, typename number, int spacedim>
void
reinit_vector(const dealii::DoFHandler<dim, spacedim> &dof_handler,
reinit_vector(const DoFHandler<dim, spacedim> &dof_handler,
const std::vector<unsigned int> &,
MGLevelObject<dealii::Vector<number>> &v)
{
Expand All @@ -75,9 +75,9 @@ namespace internal
*/
template <int dim, typename number, int spacedim>
void
reinit_vector(const dealii::DoFHandler<dim, spacedim> &dof_handler,
std::vector<unsigned int> target_component,
MGLevelObject<BlockVector<number>> & v)
reinit_vector(const DoFHandler<dim, spacedim> & dof_handler,
std::vector<unsigned int> target_component,
MGLevelObject<BlockVector<number>> &v)
{
const unsigned int n_blocks = dof_handler.get_fe().n_blocks();
if (target_component.size() == 0)
Expand Down Expand Up @@ -115,7 +115,7 @@ namespace internal
*/
template <int dim, int spacedim>
void
reinit_vector(const dealii::DoFHandler<dim, spacedim> &dof_handler,
reinit_vector(const DoFHandler<dim, spacedim> &dof_handler,
const std::vector<unsigned int> &,
MGLevelObject<TrilinosWrappers::MPI::Vector> &v)
{
Expand Down Expand Up @@ -143,7 +143,7 @@ namespace internal
*/
template <int dim, int spacedim>
void
reinit_vector(const dealii::DoFHandler<dim, spacedim> &dof_handler,
reinit_vector(const DoFHandler<dim, spacedim> &dof_handler,
const std::vector<unsigned int> &,
MGLevelObject<PETScWrappers::MPI::Vector> &v)
{
Expand Down
68 changes: 32 additions & 36 deletions include/deal.II/multigrid/multigrid.h
Original file line number Diff line number Diff line change
Expand Up @@ -709,15 +709,14 @@ namespace internal
class TRANSFER,
typename OtherVectorType>
std::enable_if_t<TRANSFER::supports_dof_handler_vector>
vmult(
const std::vector<const dealii::DoFHandler<dim> *> &dof_handler_vector,
dealii::Multigrid<VectorType> & multigrid,
const TRANSFER & transfer,
OtherVectorType & dst,
const OtherVectorType & src,
const bool uses_dof_handler_vector,
const typename dealii::mg::Signals &signals,
int)
vmult(const std::vector<const DoFHandler<dim> *> &dof_handler_vector,
Multigrid<VectorType> & multigrid,
const TRANSFER & transfer,
OtherVectorType & dst,
const OtherVectorType & src,
const bool uses_dof_handler_vector,
const typename dealii::mg::Signals & signals,
int)
{
signals.transfer_to_mg(true);
if (uses_dof_handler_vector)
Expand All @@ -741,15 +740,14 @@ namespace internal
class TRANSFER,
typename OtherVectorType>
void
vmult(
const std::vector<const dealii::DoFHandler<dim> *> &dof_handler_vector,
dealii::Multigrid<VectorType> & multigrid,
const TRANSFER & transfer,
OtherVectorType & dst,
const OtherVectorType & src,
const bool uses_dof_handler_vector,
const typename dealii::mg::Signals &signals,
...)
vmult(const std::vector<const DoFHandler<dim> *> &dof_handler_vector,
Multigrid<VectorType> & multigrid,
const TRANSFER & transfer,
OtherVectorType & dst,
const OtherVectorType & src,
const bool uses_dof_handler_vector,
const typename dealii::mg::Signals & signals,
...)
{
(void)uses_dof_handler_vector;
Assert(!uses_dof_handler_vector, ExcInternalError());
Expand All @@ -770,15 +768,14 @@ namespace internal
class TRANSFER,
typename OtherVectorType>
std::enable_if_t<TRANSFER::supports_dof_handler_vector>
vmult_add(
const std::vector<const dealii::DoFHandler<dim> *> &dof_handler_vector,
dealii::Multigrid<VectorType> & multigrid,
const TRANSFER & transfer,
OtherVectorType & dst,
const OtherVectorType & src,
const bool uses_dof_handler_vector,
const typename dealii::mg::Signals &signals,
int)
vmult_add(const std::vector<const DoFHandler<dim> *> &dof_handler_vector,
Multigrid<VectorType> & multigrid,
const TRANSFER & transfer,
OtherVectorType & dst,
const OtherVectorType & src,
const bool uses_dof_handler_vector,
const typename dealii::mg::Signals &signals,
int)
{
signals.transfer_to_mg(true);
if (uses_dof_handler_vector)
Expand All @@ -804,15 +801,14 @@ namespace internal
class TRANSFER,
typename OtherVectorType>
void
vmult_add(
const std::vector<const dealii::DoFHandler<dim> *> &dof_handler_vector,
dealii::Multigrid<VectorType> & multigrid,
const TRANSFER & transfer,
OtherVectorType & dst,
const OtherVectorType & src,
const bool uses_dof_handler_vector,
const typename dealii::mg::Signals &signals,
...)
vmult_add(const std::vector<const DoFHandler<dim> *> &dof_handler_vector,
Multigrid<VectorType> & multigrid,
const TRANSFER & transfer,
OtherVectorType & dst,
const OtherVectorType & src,
const bool uses_dof_handler_vector,
const typename dealii::mg::Signals &signals,
...)
{
(void)uses_dof_handler_vector;
Assert(!uses_dof_handler_vector, ExcInternalError());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ namespace VectorTools
concepts::is_writable_dealii_vector_type<OutVector>)
void integrate_difference(
const dealii::hp::MappingCollection<dim, spacedim> & mapping,
const dealii::DoFHandler<dim, spacedim> & dof,
const DoFHandler<dim, spacedim> & dof,
const InVector & fe_function,
const Function<spacedim, typename InVector::value_type> &exact_solution,
OutVector & difference,
Expand All @@ -635,7 +635,7 @@ namespace VectorTools
DEAL_II_CXX20_REQUIRES(concepts::is_dealii_vector_type<InVector> &&
concepts::is_writable_dealii_vector_type<OutVector>)
void integrate_difference(
const dealii::DoFHandler<dim, spacedim> & dof,
const DoFHandler<dim, spacedim> & dof,
const InVector & fe_function,
const Function<spacedim, typename InVector::value_type> &exact_solution,
OutVector & difference,
Expand Down

0 comments on commit 92344eb

Please sign in to comment.