diff --git a/opm/models/io/baseoutputmodule.hh b/opm/models/io/baseoutputmodule.hh index 36bc78b32..81ca8fe2e 100644 --- a/opm/models/io/baseoutputmodule.hh +++ b/opm/models/io/baseoutputmodule.hh @@ -38,10 +38,11 @@ #include #include -#include +#include #include #include -#include +#include +#include #include @@ -422,7 +423,7 @@ protected: { char name[512]; for (unsigned i = 0; i < numPhases; ++i) { - snprintf(name, 512, pattern, FluidSystem::phaseName(i)); + snprintf(name, 512, pattern, FluidSystem::phaseName(i).data()); if (bufferType == DofBuffer) DiscBaseOutputModule::attachScalarDofData_(baseWriter, buffer[i], name); @@ -445,7 +446,7 @@ protected: { char name[512]; for (unsigned i = 0; i < numComponents; ++i) { - snprintf(name, 512, pattern, FluidSystem::componentName(i)); + snprintf(name, 512, pattern, FluidSystem::componentName(i).data()); if (bufferType == DofBuffer) DiscBaseOutputModule::attachScalarDofData_(baseWriter, buffer[i], name); @@ -470,8 +471,8 @@ protected: for (unsigned i= 0; i < numPhases; ++i) { for (unsigned j = 0; j < numComponents; ++j) { snprintf(name, 512, pattern, - FluidSystem::phaseName(i), - FluidSystem::componentName(j)); + FluidSystem::phaseName(i).data(), + FluidSystem::componentName(j).data()); if (bufferType == DofBuffer) DiscBaseOutputModule::attachScalarDofData_(baseWriter, buffer[i][j], name); diff --git a/opm/models/io/vtkdiscretefracturemodule.hh b/opm/models/io/vtkdiscretefracturemodule.hh index f0b771513..7496d33e0 100644 --- a/opm/models/io/vtkdiscretefracturemodule.hh +++ b/opm/models/io/vtkdiscretefracturemodule.hh @@ -38,6 +38,7 @@ #include #include +#include namespace Opm::Properties { @@ -308,7 +309,7 @@ public: std::max(1e-20, fractureVelocityWeight_[phaseIdx][dofIdx]); // commit the phase velocity char name[512]; - snprintf(name, 512, "fractureFilterVelocity_%s", FluidSystem::phaseName(phaseIdx)); + snprintf(name, 512, "fractureFilterVelocity_%s", FluidSystem::phaseName(phaseIdx).data()); DiscBaseOutputModule::attachVectorDofData_(baseWriter, fractureVelocity_[phaseIdx], name); } diff --git a/opm/models/io/vtkmultiphasemodule.hh b/opm/models/io/vtkmultiphasemodule.hh index 33ff5a209..13664f10a 100644 --- a/opm/models/io/vtkmultiphasemodule.hh +++ b/opm/models/io/vtkmultiphasemodule.hh @@ -39,6 +39,7 @@ #include #include +#include namespace Opm::Properties { @@ -376,7 +377,7 @@ public: velocity_[phaseIdx][i] /= velocityWeight_[phaseIdx][i]; // commit the phase velocity char name[512]; - snprintf(name, 512, "filterVelocity_%s", FluidSystem::phaseName(phaseIdx)); + snprintf(name, 512, "filterVelocity_%s", FluidSystem::phaseName(phaseIdx).data()); DiscBaseOutputModule::attachVectorDofData_(baseWriter, velocity_[phaseIdx], name); } @@ -392,7 +393,7 @@ public: potentialGradient_[phaseIdx][i] /= potentialWeight_[phaseIdx][i]; // commit the phase velocity char name[512]; - snprintf(name, 512, "gradP_%s", FluidSystem::phaseName(phaseIdx)); + snprintf(name, 512, "gradP_%s", FluidSystem::phaseName(phaseIdx).data()); DiscBaseOutputModule::attachVectorDofData_(baseWriter, potentialGradient_[phaseIdx],