Commit b877553f authored by niklas.baumgarten's avatar niklas.baumgarten
Browse files

moved matrix graph

parent c93f9825
......@@ -5,9 +5,7 @@
void CirculantEmbedding1D::generateFineSample(SampleID id,
Vector *&fineSample,
Vector *&coarseSample) {
MatrixGraphs cellMatrixGraphs(this->meshes, dof(new CellDoF(1)));
fineSample = new Vector(cellMatrixGraphs[id.level - this->meshes.pLevel()]);
coarseSample = nullptr;
fineSample = new Vector(cellMGraphs[id.level - this->meshes.pLevel()]);
if (internalCounter == 0)
fineComplexField = generateField();
......@@ -29,6 +27,8 @@ void CirculantEmbedding1D::generateFineSample(SampleID id,
internalCounter += 1;
internalCounter %= 2;
if (coarseSample) delete coarseSample;
if (plotting)
plotter->PlotVector("kappa", *fineSample,
1, l, "CellData");
......@@ -37,8 +37,7 @@ void CirculantEmbedding1D::generateFineSample(SampleID id,
void CirculantEmbedding1D::generateCoarseSample(SampleID id,
Vector *&fineSample,
Vector *&coarseSample) {
MatrixGraphs cellMatrixGraphs(this->meshes, dof(new CellDoF(1)));
coarseSample = new Vector(cellMatrixGraphs[l - this->meshes.pLevel() - 1]);
coarseSample = new Vector(cellMGraphs[l - this->meshes.pLevel() - 1]);
(*coarseSample) = 0;
for (cell c = coarseSample->cells(); c != coarseSample->cells_end(); c++) {
......@@ -53,6 +52,8 @@ void CirculantEmbedding1D::generateCoarseSample(SampleID id,
coarseSample->operator()(coarseRow, i) /= c.Children();
}
if (fineSample) delete fineSample;
if (plotting)
plotter->PlotVector("kappa", *coarseSample, 1,
l - 1, "CellData");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment