}
}
+
+
template <int dim, int spacedim>
template <class Archive>
void
if (n_properties > 0)
ar &boost::serialization::make_array(properties, n_properties);
}
+
+
+
+ template <int dim, int spacedim>
+ void
+ Particle<dim, spacedim>::set_location(const Point<spacedim> &new_loc)
+ {
+ location = new_loc;
+ }
+
+
+
+ template <int dim, int spacedim>
+ const Point<spacedim> &
+ Particle<dim, spacedim>::get_location() const
+ {
+ return location;
+ }
+
+
+
+ template <int dim, int spacedim>
+ void
+ Particle<dim, spacedim>::set_reference_location(const Point<dim> &new_loc)
+ {
+ reference_location = new_loc;
+ }
+
+
+
+ template <int dim, int spacedim>
+ const Point<dim> &
+ Particle<dim, spacedim>::get_reference_location() const
+ {
+ return reference_location;
+ }
+
+
+
+ template <int dim, int spacedim>
+ types::particle_index
+ Particle<dim, spacedim>::get_id() const
+ {
+ return id;
+ }
+
+
+
+ template <int dim, int spacedim>
+ void
+ Particle<dim, spacedim>::set_id(const types::particle_index &new_id)
+ {
+ id = new_id;
+ }
+
+
+
+ template <int dim, int spacedim>
+ void
+ Particle<dim, spacedim>::set_property_pool(PropertyPool &new_property_pool)
+ {
+ property_pool = &new_property_pool;
+ }
+
+
+
+ template <int dim, int spacedim>
+ const ArrayView<const double>
+ Particle<dim, spacedim>::get_properties() const
+ {
+ Assert(has_properties(), ExcInternalError());
+
+ return property_pool->get_properties(properties);
+ }
+
+
+
+ template <int dim, int spacedim>
+ bool
+ Particle<dim, spacedim>::has_properties() const
+ {
+ return (property_pool != nullptr) &&
+ (properties != PropertyPool::invalid_handle);
+ }
+
} // namespace Particles
DEAL_II_NAMESPACE_CLOSE
}
+ // ------------------------- inline functions ------------------------------
+ template <int dim, int spacedim>
+ ParticleAccessor<dim, spacedim>::ParticleAccessor()
+ : map(nullptr)
+ , particle()
+ {}
+
+
+
+ template <int dim, int spacedim>
+ ParticleAccessor<dim, spacedim>::ParticleAccessor(
+ const std::multimap<internal::LevelInd, Particle<dim, spacedim>> &map,
+ const typename std::multimap<internal::LevelInd,
+ Particle<dim, spacedim>>::iterator & particle)
+ : map(const_cast<
+ std::multimap<internal::LevelInd, Particle<dim, spacedim>> *>(&map))
+ , particle(particle)
+ {}
+
+
+
+ template <int dim, int spacedim>
+ void
+ ParticleAccessor<dim, spacedim>::write_data(void *&data) const
+ {
+ Assert(particle != map->end(), ExcInternalError());
+
+ particle->second.write_data(data);
+ }
+
+
+
+ template <int dim, int spacedim>
+ void
+ ParticleAccessor<dim, spacedim>::set_location(const Point<spacedim> &new_loc)
+ {
+ Assert(particle != map->end(), ExcInternalError());
+
+ particle->second.set_location(new_loc);
+ }
+
+
+
+ template <int dim, int spacedim>
+ const Point<spacedim> &
+ ParticleAccessor<dim, spacedim>::get_location() const
+ {
+ Assert(particle != map->end(), ExcInternalError());
+
+ return particle->second.get_location();
+ }
+
+
+
+ template <int dim, int spacedim>
+ void
+ ParticleAccessor<dim, spacedim>::set_reference_location(
+ const Point<dim> &new_loc)
+ {
+ Assert(particle != map->end(), ExcInternalError());
+
+ particle->second.set_reference_location(new_loc);
+ }
+
+
+
+ template <int dim, int spacedim>
+ const Point<dim> &
+ ParticleAccessor<dim, spacedim>::get_reference_location() const
+ {
+ Assert(particle != map->end(), ExcInternalError());
+
+ return particle->second.get_reference_location();
+ }
+
+
+
+ template <int dim, int spacedim>
+ types::particle_index
+ ParticleAccessor<dim, spacedim>::get_id() const
+ {
+ Assert(particle != map->end(), ExcInternalError());
+
+ return particle->second.get_id();
+ }
+
+
+
+ template <int dim, int spacedim>
+ void
+ ParticleAccessor<dim, spacedim>::set_property_pool(
+ PropertyPool &new_property_pool)
+ {
+ Assert(particle != map->end(), ExcInternalError());
+
+ particle->second.set_property_pool(new_property_pool);
+ }
+
+
+
+ template <int dim, int spacedim>
+ bool
+ ParticleAccessor<dim, spacedim>::has_properties() const
+ {
+ Assert(particle != map->end(), ExcInternalError());
+
+ return particle->second.has_properties();
+ }
+
+
+
+ template <int dim, int spacedim>
+ void
+ ParticleAccessor<dim, spacedim>::set_properties(
+ const std::vector<double> &new_properties)
+ {
+ Assert(particle != map->end(), ExcInternalError());
+
+ particle->second.set_properties(new_properties);
+ }
+
+
+
+ template <int dim, int spacedim>
+ void
+ ParticleAccessor<dim, spacedim>::set_properties(
+ const ArrayView<const double> &new_properties)
+ {
+ Assert(particle != map->end(), ExcInternalError());
+
+ particle->second.set_properties(new_properties);
+ }
+
+
+
+ template <int dim, int spacedim>
+ const ArrayView<const double>
+ ParticleAccessor<dim, spacedim>::get_properties() const
+ {
+ Assert(particle != map->end(), ExcInternalError());
+
+ return particle->second.get_properties();
+ }
+
+
+
+ template <int dim, int spacedim>
+ typename Triangulation<dim, spacedim>::cell_iterator
+ ParticleAccessor<dim, spacedim>::get_surrounding_cell(
+ const Triangulation<dim, spacedim> &triangulation) const
+ {
+ Assert(particle != map->end(), ExcInternalError());
+
+ const typename Triangulation<dim, spacedim>::cell_iterator cell(
+ &triangulation, particle->first.first, particle->first.second);
+ return cell;
+ }
+
+
+
+ template <int dim, int spacedim>
+ const ArrayView<double>
+ ParticleAccessor<dim, spacedim>::get_properties()
+ {
+ Assert(particle != map->end(), ExcInternalError());
+
+ return particle->second.get_properties();
+ }
+
+
+
+ template <int dim, int spacedim>
+ std::size_t
+ ParticleAccessor<dim, spacedim>::serialized_size_in_bytes() const
+ {
+ Assert(particle != map->end(), ExcInternalError());
+
+ return particle->second.serialized_size_in_bytes();
+ }
+
+
+
+ template <int dim, int spacedim>
+ void
+ ParticleAccessor<dim, spacedim>::next()
+ {
+ Assert(particle != map->end(), ExcInternalError());
+ ++particle;
+ }
+
+
+
+ template <int dim, int spacedim>
+ void
+ ParticleAccessor<dim, spacedim>::prev()
+ {
+ Assert(particle != map->begin(), ExcInternalError());
+ --particle;
+ }
+
+
+
+ template <int dim, int spacedim>
+ bool
+ ParticleAccessor<dim, spacedim>::
+ operator!=(const ParticleAccessor<dim, spacedim> &other) const
+ {
+ return (map != other.map) || (particle != other.particle);
+ }
+
+
+
+ template <int dim, int spacedim>
+ bool
+ ParticleAccessor<dim, spacedim>::
+ operator==(const ParticleAccessor<dim, spacedim> &other) const
+ {
+ return (map == other.map) && (particle == other.particle);
+ }
+
+
} // namespace Particles
DEAL_II_NAMESPACE_CLOSE
*/
ParticleAccessor<dim, spacedim> accessor;
};
+
+
+
+ // ------------------------------ inline functions -------------------------
+
+ template <int dim, int spacedim>
+ ParticleIterator<dim, spacedim>::ParticleIterator(
+ const std::multimap<internal::LevelInd, Particle<dim, spacedim>> &map,
+ const typename std::multimap<internal::LevelInd,
+ Particle<dim, spacedim>>::iterator & particle)
+ : accessor(map, particle)
+ {}
+
+
+
+ template <int dim, int spacedim>
+ ParticleAccessor<dim, spacedim> &ParticleIterator<dim, spacedim>::operator*()
+ {
+ return accessor;
+ }
+
+
+
+ template <int dim, int spacedim>
+ ParticleAccessor<dim, spacedim> *ParticleIterator<dim, spacedim>::operator->()
+ {
+ return &(this->operator*());
+ }
+
+
+
+ template <int dim, int spacedim>
+ const ParticleAccessor<dim, spacedim> &ParticleIterator<dim, spacedim>::
+ operator*() const
+ {
+ return accessor;
+ }
+
+
+
+ template <int dim, int spacedim>
+ const ParticleAccessor<dim, spacedim> *ParticleIterator<dim, spacedim>::
+ operator->() const
+ {
+ return &(this->operator*());
+ }
+
+
+
+ template <int dim, int spacedim>
+ bool
+ ParticleIterator<dim, spacedim>::
+ operator!=(const ParticleIterator<dim, spacedim> &other) const
+ {
+ return accessor != other.accessor;
+ }
+
+
+
+ template <int dim, int spacedim>
+ bool
+ ParticleIterator<dim, spacedim>::
+ operator==(const ParticleIterator<dim, spacedim> &other) const
+ {
+ return accessor == other.accessor;
+ }
+
+
+
+ template <int dim, int spacedim>
+ ParticleIterator<dim, spacedim> &
+ ParticleIterator<dim, spacedim>::operator++()
+ {
+ accessor.next();
+ return *this;
+ }
+
+
+
+ template <int dim, int spacedim>
+ ParticleIterator<dim, spacedim>
+ ParticleIterator<dim, spacedim>::operator++(int)
+ {
+ ParticleIterator tmp(*this);
+ operator++();
+
+ return tmp;
+ }
+
+
+
+ template <int dim, int spacedim>
+ ParticleIterator<dim, spacedim> &
+ ParticleIterator<dim, spacedim>::operator--()
+ {
+ accessor.prev();
+ return *this;
+ }
+
+
+
+ template <int dim, int spacedim>
+ ParticleIterator<dim, spacedim>
+ ParticleIterator<dim, spacedim>::operator--(int)
+ {
+ ParticleIterator tmp(*this);
+ operator--();
+
+ return tmp;
+ }
+
+
} // namespace Particles
DEAL_II_NAMESPACE_CLOSE
SET(_src
data_out.cc
particle.cc
- particle_accessor.cc
- particle_iterator.cc
particle_handler.cc
generators.cc
property_pool.cc
SET(_inst
data_out.inst.in
particle.inst.in
- particle_accessor.inst.in
- particle_iterator.inst.in
particle_handler.inst.in
generators.inst.in
utilities.inst.in
- template <int dim, int spacedim>
- void
- Particle<dim, spacedim>::set_location(const Point<spacedim> &new_loc)
- {
- location = new_loc;
- }
-
-
-
- template <int dim, int spacedim>
- const Point<spacedim> &
- Particle<dim, spacedim>::get_location() const
- {
- return location;
- }
-
-
-
- template <int dim, int spacedim>
- void
- Particle<dim, spacedim>::set_reference_location(const Point<dim> &new_loc)
- {
- reference_location = new_loc;
- }
-
-
-
- template <int dim, int spacedim>
- const Point<dim> &
- Particle<dim, spacedim>::get_reference_location() const
- {
- return reference_location;
- }
-
-
-
- template <int dim, int spacedim>
- types::particle_index
- Particle<dim, spacedim>::get_id() const
- {
- return id;
- }
-
-
-
- template <int dim, int spacedim>
- void
- Particle<dim, spacedim>::set_id(const types::particle_index &new_id)
- {
- id = new_id;
- }
-
-
-
- template <int dim, int spacedim>
- void
- Particle<dim, spacedim>::set_property_pool(PropertyPool &new_property_pool)
- {
- property_pool = &new_property_pool;
- }
-
-
-
template <int dim, int spacedim>
void
Particle<dim, spacedim>::set_properties(
- template <int dim, int spacedim>
- const ArrayView<const double>
- Particle<dim, spacedim>::get_properties() const
- {
- Assert(has_properties(), ExcInternalError());
-
- return property_pool->get_properties(properties);
- }
-
-
-
template <int dim, int spacedim>
const ArrayView<double>
Particle<dim, spacedim>::get_properties()
return property_pool->get_properties(properties);
}
-
-
-
- template <int dim, int spacedim>
- bool
- Particle<dim, spacedim>::has_properties() const
- {
- return (property_pool != nullptr) &&
- (properties != PropertyPool::invalid_handle);
- }
} // namespace Particles
DEAL_II_NAMESPACE_CLOSE
+++ /dev/null
-// ---------------------------------------------------------------------
-//
-// Copyright (C) 2017 - 2018 by the deal.II authors
-//
-// This file is part of the deal.II library.
-//
-// The deal.II library is free software; you can use it, redistribute
-// it, and/or modify it under the terms of the GNU Lesser General
-// Public License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-// The full text of the license can be found in the file LICENSE.md at
-// the top level directory of deal.II.
-//
-// ---------------------------------------------------------------------
-
-#include <deal.II/particles/particle_accessor.h>
-
-DEAL_II_NAMESPACE_OPEN
-
-namespace Particles
-{
- template <int dim, int spacedim>
- ParticleAccessor<dim, spacedim>::ParticleAccessor()
- : map(nullptr)
- , particle()
- {}
-
-
-
- template <int dim, int spacedim>
- ParticleAccessor<dim, spacedim>::ParticleAccessor(
- const std::multimap<internal::LevelInd, Particle<dim, spacedim>> &map,
- const typename std::multimap<internal::LevelInd,
- Particle<dim, spacedim>>::iterator & particle)
- : map(const_cast<
- std::multimap<internal::LevelInd, Particle<dim, spacedim>> *>(&map))
- , particle(particle)
- {}
-
-
-
- template <int dim, int spacedim>
- void
- ParticleAccessor<dim, spacedim>::write_data(void *&data) const
- {
- Assert(particle != map->end(), ExcInternalError());
-
- particle->second.write_data(data);
- }
-
-
-
- template <int dim, int spacedim>
- void
- ParticleAccessor<dim, spacedim>::set_location(const Point<spacedim> &new_loc)
- {
- Assert(particle != map->end(), ExcInternalError());
-
- particle->second.set_location(new_loc);
- }
-
-
-
- template <int dim, int spacedim>
- const Point<spacedim> &
- ParticleAccessor<dim, spacedim>::get_location() const
- {
- Assert(particle != map->end(), ExcInternalError());
-
- return particle->second.get_location();
- }
-
-
-
- template <int dim, int spacedim>
- void
- ParticleAccessor<dim, spacedim>::set_reference_location(
- const Point<dim> &new_loc)
- {
- Assert(particle != map->end(), ExcInternalError());
-
- particle->second.set_reference_location(new_loc);
- }
-
-
-
- template <int dim, int spacedim>
- const Point<dim> &
- ParticleAccessor<dim, spacedim>::get_reference_location() const
- {
- Assert(particle != map->end(), ExcInternalError());
-
- return particle->second.get_reference_location();
- }
-
-
-
- template <int dim, int spacedim>
- types::particle_index
- ParticleAccessor<dim, spacedim>::get_id() const
- {
- Assert(particle != map->end(), ExcInternalError());
-
- return particle->second.get_id();
- }
-
-
-
- template <int dim, int spacedim>
- void
- ParticleAccessor<dim, spacedim>::set_property_pool(
- PropertyPool &new_property_pool)
- {
- Assert(particle != map->end(), ExcInternalError());
-
- particle->second.set_property_pool(new_property_pool);
- }
-
-
-
- template <int dim, int spacedim>
- bool
- ParticleAccessor<dim, spacedim>::has_properties() const
- {
- Assert(particle != map->end(), ExcInternalError());
-
- return particle->second.has_properties();
- }
-
-
-
- template <int dim, int spacedim>
- void
- ParticleAccessor<dim, spacedim>::set_properties(
- const std::vector<double> &new_properties)
- {
- Assert(particle != map->end(), ExcInternalError());
-
- particle->second.set_properties(new_properties);
- }
-
-
-
- template <int dim, int spacedim>
- void
- ParticleAccessor<dim, spacedim>::set_properties(
- const ArrayView<const double> &new_properties)
- {
- Assert(particle != map->end(), ExcInternalError());
-
- particle->second.set_properties(new_properties);
- }
-
-
-
- template <int dim, int spacedim>
- const ArrayView<const double>
- ParticleAccessor<dim, spacedim>::get_properties() const
- {
- Assert(particle != map->end(), ExcInternalError());
-
- return particle->second.get_properties();
- }
-
-
-
- template <int dim, int spacedim>
- typename Triangulation<dim, spacedim>::cell_iterator
- ParticleAccessor<dim, spacedim>::get_surrounding_cell(
- const Triangulation<dim, spacedim> &triangulation) const
- {
- Assert(particle != map->end(), ExcInternalError());
-
- const typename Triangulation<dim, spacedim>::cell_iterator cell(
- &triangulation, particle->first.first, particle->first.second);
- return cell;
- }
-
-
-
- template <int dim, int spacedim>
- const ArrayView<double>
- ParticleAccessor<dim, spacedim>::get_properties()
- {
- Assert(particle != map->end(), ExcInternalError());
-
- return particle->second.get_properties();
- }
-
-
-
- template <int dim, int spacedim>
- std::size_t
- ParticleAccessor<dim, spacedim>::serialized_size_in_bytes() const
- {
- Assert(particle != map->end(), ExcInternalError());
-
- return particle->second.serialized_size_in_bytes();
- }
-
-
-
- template <int dim, int spacedim>
- void
- ParticleAccessor<dim, spacedim>::next()
- {
- Assert(particle != map->end(), ExcInternalError());
- ++particle;
- }
-
-
-
- template <int dim, int spacedim>
- void
- ParticleAccessor<dim, spacedim>::prev()
- {
- Assert(particle != map->begin(), ExcInternalError());
- --particle;
- }
-
-
-
- template <int dim, int spacedim>
- bool
- ParticleAccessor<dim, spacedim>::
- operator!=(const ParticleAccessor<dim, spacedim> &other) const
- {
- return (map != other.map) || (particle != other.particle);
- }
-
-
-
- template <int dim, int spacedim>
- bool
- ParticleAccessor<dim, spacedim>::
- operator==(const ParticleAccessor<dim, spacedim> &other) const
- {
- return (map == other.map) && (particle == other.particle);
- }
-} // namespace Particles
-
-DEAL_II_NAMESPACE_CLOSE
-
-DEAL_II_NAMESPACE_OPEN
-
-#include "particle_accessor.inst"
-
-DEAL_II_NAMESPACE_CLOSE
+++ /dev/null
-// ---------------------------------------------------------------------
-//
-// Copyright (C) 2017 - 2018 by the deal.II authors
-//
-// This file is part of the deal.II library.
-//
-// The deal.II library is free software; you can use it, redistribute
-// it, and/or modify it under the terms of the GNU Lesser General
-// Public License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-// The full text of the license can be found in the file LICENSE.md at
-// the top level directory of deal.II.
-//
-// ---------------------------------------------------------------------
-
-
-for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS)
- {
-#if deal_II_dimension <= deal_II_space_dimension
- namespace Particles
- \{
- template class ParticleAccessor<deal_II_dimension,
- deal_II_space_dimension>;
- \}
-#endif
- }
+++ /dev/null
-// ---------------------------------------------------------------------
-//
-// Copyright (C) 2017 - 2019 by the deal.II authors
-//
-// This file is part of the deal.II library.
-//
-// The deal.II library is free software; you can use it, redistribute
-// it, and/or modify it under the terms of the GNU Lesser General
-// Public License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-// The full text of the license can be found in the file LICENSE.md at
-// the top level directory of deal.II.
-//
-// ---------------------------------------------------------------------
-
-#include <deal.II/particles/particle_iterator.h>
-
-DEAL_II_NAMESPACE_OPEN
-
-namespace Particles
-{
- template <int dim, int spacedim>
- ParticleIterator<dim, spacedim>::ParticleIterator(
- const std::multimap<internal::LevelInd, Particle<dim, spacedim>> &map,
- const typename std::multimap<internal::LevelInd,
- Particle<dim, spacedim>>::iterator & particle)
- : accessor(map, particle)
- {}
-
-
-
- template <int dim, int spacedim>
- ParticleAccessor<dim, spacedim> &ParticleIterator<dim, spacedim>::operator*()
- {
- return accessor;
- }
-
-
-
- template <int dim, int spacedim>
- ParticleAccessor<dim, spacedim> *ParticleIterator<dim, spacedim>::operator->()
- {
- return &(this->operator*());
- }
-
-
-
- template <int dim, int spacedim>
- const ParticleAccessor<dim, spacedim> &ParticleIterator<dim, spacedim>::
- operator*() const
- {
- return accessor;
- }
-
-
-
- template <int dim, int spacedim>
- const ParticleAccessor<dim, spacedim> *ParticleIterator<dim, spacedim>::
- operator->() const
- {
- return &(this->operator*());
- }
-
-
-
- template <int dim, int spacedim>
- bool
- ParticleIterator<dim, spacedim>::
- operator!=(const ParticleIterator<dim, spacedim> &other) const
- {
- return accessor != other.accessor;
- }
-
-
-
- template <int dim, int spacedim>
- bool
- ParticleIterator<dim, spacedim>::
- operator==(const ParticleIterator<dim, spacedim> &other) const
- {
- return accessor == other.accessor;
- }
-
-
-
- template <int dim, int spacedim>
- ParticleIterator<dim, spacedim> &
- ParticleIterator<dim, spacedim>::operator++()
- {
- accessor.next();
- return *this;
- }
-
-
-
- template <int dim, int spacedim>
- ParticleIterator<dim, spacedim>
- ParticleIterator<dim, spacedim>::operator++(int)
- {
- ParticleIterator tmp(*this);
- operator++();
-
- return tmp;
- }
-
-
-
- template <int dim, int spacedim>
- ParticleIterator<dim, spacedim> &
- ParticleIterator<dim, spacedim>::operator--()
- {
- accessor.prev();
- return *this;
- }
-
-
-
- template <int dim, int spacedim>
- ParticleIterator<dim, spacedim>
- ParticleIterator<dim, spacedim>::operator--(int)
- {
- ParticleIterator tmp(*this);
- operator--();
-
- return tmp;
- }
-} // namespace Particles
-
-
-DEAL_II_NAMESPACE_CLOSE
-
-DEAL_II_NAMESPACE_OPEN
-
-#include "particle_iterator.inst"
-
-DEAL_II_NAMESPACE_CLOSE
+++ /dev/null
-// ---------------------------------------------------------------------
-//
-// Copyright (C) 2017 - 2018 by the deal.II authors
-//
-// This file is part of the deal.II library.
-//
-// The deal.II library is free software; you can use it, redistribute
-// it, and/or modify it under the terms of the GNU Lesser General
-// Public License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-// The full text of the license can be found in the file LICENSE.md at
-// the top level directory of deal.II.
-//
-// ---------------------------------------------------------------------
-
-
-for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS)
- {
-#if deal_II_dimension <= deal_II_space_dimension
- namespace Particles
- \{
- template class ParticleIterator<deal_II_dimension,
- deal_II_space_dimension>;
- \}
-#endif
- }