Commit e024fc99 authored by jannick.wolters's avatar jannick.wolters
Browse files

added normalized dose

parent ce9c9936
Pipeline #106295 passed with stages
in 28 minutes and 33 seconds
......@@ -151,9 +151,12 @@ void CSDSNSolver::Solve() {
}
void CSDSNSolver::Save() const {
std::vector<std::string> fieldNames{ "dose" };
std::vector<std::vector<double>> scalarField( 1, _dose );
std::vector<std::vector<std::vector<double>>> results{ scalarField };
std::vector<std::string> fieldNames{ "dose", "normalized dose" };
std::vector<std::vector<double>> dose( 1, _dose );
std::vector<std::vector<double>> normalizedDose( 1, _dose );
double maxDose = *std::max_element( _dose.begin(), _dose.end() );
for( unsigned i = 0; i < _dose.size(); ++i ) normalizedDose[0][i] /= maxDose;
std::vector<std::vector<std::vector<double>>> results{ dose, normalizedDose };
ExportVTK( _settings->GetOutputFile(), results, fieldNames, _mesh );
}
......
Supports Markdown
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