Commit d16dbee6 authored by Andrew Heather's avatar Andrew Heather

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

parent e02118ed
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Typedef
Foam::IOrunTimePostProcessing
Description
Instance of the generic IOOutputFilter for runTimePostProcessing.
\*---------------------------------------------------------------------------*/
#ifndef IOrunTimePostProcessing_H
#define IOrunTimePostProcessing_H
#include "runTimePostProcessing.H"
#include "IOOutputFilter.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef IOOutputFilter<runTimePostProcessing> IOrunTimePostProcessing;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
......@@ -50,14 +50,22 @@ License
namespace Foam
{
template<>
const char* NamedEnum<fieldVisualisationBase::colourByType, 2>::names[] =
const char* NamedEnum
<
functionObjects::fieldVisualisationBase::colourByType,
2
>::names[] =
{
"colour",
"field"
};
template<>
const char* NamedEnum<fieldVisualisationBase::colourMapType, 4>::names[] =
const char* NamedEnum
<
functionObjects::fieldVisualisationBase::colourMapType,
4
>::names[] =
{
"rainbow",
"blueWhiteRed",
......@@ -66,16 +74,27 @@ namespace Foam
};
}
const Foam::NamedEnum<Foam::fieldVisualisationBase::colourByType, 2>
Foam::fieldVisualisationBase::colourByTypeNames;
const Foam::NamedEnum
<
Foam::functionObjects::fieldVisualisationBase::colourByType,
2
>
Foam::functionObjects::fieldVisualisationBase::colourByTypeNames;
const Foam::NamedEnum<Foam::fieldVisualisationBase::colourMapType, 4>
Foam::fieldVisualisationBase::colourMapTypeNames;
const Foam::NamedEnum
<
Foam::functionObjects::fieldVisualisationBase::colourMapType,
4
>
Foam::functionObjects::fieldVisualisationBase::colourMapTypeNames;
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
void Foam::fieldVisualisationBase::setColourMap(vtkLookupTable* lut) const
void Foam::functionObjects::fieldVisualisationBase::setColourMap
(
vtkLookupTable* lut
) const
{
label nColours = 256;
......@@ -131,7 +150,7 @@ void Foam::fieldVisualisationBase::setColourMap(vtkLookupTable* lut) const
}
void Foam::fieldVisualisationBase::addScalarBar
void Foam::functionObjects::fieldVisualisationBase::addScalarBar
(
const scalar position,
vtkRenderer* renderer,
......@@ -242,7 +261,7 @@ void Foam::fieldVisualisationBase::addScalarBar
}
void Foam::fieldVisualisationBase::setField
void Foam::functionObjects::fieldVisualisationBase::setField
(
const scalar position,
const word& colourFieldName,
......@@ -307,7 +326,7 @@ void Foam::fieldVisualisationBase::setField
void Foam::fieldVisualisationBase::addGlyphs
void Foam::functionObjects::fieldVisualisationBase::addGlyphs
(
const scalar position,
const word& scaleFieldName,
......@@ -486,7 +505,7 @@ void Foam::fieldVisualisationBase::addGlyphs
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::fieldVisualisationBase::fieldVisualisationBase
Foam::functionObjects::fieldVisualisationBase::fieldVisualisationBase
(
const runTimePostProcessing& parent,
const dictionary& dict,
......@@ -537,20 +556,21 @@ Foam::fieldVisualisationBase::fieldVisualisationBase
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::fieldVisualisationBase::~fieldVisualisationBase()
Foam::functionObjects::fieldVisualisationBase::~fieldVisualisationBase()
{}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
const Foam::HashPtrTable<Foam::Function1<Foam::vector>, Foam::word>&
Foam::fieldVisualisationBase::colours() const
Foam::functionObjects::fieldVisualisationBase::colours() const
{
return colours_;
}
const Foam::word& Foam::fieldVisualisationBase::fieldName() const
const Foam::word&
Foam::functionObjects::fieldVisualisationBase::fieldName() const
{
return fieldName_;
}
......
......@@ -22,17 +22,18 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::fieldVisualisationBase
Foam::functionObjects::fieldVisualisationBase
Description
Base class for scene objects
SourceFiles
fieldVisualisationBase.C
\*---------------------------------------------------------------------------*/
#ifndef fieldVisualisationBase_H
#define fieldVisualisationBase_H
#ifndef functionObjects_fieldVisualisationBase_H
#define functionObjects_fieldVisualisationBase_H
#include "dictionary.H"
#include "Tuple2.H"
......@@ -56,6 +57,8 @@ class vtkMapper;
namespace Foam
{
namespace functionObjects
{
class runTimePostProcessing;
......@@ -206,6 +209,7 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace functionObjects
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2015-2016 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -25,6 +25,7 @@ License
// OpenFOAM includes
#include "functionObjectCloud.H"
#include "fvMesh.H"
#include "runTimePostProcessing.H"
#include "addToRunTimeSelectionTable.H"
......@@ -39,15 +40,21 @@ License
// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
namespace Foam
{
namespace functionObjects
{
namespace runTimePostPro
{
defineTypeNameAndDebug(functionObjectCloud, 0);
addToRunTimeSelectionTable(pointData, functionObjectCloud, dictionary);
}
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::functionObjectCloud::functionObjectCloud
Foam::functionObjects::runTimePostPro::functionObjectCloud::functionObjectCloud
(
const runTimePostProcessing& parent,
const dictionary& dict,
......@@ -67,13 +74,15 @@ Foam::functionObjectCloud::functionObjectCloud
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::functionObjectCloud::~functionObjectCloud()
Foam::functionObjects::runTimePostPro::functionObjectCloud::
~functionObjectCloud()
{}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
void Foam::functionObjectCloud::addGeometryToScene
void Foam::functionObjects::runTimePostPro::functionObjectCloud::
addGeometryToScene
(
const scalar position,
vtkRenderer* renderer
......@@ -85,13 +94,13 @@ void Foam::functionObjectCloud::addGeometryToScene
}
const dictionary& cloudDict =
geometryBase::parent_.obr().lookupObject<IOdictionary>
geometryBase::parent_.mesh().lookupObject<IOdictionary>
(
cloudName_ + "OutputProperties"
);
fileName fName;
if (cloudDict.found("cloudFunctionObject"))
if (cloudDict.found("functionObjectCloud"))
{
const dictionary& foDict = cloudDict.subDict("cloudFunctionObject");
if (foDict.found(functionObject_))
......@@ -138,7 +147,10 @@ void Foam::functionObjectCloud::addGeometryToScene
}
void Foam::functionObjectCloud::updateActors(const scalar position)
void Foam::functionObjects::runTimePostPro::functionObjectCloud::updateActors
(
const scalar position
)
{
actor_->GetProperty()->SetOpacity(opacity(position));
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2015-2016 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -22,17 +22,18 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::functionObjectCloud
Foam::functionObjects::runTimePostPro::functionObjectCloud
Description
Visualisation of cloud data from function object output
SourceFiles
functionObjectCloud.C
\*---------------------------------------------------------------------------*/
#ifndef functionObjectCloud_H
#define functionObjectCloud_H
#ifndef functionObjects_runTimePostPro_functionObjectCloud_H
#define functionObjects_runTimePostPro_functionObjectCloud_H
#include "pointData.H"
#include "fieldVisualisationBase.H"
......@@ -41,6 +42,10 @@ SourceFiles
namespace Foam
{
namespace functionObjects
{
namespace runTimePostPro
{
/*---------------------------------------------------------------------------*\
Class functionObjectCloud Declaration
......@@ -56,20 +61,20 @@ private:
// Private Member Functions
//- Disallow default bitwise copy construct
functionObjectCloud(const functionObjectCloud&);
functionObjectCloud(const functionObjectCloud&) = delete;
//- Disallow default bitwise assignment
void operator=(const functionObjectCloud&);
void operator=(const functionObjectCloud&) = delete;
protected:
// Protected data
//- Name of cloud
//- Name of functionObjectCloud
word cloudName_;
//- Name of cloud function object result to render
//- Name of functionObjectCloud function object result to render
word functionObject_;
//- Name of field to colour by
......@@ -116,6 +121,8 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace runTimePostPro
} // End namespace functionObjects
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -39,15 +39,21 @@ License
// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
namespace Foam
{
namespace functionObjects
{
namespace runTimePostPro
{
defineTypeNameAndDebug(functionObjectLine, 0);
addToRunTimeSelectionTable(pathline, functionObjectLine, dictionary);
}
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::functionObjectLine::functionObjectLine
Foam::functionObjects::runTimePostPro::functionObjectLine::functionObjectLine
(
const runTimePostProcessing& parent,
const dictionary& dict,
......@@ -65,13 +71,14 @@ Foam::functionObjectLine::functionObjectLine
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::functionObjectLine::~functionObjectLine()
Foam::functionObjects::runTimePostPro::functionObjectLine::~functionObjectLine()
{}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
void Foam::functionObjectLine::addGeometryToScene
void Foam::functionObjects::runTimePostPro::functionObjectLine::
addGeometryToScene
(
const scalar position,
vtkRenderer* renderer
......@@ -121,7 +128,10 @@ void Foam::functionObjectLine::addGeometryToScene
}
void Foam::functionObjectLine::updateActors(const scalar position)
void Foam::functionObjects::runTimePostPro::functionObjectLine::updateActors
(
const scalar position
)
{
actor_->GetProperty()->SetLineWidth(2);
actor_->GetProperty()->SetOpacity(opacity(position));
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2015-2016 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -22,17 +22,18 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::functionObjectLine
Foam::functionObjects::runTimePostPro::functionObjectLine
Description
Visualisation of line data from function object output
SourceFiles
functionObjectLine.C
\*---------------------------------------------------------------------------*/
#ifndef functionObjectLine_H
#define functionObjectLine_H
#ifndef functionObjects_runTimePostPro_functionObjectLine_H
#define functionObjects_runTimePostPro_functionObjectLine_H
#include "pathline.H"
#include "fieldVisualisationBase.H"
......@@ -41,6 +42,10 @@ SourceFiles
namespace Foam
{
namespace functionObjects
{
namespace runTimePostPro
{
/*---------------------------------------------------------------------------*\
Class functionObjectLine Declaration
......@@ -56,10 +61,10 @@ private:
// Private Member Functions
//- Disallow default bitwise copy construct
functionObjectLine(const functionObjectLine&);
functionObjectLine(const functionObjectLine&) = delete;
//- Disallow default bitwise assignment
void operator=(const functionObjectLine&);
void operator=(const functionObjectLine&) = delete;
protected:
......@@ -76,7 +81,7 @@ protected:
public:
//- Run-time type information
TypeName("line");
TypeName("functionObjectLine");
// Constructors
......@@ -110,6 +115,8 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace runTimePostPro
} // End namespace functionObjects
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -39,15 +39,22 @@ License
// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
namespace Foam
{
namespace functionObjects
{
namespace runTimePostPro
{
defineTypeNameAndDebug(functionObjectSurface, 0);
addToRunTimeSelectionTable(surface, functionObjectSurface, dictionary);
}
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::functionObjectSurface::functionObjectSurface
Foam::functionObjects::runTimePostPro::functionObjectSurface::
functionObjectSurface
(
const runTimePostProcessing& parent,
const dictionary& dict,
......@@ -67,13 +74,15 @@ Foam::functionObjectSurface::functionObjectSurface
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::functionObjectSurface::~functionObjectSurface()
Foam::functionObjects::runTimePostPro::functionObjectSurface::
~functionObjectSurface()
{}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
void Foam::functionObjectSurface::addGeometryToScene
void Foam::functionObjects::runTimePostPro::functionObjectSurface::
addGeometryToScene
(
const scalar position,
vtkRenderer* renderer
......@@ -98,7 +107,7 @@ void Foam::functionObjectSurface::addGeometryToScene
WarningInFunction
<< "Unable to find function object " << functionObject_
<< " output for field " << fieldName_
<< ". Surface will not be processed"
<< ". functionObjectSurface will not be processed"
<< endl;
return;
}
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2015-2016 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -22,17 +22,18 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::functionObjectSurface
Foam::functionObjects::runTimePostPro::functionObjectSurface
Description
Visualisation of surface data from function object output
SourceFiles
functionObjectSurface.C
functionObjectfunctionObjectSurface.C
\*---------------------------------------------------------------------------*/
#ifndef functionObjectSurface_H
#define functionObjectSurface_H
#ifndef functionObjects_runTimePostPro_functionObjectSurface_H
#define functionObjects_runTimePostPro_functionObjectSurface_H
#include "geometrySurface.H"
#include "fieldVisualisationBase.H"
......@@ -41,6 +42,10 @@ SourceFiles
namespace Foam
{
namespace functionObjects
{
namespace runTimePostPro
{
/*---------------------------------------------------------------------------*\
Class functionObjectSurface Declaration
......@@ -58,10 +63,10 @@ private:
// Private Member Functions
//- Disallow default bitwise copy construct
functionObjectSurface(const functionObjectSurface&);
functionObjectSurface(const functionObjectSurface&) = delete;
//- Disallow default bitwise assignment
void operator=(const functionObjectSurface&);
void operator=(const functionObjectSurface&) = delete;
protected:
......@@ -75,7 +80,7 @@ protected:
public:
//- Run-time type information
TypeName("functionObject");
TypeName("functionObjectSurface");
// Constructors
......@@ -95,7 +100,7 @@ public:
// Member Functions
//- Add surface(s) to scene
//- Add functionObjectSurface(s) to scene
virtual void addGeometryToScene
(
const scalar position,
......@@ -106,6 +111,8 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace runTimePostPro
} // End namespace functionObjects
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenCFD Ltd.