Reference documentation for deal.II version Git a0b41b6d0f 2020-02-26 20:08:13 -0600
\(\newcommand{\vcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\vcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
property_pool.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2017 - 2018 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.md at
12 // the top level directory of deal.II.
13 //
14 // ---------------------------------------------------------------------
15 
16 #ifndef dealii_particles_property_pool_h
17 #define dealii_particles_property_pool_h
18 
19 #include <deal.II/base/config.h>
20 
21 #include <deal.II/base/array_view.h>
22 
23 DEAL_II_NAMESPACE_OPEN
24 
25 namespace Particles
26 {
44  {
45  public:
51  using Handle = double *;
52 
56  static const Handle invalid_handle;
57 
61  PropertyPool(const unsigned int n_properties_per_slot);
62 
68  Handle
70 
76  void
77  deallocate_properties_array(const Handle handle);
78 
84  get_properties(const Handle handle);
85 
90  void
91  reserve(const std::size_t size);
92 
96  unsigned int
97  n_properties_per_slot() const;
98 
99  private:
103  const unsigned int n_properties;
104  };
105 
106 
107 } // namespace Particles
108 
109 DEAL_II_NAMESPACE_CLOSE
110 
111 #endif
const unsigned int n_properties
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:56
void reserve(const std::size_t size)
PropertyPool(const unsigned int n_properties_per_slot)
Handle allocate_properties_array()