diff --git a/FF/Velocity.C b/FF/Velocity.C index 28092919..f9ecfe61 100644 --- a/FF/Velocity.C +++ b/FF/Velocity.C @@ -8,20 +8,19 @@ preciceAdapter::FF::Velocity::Velocity( const std::string nameU, const std::string namePhi, bool fluxCorrection) -: U_( - const_cast( - &mesh.lookupObject(nameU))), - phi_(const_cast( - &mesh.lookupObject(namePhi))), +: phi_(const_cast( + &mesh.lookupObject(namePhi))), fluxCorrection_(fluxCorrection) { if (mesh.foundObject(nameU)) { + adapterInfo("Using existing velocity object " + nameU, "debug"); U_ = const_cast( &mesh.lookupObject(nameU)); } else { + adapterInfo("Creating a new velocity object " + nameU, "debug"); U_ = new volVectorField( IOobject( nameU, diff --git a/changelog-entries/330.md b/changelog-entries/330.md new file mode 100644 index 00000000..5dce487f --- /dev/null +++ b/changelog-entries/330.md @@ -0,0 +1 @@ +- Fixed looking for velocity object that should first be created by the adapter [#330](https://github.com/precice/openfoam-adapter/pull/330).