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

Add constructor from a scalar

[[Imported from SVN: r6425]]
parent 1a67eeea
No related branches found
No related tags found
No related merge requests found
......@@ -8,11 +8,23 @@
#include <dune/common/array.hh>
#include <dune/common/fmatrix.hh>
/** \brief A third-rank tensor
*/
template <class T, int N1, int N2, int N3>
class Tensor3
: public Dune::array<Dune::FieldMatrix<T,N2,N3>,N1>
{
public:
/** \brief Default constructor */
Tensor3() {}
/** \brief Constructor from a scalar */
Tensor3(const T& c)
{
for (int i=0; i<N1; i++)
(*this)[i] = c;
}
T infinity_norm() const
{
......
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