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

CE adaption

parent b2135fc3
......@@ -4,7 +4,7 @@
void CirculantEmbedding1D::generateFineSample(const SampleID &id,
Vector *&fineSample,
Vector *&coarseSample) {
fineSample = new Vector(cellMGraphs[id.level.mGfine]);
fineSample = new Vector(cellMGraphs[id.level.fine - id.level.pLevel]);
if (internalCounter == 0)
fineComplexField = generateField(id);
......@@ -33,7 +33,7 @@ void CirculantEmbedding1D::generateFineSample(const SampleID &id,
void CirculantEmbedding1D::generateCoarseSample(const SampleID &id,
Vector *&fineSample,
Vector *&coarseSample) {
coarseSample = new Vector(cellMGraphs[id.level.mGcoarse]);
coarseSample = new Vector(cellMGraphs[id.level.coarse - id.level.pLevel]);
(*coarseSample) = 0;
for (cell c = coarseSample->cells(); c != coarseSample->cells_end(); c++) {
......@@ -155,7 +155,7 @@ SqrtEigenValues1D CirculantEmbedding1D::computeSqrtEV() {
void CirculantEmbedding2D::generateFineSample(const SampleID &id,
Vector *&fineSample,
Vector *&coarseSample) {
fineSample = new Vector(cellMGraphs[id.level.mGfine]);
fineSample = new Vector(cellMGraphs[id.level.fine - id.level.pLevel]);
if (internalCounter == 0)
fineComplexField = generateField(id);
......@@ -187,7 +187,7 @@ void CirculantEmbedding2D::generateFineSample(const SampleID &id,
void CirculantEmbedding2D::generateCoarseSample(const SampleID &id,
Vector *&fineSample,
Vector *&coarseSample) {
coarseSample = new Vector(cellMGraphs[id.level.mGcoarse]);
coarseSample = new Vector(cellMGraphs[id.level.coarse - id.level.pLevel]);
*coarseSample = 0;
for (cell c = coarseSample->cells(); c != coarseSample->cells_end(); ++c) {
......
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