diff --git a/src/thermophysicalModels/multicomponentThermo/include/GeometricFieldListSlicer.H b/src/thermophysicalModels/multicomponentThermo/include/GeometricFieldListSlicer.H index a600da840a..b239fdd872 100644 --- a/src/thermophysicalModels/multicomponentThermo/include/GeometricFieldListSlicer.H +++ b/src/thermophysicalModels/multicomponentThermo/include/GeometricFieldListSlicer.H @@ -74,21 +74,29 @@ public: inline GeometricFieldListSlicer() {} - //- Construct from a list of fields - inline GeometricFieldListSlicer(const PtrList& geoFields) + //- Construct from a mesh and a list of fields + inline GeometricFieldListSlicer + ( + const typename geoFieldType::Mesh& mesh, + const PtrList& geoFields + ) { - set(geoFields); + set(mesh, geoFields); } // Member Functions //- Set the field pointers - inline void set(const PtrList& geoFields) + inline void set + ( + const typename geoFieldType::Mesh& mesh, + const PtrList& geoFields + ) { fields_.resize(geoFields.size()); - patchFields_.resize(geoFields[0].boundaryField().size(), fields_); + patchFields_.resize(mesh.boundary().size(), fields_); forAll(geoFields, fieldi) { diff --git a/src/thermophysicalModels/multicomponentThermo/multicomponentThermo/multicomponentThermoI.H b/src/thermophysicalModels/multicomponentThermo/multicomponentThermo/multicomponentThermoI.H index 65f6107c64..846b1c9836 100644 --- a/src/thermophysicalModels/multicomponentThermo/multicomponentThermo/multicomponentThermoI.H +++ b/src/thermophysicalModels/multicomponentThermo/multicomponentThermo/multicomponentThermoI.H @@ -107,7 +107,7 @@ inline Foam::label Foam::multicomponentThermo::specieIndex inline Foam::volScalarFieldListSlicer Foam::multicomponentThermo::implementation::Yslicer() const { - return volScalarFieldListSlicer(Y_); + return volScalarFieldListSlicer(mesh(), Y_); } diff --git a/src/thermophysicalModels/multicomponentThermo/psiuMulticomponentThermo/psiuMulticomponentThermoI.H b/src/thermophysicalModels/multicomponentThermo/psiuMulticomponentThermo/psiuMulticomponentThermoI.H index fd5b8f6762..44b0df0abd 100644 --- a/src/thermophysicalModels/multicomponentThermo/psiuMulticomponentThermo/psiuMulticomponentThermoI.H +++ b/src/thermophysicalModels/multicomponentThermo/psiuMulticomponentThermo/psiuMulticomponentThermoI.H @@ -58,7 +58,7 @@ inline const Foam::volScalarField& Foam::psiuMulticomponentThermo::Y inline Foam::volScalarFieldListSlicer Foam::psiuMulticomponentThermo::implementation::Yslicer() const { - return volScalarFieldListSlicer(Y_); + return volScalarFieldListSlicer(mesh(), Y_); }