// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root // SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- // vi: set et ts=4 sw=2 sts=2: #include #include #include #include #include #include "laplacian.hh" int main(int argc, char** argv) { const int BS=1; int N=100; if(argc>1) N = atoi(argv[1]); std::cout << "testing for N=" << N << " BS=" << BS << std::endl; typedef Dune::FieldMatrix MatrixBlock; typedef Dune::BCRSMatrix BCRSMat; typedef Dune::FieldVector VectorBlock; typedef Dune::BlockVector Vector; typedef Dune::MatrixAdapter Operator; BCRSMat mat; Operator fop(mat); Vector b(N*N), x(N*N); setupLaplacian(mat,N); b=1; x=0; Dune::Timer watch; watch.reset(); int iter=1000; for(int i=0; i< iter; ++i) fop.apply(x,b); std::cout<