Skip to content
Snippets Groups Projects
Commit 5e9faaed authored by Carsten Gräser's avatar Carsten Gräser
Browse files

[examples] Fix matrix/vector types of examples

The nested matrix and vector types should correspond
to the index tree of the basis. Here, this is not the
case since `Field*<T,*>` was used instead of `T`.
While this is in many cases no problem, it may fail
if the matrix is recursively traversed with `IsNumber`
as termination criterion.
parent 640783c7
No related branches found
No related tags found
1 merge request!256[examples] Fix matrix/vector types of examples
Pipeline #76492 passed
......@@ -101,9 +101,9 @@ int main (int argc, char *argv[])
// Stiffness matrix and right hand side vector
/////////////////////////////////////////////////////////
using Matrix = Dune::Matrix<Dune::BCRSMatrix<Dune::FieldMatrix<double,1,1> > >;
using Vector = Dune::BlockVector<Dune::BlockVector<Dune::FieldVector<double,1> > >;
using BitVector = Dune::BlockVector<Dune::BlockVector<Dune::FieldVector<char,1> > >;
using Matrix = Dune::Matrix<Dune::BCRSMatrix<double> >;
using Vector = Dune::BlockVector<Dune::BlockVector<double> >;
using BitVector = Dune::BlockVector<Dune::BlockVector<char> >;
using Functions::istlVectorBackend;
......
......@@ -228,8 +228,8 @@ int main (int argc, char *argv[]) try
// Stiffness matrix and right hand side vector
/////////////////////////////////////////////////////////
using Vector = Dune::BlockVector<Dune::FieldVector<double,1>>;
using Matrix = Dune::BCRSMatrix<Dune::FieldMatrix<double,1,1>>;
using Vector = Dune::BlockVector<double>;
using Matrix = Dune::BCRSMatrix<double>;
Vector rhs;
Matrix stiffnessMatrix;
......
......@@ -191,9 +191,9 @@ int main (int argc, char *argv[]) try
using Matrix = MultiTypeBlockMatrix<MatrixRow0,MatrixRow1>;
// { linear_algebra_setup_end }
#else
using Vector = BlockVector<BlockVector<FieldVector<double,1> > >;
using BitVector = BlockVector<BlockVector<FieldVector<char,1> > >;
using Matrix = Dune::Matrix<BCRSMatrix<FieldMatrix<double,1,1> > >;
using Vector = BlockVector<BlockVector<double> >;
using BitVector = BlockVector<BlockVector<char> >;
using Matrix = Dune::Matrix<BCRSMatrix<double> >;
#endif
/////////////////////////////////////////////////////////
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment