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

@ -1,49 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ 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
// ************************************************************************* //

View File

@ -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_;
}

View File

@ -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
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -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));

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -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
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -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));

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -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
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -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;
}

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -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
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -35,7 +35,11 @@ License
namespace Foam
{
template<>
const char* NamedEnum<geometryBase::renderModeType, 3>::names[] =
const char* NamedEnum
<
functionObjects::runTimePostPro::geometryBase::renderModeType,
3
>::names[] =
{
"flat",
"gouraud",
@ -43,13 +47,20 @@ namespace Foam
};
}
const Foam::NamedEnum<Foam::geometryBase::renderModeType, 3>
Foam::geometryBase::renderModeTypeNames;
const Foam::NamedEnum
<
Foam::functionObjects::runTimePostPro::geometryBase::renderModeType,
3
>
Foam::functionObjects::runTimePostPro::geometryBase::renderModeTypeNames;
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
void Foam::geometryBase::initialiseActor(vtkActor* actor) const
void Foam::functionObjects::runTimePostPro::geometryBase::initialiseActor
(
vtkActor* actor
) const
{
actor->GetProperty()->SetSpecular(0);
actor->GetProperty()->SetSpecularPower(20);
@ -77,7 +88,7 @@ void Foam::geometryBase::initialiseActor(vtkActor* actor) const
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::geometryBase::geometryBase
Foam::functionObjects::runTimePostPro::geometryBase::geometryBase
(
const runTimePostProcessing& parent,
const dictionary& dict,
@ -109,38 +120,43 @@ Foam::geometryBase::geometryBase
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::geometryBase::~geometryBase()
Foam::functionObjects::runTimePostPro::geometryBase::~geometryBase()
{}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
const Foam::runTimePostProcessing& Foam::geometryBase::parent() const
const Foam::functionObjects::runTimePostProcessing&
Foam::functionObjects::runTimePostPro::geometryBase::parent() const
{
return parent_;
}
const Foam::word& Foam::geometryBase::name() const
const Foam::word&
Foam::functionObjects::runTimePostPro::geometryBase::name() const
{
return name_;
}
bool Foam::geometryBase::visible() const
bool Foam::functionObjects::runTimePostPro::geometryBase::visible() const
{
return visible_;
}
Foam::scalar Foam::geometryBase::opacity(const scalar position) const
Foam::scalar Foam::functionObjects::runTimePostPro::geometryBase::opacity
(
const scalar position
) const
{
return opacity_->value(position);
}
const Foam::HashPtrTable<Foam::Function1<Foam::vector>, Foam::word>&
Foam::geometryBase::colours() const
Foam::functionObjects::runTimePostPro::geometryBase::colours() const
{
return colours_;
}

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -22,17 +22,18 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::geometryBase
Foam::functionObjects::runTimePostPro::geometryBase
Description
Base class for surface handling
SourceFiles
geometryBase.C
\*---------------------------------------------------------------------------*/
#ifndef geometryBase_H
#define geometryBase_H
#ifndef functionObjects_runTimePostPro_geometryBase_H
#define functionObjects_runTimePostPro_geometryBase_H
#include "dictionary.H"
#include "vector.H"
@ -47,9 +48,14 @@ class vtkActor;
namespace Foam
{
namespace functionObjects
{
class runTimePostProcessing;
namespace runTimePostPro
{
/*---------------------------------------------------------------------------*\
Class geometryBase Declaration
\*---------------------------------------------------------------------------*/
@ -63,9 +69,9 @@ public:
enum renderModeType
{
rmFlat,
rmGouraud,
rmPhong
rmFlat, //< Flat shading
rmGouraud, //< Gouraud shading
rmPhong //< Phong shading
};
static const NamedEnum<renderModeType, 3> renderModeTypeNames;
@ -162,6 +168,8 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace runTimePostPro
} // End namespace functionObjects
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -47,15 +47,20 @@ License
// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
namespace Foam
{
namespace functionObjects
{
namespace runTimePostPro
{
defineTypeNameAndDebug(geometrySurface, 0);
addToRunTimeSelectionTable(surface, geometrySurface, dictionary);
}
}
}
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
void Foam::geometrySurface::addGeometryToScene
void Foam::functionObjects::runTimePostPro::geometrySurface::addGeometryToScene
(
const scalar position,
vtkRenderer* renderer,
@ -132,7 +137,7 @@ void Foam::geometrySurface::addGeometryToScene
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::geometrySurface::geometrySurface
Foam::functionObjects::runTimePostPro::geometrySurface::geometrySurface
(
const runTimePostProcessing& parent,
const dictionary& dict,
@ -144,7 +149,7 @@ Foam::geometrySurface::geometrySurface
{}
Foam::geometrySurface::geometrySurface
Foam::functionObjects::runTimePostPro::geometrySurface::geometrySurface
(
const runTimePostProcessing& parent,
const dictionary& dict,
@ -159,13 +164,13 @@ Foam::geometrySurface::geometrySurface
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::geometrySurface::~geometrySurface()
Foam::functionObjects::runTimePostPro::geometrySurface::~geometrySurface()
{}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
void Foam::geometrySurface::addGeometryToScene
void Foam::functionObjects::runTimePostPro::geometrySurface::addGeometryToScene
(
const scalar position,
vtkRenderer* renderer
@ -184,7 +189,10 @@ void Foam::geometrySurface::addGeometryToScene
}
void Foam::geometrySurface::updateActors(const scalar position)
void Foam::functionObjects::runTimePostPro::geometrySurface::updateActors
(
const scalar position
)
{
if (!visible_)
{

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -25,14 +25,15 @@ Class
Foam::geometrySurface
Description
Visualisation of surface geometry data
SourceFiles
geometrySurface.C
\*---------------------------------------------------------------------------*/
#ifndef geometrySurface_H
#define geometrySurface_H
#ifndef functionObjects_runTimePostPro_geometrySurface_H
#define functionObjects_runTimePostPro_geometrySurface_H
#include "surface.H"
@ -42,9 +43,13 @@ class vtkPolyData;
namespace Foam
{
namespace functionObjects
{
namespace runTimePostPro
{
/*---------------------------------------------------------------------------*\
Class geometrySurface Declaration
Class geometrySurface Declaration
\*---------------------------------------------------------------------------*/
class geometrySurface
@ -56,10 +61,10 @@ private:
// Private Member Functions
//- Disallow default bitwise copy construct
geometrySurface(const geometrySurface&);
geometrySurface(const geometrySurface&) = delete;
//- Disallow default bitwise assignment
void operator=(const geometrySurface&);
void operator=(const geometrySurface&) = delete;
protected:
@ -127,6 +132,8 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace runTimePostPro
} // End namespace functionObjects
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -40,26 +40,40 @@ License
namespace Foam
{
template<>
const char* NamedEnum<pathline::representationType, 4>::names[] =
{
"none",
"line",
"tube",
"vector"
};
namespace functionObjects
{
namespace runTimePostPro
{
defineTypeNameAndDebug(pathline, 0);
defineRunTimeSelectionTable(pathline, dictionary);
}
}
const Foam::NamedEnum<Foam::pathline::representationType, 4>
Foam::pathline::representationTypeNames;
template<>
const char* NamedEnum
<
functionObjects::runTimePostPro::pathline::representationType,
4
>::names[] =
{
"none",
"line",
"tube",
"vector"
};
}
const Foam::NamedEnum
<
Foam::functionObjects::runTimePostPro::pathline::representationType,
4
>
Foam::functionObjects::runTimePostPro::pathline::representationTypeNames;
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
void Foam::pathline::addLines
void Foam::functionObjects::runTimePostPro::pathline::addLines
(
const label frameI,
vtkActor* actor,
@ -114,7 +128,7 @@ void Foam::pathline::addLines
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::pathline::pathline
Foam::functionObjects::runTimePostPro::pathline::pathline
(
const runTimePostProcessing& parent,
const dictionary& dict,
@ -164,7 +178,8 @@ Foam::pathline::pathline
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::pathline> Foam::pathline::New
Foam::autoPtr<Foam::functionObjects::runTimePostPro::pathline>
Foam::functionObjects::runTimePostPro::pathline::New
(
const runTimePostProcessing& parent,
const dictionary& dict,
@ -196,7 +211,7 @@ Foam::autoPtr<Foam::pathline> Foam::pathline::New
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::pathline::~pathline()
Foam::functionObjects::runTimePostPro::pathline::~pathline()
{}

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -31,8 +31,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/
#ifndef pathline_H
#define pathline_H
#ifndef functionObjects_runTimePostPro_pathline_H
#define functionObjects_runTimePostPro_pathline_H
#include "geometryBase.H"
#include "NamedEnum.H"
@ -46,6 +46,10 @@ class vtkPolyDataMapper;
namespace Foam
{
namespace functionObjects
{
namespace runTimePostPro
{
/*---------------------------------------------------------------------------*\
Class pathline Declaration
@ -75,10 +79,10 @@ private:
// Private Member Functions
//- Disallow default bitwise copy construct
pathline(const pathline&);
pathline(const pathline&) = delete;
//- Disallow default bitwise assignment
void operator=(const pathline&);
void operator=(const pathline&) = delete;
protected:
@ -158,6 +162,8 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace runTimePostPro
} // End namespace functionObjects
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -40,24 +40,37 @@ License
namespace Foam
{
template<>
const char* NamedEnum<pointData::representationType, 2>::names[] =
{
"sphere",
"vector"
};
namespace functionObjects
{
namespace runTimePostPro
{
defineTypeNameAndDebug(pointData, 0);
defineRunTimeSelectionTable(pointData, dictionary);
}
}
template<>
const char* NamedEnum
<
functionObjects::runTimePostPro::pointData::representationType,
2
>::names[] =
{
"sphere",
"vector"
};
}
const Foam::NamedEnum<Foam::pointData::representationType, 2>
Foam::pointData::representationTypeNames;
const Foam::NamedEnum
<
Foam::functionObjects::runTimePostPro::pointData::representationType,
2
>
Foam::functionObjects::runTimePostPro::pointData::representationTypeNames;
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
void Foam::pointData::addPoints
void Foam::functionObjects::runTimePostPro::pointData::addPoints
(
const label frameI,
vtkActor* actor,
@ -83,7 +96,7 @@ void Foam::pointData::addPoints
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::pointData::pointData
Foam::functionObjects::runTimePostPro::pointData::pointData
(
const runTimePostProcessing& parent,
const dictionary& dict,
@ -124,7 +137,7 @@ Foam::pointData::pointData
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::pointData> Foam::pointData::New
Foam::autoPtr<Foam::functionObjects::runTimePostPro::pointData> Foam::functionObjects::runTimePostPro::pointData::New
(
const runTimePostProcessing& parent,
const dictionary& dict,
@ -156,7 +169,7 @@ Foam::autoPtr<Foam::pointData> Foam::pointData::New
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::pointData::~pointData()
Foam::functionObjects::runTimePostPro::pointData::~pointData()
{}

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::pointData
Foam::functionObjects::runTimePostPro::pointData
Description
@ -31,8 +31,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/
#ifndef pointData_H
#define pointData_H
#ifndef functionObjects_runTimePostPro_pointData_H
#define functionObjects_runTimePostPro_pointData_H
#include "geometryBase.H"
#include "NamedEnum.H"
@ -46,6 +46,10 @@ class vtkPolyDataMapper;
namespace Foam
{
namespace functionObjects
{
namespace runTimePostPro
{
/*---------------------------------------------------------------------------*\
Class pointData Declaration
@ -61,8 +65,8 @@ public:
enum representationType
{
rtSphere,
rtVector
rtSphere, //< Sphere
rtVector //< Vector
};
static const NamedEnum<representationType, 2> representationTypeNames;
@ -73,10 +77,10 @@ private:
// Private Member Functions
//- Disallow default bitwise copy construct
pointData(const pointData&);
pointData(const pointData&) = delete;
//- Disallow default bitwise assignment
void operator=(const pointData&);
void operator=(const pointData&) = delete;
protected:
@ -157,6 +161,8 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace runTimePostPro
} // End namespace functionObjects
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -32,6 +32,7 @@ License
#include "text.H"
#include "Time.H"
#include "sigFpe.H"
#include "addToRunTimeSelectionTable.H"
// VTK includes
#include "vtkPolyDataMapper.h"
@ -44,29 +45,36 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace functionObjects
{
defineTypeNameAndDebug(runTimePostProcessing, 0);
addToRunTimeSelectionTable
(
functionObject,
runTimePostProcessing,
dictionary
);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::runTimePostProcessing::runTimePostProcessing
Foam::functionObjects::runTimePostProcessing::runTimePostProcessing
(
const word& name,
const objectRegistry& obr,
const dictionary& dict,
const bool loadFromFiles
const Time& runTime,
const dictionary& dict
)
:
functionObjectState(obr, name),
scene_(obr, name),
fvMeshFunctionObject(name, runTime, dict),
scene_(runTime, name),
points_(),
lines_(),
surfaces_(),
text_(),
obr_(obr),
active_(true)
text_()
{
read(dict);
}
@ -74,15 +82,15 @@ Foam::runTimePostProcessing::runTimePostProcessing
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::runTimePostProcessing::~runTimePostProcessing()
Foam::functionObjects::runTimePostProcessing::~runTimePostProcessing()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::runTimePostProcessing::read(const dictionary& dict)
bool Foam::functionObjects::runTimePostProcessing::read(const dictionary& dict)
{
Info<< type() << " " << name_ << ": reading post-processing data" << endl;
Info<< type() << " " << name() << ": reading post-processing data" << endl;
scene_.read(dict);
@ -107,37 +115,32 @@ void Foam::runTimePostProcessing::read(const dictionary& dict)
<< exit(FatalIOError);
}
text_.append(new text(*this, iter().dict(), scene_.colours()));
text_.append(new runTimePostPro::text
(
*this,
iter().dict(),
scene_.colours())
);
}
return true;
}
void Foam::runTimePostProcessing::execute()
bool Foam::functionObjects::runTimePostProcessing::execute()
{
// Do nothing
return true;
}
void Foam::runTimePostProcessing::end()
{
// Do nothing
}
void Foam::runTimePostProcessing::timeSet()
{
// Do nothing
}
void Foam::runTimePostProcessing::write()
bool Foam::functionObjects::runTimePostProcessing::write()
{
if (!Pstream::master())
{
return;
return true;
}
Info<< type() << " " << name_ << " output:" << nl
Info<< type() << " " << name() << " output:" << nl
<< " Constructing scene" << endl;
// Unset any floating point trapping (some low-level rendering functionality
@ -214,6 +217,8 @@ void Foam::runTimePostProcessing::write()
// Reset any floating point trapping
sigFpe::set(false);
return true;
}

View File

@ -22,13 +22,13 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::runTimePostProcessing
Foam::functionObjects::runTimePostProcessing
Group
grpGraphicsFunctionObjects
Description
Function object to generate images during run-time.
Generate images during run-time.
The functionality makes use of the VTK libraries (see http://www.vtk.org)
which provide a broad set of functionality for scene composition and
@ -54,10 +54,10 @@ SourceFiles
\*---------------------------------------------------------------------------*/
#ifndef runTimePostProcessing_H
#define runTimePostProcessing_H
#ifndef functionObjects_runTimePostProcessing_H
#define functionObjects_runTimePostProcessing_H
#include "functionObjectState.H"
#include "fvMeshFunctionObject.H"
#include "objectRegistry.H"
#include "mapPolyMesh.H"
#include "PtrList.H"
@ -70,12 +70,15 @@ class vtkRenderWindow;
namespace Foam
{
class dictionary;
class pointData;
class pathline;
class surface;
class text;
namespace functionObjects
{
namespace runTimePostPro
{
class pointData;
class pathline;
class surface;
class text;
}
/*---------------------------------------------------------------------------*\
Class runTimePostProcessing Declaration
@ -83,7 +86,7 @@ class text;
class runTimePostProcessing
:
public functionObjectState
public fvMeshFunctionObject
{
private:
@ -101,19 +104,19 @@ private:
outputType output_;
//- Scene manager
scene scene_;
runTimePostPro::scene scene_;
//- List of points
PtrList<pointData> points_;
PtrList<runTimePostPro::pointData> points_;
//- List of lines
PtrList<pathline> lines_;
PtrList<runTimePostPro::pathline> lines_;
//- List of surfaces
PtrList<surface> surfaces_;
PtrList<runTimePostPro::surface> surfaces_;
//- List of text
PtrList<text> text_;
PtrList<runTimePostPro::text> text_;
// Private Member Functions
@ -127,17 +130,6 @@ private:
) const;
protected:
// Protected data
//- Reference to the database
const objectRegistry& obr_;
//- on/off switch
bool active_;
public:
//- Runtime type information
@ -150,49 +142,36 @@ public:
runTimePostProcessing
(
const word& name,
const objectRegistry&,
const dictionary&,
const bool loadFromFiles = false
const Time& runTime,
const dictionary&dict
);
//- Desructor
virtual ~runTimePostProcessing();
// Member Functions
virtual const objectRegistry& obr() const
const fvMesh& mesh() const
{
return obr_;
return mesh_;
}
//- Read the field min/max data
virtual void read(const dictionary&);
virtual bool read(const dictionary&);
//- Execute, currently does nothing
virtual void execute();
//- Execute at the final time-loop, currently does nothing
virtual void end();
//- Called when time was set at the end of the Time::operator++
virtual void timeSet();
virtual bool execute();
//- Write
virtual void write();
//- Update for changes of mesh
virtual void updateMesh(const mapPolyMesh&)
{}
//- Update for changes of mesh
virtual void movePoints(const polyMesh&)
{}
virtual bool write();
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace functionObjects
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -1,42 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ 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/>.
\*---------------------------------------------------------------------------*/
#include "runTimePostProcessingFunctionObject.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineNamedTemplateTypeNameAndDebug(runTimePostProcessingFunctionObject, 0);
addToRunTimeSelectionTable
(
functionObject,
runTimePostProcessingFunctionObject,
dictionary
);
}
// ************************************************************************* //

View File

@ -1,54 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ 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::runTimePostProcessingFunctionObject
Description
FunctionObject wrapper around runTimePostProcessing to allow them to be
created via the functions entry within controlDict.
SourceFiles
runTimePostProcessingFunctionObject.C
\*---------------------------------------------------------------------------*/
#ifndef runTimePostProcessingFunctionObject_H
#define runTimePostProcessingFunctionObject_H
#include "runTimePostProcessing.H"
#include "OutputFilterFunctionObject.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef OutputFilterFunctionObject<runTimePostProcessing>
runTimePostProcessingFunctionObject;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -26,7 +26,7 @@ License
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type>
void Foam::runTimePostProcessing::readObjects
void Foam::functionObjects::runTimePostProcessing::readObjects
(
const dictionary& dict,
PtrList<Type>& objects

View File

@ -43,19 +43,30 @@ License
namespace Foam
{
template<>
const char* NamedEnum<scene::modeType, 2>::names[] =
const char* NamedEnum
<
functionObjects::runTimePostPro::scene::modeType,
2
>::names[] =
{
"static",
"flightPath"
};
}
const Foam::NamedEnum<Foam::scene::modeType, 2> modeTypeNames_;
const Foam::NamedEnum
<
Foam::functionObjects::runTimePostPro::scene::modeType,
2
> modeTypeNames_;
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
void Foam::scene::readCamera(const dictionary& dict)
void Foam::functionObjects::runTimePostPro::scene::readCamera
(
const dictionary& dict
)
{
if (dict.readIfPresent("nFrameTotal", nFrameTotal_))
{
@ -155,7 +166,10 @@ void Foam::scene::readCamera(const dictionary& dict)
}
void Foam::scene::readColours(const dictionary& dict)
void Foam::functionObjects::runTimePostPro::scene::readColours
(
const dictionary& dict
)
{
const wordList colours = dict.toc();
forAll(colours, i)
@ -166,7 +180,11 @@ void Foam::scene::readColours(const dictionary& dict)
}
void Foam::scene::initialise(vtkRenderer* renderer, const word& outputName)
void Foam::functionObjects::runTimePostPro::scene::initialise
(
vtkRenderer* renderer,
const word& outputName
)
{
currentFrameI_ = 0;
position_ = startPosition_;
@ -256,7 +274,10 @@ void Foam::scene::initialise(vtkRenderer* renderer, const word& outputName)
}
void Foam::scene::setCamera(vtkRenderer* renderer) const
void Foam::functionObjects::runTimePostPro::scene::setCamera
(
vtkRenderer* renderer
) const
{
if (mode_ == mtFlightPath)
{
@ -281,7 +302,8 @@ void Foam::scene::setCamera(vtkRenderer* renderer) const
}
Foam::string Foam::scene::frameIndexStr() const
Foam::string
Foam::functionObjects::runTimePostPro::scene::frameIndexStr() const
{
string str = Foam::name(currentFrameI_);
str.insert(0, 4 - str.length(), '0');
@ -292,7 +314,11 @@ Foam::string Foam::scene::frameIndexStr() const
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::scene::scene(const objectRegistry& obr, const word& name)
Foam::functionObjects::runTimePostPro::scene::scene
(
const objectRegistry& obr,
const word& name
)
:
obr_(obr),
name_(name),
@ -315,39 +341,39 @@ Foam::scene::scene(const objectRegistry& obr, const word& name)
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::scene::~scene()
Foam::functionObjects::runTimePostPro::scene::~scene()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
const Foam::HashPtrTable<Foam::Function1<Foam::vector>, Foam::word>&
Foam::scene::colours() const
Foam::functionObjects::runTimePostPro::scene::colours() const
{
return colours_;
}
Foam::label Foam::scene::frameIndex() const
Foam::label Foam::functionObjects::runTimePostPro::scene::frameIndex() const
{
return currentFrameI_;
}
Foam::scalar Foam::scene::position() const
Foam::scalar Foam::functionObjects::runTimePostPro::scene::position() const
{
return position_;
}
void Foam::scene::read(const dictionary& dict)
void Foam::functionObjects::runTimePostPro::scene::read(const dictionary& dict)
{
readCamera(dict.subDict("camera"));
readColours(dict.subDict("colours"));
}
bool Foam::scene::loop(vtkRenderer* renderer)
bool Foam::functionObjects::runTimePostPro::scene::loop(vtkRenderer* renderer)
{
static bool initialised = false;
setCamera(renderer);
@ -381,7 +407,10 @@ bool Foam::scene::loop(vtkRenderer* renderer)
}
void Foam::scene::saveImage(vtkRenderWindow* renderWindow) const
void Foam::functionObjects::runTimePostPro::scene::saveImage
(
vtkRenderWindow* renderWindow
) const
{
if (!renderWindow)
{

View File

@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::scene
Foam::functionObjects::runTimePostPro::scene
Description
@ -31,8 +31,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/
#ifndef scene_H
#define scene_H
#ifndef functionObjects_runTimePostPro_scene_H
#define functionObjects_runTimePostPro_scene_H
// OpenFOAM includes
#include "dictionary.H"
@ -54,6 +54,10 @@ class vtkRenderWindow;
namespace Foam
{
namespace functionObjects
{
namespace runTimePostPro
{
/*---------------------------------------------------------------------------*\
Class scene Declaration
@ -193,6 +197,8 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace runTimePostPro
} // End namespace functionObjects
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -40,27 +40,43 @@ License
namespace Foam
{
template<>
const char* NamedEnum<surface::representationType, 5>::names[] =
{
"none",
"wireframe",
"surface",
"surfaceWithEdges",
"glyph"
};
namespace functionObjects
{
namespace runTimePostPro
{
defineTypeNameAndDebug(surface, 0);
defineRunTimeSelectionTable(surface, dictionary);
}
}
template<>
const char* NamedEnum
<
functionObjects::runTimePostPro::surface::representationType,
5
>::names[] =
{
"none",
"wireframe",
"surface",
"surfaceWithEdges",
"glyph"
};
}
const Foam::NamedEnum<Foam::surface::representationType, 5>
Foam::surface::representationTypeNames;
const Foam::NamedEnum
<
Foam::functionObjects::runTimePostPro::surface::representationType,
5
>
Foam::functionObjects::runTimePostPro::surface::representationTypeNames;
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
void Foam::surface::setRepresentation(vtkActor* actor) const
void Foam::functionObjects::runTimePostPro::surface::setRepresentation
(
vtkActor* actor
) const
{
geometryBase::initialiseActor(actor);
@ -93,7 +109,7 @@ void Foam::surface::setRepresentation(vtkActor* actor) const
}
void Foam::surface::addFeatureEdges
void Foam::functionObjects::runTimePostPro::surface::addFeatureEdges
(
vtkRenderer* renderer,
vtkPolyData* data
@ -131,7 +147,7 @@ void Foam::surface::addFeatureEdges
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::surface::surface
Foam::functionObjects::runTimePostPro::surface::surface
(
const runTimePostProcessing& parent,
const dictionary& dict,
@ -187,7 +203,8 @@ Foam::surface::surface
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::surface> Foam::surface::New
Foam::autoPtr<Foam::functionObjects::runTimePostPro::surface>
Foam::functionObjects::runTimePostPro::surface::New
(
const runTimePostProcessing& parent,
const dictionary& dict,
@ -219,13 +236,16 @@ Foam::autoPtr<Foam::surface> Foam::surface::New
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::surface::~surface()
Foam::functionObjects::runTimePostPro::surface::~surface()
{}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
void Foam::surface::updateActors(const scalar position)
void Foam::functionObjects::runTimePostPro::surface::updateActors
(
const scalar position
)
{
if (!featureEdges_)
{

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::surface
Foam::functionObjects::runTimePostPro::surface
Description
@ -31,8 +31,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/
#ifndef surface_H
#define surface_H
#ifndef functionObjects_runTimePostPro_surface_H
#define functionObjects_runTimePostPro_surface_H
#include "geometryBase.H"
#include "NamedEnum.H"
@ -48,6 +48,10 @@ class vtkPolyData;
namespace Foam
{
namespace functionObjects
{
namespace runTimePostPro
{
/*---------------------------------------------------------------------------*\
Class surface Declaration
@ -78,10 +82,10 @@ private:
// Private Member Functions
//- Disallow default bitwise copy construct
surface(const surface&);
surface(const surface&) = delete;
//- Disallow default bitwise assignment
void operator=(const surface&);
void operator=(const surface&) = delete;
protected:
@ -181,6 +185,8 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace runTimePostPro
} // End namespace functionObjects
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -25,6 +25,7 @@ License
// OpenFOAM includes
#include "text.H"
#include "fvMesh.H"
#include "runTimePostProcessing.H"
// VTK includes
@ -35,7 +36,7 @@ License
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::text::text
Foam::functionObjects::runTimePostPro::text::text
(
const runTimePostProcessing& parent,
const dictionary& dict,
@ -63,13 +64,13 @@ Foam::text::text
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::text::~text()
Foam::functionObjects::runTimePostPro::text::~text()
{}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
void Foam::text::addGeometryToScene
void Foam::functionObjects::runTimePostPro::text::addGeometryToScene
(
const scalar position,
vtkRenderer* renderer
@ -86,7 +87,8 @@ void Foam::text::addGeometryToScene
string textAndTime = string_;
if (timeStamp_)
{
textAndTime = textAndTime + " " + geometryBase::parent_.obr().time().timeName();
textAndTime =
textAndTime + " " + geometryBase::parent_.mesh().time().timeName();
}
actor->SetInput(textAndTime.c_str());
actor->GetTextProperty()->SetFontFamilyToArial();
@ -108,7 +110,10 @@ void Foam::text::addGeometryToScene
}
void Foam::text::updateActors(const scalar position)
void Foam::functionObjects::runTimePostPro::text::updateActors
(
const scalar position
)
{
// do nothing - all handled by addGeometryToScene
}

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::text
Foam::functionObjects::runTimePostPro::text
Description
Example of text object specification:
@ -48,8 +48,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/
#ifndef text_H
#define text_H
#ifndef functionObjects_runTimePostPro_text_H
#define functionObjects_runTimePostPro_text_H
#include "geometryBase.H"
#include "Tuple2.H"
@ -60,6 +60,10 @@ class vtkRenderer;
namespace Foam
{
namespace functionObjects
{
namespace runTimePostPro
{
/*---------------------------------------------------------------------------*\
Class text Declaration
@ -74,10 +78,10 @@ private:
// Private Member Functions
//- Disallow default bitwise copy construct
text(const text&);
text(const text&) = delete;
//- Disallow default bitwise assignment
void operator=(const text&);
void operator=(const text&) = delete;
protected:
@ -136,6 +140,8 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace runTimePostPro
} // End namespace functionObjects
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //