mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
copy ctor for MatrixFixWidth<W,double>
This commit is contained in:
parent
780e72bf81
commit
ebf1478048
@ -1380,6 +1380,6 @@ namespace netgen
|
||||
return ost;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -171,8 +171,14 @@ public:
|
||||
{ height = h; data = adata; ownmem = false; }
|
||||
///
|
||||
MatrixFixWidth (const MatrixFixWidth & m2)
|
||||
: height(m2.height), data(m2.data), ownmem(false)
|
||||
{ ; }
|
||||
: height(m2.height), ownmem(true)
|
||||
{
|
||||
data = new T[height*WIDTH];
|
||||
for (int i = 0; i < WIDTH*height; i++)
|
||||
data[i] = m2.data[i];
|
||||
}
|
||||
// : height(m2.height), data(m2.data), ownmem(false)
|
||||
//{ ; }
|
||||
///
|
||||
~MatrixFixWidth ()
|
||||
{ if (ownmem) delete [] data; }
|
||||
@ -277,6 +283,15 @@ public:
|
||||
///
|
||||
MatrixFixWidth (int h)
|
||||
{ height = h; data = new double[WIDTH*height]; ownmem = true; }
|
||||
|
||||
MatrixFixWidth (const MatrixFixWidth & m2)
|
||||
: height(m2.height), ownmem(true)
|
||||
{
|
||||
data = new double[height*WIDTH];
|
||||
for (int i = 0; i < WIDTH*height; i++)
|
||||
data[i] = m2.data[i];
|
||||
}
|
||||
|
||||
///
|
||||
MatrixFixWidth (int h, double * adata)
|
||||
{ height = h; data = adata; ownmem = false; }
|
||||
|
Loading…
Reference in New Issue
Block a user