16 #include <deal.II/particles/particle_accessor.h> 18 DEAL_II_NAMESPACE_OPEN
22 template <
int dim,
int spacedim>
23 ParticleAccessor<dim,spacedim>::ParticleAccessor ()
31 template <
int dim,
int spacedim>
32 ParticleAccessor<dim,spacedim>::ParticleAccessor (
const std::multimap<internal::LevelInd, Particle<dim,spacedim> > &map,
33 const typename std::multimap<internal::LevelInd, Particle<dim,spacedim> >::iterator &particle)
35 map (const_cast<
std::multimap<
internal::LevelInd, Particle<dim,spacedim> > *> (&map)),
41 template <
int dim,
int spacedim>
43 ParticleAccessor<dim,spacedim>::write_data (
void *&data)
const 45 Assert(particle != map->end(),
48 particle->second.write_data(data);
53 template <
int dim,
int spacedim>
55 ParticleAccessor<dim,spacedim>::set_location (
const Point<spacedim> &new_loc)
57 Assert(particle != map->end(),
60 particle->second.set_location(new_loc);
65 template <
int dim,
int spacedim>
67 ParticleAccessor<dim,spacedim>::get_location ()
const 69 Assert(particle != map->end(),
72 return particle->second.get_location();
77 template <
int dim,
int spacedim>
79 ParticleAccessor<dim,spacedim>::set_reference_location (
const Point<dim> &new_loc)
81 Assert(particle != map->end(),
84 particle->second.set_reference_location(new_loc);
89 template <
int dim,
int spacedim>
91 ParticleAccessor<dim,spacedim>::get_reference_location ()
const 93 Assert(particle != map->end(),
96 return particle->second.get_reference_location();
101 template <
int dim,
int spacedim>
103 ParticleAccessor<dim,spacedim>::get_id ()
const 105 Assert(particle != map->end(),
108 return particle->second.get_id();
113 template <
int dim,
int spacedim>
115 ParticleAccessor<dim,spacedim>::set_property_pool (PropertyPool &new_property_pool)
117 Assert(particle != map->end(),
120 particle->second.set_property_pool(new_property_pool);
125 template <
int dim,
int spacedim>
127 ParticleAccessor<dim,spacedim>::has_properties ()
const 129 Assert(particle != map->end(),
132 return particle->second.has_properties();
137 template <
int dim,
int spacedim>
139 ParticleAccessor<dim,spacedim>::set_properties (
const std::vector<double> &new_properties)
141 Assert(particle != map->end(),
144 particle->second.set_properties(new_properties);
150 template <
int dim,
int spacedim>
152 ParticleAccessor<dim,spacedim>::get_properties ()
const 154 Assert(particle != map->end(),
157 return particle->second.get_properties();
162 template <
int dim,
int spacedim>
166 Assert(particle != map->end(),
170 particle->first.first,
171 particle->first.second);
177 template <
int dim,
int spacedim>
179 ParticleAccessor<dim,spacedim>::get_properties ()
181 Assert(particle != map->end(),
184 return particle->second.get_properties();
189 template <
int dim,
int spacedim>
191 ParticleAccessor<dim,spacedim>::serialized_size_in_bytes ()
const 193 Assert(particle != map->end(),
196 return particle->second.serialized_size_in_bytes();
201 template <
int dim,
int spacedim>
203 ParticleAccessor<dim,spacedim>::next ()
211 template <
int dim,
int spacedim>
213 ParticleAccessor<dim,spacedim>::prev ()
221 template <
int dim,
int spacedim>
223 ParticleAccessor<dim,spacedim>::operator != (
const ParticleAccessor<dim,spacedim> &other)
const 225 return (map != other.map) || (particle != other.particle);
230 template <
int dim,
int spacedim>
232 ParticleAccessor<dim,spacedim>::operator == (
const ParticleAccessor<dim,spacedim> &other)
const 234 return (map == other.map) && (particle == other.particle);
238 DEAL_II_NAMESPACE_CLOSE
240 DEAL_II_NAMESPACE_OPEN
242 #include "particle_accessor.inst" 244 DEAL_II_NAMESPACE_CLOSE
unsigned int particle_index
#define Assert(cond, exc)
static ::ExceptionBase & ExcInternalError()