* at quadrature point <i>k</i>
*/
number quadrature_value(unsigned int k, unsigned int i) const;
+
+ /**
+ * The memory used by this object.
+ */
+ unsigned int memory_consumption () const;
private:
/**
template <class ASSEMBLER>
void assemble(ASSEMBLER& ass) const;
+ /**
+ * The memory used by this object.
+ */
+ unsigned int memory_consumption () const;
+
/**
* The data for the cell.
*/
std_cxx1x::shared_ptr<VectorDataBase<dim, spacedim> > global_data;
+ /**
+ * The memory used by this object.
+ */
+ unsigned int memory_consumption () const;
+
private:
/**
* Use the finite element
unsigned int n_boundary_points,
unsigned int n_face_points);
+ /**
+ * The memory used by this object.
+ */
+ unsigned int memory_consumption () const;
+
/**
* The set of update flags
* for boundary cell integration.
}
+ template<int dim, int sdim>
+ unsigned int
+ IntegrationInfo<dim,sdim>::memory_consumption () const
+ {
+ unsigned int mem = sizeof(*this)
+ + MemoryConsumption::memory_consumption(fevalv)
+ - sizeof (fevalv)
+ ;
+ for (unsigned int i=0;i<fevalv.size();++i)
+ mem += fevalv[i]->memory_consumption();
+ return mem;
+ }
+
//----------------------------------------------------------------------//
if (face) face_flags |= flags;
if (neighbor) neighbor_flags |= flags;
}
+
+
+ template<int dim, int sdim>
+ unsigned int
+ IntegrationInfoBox<dim,sdim>::memory_consumption () const
+ {
+ unsigned int mem = sizeof(*this)
+ + MemoryConsumption::memory_consumption(cell_quadrature)
+ - sizeof (cell_quadrature)
+ + MemoryConsumption::memory_consumption(boundary_quadrature)
+ - sizeof (boundary_quadrature)
+ + MemoryConsumption::memory_consumption(face_quadrature)
+ - sizeof (face_quadrature)
+ + MemoryConsumption::memory_consumption(cell_selector)
+ -sizeof (cell_selector)
+ + MemoryConsumption::memory_consumption(boundary_selector)
+ -sizeof (boundary_selector)
+ + MemoryConsumption::memory_consumption(face_selector)
+ -sizeof (face_selector)
+ + MemoryConsumption::memory_consumption(cell)
+ - sizeof(cell)
+ + MemoryConsumption::memory_consumption(boundary)
+ - sizeof(boundary)
+ + MemoryConsumption::memory_consumption(face)
+ - sizeof(face)
+ + MemoryConsumption::memory_consumption(subface)
+ - sizeof(subface)
+ + MemoryConsumption::memory_consumption(neighbor)
+ - sizeof(neighbor)
+ ;
+// if (cell_data != 0)
+// mem += MemoryConsumption::memory_consumption(*cell_data);
+// if (boundary_data != 0)
+// mem += MemoryConsumption::memory_consumption(*boundary_data);
+// if (face_data != 0)
+// mem += MemoryConsumption::memory_consumption(*face_data);
+
+ return mem;
+ }
}
template <class STREAM>
void print (STREAM& s) const;
+ /**
+ * The memory used by this object.
+ */
+ unsigned int memory_consumption () const;
+
protected:
/**
* Selection of the vectors
unsigned int n_comp,
unsigned int start,
unsigned int size) const;
+
+ /**
+ * The memory used by this object.
+ */
+ unsigned int memory_consumption () const;
};
unsigned int component,
unsigned int n_comp,
unsigned int start,
- unsigned int size) const;
+ unsigned int size) const;
+
+ /**
+ * The memory used by this object.
+ */
+ unsigned int memory_consumption () const;
+
private:
NamedData<SmartPointer<const VECTOR,VectorData<VECTOR,dim,spacedim> > > data;
};
unsigned int n_comp,
unsigned int start,
unsigned int size) const;
+
+ /**
+ * The memory used by this object.
+ */
+ unsigned int memory_consumption () const;
+
private:
NamedData<SmartPointer<const MGLevelObject<VECTOR>,MGVectorData<VECTOR,dim,spacedim> > > data;
};
s << " '" << v.name(hessian_selection(i)) << '\'';
s << std::endl;
}
+
+
+ inline unsigned int
+ VectorSelector::memory_consumption () const
+ {
+ unsigned int mem = sizeof(*this);
+ return mem;
+ }
+
}
+
DEAL_II_NAMESPACE_CLOSE
#endif
{
Assert(false, ExcNotImplemented());
}
+
+
//----------------------------------------------------------------------//
template <class VECTOR, int dim, int spacedim>
}
}
+
+ template <class VECTOR, int dim, int spacedim>
+ unsigned int
+ VectorData<VECTOR, dim, spacedim>::memory_consumption () const
+ {
+ unsigned int mem = VectorSelector::memory_consumption();
+ mem += sizeof (data);
+ return mem;
+ }
+
//----------------------------------------------------------------------//
template <class VECTOR, int dim, int spacedim>
fe.get_function_hessians(src, make_slice(index, start, size), dst, true);
}
}
+
+
+ template <class VECTOR, int dim, int spacedim>
+ unsigned int
+ MGVectorData<VECTOR, dim, spacedim>::memory_consumption () const
+ {
+ unsigned int mem = VectorSelector::memory_consumption();
+ mem += sizeof (data);
+ return mem;
+ }
}
DEAL_II_NAMESPACE_CLOSE
quadrature_values[k][i] = 0.;
}
+
+template <typename number>
+unsigned int
+LocalResults<number>::memory_consumption () const
+{
+ unsigned int mem = sizeof(*this)
+ + MemoryConsumption::memory_consumption(J)
+ + MemoryConsumption::memory_consumption(R)
+ + MemoryConsumption::memory_consumption(M1)
+ + MemoryConsumption::memory_consumption(M2)
+ + MemoryConsumption::memory_consumption(quadrature_values);
+ return mem;
+}
+
+
template class LocalResults<float>;
template class LocalResults<double>;
#include <base/named_data.h>
#include <base/smartpointer.h>
#include <base/std_cxx1x/shared_ptr.h>
+#include <base/memory_consumption.h>
#include <lac/block_indices.h>
#include <lac/block_sparsity_pattern.h>
#include <lac/sparse_matrix.h>
* matching #matrix.
*/
template<class VECTOR>
- void Tvmult_add (VECTOR& w, const VECTOR& v) const;
-
+ void Tvmult_add (VECTOR& w, const VECTOR& v) const;
+
+ /**
+ * The memory used by this object.
+ */
+ unsigned int memory_consumption () const;
+
/**
* The block number computed from
* an index by using
*/
void reinit(const BlockSparsityPattern& sparsity);
+ /**
+ * The memory used by this object.
+ */
+ unsigned int memory_consumption () const;
+
/**
* Access a constant reference to
* the block at position <i>i</i>.
*/
MatrixBlock<MATRIX>& block(unsigned int i);
+ /**
+ * The memory used by this object.
+ */
+ unsigned int memory_consumption () const;
+
/**
* Access the matrix at position
* <i>i</i> for read and write
}
+template <class MATRIX>
+inline
+unsigned int
+MatrixBlock<MATRIX>::memory_consumption () const
+{
+ unsigned int mem = sizeof(*this)
+ + MemoryConsumption::memory_consumption(matrix)
+ - sizeof(matrix);
+ return mem;
+}
//----------------------------------------------------------------------//