COMP: Multiple changes - first clean build after latest merge - UNTESTED

This commit is contained in:
Andrew Heather
2016-09-23 15:36:53 +01:00
parent 9fbd612672
commit b9940cbbb1
311 changed files with 4119 additions and 6540 deletions

View File

@ -93,6 +93,7 @@ bool Foam::functionObjects::fieldValue::read(const dictionary& dict)
}
fvMeshFunctionObject::read(dict);
writeFile::read(dict);
dict.lookup("fields") >> fields_;
dict.lookup("writeFields") >> writeFields_;

View File

@ -53,14 +53,11 @@ SourceFiles
namespace Foam
{
// Forward declaration of classes
class fvMesh;
namespace functionObjects
{
/*---------------------------------------------------------------------------*\
Class fieldValue Declaration
Class fieldValue Declaration
\*---------------------------------------------------------------------------*/
class fieldValue
@ -73,6 +70,9 @@ protected:
// Protected data
//- Optional scale value
scalar scaleFactor_;
//- Construction dictionary
dictionary dict_;

View File

@ -62,7 +62,10 @@ const Foam::NamedEnum
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
void Foam::fieldValues::fieldValueDelta::writeFileHeader(Ostream& os) const
void Foam::functionObjects::fieldValues::fieldValueDelta::writeFileHeader
(
Ostream& os
) const
{
const wordList& fields1 = region1Ptr_->fields();
const wordList& fields2 = region2Ptr_->fields();
@ -100,7 +103,7 @@ Foam::functionObjects::fieldValues::fieldValueDelta::fieldValueDelta
const dictionary& dict
)
:
regionFunctionObject(name, runTime, dict),
fvMeshFunctionObject(name, runTime, dict),
writeFile(obr_, name, typeName, dict),
operation_(opSubtract),
region1Ptr_(nullptr),
@ -124,7 +127,7 @@ bool Foam::functionObjects::fieldValues::fieldValueDelta::read
const dictionary& dict
)
{
regionFunctionObject::read(dict);
fvMeshFunctionObject::read(dict);
writeFile::read(dict);
@ -164,8 +167,8 @@ bool Foam::functionObjects::fieldValues::fieldValueDelta::write()
Log << type() << " " << name() << " write:" << endl;
const word& name1 = source1Ptr_->name();
const word& name2 = source2Ptr_->name();
const word& name1 = region1Ptr_->name();
const word& name2 = region2Ptr_->name();
const wordList entries1 = objectResultEntries(name1);
const wordList entries2 = objectResultEntries(name2);
@ -173,7 +176,7 @@ bool Foam::functionObjects::fieldValues::fieldValueDelta::write()
if (entries1.size() != entries2.size())
{
FatalErrorInFunction
<< name_ << ": objects must generate the same number of results"
<< name() << ": objects must generate the same number of results"
<< nl
<< " " << name1 << " objects: " << entries1 << nl
<< " " << name2 << " objects: " << entries2 << nl
@ -190,7 +193,7 @@ bool Foam::functionObjects::fieldValues::fieldValueDelta::write()
if (type1 != type2)
{
FatalErrorInFunction
<< name_
<< name()
<< ": input values for operation must be of the same type"
<< nl
<< " " << entry1 << ": " << type1 << nl

View File

@ -2,13 +2,8 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
<<<<<<< HEAD:src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.H
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
=======
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\/ M anipulation |
>>>>>>> foundation-github:src/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.H
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -33,15 +28,10 @@ Group
grpFieldFunctionObjects
Description
<<<<<<< HEAD:src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.H
This function object provides applies an operation to the output of two
fieldValue function objects.
Provides an operation between two 'field value' function objects.
The operation is applied to all results of each fieldValue object.
Accordingly, each object must generate the same number and type of results.
=======
Provides a differencing option between two 'field value' function objects.
>>>>>>> foundation-github:src/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.H
Example of function object specification:
\verbatim
@ -77,16 +67,11 @@ Usage
average | average
\endplaintable
<<<<<<< HEAD:src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.H
SeeAlso
Foam::fieldValue
=======
See also
Foam::functionObject
Foam::functionObject::fieldValue
Foam::functionObjects::fieldValue
Foam::functionObjects::regionFunctionObject
Foam::functionObjects::logFiles
>>>>>>> foundation-github:src/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.H
Foam::functionObjects::writeFile
SourceFiles
fieldValueDelta.C
@ -96,13 +81,8 @@ SourceFiles
#ifndef functionObjects_fieldValueDelta_H
#define functionObjects_fieldValueDelta_H
<<<<<<< HEAD:src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.H
#include "functionObjectState.H"
#include "functionObjectFile.H"
=======
#include "regionFunctionObject.H"
#include "logFiles.H"
>>>>>>> foundation-github:src/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.H
#include "stateFunctionObject.H"
#include "writeFile.H"
#include "fieldValue.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -120,23 +100,18 @@ namespace fieldValues
class fieldValueDelta
:
<<<<<<< HEAD:src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.H
public functionObjectState,
public functionObjectFile
=======
public regionFunctionObject,
public logFiles
>>>>>>> foundation-github:src/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.H
public fvMeshFunctionObject,
public writeFile
{
public:
//- Operation type enumeration
enum operationType
{
opAdd,
opSubtract,
opMin,
opMax,
opAverage
opAdd, //< Add
opSubtract, //< Subtract
opMin, //< Minimum
opMax, //< Maximum
opAverage //< Average
};
//- Operation type names
@ -147,18 +122,6 @@ private:
// Private data
<<<<<<< HEAD:src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.H
//- Database this class is registered to
const objectRegistry& obr_;
//- Flag to indicate to load from files
bool loadFromFiles_;
//- Switch to send output to Info as well as to file
Switch log_;
=======
>>>>>>> foundation-github:src/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.H
//- Operation to apply to values
operationType operation_;
@ -173,7 +136,7 @@ private:
//- Templated function to apply the operation
template<class Type>
void apply
void applyOperation
(
const word& resultType,
const word& name1,

View File

@ -26,7 +26,7 @@ License
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type>
Type Foam::functionObjects::fieldValues::fieldValueDelta::applyOperation
void Foam::functionObjects::fieldValues::fieldValueDelta::applyOperation
(
const word& resultType,
const word& name1,

View File

@ -25,7 +25,6 @@ License
#include "surfaceFieldValue.H"
#include "fvMesh.H"
#include "cyclicPolyPatch.H"
#include "emptyPolyPatch.H"
#include "coupledPolyPatch.H"
#include "sampledSurface.H"
@ -489,7 +488,7 @@ void Foam::functionObjects::fieldValues::surfaceFieldValue::initialise
if (weightFieldName_ == "none")
{
dict.lookup("orientedWeightField") >> weightFieldName_;
if (log_) Info << " weight field = " << weightFieldName_ << nl;
Log << " weight field = " << weightFieldName_ << nl;
orientWeightField_ = true;
}
else
@ -527,7 +526,10 @@ void Foam::functionObjects::fieldValues::surfaceFieldValue::initialise
}
void Foam::fieldValues::faceSource::writeFileHeader(Ostream& os) const
void Foam::functionObjects::fieldValues::surfaceFieldValue::writeFileHeader
(
Ostream& os
) const
{
if (operation_ != opNone)
{
@ -649,7 +651,6 @@ Foam::functionObjects::fieldValues::surfaceFieldValue::surfaceFieldValue
weightFieldName_("none"),
orientWeightField_(false),
orientedFieldsStart_(labelMax),
scaleFactor_(1.0),
writeArea_(dict.lookupOrDefault("writeArea", false)),
nFaces_(0),
faceId_(),
@ -675,7 +676,6 @@ Foam::functionObjects::fieldValues::surfaceFieldValue::surfaceFieldValue
weightFieldName_("none"),
orientWeightField_(false),
orientedFieldsStart_(labelMax),
scaleFactor_(1.0),
writeArea_(dict.lookupOrDefault("writeArea", false)),
nFaces_(0),
faceId_(),

View File

@ -52,13 +52,7 @@ Description
name movingWall;
operation areaAverage;
fields
(
p
phi
U
);
fields (p phi U);
}
surfaceFieldValue1
@ -75,15 +69,8 @@ Description
name f0;
operation sum;
weightField alpha1;
fields
(
p
phi
U
);
fields (p phi U);
}
\endverbatim
@ -165,6 +152,11 @@ SourceFiles
#include "fieldValue.H"
#include "NamedEnum.H"
#include "faceList.H"
#include "surfaceMesh.H"
#include "fvsPatchField.H"
#include "volFieldsFwd.H"
#include "surfFieldsFwd.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -180,7 +172,7 @@ namespace fieldValues
{
/*---------------------------------------------------------------------------*\
Class surfaceFieldValue Declaration
Class surfaceFieldValue Declaration
\*---------------------------------------------------------------------------*/
class surfaceFieldValue
@ -207,21 +199,21 @@ public:
//- Operation type enumeration
enum operationType
{
opNone,
opSum,
opSumMag,
opSumDirection,
opSumDirectionBalance,
opAverage,
opWeightedAverage,
opAreaAverage,
opWeightedAreaAverage,
opAreaIntegrate,
opMin,
opMax,
opCoV,
opAreaNormalAverage,
opAreaNormalIntegrate
opNone, //< None
opSum, //< Sum
opSumMag, //< Magnitude of sum
opSumDirection, //< Sum in a given direction
opSumDirectionBalance, //< Sum in a given direction for multiple
opAverage, //< Average
opWeightedAverage, //< Weighted average
opAreaAverage, //< Area average
opWeightedAreaAverage, //< Weighted area average
opAreaIntegrate, //< Area integral
opMin, //< Minimum
opMax, //< Maximum
opCoV, //< Coefficient of variation
opAreaNormalAverage, //< Area average in normal direction
opAreaNormalIntegrate //< Area integral in normal direction
};
//- Operation type names
@ -321,7 +313,7 @@ protected:
//- Return field values by looking up field name
template<class Type>
tmp<Field<Type>> setFieldValues
tmp<Field<Type>> getFieldValues
(
const word& fieldName,
const bool mustGet = false,

View File

@ -24,6 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include "surfaceFieldValue.H"
#include "Time.H"
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
@ -58,7 +59,7 @@ Foam::functionObjects::fieldValues::surfaceFieldValue::faceSign() const
inline Foam::fileName
Foam::functionObjects::fieldValues::surfaceFieldValue::outputDir() const
{
return baseFileDir()/name()/"surface"/obr_.time().timeName();
return baseFileDir()/name()/"surface"/time_.timeName();
}

View File

@ -55,12 +55,8 @@ bool Foam::functionObjects::fieldValues::surfaceFieldValue::validField
template<class Type>
<<<<<<< HEAD:src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceTemplates.C
Foam::tmp<Foam::Field<Type>> Foam::fieldValues::faceSource::setFieldValues
=======
Foam::tmp<Foam::Field<Type>>
Foam::functionObjects::fieldValues::surfaceFieldValue::getFieldValues
>>>>>>> foundation-github:src/functionObjects/field/fieldValues/surfaceFieldValue/surfaceFieldValueTemplates.C
(
const word& fieldName,
const bool mustGet,
@ -294,7 +290,7 @@ bool Foam::functionObjects::fieldValues::surfaceFieldValue::writeValues
if (ok)
{
Field<Type> values(setFieldValues<Type>(fieldName, true, orient));
Field<Type> values(getFieldValues<Type>(fieldName, true, orient));
vectorField Sf;
if (surfacePtr_.valid())
@ -357,7 +353,7 @@ bool Foam::functionObjects::fieldValues::surfaceFieldValue::writeValues
// Write state/results information
const word& opName = operationTypeNames_[operation_];
word resultName =
opName + '(' + sourceName_ + ',' + fieldName + ')';
opName + '(' + regionName_ + ',' + fieldName + ')';
this->setResult(resultName, result);
}
}

View File

@ -199,7 +199,7 @@ bool Foam::functionObjects::fieldValues::volFieldValue::write()
{
WarningInFunction
<< "Requested field " << fieldName
<< " not found in database and not ok"
<< " not found in database and not processed"
<< endl;
}
}

View File

@ -173,7 +173,7 @@ protected:
//- Insert field values into values list
template<class Type>
tmp<Field<Type>> setFieldValues
tmp<Field<Type>> getFieldValues
(
const word& fieldName,
const bool mustGet = false

View File

@ -47,7 +47,7 @@ bool Foam::functionObjects::fieldValues::volFieldValue::validField
template<class Type>
Foam::tmp<Foam::Field<Type>>
Foam::functionObjects::fieldValues::volFieldValue::setFieldValues
Foam::functionObjects::fieldValues::volFieldValue::getFieldValues
(
const word& fieldName,
const bool mustGet
@ -171,7 +171,7 @@ Type Foam::functionObjects::fieldValues::volFieldValue::processValues
template<class Type>
bool Foam::functionObjects::fieldValues::volFieldValue::writeValues
(
const word& fieldName
const word& fieldName,
const scalarField& weightField
)
{
@ -179,7 +179,7 @@ bool Foam::functionObjects::fieldValues::volFieldValue::writeValues
if (ok)
{
Field<Type> values(setFieldValues<Type>(fieldName));
Field<Type> values(getFieldValues<Type>(fieldName));
scalarField V(filterField(fieldValue::mesh_.V()));
if (writeFields_)
@ -218,7 +218,8 @@ bool Foam::functionObjects::fieldValues::volFieldValue::writeValues
// Write state/results information
const word& opName = operationTypeNames_[operation_];
word resultName = opName + '(' + sourceName_ + ',' + fieldName + ')';
word resultName =
opName + '(' + volRegion::regionName_ + ',' + fieldName + ')';
this->setResult(resultName, result);
}