Merge remote branch 'OpenCFD/master' into olesenm

This commit is contained in:
Mark Olesen
2011-02-14 09:47:49 +01:00
311 changed files with 3789 additions and 10892 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -27,7 +27,7 @@ Class
Description
Calculates the field averages given list of fieldAverageItems, e.g.
@verbatim
\verbatim
fieldAverage1
{
// Type of functionObject
@ -61,7 +61,7 @@ Description
base time;
}
);
@endverbatim
\endverbatim
Member function calcAverages() calculates the averages.

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -28,13 +28,13 @@ Description
Helper class to describe what form of averaging to apply. A set will be
applied to each base field in Foam::fieldAverage, of the form:
@verbatim
\verbatim
{
mean on;
prime2Mean on;
base time; // iteration
}
@endverbatim
\endverbatim
SourceFiles
fieldAverageItem.C

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -119,14 +119,14 @@ bool Foam::fieldValues::cellSource::writeValues(const word& fieldName)
if (ok)
{
Field<Type> values(combineFields(setFieldValues<Type>(fieldName)));
Field<Type> values(setFieldValues<Type>(fieldName));
combineFields(values);
scalarField V(combineFields(filterField(mesh().V())));
scalarField V(filterField(mesh().V()));
combineFields(V);
scalarField weightField
(
combineFields(setFieldValues<scalar>(weightFieldName_))
);
scalarField weightField(setFieldValues<scalar>(weightFieldName_));
combineFields(weightField);
if (Pstream::master())
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -150,13 +150,13 @@ bool Foam::fieldValues::faceSource::writeValues(const word& fieldName)
else
{
// Get unoriented magSf
magSf = combineFields(filterField(mesh().magSf(), false));
magSf = filterField(mesh().magSf(), false);
}
// Combine onto master
values = combineFields(values);
magSf = combineFields(magSf);
weightField = combineFields(weightField);
combineFields(values);
combineFields(magSf);
combineFields(weightField);
if (Pstream::master())

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -166,12 +166,11 @@ public:
//- Combine fields from all processor domains into single field
template<class Type>
tmp<Field<Type> > combineFields(const Field<Type>& field) const;
void combineFields(Field<Type>& field);
//- Combine fields from all processor domains into single field
template<class Type>
tmp<Field<Type> > combineFields(const tmp<Field<Type> >&) const;
void combineFields(tmp<Field<Type> >&);
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -30,10 +30,7 @@ License
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type>
Foam::tmp<Foam::Field<Type> > Foam::fieldValue::combineFields
(
const Field<Type>& field
) const
void Foam::fieldValue::combineFields(Field<Type>& field)
{
List<Field<Type> > allValues(Pstream::nProcs());
@ -43,32 +40,20 @@ Foam::tmp<Foam::Field<Type> > Foam::fieldValue::combineFields
if (Pstream::master())
{
return tmp<Field<Type> >
(
new Field<Type>
field =
ListListOps::combine<Field<Type> >
(
ListListOps::combine<Field<Type> >
(
allValues,
accessOp<Field<Type> >()
)
)
);
}
else
{
return field;
allValues,
accessOp<Field<Type> >()
);
}
}
template<class Type>
Foam::tmp<Foam::Field<Type> > Foam::fieldValue::combineFields
(
const tmp<Field<Type> >& field
) const
void Foam::fieldValue::combineFields(tmp<Field<Type> >& field)
{
return combineFields(field());
combineFields(field());
}