diff --git a/src/fvMotionSolver/pointPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValuePointPatchField.C b/src/fvMotionSolver/pointPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValuePointPatchField.C index 8bca126f9b..edcd775d3a 100644 --- a/src/fvMotionSolver/pointPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValuePointPatchField.C +++ b/src/fvMotionSolver/pointPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValuePointPatchField.C @@ -156,6 +156,47 @@ timeVaryingMappedFixedValuePointPatchField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +template +void Foam::timeVaryingMappedFixedValuePointPatchField::autoMap +( + const pointPatchFieldMapper& m +) +{ + fixedValuePointPatchField::autoMap(m); + if (startSampledValues_.size()) + { + startSampledValues_.autoMap(m); + endSampledValues_.autoMap(m); + } + // Clear interpolator + mapperPtr_.clear(); + startSampleTime_ = -1; + endSampleTime_ = -1; +} + + +template +void Foam::timeVaryingMappedFixedValuePointPatchField::rmap +( + const pointPatchField& ptf, + const labelList& addr +) +{ + fixedValuePointPatchField::rmap(ptf, addr); + + const timeVaryingMappedFixedValuePointPatchField& tiptf = + refCast >(ptf); + + startSampledValues_.rmap(tiptf.startSampledValues_, addr); + endSampledValues_.rmap(tiptf.endSampledValues_, addr); + + // Clear interpolator + mapperPtr_.clear(); + startSampleTime_ = -1; + endSampleTime_ = -1; +} + + template void Foam::timeVaryingMappedFixedValuePointPatchField::checkTable() { diff --git a/src/fvMotionSolver/pointPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValuePointPatchField.H b/src/fvMotionSolver/pointPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValuePointPatchField.H index 108ec6786e..942dc3e4a6 100644 --- a/src/fvMotionSolver/pointPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValuePointPatchField.H +++ b/src/fvMotionSolver/pointPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValuePointPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -167,6 +167,23 @@ public: void checkTable(); + // Mapping functions + + //- Map (and resize as needed) from self given a mapping object + virtual void autoMap + ( + const pointPatchFieldMapper& + ); + + //- Reverse map the given PointPatchField onto + // this PointPatchField + virtual void rmap + ( + const pointPatchField&, + const labelList& + ); + + // Evaluation functions //- Update the coefficients associated with the patch field diff --git a/src/mesh/autoMesh/autoHexMesh/refinementFeatures/refinementFeatures.C b/src/mesh/autoMesh/autoHexMesh/refinementFeatures/refinementFeatures.C index e72f13d726..9c8f08630f 100644 --- a/src/mesh/autoMesh/autoHexMesh/refinementFeatures/refinementFeatures.C +++ b/src/mesh/autoMesh/autoHexMesh/refinementFeatures/refinementFeatures.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -41,23 +41,31 @@ void Foam::refinementFeatures::read fileName featFileName(dict.lookup("file")); - set - ( - featI, - new featureEdgeMesh + { + IOobject featObj ( - IOobject + featFileName, // name + io.time().constant(), // instance + "triSurface", // local + io.time(), // registry + IOobject::MUST_READ, + IOobject::NO_WRITE, + false + ); + + autoPtr eMeshPtr = edgeMesh::New(featObj.filePath()); + + set + ( + featI, + new featureEdgeMesh ( - featFileName, // name - io.time().constant(), // instance - "triSurface", // local - io.time(), // registry - IOobject::MUST_READ, - IOobject::NO_WRITE, - false + featObj, + eMeshPtr->points(), + eMeshPtr->edges() ) - ) - ); + ); + } const featureEdgeMesh& eMesh = operator[](featI); diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C index ba9416b6ed..90e6977a77 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -191,6 +191,35 @@ externalWallHeatFluxTemperatureFvPatchScalarField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::autoMap +( + const fvPatchFieldMapper& m +) +{ + mixedFvPatchScalarField::autoMap(m); + q_.autoMap(m); + h_.autoMap(m); + Ta_.autoMap(m); +} + + +void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::rmap +( + const fvPatchScalarField& ptf, + const labelList& addr +) +{ + mixedFvPatchScalarField::rmap(ptf, addr); + + const externalWallHeatFluxTemperatureFvPatchScalarField& tiptf = + refCast(ptf); + + q_.rmap(tiptf.q_, addr); + h_.rmap(tiptf.h_, addr); + Ta_.rmap(tiptf.Ta_, addr); +} + + void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs() { if (updated()) diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.H b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.H index 44e96635ba..5fdaa446ee 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -185,6 +185,22 @@ public: // Member functions + // Mapping functions + + //- Map (and resize as needed) from self given a mapping object + virtual void autoMap + ( + const fvPatchFieldMapper& + ); + + //- Reverse map the given fvPatchField onto this fvPatchField + virtual void rmap + ( + const fvPatchScalarField&, + const labelList& + ); + + // Evaluation functions //- Update the coefficients associated with the patch field