[Dune] C++ question

Mike Rosing eresrch at sdf.org
Tue Aug 19 16:26:50 CEST 2025


In dune/istl/bcrsmatrix.hh it says " - VariableBCRSMatrix is not yet 
implemented."  Does that mean I can't do what I'm attempting: to create
a BCRSMatrix with variable dimensions?


On Mon, 18 Aug 2025, Mike Rosing wrote:

> Date: Mon, 18 Aug 2025 19:31:22 +0000 (UTC)
> From: Mike Rosing <eresrch at sdf.org>
> To: dune at lists.dune-project.org
> Subject: [Dune] C++ question
> 
> I'm trying to create a BCRSMatrix of runtime sized Matrix. I tried
>
>  typedef Matrix<double> occupy(np, np);
>  BCRSMatrix<occupy> stiffns(4*numelement, 4*numelement, 9, .12,
>                             BCRSMatrix<occupy>::implicit);
>
>
> and several other iterations - but I obviously don't understand what I'm 
> doing.  The "occupy" matrix is mostly full, the "stiffns" matrix is mostly
> empty.
>
> In case it matters, the list of includes is
> #include <iostream>
> #include <fstream>
> #include <dune/common/parallel/mpihelper.hh> // An initializer of MPI
> // #include <dune/common/exceptions.hh> // We use exceptions
> #include <dune/grid/uggrid.hh>
> #include <dune/grid/io/file/gmshreader.hh>
> #include <dune/geometry/affinegeometry.hh>
> #include <dune/istl/matrix.hh>
>
> // { include_matrix_vector_begin }
> #include <dune/istl/bcrsmatrix.hh>
> #include <dune/istl/bvector.hh>
> // { include_matrix_vector_end }
>
> #include <dune/istl/matrixindexset.hh>
> #include <dune/istl/preconditioners.hh>
> #include <dune/istl/solvers.hh>
> #include <dune/istl/matrixmarket.hh>
>
> What's the correct way to set up this kind of structure?
>
> Mike Rosing
> Engineering Research
> Madison WI USA
> Elliptic Curve Crypto:  http://mng.bz/D9NA
>
>
> _______________________________________________
> Dune mailing list
> Dune at lists.dune-project.org
> https://lists.dune-project.org/mailman/listinfo/dune
>
>

Mike Rosing
Engineering Research
Madison WI USA
Elliptic Curve Crypto:  http://mng.bz/D9NA




More information about the Dune mailing list