for (unsigned int i=200000; i<400000; ++i)
AssertDimension (a[i], true);
deallog << "OK" << std::endl;
-
- deallog << "Memory consumption: " << a.memory_consumption()
- << " for a.size()=" << a.size() << std::endl;
}
DEAL::Assignment: 0 0 1 0 1 0 1
DEAL::Check large initialization: OK
DEAL::Check large resize: OK
-DEAL::Memory consumption: 400024 for a.size()=400000
+++ /dev/null
-// ---------------------------------------------------------------------
-//
-// Copyright (C) 2016 by the deal.II authors
-//
-// This file is part of the deal.II library.
-//
-// The deal.II library is free software; you can use it, redistribute
-// it, and/or modify it under the terms of the GNU Lesser General
-// Public License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-// The full text of the license can be found in the file LICENSE at
-// the top level of the deal.II distribution.
-//
-// ---------------------------------------------------------------------
-
-// Test SymmetricTensor::memory_consumption
-
-#include "../tests.h"
-#include <deal.II/base/symmetric_tensor.h>
-#include <deal.II/base/logstream.h>
-#include <deal.II/base/memory_consumption.h>
-
-
-template <int rank, int dim>
-void check ()
-{
- deallog << "dim=" << dim << ", T=double "
- << MemoryConsumption::memory_consumption (SymmetricTensor<rank,dim>())
- << std::endl;
- deallog << "dim=" << dim << ", T=complex<double> "
- << MemoryConsumption::memory_consumption (SymmetricTensor<rank,dim,std::complex<double> >())
- << std::endl;
-}
-
-
-int main ()
-{
- std::ofstream logfile("output");
- deallog << std::setprecision(3);
- deallog.attach(logfile);
- deallog.threshold_double(1.e-10);
-
- deallog << "check rank 2 tensors" << std::endl;
- check<2,1>();
- check<2,2>();
- check<2,3>();
-
- deallog << "check rank 4 tensors" << std::endl;
- check<4,1>();
- check<4,2>();
- check<4,3>();
-
- deallog << "OK" << std::endl;
-}
+++ /dev/null
-
-DEAL::check rank 2 tensors
-DEAL::dim=1, T=double 8
-DEAL::dim=1, T=complex<double> 16
-DEAL::dim=2, T=double 24
-DEAL::dim=2, T=complex<double> 48
-DEAL::dim=3, T=double 48
-DEAL::dim=3, T=complex<double> 96
-DEAL::check rank 4 tensors
-DEAL::dim=1, T=double 8
-DEAL::dim=1, T=complex<double> 16
-DEAL::dim=2, T=double 72
-DEAL::dim=2, T=complex<double> 144
-DEAL::dim=3, T=double 288
-DEAL::dim=3, T=complex<double> 576
-DEAL::OK
const unsigned int col) const;
void set_diagonal (const Vector<number> &diagonal);
- std::size_t memory_consumption () const;
-
private:
void local_apply (const MatrixFree<dim,number> &data,
Vector<double> &dst,
- template <int dim, int fe_degree, typename number>
- std::size_t
- LaplaceOperator<dim,fe_degree,number>::memory_consumption () const
- {
- return (data.memory_consumption () +
- coefficient.memory_consumption() +
- diagonal_values.memory_consumption() +
- MemoryConsumption::memory_consumption(diagonal_is_available));
- }
-
-
-
-
template <int dim>
class LaplaceProblem
{
MGTransferPrebuilt<Vector<double> > >
preconditioner(dof_handler, mg, mg_transfer);
- const std::size_t multigrid_memory
- = (mg_matrices.memory_consumption() +
- mg_transfer.memory_consumption() +
- coarse_matrix.memory_consumption());
-
SolverControl solver_control (1000, 1e-12*system_rhs.l2_norm());
SolverCG<> cg (solver_control);
return 0;
}
-
+++ /dev/null
-// ---------------------------------------------------------------------
-//
-// Copyright (C) 2016 by the deal.II authors
-//
-// This file is part of the deal.II library.
-//
-// The deal.II library is free software; you can use it, redistribute
-// it, and/or modify it under the terms of the GNU Lesser General
-// Public License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-// The full text of the license can be found in the file LICENSE at
-// the top level of the deal.II distribution.
-//
-// ---------------------------------------------------------------------
-
-
-// check memory consumption parallel vector
-
-#include "../tests.h"
-#include <deal.II/base/utilities.h>
-#include <deal.II/base/index_set.h>
-#include <deal.II/lac/la_parallel_block_vector.h>
-#include <fstream>
-#include <iostream>
-#include <vector>
-
-
-void test ()
-{
- unsigned int myid = Utilities::MPI::this_mpi_process (MPI_COMM_WORLD);
- unsigned int numproc = Utilities::MPI::n_mpi_processes (MPI_COMM_WORLD);
-
- if (myid==0) deallog << "numproc=" << numproc << std::endl;
-
-
- // each processor from processor 1 to 8 owns 2 indices (the other processors
- // do not own any dof), and all processors are ghosting element 1
- IndexSet local_owned(30);
- if (myid == 0)
- local_owned.add_range(0,20);
- else
- local_owned.add_range(std::min(20U,20*myid),30U);
- IndexSet local_relevant(30);
- local_relevant = local_owned;
- local_relevant.add_range(19,20);
-
- LinearAlgebra::distributed::Vector<double> v(local_owned, local_relevant,
- MPI_COMM_WORLD);
-
- deallog << v.memory_consumption() << std::endl;
-
- LinearAlgebra::distributed::BlockVector<double> w(3);
- for (unsigned int i=0; i<3; ++i)
- {
- w.block(i) = v;
- w.block(i) *= (i+1);
- }
- w.collect_sizes();
-
- deallog << w.memory_consumption() << std::endl;
-}
-
-
-
-int main (int argc, char **argv)
-{
- Utilities::MPI::MPI_InitFinalize mpi_initialization (argc, argv, testing_max_num_threads());
-
- MPILogInitAll log;
- test();
-}
+++ /dev/null
-
-DEAL:0::numproc=2
-DEAL:0::599
-DEAL:0::1476
-
-DEAL:1::519
-DEAL:1::1254
-
+++ /dev/null
-
-DEAL:0::numproc=2
-DEAL:0::569
-DEAL:0::1383
-
-DEAL:1::489
-DEAL:1::1161
-
+++ /dev/null
-
-DEAL:0::numproc=2
-DEAL:0::727
-DEAL:0::1548
-
-DEAL:1::647
-DEAL:1::1326
-
+++ /dev/null
-
-DEAL:0::numproc=2
-DEAL:0::675
-DEAL:0::1533
-
-DEAL:1::595
-DEAL:1::1311
-
+++ /dev/null
-
-DEAL:0::numproc=2
-DEAL:0::679
-DEAL:0::1536
-
-DEAL:1::599
-DEAL:1::1314
-
+++ /dev/null
-
-DEAL:0::numproc=2
-DEAL:0::643
-DEAL:0::1501
-
-DEAL:1::563
-DEAL:1::1279
-
+++ /dev/null
-
-DEAL:0::numproc=2
-DEAL:0::643
-DEAL:0::1525
-
-DEAL:1::563
-DEAL:1::1303
-
+++ /dev/null
-
-DEAL:0::numproc=2
-DEAL:0::719
-DEAL:0::1582
-
-DEAL:1::639
-DEAL:1::1360
-
+++ /dev/null
-
-DEAL:0::numproc=2
-DEAL:0::723
-DEAL:0::1585
-
-DEAL:1::643
-DEAL:1::1363
-