Skip to content
Snippets Groups Projects
Commit d9259b48 authored by Oliver Sander's avatar Oliver Sander Committed by sander@FU-BERLIN.DE
Browse files

Support for square matrices

[[Imported from SVN: r8555]]
parent f3689993
No related branches found
No related tags found
No related merge requests found
...@@ -225,5 +225,28 @@ public: ...@@ -225,5 +225,28 @@ public:
}; };
/** \brief A class that creates sets of values of various types, to be used in unit tests
*
* This is the specialization for square FieldMatrices
*/
template <class T, int N>
class ValueFactory<Dune::FieldMatrix<T,N,N> >
{
public:
static void get(std::vector<Dune::FieldMatrix<T,N,N> >& values) {
int nTestPoints = 10;
values.resize(nTestPoints);
// Set up elements of T^{N \times N}
for (int i=0; i<nTestPoints; i++)
for (int j=0; j<N; j++)
for (int k=0; k<N; k++)
values[i][j][k] = std::rand();
}
};
#endif #endif
\ No newline at end of file
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