Skip to content
Snippets Groups Projects
Commit 35c38ce6 authored by Oliver Sander's avatar Oliver Sander
Browse files

Use the local constant SIZE instead of having '10' hardwired all over

the code.

Make SIZE protected instead of private so derived classes can use it.

[[Imported from SVN: r4164]]
parent a8b51ba7
Branches
Tags
No related merge requests found
......@@ -71,6 +71,8 @@ namespace Dune
typedef typename G::ctype DT;
typedef typename G::Traits::template Codim<0>::Entity Entity;
enum {n=G::dimension};
protected:
enum {SIZE=10};
public:
......@@ -159,7 +161,7 @@ namespace Dune
//! set the current size of the local stiffness matrix
void setcurrentsize (int s)
{
if (s>=10)
if (s>=SIZE)
DUNE_THROW(MathError,"LocalStiffness: increase SIZE");
currentsize_ = s;
}
......@@ -173,9 +175,9 @@ namespace Dune
protected:
// assembled data
int currentsize_;
MBlockType A[10][10];
VBlockType b[10];
BCBlockType bctype[10];
MBlockType A[SIZE][SIZE];
VBlockType b[SIZE];
BCBlockType bctype[SIZE];
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment