Commit 7f80e4a6 authored by jonas.kusch's avatar jonas.kusch
Browse files

return density vector for phantom2d

parent 21547b33
Pipeline #119899 canceled with stages
......@@ -24,8 +24,8 @@ VectorVector Phantom2D::SetupIC() {
std::vector<double> Phantom2D::GetDensity( const VectorVector& cellMidPoints ) {
std::string imageFile = "../tests/input/phantom.png";
std::string meshFile = _settings->GetMeshFile();
Matrix gsImage = createSU2MeshFromImage( imageFile, meshFile );
auto bounds = _mesh->GetBounds();
Matrix gsImage = createSU2MeshFromImage( imageFile, meshFile );
auto bounds = _mesh->GetBounds();
double xMin = bounds[0].first;
double xMax = bounds[0].second;
......@@ -46,6 +46,5 @@ std::vector<double> Phantom2D::GetDensity( const VectorVector& cellMidPoints ) {
for( unsigned i = 0; i < _mesh->GetNumCells(); ++i ) {
result[i] = std::clamp( interp( cellMidPoints[i][0], cellMidPoints[i][1] ), 0.0, 1.0 );
}
}
\ No newline at end of file
return result;
}
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