16 #ifndef dealii__vector_memory_h 17 #define dealii__vector_memory_h 20 #include <deal.II/base/config.h> 21 #include <deal.II/base/smartpointer.h> 22 #include <deal.II/base/logstream.h> 23 #include <deal.II/base/thread_management.h> 24 #include <deal.II/lac/vector.h> 29 DEAL_II_NAMESPACE_OPEN
70 template<
typename VectorType = ::Vector<
double> >
87 virtual VectorType *
alloc () = 0;
93 virtual void free (
const VectorType *
const) = 0;
104 "You are trying to deallocate a vector from a memory pool, but this " 105 "vector has not actually been allocated by the same pool before.");
138 operator VectorType *()
const;
172 template<
typename VectorType = ::Vector<
double> >
192 return new VectorType();
203 virtual void free (
const VectorType *
const v)
235 template<
typename VectorType = ::Vector<
double> >
266 virtual VectorType *
alloc ();
275 virtual void free (
const VectorType *
const);
357 void release_all_unused_memory();
367 template <
typename VectorType>
371 pool(&mem, typeid(*this).name()), v(0)
377 template <
typename VectorType>
390 template <
typename VectorType>
398 template <
typename VectorType>
406 template <
typename VectorType>
416 DEAL_II_NAMESPACE_CLOSE
virtual VectorType * alloc()=0
static void release_unused_memory()
virtual VectorType * alloc()
SmartPointer< VectorMemory< VectorType >, Pointer > pool
void initialize(const size_type size)
std::vector< entry_type > * data
virtual void free(const VectorType *const)=0
std::pair< bool, VectorType * > entry_type
static ::ExceptionBase & ExcNotAllocatedHere()
GrowingVectorMemory(const size_type initial_size=0, const bool log_statistics=false)
VectorType & operator*() const
unsigned int global_dof_index
virtual VectorType * alloc()
#define DeclExceptionMsg(Exception, defaulttext)
static Threads::Mutex mutex
virtual void free(const VectorType *const)
virtual ~GrowingVectorMemory()
VectorType * operator->() const
virtual void free(const VectorType *const v)
Pointer(VectorMemory< VectorType > &mem)
virtual std::size_t memory_consumption() const
types::global_dof_index size_type