ENH: improve file reader support for runTimePostProcessing (#1091)

- support .vtp format for geometry, surface, line, cloud.

- use native reader for handling vtk, vtp, obj, stl surface files.
  For other formats, use the MeshedSurface (the surfMesh lib) to
  handle reading and Foam::vtk::Tools::Patch to handle the
  conversion to vtkPolyData. This combination is more memory efficient.

- update tutorial case to include vtp surface geometry
This commit is contained in:
Mark Olesen
2018-12-16 19:14:22 +01:00
parent b6983e6af5
commit c3507f74f2
33 changed files with 681 additions and 441 deletions

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) 2016 OpenCFD Ltd.
\\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -25,6 +25,8 @@ Class
Foam::functionObjects::runTimePostPro::text
Description
Define text element for runTimePostProcessing
Example of text object specification:
\verbatim
text1
@ -39,10 +41,22 @@ Description
// colour (0 1 1);
// Optional entry
timeStamp yes; //Append solution time to string
timeStamp yes; // Append solution time to string
}
\endverbatim
Dictionary controls
\table
Property | Description | Required | Default
visible | Display the text | yes |
string | Text to display | yes |
position | The (x y) viewport position | yes |
size | The font size in points | yes |
bold | Use bold font | yes |
colour | Override default text colour | no |
timeStamp | Append solution timeName to string | no | false
\endtable
SourceFiles
text.C
@ -56,6 +70,7 @@ SourceFiles
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Forward declarations
class vtkRenderer;
namespace Foam
@ -73,20 +88,9 @@ class text
:
public geometryBase
{
private:
// Private Member Functions
//- No copy construct
text(const text&) = delete;
//- No copy assignment
void operator=(const text&) = delete;
protected:
// Protected data
// Protected Data
//- Text
string string_;
@ -107,6 +111,15 @@ protected:
bool timeStamp_;
// Protected Member Functions
//- No copy construct
text(const text&) = delete;
//- No copy assignment
void operator=(const text&) = delete;
public:
// Constructors
@ -116,7 +129,7 @@ public:
(
const runTimePostProcessing& parent,
const dictionary& dict,
const HashPtrTable<Function1<vector>, word>& colours
const HashPtrTable<Function1<vector>>& colours
);