Reference documentation for deal.II version 9.0.0
property_pool.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2017 by the deal.II authors
4 //
5 // This file is part of the deal.II library.
6 //
7 // The deal.II library is free software; you can use it, redistribute
8 // it, and/or modify it under the terms of the GNU Lesser General
9 // Public License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 // The full text of the license can be found in the file LICENSE at
12 // the top level of the deal.II distribution.
13 //
14 // ---------------------------------------------------------------------
15 
16 #ifndef dealii_particles_property_pool_h
17 #define dealii_particles_property_pool_h
18 
19 #include <deal.II/base/array_view.h>
20 
21 DEAL_II_NAMESPACE_OPEN
22 
23 namespace Particles
24 {
42  {
43  public:
49  typedef double *Handle;
50 
54  static const Handle invalid_handle;
55 
59  PropertyPool (const unsigned int n_properties_per_slot);
60 
67 
73  void deallocate_properties_array (const Handle handle);
74 
80 
85  void reserve(const std::size_t size);
86 
90  unsigned int n_properties_per_slot() const;
91 
92  private:
96  const unsigned int n_properties;
97  };
98 
99 
100 }
101 
102 DEAL_II_NAMESPACE_CLOSE
103 
104 #endif
const unsigned int n_properties
Definition: property_pool.h:96
ArrayView< double > get_properties(const Handle handle)
void deallocate_properties_array(const Handle handle)
unsigned int n_properties_per_slot() const
static const Handle invalid_handle
Definition: property_pool.h:54
void reserve(const std::size_t size)
PropertyPool(const unsigned int n_properties_per_slot)
Handle allocate_properties_array()