16#include "dune/istl/bvector.hh"
24 template <
class Entry>
43 template <
int n,
class Entry,
int m,
class A>
47 assert( (x.N()*m) % n == 0);
49 for (
int i=0; i<x.N(); ++i)
50 for (
int j=0; j<m; ++j)
62 template <
class Kb,
int nb,
int mb,
class Ka,
int na,
int ma>
63 DynamicMatrix<Dune::FieldMatrix<Kb,nb,mb>>
66 assert( (A.N()*na) % nb == 0 );
67 assert( (A.M()*ma) % mb == 0 );
70 for (
int j=0; j<A.M(); ++j)
71 for (
int i=0; i<A.N(); ++i)
72 for (
int k=0; k<na; ++k)
73 for (
int l=0; l<ma; ++l)
77 B[r/nb][c/mb][r%nb][c%mb] = A[i][j][k][l];
A LAPACK-compatible dense matrix class with shape specified at runtime.
Dune::BlockVector< Dune::FieldVector< double, dimOut > > reshapeBlocks(Dune::BlockVector< Dune::FieldVector< double, dimIn > > const &b)
reshapes a Dune::BlockVector block structure