built restart utilities
This commit is contained in:
@@ -355,6 +355,24 @@ const CylinderBinning* PoissonSolver::densityBinning() {
|
||||
return &density_binning_;
|
||||
}
|
||||
|
||||
void PoissonSolver::setPotential(blitz::Array<double, 3>& potential) {
|
||||
// check if the loaded potential has the same size as the potential
|
||||
// specified by the json file
|
||||
if(!blitz::all(potential.length() == potential_.length())) {
|
||||
std::stringstream out;
|
||||
out << "The size of the potential is " << potential.length();
|
||||
out << ". But expected a size of " << potential_.length();
|
||||
ERROR(out.str());
|
||||
}
|
||||
for(int i = potential_.lbound(0); i <= potential_.ubound(0); ++i) {
|
||||
for(int j = potential_.lbound(1); j <= potential_.ubound(1); ++j) {
|
||||
for(int k = potential_.lbound(2); k <= potential_.ubound(2); ++k) {
|
||||
potential_(i,j,k).value = potential(i,j,k);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Electrode::Electrode(double potential): potential_(potential) {};
|
||||
|
||||
double Electrode::electrodePotential() {
|
||||
|
||||
Reference in New Issue
Block a user