Skip to content

Commit

Permalink
Merge pull request fmihpc#327 from ursg/flowthrough_b
Browse files Browse the repository at this point in the history
In flowthrough test, assign B field only to BgB, not twice.
  • Loading branch information
ykempf authored Mar 16, 2017
2 parents 06f5d4d + c8713f9 commit 216871e
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions projects/Flowthrough/Flowthrough.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,21 +181,15 @@ namespace projects {

void Flowthrough::calcCellParameters(spatial_cell::SpatialCell* cell,creal& t) {
Real* cellParams = cell->get_cell_parameters();
cellParams[CellParams::PERBX] = this->Bx;
cellParams[CellParams::PERBY] = this->By;
cellParams[CellParams::PERBZ] = this->Bz;
cellParams[CellParams::PERBX] = 0.;
cellParams[CellParams::PERBY] = 0.;
cellParams[CellParams::PERBZ] = 0.;
}

void Flowthrough::setCellBackgroundField(spatial_cell::SpatialCell* cell) const {
if (Parameters::propagateField == true) {
ConstantField bgField;
bgField.initialize(0,0,0); //bg bx, by,bz
setBackgroundField(bgField,cell->parameters, cell->derivatives,cell->derivativesBVOL);
} else {
ConstantField bgField;
bgField.initialize(Bx,By,Bz); //bg bx, by,bz
setBackgroundField(bgField,cell->parameters, cell->derivatives,cell->derivativesBVOL);
}
ConstantField bgField;
bgField.initialize(Bx,By,Bz); //bg bx, by,bz
setBackgroundField(bgField,cell->parameters, cell->derivatives,cell->derivativesBVOL);
}

std::vector<std::array<Real, 3> > Flowthrough::getV0(
Expand Down

0 comments on commit 216871e

Please sign in to comment.