Reference documentation for deal.II version 8.4.1
Public Member Functions | List of all members
PrimitiveVectorMemory< VectorType > Class Template Reference

#include <deal.II/lac/vector_memory.h>

Inheritance diagram for PrimitiveVectorMemory< VectorType >:
[legend]

Public Member Functions

 PrimitiveVectorMemory ()
 
virtual VectorType * alloc ()
 
virtual void free (const VectorType *const v)
 
- Public Member Functions inherited from VectorMemory< VectorType >
virtual ~VectorMemory ()
 
 DeclException0 (ExcNoMoreVectors)
 
 DeclException0 (ExcNotAllocatedHere)
 
- Public Member Functions inherited from Subscriptor
 Subscriptor ()
 
 Subscriptor (const Subscriptor &)
 
virtual ~Subscriptor ()
 
Subscriptoroperator= (const Subscriptor &)
 
void subscribe (const char *identifier=0) const
 
void unsubscribe (const char *identifier=0) const
 
unsigned int n_subscriptions () const
 
void list_subscribers () const
 
 DeclException3 (ExcInUse, int, char *, std::string &,<< "Object of class "<< arg2<< " is still used by "<< arg1<< " other objects."<< "\n\n"<< "(Additional information: "<< arg3<< ")\n\n"<< "See the entry in the Frequently Asked Questions of "<< "deal.II (linked to from http://www.dealii.org/) for "<< "a lot more information on what this error means and "<< "how to fix programs in which it happens.")
 
 DeclException2 (ExcNoSubscriber, char *, char *,<< "No subscriber with identifier <"<< arg2<< "> subscribes to this object of class "<< arg1<< ". Consequently, it cannot be unsubscribed.")
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Detailed Description

template<typename VectorType = ::Vector<double>>
class PrimitiveVectorMemory< VectorType >

Simple memory management. See the documentation of the base class for a description of its purpose.

This class allocates and deletes vectors as needed from the global heap, i.e. performs no specially adapted actions for memory management.

Definition at line 166 of file vector_memory.h.

Constructor & Destructor Documentation

template<typename VectorType = ::Vector<double>>
PrimitiveVectorMemory< VectorType >::PrimitiveVectorMemory ( )
inline

Constructor.

Definition at line 172 of file vector_memory.h.

Member Function Documentation

template<typename VectorType = ::Vector<double>>
virtual VectorType* PrimitiveVectorMemory< VectorType >::alloc ( )
inlinevirtual

Return a pointer to a new vector. The number of elements or their subdivision into blocks (if applicable) is unspecified and users of this function should reset vectors to their proper size. The same holds for the contents of vectors: they are unspecified.

For the present class, calling this function will allocate a new vector on the heap and returning a pointer to it.

Implements VectorMemory< VectorType >.

Definition at line 183 of file vector_memory.h.

template<typename VectorType = ::Vector<double>>
virtual void PrimitiveVectorMemory< VectorType >::free ( const VectorType *const  v)
inlinevirtual

Return a vector and indicate that it is not going to be used any further by the instance that called alloc() to get a pointer to it.

For the present class, this means that the vector is returned to the global heap.

Implements VectorMemory< VectorType >.

Definition at line 196 of file vector_memory.h.


The documentation for this class was generated from the following file: