diff --git a/src/dynamicMesh/fvMeshAdder/fvMeshAdder.C b/src/dynamicMesh/fvMeshAdder/fvMeshAdder.C index b3aa15ff3f268d5e6f53cf6afc274f94a1b8f6e1..f24dc996bf4623c696788a2859eef8c9bc6d68fa 100644 --- a/src/dynamicMesh/fvMeshAdder/fvMeshAdder.C +++ b/src/dynamicMesh/fvMeshAdder/fvMeshAdder.C @@ -71,7 +71,8 @@ Foam::autoPtr<Foam::mapAddedPolyMesh> Foam::fvMeshAdder::add fvMesh& mesh0, const fvMesh& mesh1, const faceCoupleInfo& coupleInfo, - const bool validBoundary + const bool validBoundary, + const bool fullyMapped ) { mesh0.clearOut(); @@ -101,17 +102,20 @@ Foam::autoPtr<Foam::mapAddedPolyMesh> Foam::fvMeshAdder::add // Do the mapping of the stored fields // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - fvMeshAdder::MapVolFields<scalar>(map, mesh0, mesh1); - fvMeshAdder::MapVolFields<vector>(map, mesh0, mesh1); - fvMeshAdder::MapVolFields<sphericalTensor>(map, mesh0, mesh1); - fvMeshAdder::MapVolFields<symmTensor>(map, mesh0, mesh1); - fvMeshAdder::MapVolFields<tensor>(map, mesh0, mesh1); - - fvMeshAdder::MapSurfaceFields<scalar>(map, mesh0, mesh1); - fvMeshAdder::MapSurfaceFields<vector>(map, mesh0, mesh1); - fvMeshAdder::MapSurfaceFields<sphericalTensor>(map, mesh0, mesh1); - fvMeshAdder::MapSurfaceFields<symmTensor>(map, mesh0, mesh1); - fvMeshAdder::MapSurfaceFields<tensor>(map, mesh0, mesh1); + fvMeshAdder::MapVolFields<scalar>(map, mesh0, mesh1, fullyMapped); + fvMeshAdder::MapVolFields<vector>(map, mesh0, mesh1, fullyMapped); + fvMeshAdder::MapVolFields<sphericalTensor>(map, mesh0, mesh1, fullyMapped); + fvMeshAdder::MapVolFields<symmTensor>(map, mesh0, mesh1, fullyMapped); + fvMeshAdder::MapVolFields<tensor>(map, mesh0, mesh1, fullyMapped); + + fvMeshAdder::MapSurfaceFields<scalar>(map, mesh0, mesh1, fullyMapped); + fvMeshAdder::MapSurfaceFields<vector>(map, mesh0, mesh1, fullyMapped); + fvMeshAdder::MapSurfaceFields<sphericalTensor> + ( + map, mesh0, mesh1, fullyMapped + ); + fvMeshAdder::MapSurfaceFields<symmTensor>(map, mesh0, mesh1, fullyMapped); + fvMeshAdder::MapSurfaceFields<tensor>(map, mesh0, mesh1, fullyMapped); fvMeshAdder::MapDimFields<scalar>(map, mesh0, mesh1); fvMeshAdder::MapDimFields<vector>(map, mesh0, mesh1); diff --git a/src/dynamicMesh/fvMeshAdder/fvMeshAdder.H b/src/dynamicMesh/fvMeshAdder/fvMeshAdder.H index e86792c396d834ef4abb11533777473263be5daf..413dc0a48d3a85276c7d76b05bda9525fe1806b3 100644 --- a/src/dynamicMesh/fvMeshAdder/fvMeshAdder.H +++ b/src/dynamicMesh/fvMeshAdder/fvMeshAdder.H @@ -89,7 +89,8 @@ private: const mapAddedPolyMesh& meshMap, GeometricField<Type, fvPatchField, volMesh>& fld, - const GeometricField<Type, fvPatchField, volMesh>& fldToAdd + const GeometricField<Type, fvPatchField, volMesh>& fldToAdd, + const bool fullyMapped ); //- Update single surfaceField. @@ -99,7 +100,8 @@ private: const mapAddedPolyMesh& meshMap, GeometricField<Type, fvsPatchField, surfaceMesh>& fld, - const GeometricField<Type, fvsPatchField, surfaceMesh>& fldToAdd + const GeometricField<Type, fvsPatchField, surfaceMesh>& fldToAdd, + const bool fullyMapped ); //- Update single dimensionedField. @@ -126,16 +128,21 @@ public: fvMesh& mesh0, const fvMesh& mesh1, const faceCoupleInfo& coupleInfo, - const bool validBoundary = true + const bool validBoundary = true, + const bool fullyMapped = false ); - //- Map all volFields of Type + //- Map all volFields of Type. + // Optionally override mapping detection + // of unmapped values (e.g. used in fvMeshDistribute since it fixes + // up mapping itself) template<class Type> static void MapVolFields ( const mapAddedPolyMesh&, const fvMesh& mesh, - const fvMesh& meshToAdd + const fvMesh& meshToAdd, + const bool fullyMapped = false ); //- Map all surfaceFields of Type @@ -144,7 +151,8 @@ public: ( const mapAddedPolyMesh&, const fvMesh& mesh, - const fvMesh& meshToAdd + const fvMesh& meshToAdd, + const bool fullyMapped = false ); //- Map all DimensionedFields of Type diff --git a/src/dynamicMesh/fvMeshAdder/fvMeshAdderTemplates.C b/src/dynamicMesh/fvMeshAdder/fvMeshAdderTemplates.C index b6640a354ece25acb94dc5dbd8b595ef43612b26..48a0456597ca2a749198001145ba5492b5c33f4f 100644 --- a/src/dynamicMesh/fvMeshAdder/fvMeshAdderTemplates.C +++ b/src/dynamicMesh/fvMeshAdder/fvMeshAdderTemplates.C @@ -36,7 +36,8 @@ void Foam::fvMeshAdder::MapVolField const mapAddedPolyMesh& meshMap, GeometricField<Type, fvPatchField, volMesh>& fld, - const GeometricField<Type, fvPatchField, volMesh>& fldToAdd + const GeometricField<Type, fvPatchField, volMesh>& fldToAdd, + const bool fullyMapped ) { const fvMesh& mesh = fld.mesh(); @@ -142,6 +143,12 @@ void Foam::fvMeshAdder::MapVolField directFvPatchFieldMapper patchMapper(newToOld); + // Override mapping (for use in e.g. fvMeshDistribute where + // it sorts mapping out itself) + if (fullyMapped) + { + patchMapper.hasUnmapped() = false; + } // Create new patchField with same type as existing one. // Note: @@ -204,6 +211,13 @@ void Foam::fvMeshAdder::MapVolField directFvPatchFieldMapper patchMapper(newToAdded); + // Override mapping (for use in e.g. fvMeshDistribute where + // it sorts mapping out itself) + if (fullyMapped) + { + patchMapper.hasUnmapped() = false; + } + bfld.set ( newPatchi, @@ -250,7 +264,8 @@ void Foam::fvMeshAdder::MapVolFields ( const mapAddedPolyMesh& meshMap, const fvMesh& mesh, - const fvMesh& meshToAdd + const fvMesh& meshToAdd, + const bool fullyMapped ) { HashTable<const GeometricField<Type, fvPatchField, volMesh>*> fields @@ -312,7 +327,7 @@ void Foam::fvMeshAdder::MapVolFields << "MapVolFields : mapping " << fld.name() << " and " << fldToAdd.name() << endl; - MapVolField<Type>(meshMap, fld, fldToAdd); + MapVolField<Type>(meshMap, fld, fldToAdd, fullyMapped); } else { @@ -331,7 +346,8 @@ void Foam::fvMeshAdder::MapSurfaceField const mapAddedPolyMesh& meshMap, GeometricField<Type, fvsPatchField, surfaceMesh>& fld, - const GeometricField<Type, fvsPatchField, surfaceMesh>& fldToAdd + const GeometricField<Type, fvsPatchField, surfaceMesh>& fldToAdd, + const bool fullyMapped ) { const fvMesh& mesh = fld.mesh(); @@ -458,6 +474,13 @@ void Foam::fvMeshAdder::MapSurfaceField directFvPatchFieldMapper patchMapper(newToOld); + // Override mapping (for use in e.g. fvMeshDistribute where + // it sorts mapping out itself) + if (fullyMapped) + { + patchMapper.hasUnmapped() = false; + } + // Create new patchField with same type as existing one. // Note: // - boundaryField already in new order so access with newPatchi @@ -519,6 +542,13 @@ void Foam::fvMeshAdder::MapSurfaceField directFvPatchFieldMapper patchMapper(newToAdded); + // Override mapping (for use in e.g. fvMeshDistribute where + // it sorts mapping out itself) + if (fullyMapped) + { + patchMapper.hasUnmapped() = false; + } + bfld.set ( newPatchi, @@ -565,7 +595,8 @@ void Foam::fvMeshAdder::MapSurfaceFields ( const mapAddedPolyMesh& meshMap, const fvMesh& mesh, - const fvMesh& meshToAdd + const fvMesh& meshToAdd, + const bool fullyMapped ) { typedef GeometricField<Type, fvsPatchField, surfaceMesh> fldType; @@ -619,7 +650,7 @@ void Foam::fvMeshAdder::MapSurfaceFields << "MapSurfaceFields : mapping " << fld.name() << " and " << fldToAdd.name() << endl; - MapSurfaceField<Type>(meshMap, fld, fldToAdd); + MapSurfaceField<Type>(meshMap, fld, fldToAdd, fullyMapped); } else { diff --git a/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C b/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C index 02ef7638ea842282d2f984f4f23de8088d287667..b7180c770d53eced0b2ba79ab2cc533d0e92c392 100644 --- a/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C +++ b/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C @@ -2606,7 +2606,8 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> Foam::fvMeshDistribute::distribute mesh_, domainMesh, couples, - false // no parallel comms + false, // no parallel comms + true // fake complete mapping ); // Update mesh data: sourceFace,sourceProc for added diff --git a/src/finiteVolume/fields/fvPatchFields/derived/mappedField/Sampled/Sampled.H b/src/finiteVolume/fields/fvPatchFields/derived/mappedField/Sampled/Sampled.H index 9175b6df5413eeeb0ef03cb90cf7c51d6f778661..cc1c3f8c3a125f444c7ceab8626bca44921e9340 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/mappedField/Sampled/Sampled.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/mappedField/Sampled/Sampled.H @@ -185,7 +185,19 @@ public: // Evaluation //- Return sampled value - virtual tmp<Field<Type>> value(const scalar) const; + virtual tmp<Field<Type>> value(const scalar x) const; + + //- Is value constant (i.e. independent of x) + virtual inline bool constant() const + { + return false; + } + + //- Is value uniform (i.e. independent of coordinate) + virtual inline bool uniform() const + { + return false; + } //- Integrate between two values virtual tmp<Field<Type>> integrate diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedValue/uniformFixedValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedValue/uniformFixedValueFvPatchField.C index 012740f257e1867286fe46522cfb586cd250713a..2211651b48da20908fdb56e1f804a8ff0547200b 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedValue/uniformFixedValueFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedValue/uniformFixedValueFvPatchField.C @@ -63,7 +63,17 @@ Foam::uniformFixedValueFvPatchField<Type>::uniformFixedValueFvPatchField fixedValueFvPatchField<Type>(p, iF, dict, false), uniformValue_(PatchFunction1<Type>::New(p.patch(), "uniformValue", dict)) { - this->evaluate(); + if (dict.found("value")) + { + fvPatchField<Type>::operator= + ( + Field<Type>("value", dict, p.size()) + ); + } + else + { + this->evaluate(); + } } @@ -79,8 +89,16 @@ Foam::uniformFixedValueFvPatchField<Type>::uniformFixedValueFvPatchField fixedValueFvPatchField<Type>(p, iF), // Don't map uniformValue_(ptf.uniformValue_.clone(p.patch())) { - // Evaluate since value not mapped - this->evaluate(); + if (mapper.direct() && !mapper.hasUnmapped()) + { + // Use mapping instead of re-evaluation + this->map(ptf, mapper); + } + else + { + // Evaluate since value not mapped + this->evaluate(); + } } @@ -104,13 +122,7 @@ Foam::uniformFixedValueFvPatchField<Type>::uniformFixedValueFvPatchField : fixedValueFvPatchField<Type>(ptf, iF), uniformValue_(ptf.uniformValue_.clone(this->patch().patch())) -{ - // Evaluate the profile if defined - if (uniformValue_.valid()) - { - this->evaluate(); - } -} +{} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -123,6 +135,12 @@ void Foam::uniformFixedValueFvPatchField<Type>::autoMap { fixedValueFvPatchField<Type>::autoMap(mapper); uniformValue_().autoMap(mapper); + + if (uniformValue_().constant()) + { + // If mapper is not dependent on time we're ok to evaluate + this->evaluate(); + } } diff --git a/src/finiteVolume/fields/fvPatchFields/fvPatchField/directFvPatchFieldMapper.H b/src/finiteVolume/fields/fvPatchFields/fvPatchField/directFvPatchFieldMapper.H index 7a87d1ad5349beabce50719a40ad785e167ad088..8aa3163ef2d0d8da3a58eed48d99b9bc6be6ccea 100644 --- a/src/finiteVolume/fields/fvPatchFields/fvPatchField/directFvPatchFieldMapper.H +++ b/src/finiteVolume/fields/fvPatchFields/fvPatchField/directFvPatchFieldMapper.H @@ -93,6 +93,11 @@ public: return hasUnmapped_; } + bool& hasUnmapped() + { + return hasUnmapped_; + } + const labelUList& directAddressing() const { return directAddressing_; diff --git a/src/meshTools/PatchFunction1/ConstantField/ConstantField.C b/src/meshTools/PatchFunction1/ConstantField/ConstantField.C index 1b9378ccc4b10e8085882fa26cc905ae07855402..6815159711a88366c50fc6fe274bf1fd06f401ab 100644 --- a/src/meshTools/PatchFunction1/ConstantField/ConstantField.C +++ b/src/meshTools/PatchFunction1/ConstantField/ConstantField.C @@ -32,13 +32,17 @@ Foam::PatchFunction1Types::ConstantField<Type>::ConstantField ( const polyPatch& pp, const word& entryName, - const Field<Type>& value, + const bool isUniform, + const Type& uniformValue, + const Field<Type>& nonUniformValue, const dictionary& dict, const bool faceValues ) : PatchFunction1<Type>(pp, entryName, dict, faceValues), - value_(value) + isUniform_(isUniform), + uniformValue_(uniformValue), + value_(nonUniformValue) {} @@ -47,9 +51,14 @@ Foam::Field<Type> Foam::PatchFunction1Types::ConstantField<Type>::getValue ( const word& keyword, const dictionary& dict, - const label len + const label len, + bool& isUniform, + Type& uniformValue ) { + isUniform = true; + uniformValue = Zero; + Field<Type> fld; if (len) @@ -67,13 +76,16 @@ Foam::Field<Type> Foam::PatchFunction1Types::ConstantField<Type>::getValue || firstToken.wordToken() == "constant" ) { + is >> uniformValue; fld.setSize(len); - fld = pTraits<Type>(is); + fld = uniformValue; } else if (firstToken.wordToken() == "nonuniform") { List<Type>& list = fld; is >> list; + isUniform = false; + label currentSize = fld.size(); if (currentSize != len) { @@ -105,6 +117,7 @@ Foam::Field<Type> Foam::PatchFunction1Types::ConstantField<Type>::getValue } else { + isUniform = false; FatalIOErrorInFunction(dict) << "Expected keyword 'uniform', 'nonuniform' or 'constant'" << ", found " << firstToken.wordToken() @@ -113,10 +126,10 @@ Foam::Field<Type> Foam::PatchFunction1Types::ConstantField<Type>::getValue } else { - fld.setSize(len); - is.putBack(firstToken); - fld = pTraits<Type>(is); + is >> uniformValue; + fld.setSize(len); + fld = uniformValue; } } return fld; @@ -134,7 +147,7 @@ Foam::PatchFunction1Types::ConstantField<Type>::ConstantField ) : PatchFunction1<Type>(pp, entryName, dict, faceValues), - value_(getValue(entryName, dict, pp.size())) + value_(getValue(entryName, dict, pp.size(), isUniform_, uniformValue_)) {} @@ -145,6 +158,8 @@ Foam::PatchFunction1Types::ConstantField<Type>::ConstantField ) : PatchFunction1<Type>(cnst), + isUniform_(cnst.isUniform_), + uniformValue_(cnst.uniformValue_), value_(cnst.value_) {} @@ -157,8 +172,17 @@ Foam::PatchFunction1Types::ConstantField<Type>::ConstantField ) : PatchFunction1<Type>(cnst, pp), + isUniform_(cnst.isUniform_), + uniformValue_(cnst.uniformValue_), value_(cnst.value_) -{} +{ + // If different sizes do what? + value_.setSize(this->patch_.size()); + if (isUniform_) + { + value_ = uniformValue_; + } +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -170,6 +194,12 @@ void Foam::PatchFunction1Types::ConstantField<Type>::autoMap ) { value_.autoMap(mapper); + + // If originating from single value override just to make sure + if (isUniform_) + { + value_ = uniformValue_; + } } diff --git a/src/meshTools/PatchFunction1/ConstantField/ConstantField.H b/src/meshTools/PatchFunction1/ConstantField/ConstantField.H index 307a49c4acb244a4652d1cc0e5707bf726f47381..ccb56246c67c4fbb54ba2c059161946bd0903a94 100644 --- a/src/meshTools/PatchFunction1/ConstantField/ConstantField.H +++ b/src/meshTools/PatchFunction1/ConstantField/ConstantField.H @@ -60,6 +60,12 @@ class ConstantField { // Private data + //- Is uniform? + bool isUniform_; + + //- If uniform the uniformValue + Type uniformValue_; + //- ConstantField value Field<Type> value_; @@ -71,7 +77,9 @@ class ConstantField ( const word& keyword, const dictionary& dict, - const label len + const label len, + bool& isUniform, + Type& uniformValue ); //- No copy assignment @@ -91,7 +99,9 @@ public: ( const polyPatch& pp, const word& entryName, - const Field<Type>& value, + const bool isUniform, + const Type& uniformValue, + const Field<Type>& nonUniformValue, const dictionary& dict = dictionary::null, const bool faceValues = true ); @@ -141,7 +151,19 @@ public: // Evaluation //- Return constant value - virtual inline tmp<Field<Type>> value(const scalar) const; + virtual inline tmp<Field<Type>> value(const scalar x) const; + + //- Is value constant (i.e. independent of x) + virtual inline bool constant() const + { + return true; + } + + //- Is value uniform (i.e. independent of coordinate) + virtual inline bool uniform() const + { + return isUniform_ && PatchFunction1<Type>::uniform(); + } //- Integrate between two values virtual inline tmp<Field<Type>> integrate diff --git a/src/meshTools/PatchFunction1/MappedFile/MappedFile.H b/src/meshTools/PatchFunction1/MappedFile/MappedFile.H index 60bdb325b58c8a240584c0ea5d8e233855374e21..06db2eeae66456e1f18327c12271d865388ebc3a 100644 --- a/src/meshTools/PatchFunction1/MappedFile/MappedFile.H +++ b/src/meshTools/PatchFunction1/MappedFile/MappedFile.H @@ -178,6 +178,18 @@ public: //- Return MappedFile value virtual tmp<Field<Type>> value(const scalar) const; + //- Is value constant (i.e. independent of x) + virtual bool constant() const + { + return sampleTimes_.size() == 1; + } + + //- Is value uniform (i.e. independent of coordinate) + virtual bool uniform() const + { + return PatchFunction1<Type>::uniform(); + } + //- Integrate between two values virtual tmp<Field<Type>> integrate ( diff --git a/src/meshTools/PatchFunction1/PatchFunction1.C b/src/meshTools/PatchFunction1/PatchFunction1.C index 94bbdf3f7084774aa03b9df4888c62e593311e7e..8b1fa65c0c851ee163f51c755eb01a98d33aa70e 100644 --- a/src/meshTools/PatchFunction1/PatchFunction1.C +++ b/src/meshTools/PatchFunction1/PatchFunction1.C @@ -113,6 +113,12 @@ Foam::tmp<Foam::Field<Type>> Foam::PatchFunction1<Type>::value return Field<Type>(); } +template<class Type> +bool Foam::PatchFunction1<Type>::uniform() const +{ + return !coordSys_.active(); +} + template<class Type> Foam::tmp<Foam::Field<Type>> Foam::PatchFunction1<Type>::integrate diff --git a/src/meshTools/PatchFunction1/PatchFunction1.H b/src/meshTools/PatchFunction1/PatchFunction1.H index e6713a3023b411aa8ee821a1ca5d0fc00e44930d..9352d5591c3f22fee5da0cfc3b3c77bbf4b17fd7 100644 --- a/src/meshTools/PatchFunction1/PatchFunction1.H +++ b/src/meshTools/PatchFunction1/PatchFunction1.H @@ -193,6 +193,12 @@ public: //- Return value as a function of (scalar) independent variable virtual tmp<Field<Type>> value(const scalar x) const; + //- Is value constant (i.e. independent of x) + virtual bool constant() const = 0; + + //- Is value uniform (i.e. independent of coordinate) + virtual bool uniform() const = 0; + //- Integrate between two (scalar) values virtual tmp<Field<Type>> integrate ( diff --git a/src/meshTools/PatchFunction1/PatchFunction1New.C b/src/meshTools/PatchFunction1/PatchFunction1New.C index ce379527ebcc1535bf99b0c46e512082ccce03c3..4b10bd59ca203726f43efc1c9d505cc4d5a7a073 100644 --- a/src/meshTools/PatchFunction1/PatchFunction1New.C +++ b/src/meshTools/PatchFunction1/PatchFunction1New.C @@ -67,7 +67,9 @@ Foam::autoPtr<Foam::PatchFunction1<Type>> Foam::PatchFunction1<Type>::New { // Backwards-compatibility for reading straight fields is.putBack(firstToken); - const Field<Type> value(pp.size(), pTraits<Type>(is)); + + const Type uniformValue = pTraits<Type>(is); + const Field<Type> value(pp.size(), uniformValue); return autoPtr<PatchFunction1<Type>> ( @@ -75,6 +77,8 @@ Foam::autoPtr<Foam::PatchFunction1<Type>> Foam::PatchFunction1<Type>::New ( pp, entryName, + true, // uniform + uniformValue, // uniform value value, // Supply value dict, faceValues diff --git a/src/meshTools/PatchFunction1/UniformValueField/UniformValueField.H b/src/meshTools/PatchFunction1/UniformValueField/UniformValueField.H index 683ff0c5607d8b476a2b78b8b50163838c9c0a7e..c3c94f5e862ba01c2ccbd339fa85598229b52b18 100644 --- a/src/meshTools/PatchFunction1/UniformValueField/UniformValueField.H +++ b/src/meshTools/PatchFunction1/UniformValueField/UniformValueField.H @@ -128,7 +128,16 @@ public: // Evaluation //- Return UniformValueField value - virtual inline tmp<Field<Type>> value(const scalar) const; + virtual inline tmp<Field<Type>> value(const scalar x) const; + + //- Is value constant (i.e. independent of x) + virtual inline bool constant() const; + + //- Is value uniform (i.e. independent of coordinate) + virtual inline bool uniform() const + { + return PatchFunction1<Type>::uniform(); + } //- Integrate between two values virtual inline tmp<Field<Type>> integrate diff --git a/src/meshTools/PatchFunction1/UniformValueField/UniformValueFieldI.H b/src/meshTools/PatchFunction1/UniformValueField/UniformValueFieldI.H index 480ea6d8893ecc7f7045614989bd9618623968f4..f4341ca844df8006ac27d3e4f18c065d1720142d 100644 --- a/src/meshTools/PatchFunction1/UniformValueField/UniformValueFieldI.H +++ b/src/meshTools/PatchFunction1/UniformValueField/UniformValueFieldI.H @@ -25,9 +25,18 @@ License #include "UniformValueField.H" #include "SubField.H" +#include "Constant.H" // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +template<class Type> +inline bool +Foam::PatchFunction1Types::UniformValueField<Type>::constant() const +{ + return uniformValuePtr_->type() == Function1Types::Constant<Type>::typeName; +} + + template<class Type> inline Foam::tmp<Foam::Field<Type>> Foam::PatchFunction1Types::UniformValueField<Type>::value diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/0.orig/cabin/omega b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/0.orig/cabin/omega index 989d77cf04a32368dde7f35f2897eb9a6454f0fd..1442320b1ca71da977e0ba6b3b8a3fe7ecca78ed 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/0.orig/cabin/omega +++ b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/0.orig/cabin/omega @@ -21,7 +21,6 @@ internalField uniform 0.2; boundaryField { - inlet { type uniformFixedValue; diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/0.orig/U b/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/0.orig/U index aff8dd1982b525dfca684a29c125b5e1ba1f0b13..7f90ff6f84142cab0ad5501f2880fa8d44676443 100644 --- a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/0.orig/U +++ b/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/0.orig/U @@ -32,7 +32,6 @@ boundaryField (0.01 (0 -15 0)) (100 (0 -15 0)) ); - value $internalField; } outlet