Commit Graph

51 Commits

Author SHA1 Message Date
OpenFOAM bot
154029ddd0 BOT: Cleaned up header files 2019-02-06 12:28:23 +00:00
Mark Olesen
5252c70b46 STYLE: add OpenFOAM/include directory in CMakeLists
- eg for foamVersion.H
2018-12-04 01:38:46 +01:00
Mark Olesen
628b2445fc ENH: improve setup for paraview
- removed reliance on ParaView_INCLUDE_DIR variable for conveying the
  major.minor version information when compiling. This can be somewhat
  fragile and also adds variable that is an unnecessary when running
  (only used when compiling).

  Instead use `have_pvplugin_support` function in paraviewFunctions
  wmake script to determine the maj.min from the PV_PLUGIN_PATH
  since we have already defined the output path there with paraview
  maj.min numbering.

  Can now build with paraview from the operating system,
  provided that it has develop headers available.

      ParaView_VERSION=system

  In the etc/config.sh/paraview setup, the maj.min is taken from
  the corresponding `paraview --version` output and used when
  defining the PV_PLUGIN_PATH.

  During the build, the include path taken from `paraview-config`
  for a system installation, from the guess installation root
  of the paraview binary, or ParaView_DIR otherwise.

NB: using a system ParaView for building runTimePostProcessing is unsupported.

- these types of builds appear to have various library resolution issues
  (eg, libexpat not being loaded). Additionally, the build logic does
  not yet cover this type of use case.
2018-11-29 01:48:00 +01:00
Mark Olesen
56dd71ab11 CONFIG: cmake targets are globally unique
- unify CMakeLists naming and align content
2018-07-20 12:49:25 +02:00
Mark Olesen
a410f52e6d COMP: handle unset WM_OSTYPE for cmake targets (issue #909)
- regularise referencing of OpenFOAM env variables, sources etc.
2018-06-26 09:48:57 +02:00
Mark Olesen
f9fe71815a STYLE: consistent use of '= delete' for removed constructors/assignments
- make the purpose more explicit, and reduces some work for the
  compiler as well.
2018-05-30 12:03:17 +02:00
Mark Olesen
3f6e130c91 STYLE: flatten PVReaders directory structure 2017-08-02 11:19:57 +02:00
Mark Olesen
86ef9e86dc ENH: make treatment of stream allocators more uniform (issue #532)
- use allocator class to wrap the stream pointers instead of passing
  them into ISstream, OSstream and using a dynamic cast to delete
  then. This is especially important if we will have a bidirectional
  stream (can't delete twice!).

STYLE:

- file stream constructors with std::string (C++11)

- for rewind, explicit about in|out direction. This is not currently
  important, but avoids surprises with any future bidirectional access.

- combined string streams in StringStream.H header.
  Similar to <sstream> include that has both input and output string
  streams.
2017-07-17 15:14:38 +02:00
Mark Olesen
a42c35f64b ENH: paraview reader module with internal caching of the vtk geometries
- The reader module allows two levels of caching.
  The OpenFOAM fvMesh can be cached in memory, for faster loading of
  fields. Additionally, the translated VTK geometries are held in a
  local cache. The cached VTK geometries should incur no additional
  overhead since they use the VTK reference counting for their storage
  management.
2017-05-24 17:12:49 +02:00
Mark Olesen
96d98cd2de ENH: paraFoam --help => immediate pass-through to paraview --help
ENH: Paraview modules.

- Update props with int, not bool (for more versatility)
- Set properties and tool-tips directly on widgets instead of buttons
2017-05-23 08:02:25 +02:00
Mark Olesen
cf5ebd82db ENH: improve internal bookkeeping in paraview readers
- has the selected values directly and use these lookup names to store
  directly into a hash. This replaces several parallel lists of
  decomp information etc and makes it easier.
2017-05-14 21:42:59 +02:00
Mark Olesen
09f0cfd5c7 STYLE: reduce number of small methods in paraview reader
- improves the overview of the code
2017-05-14 21:38:15 +02:00
Mark Olesen
48bf71dd26 STYLE: avoid VTK InsertNextPoint if we already know the sizes
- avoids potentially issues if we reusing a vtkPoints array,
  and should be marginally faster without the additional
  range checking.
2017-05-14 21:24:06 +02:00
Mark Olesen
2e0337d024 ENH: use smart pointers for paraview readers
- adds flexiblity and reduces risk of memory leaks as we add/change
  features

STYLE: adjust naming for paraview internal polyDecomp
2017-05-14 21:04:11 +02:00
Mark Olesen
e5cdee5dd9 STYLE: use labelRange and range-based-for in paraview readers
- also use updated forAll* macros
2017-05-12 15:36:44 +02:00
Andrew Heather
db5348880e MRG: resolved merge conflicts from merge from develop branch 2017-05-19 16:29:54 +01:00
Mark Olesen
15d0a918c5 COMP: use VTK_OVERRIDE on paraview methods
COMP: avoid undefined-var-template warning in runTimePostProcessing
2017-05-18 13:21:48 +02:00
Mark Olesen
3814762785 ENH: relocate triSurface classes into surfMesh library (issue #294)
- simplifies organization, includes, linkage etc.
2017-05-18 10:42:05 +02:00
Mark Olesen
5fc6c3ca34 ENH: provide FOAM_EXECUTABLE as environment variable in argList
- can be used directly from within an application or function-object.
  Makes it available for dictionaries.
2017-02-24 17:48:13 +01:00
Mark Olesen
1bdb57985f COMP: drop FOAM_EXT_LIBBIN dependency for VTK-related items
- they don't use scotch/metis anyhow, which are the only things
  placed in FOAM_EXT_LIBBIN
2017-04-04 16:22:12 +02:00
Mark Olesen
3d02c8a530 ENH: improve isolation of shell variables in wmake scripts
- reduces unexpected interactions between various make elements
2017-02-10 16:13:54 +01:00
Mark Olesen
9d63cc5ca8 ENH: add versioning for VTK library to runTimePostProcessing (issue #370)
Eg,
    librunTimePostProcessing.so
    librunTimePostProcessing.so.7 -> librunTimePostProcessing.so.7.1.0
    librunTimePostProcessing.so.7.1.0

- centralize handling of paraview/vtk versioning into wmake/cmakeFunctions
2017-01-23 13:37:42 +01:00
Mark Olesen
f47e8513d7 ENH: avoid deprecated paraview method SetImmediateUpdate()
- add support for patch names in block mesh reader.
2017-01-12 11:41:15 +01:00
Mark Olesen
ecb80a2ee8 ENH: refactor paraview readers code to avoid duplication
- as originally intended years ago, but never actually done.

- use 'foamPvCore' instead of 'vtkPVReaders' to avoid potential name
  collisions with any 'vtk*' files and since we may reuse these
  functions in other foam-paraview modules (not just readers).

STYLE: use same font size/colour for patch-names as for point-numbers

BUG: repair issue with single time-step

- paraview time-selector returns '0' as the requested time if there is
  only one time step. However, if we have skipped the 0/ directory,
  this single time step is likely a non-zero value.
2017-01-12 06:40:58 +01:00
Mark Olesen
7a90f5e6fb ENH: add versioning to paraview plugin support libraries (issue #370)
- use "-pvMAJ.MIN" suffix for similarity with the paraview convention

- use sentinel file to ensure clean change of intermediate targets

- ensure all library files are being properly removed
2017-01-05 16:22:07 +01:00
Mark Olesen
4eb679614c ENH: update blockMesh reader (issue #337)
- use property group customization instead of individual pqPropertyWidget
2017-01-04 12:27:36 +01:00
Mark Olesen
71ea6bec62 ENH: update blockMesh reader for paraview 5.2 (issue #337)
- although this is not the final desired form, since it uses
  individual pqPropertyWidget customizations (ie, ugly layout, too
  many bits of code), but is an interesting intermediate solution
  that may be useful in other contexts.
2017-01-04 10:48:13 +01:00
Andrew Heather
c0f44ac4f3 MRG: Integrated foundation code 2016-12-12 12:10:29 +00:00
Henry Weller
3d08651324 PVReaders: Update link order to avoid problems on Ubuntu
Resolves bug-report http://bugs.openfoam.org/view.php?id=2372
2016-12-06 10:57:35 +00:00
Mark Olesen
a2bba390f2 COMP: improve robustness of cmake (vtk) builds when directories have moved 2016-11-28 23:28:21 +01:00
Mark Olesen
b69ab6c895 COMP: reduce compile noise for paraview modules
- vtkkwiml headers use old-style casts, so reduce compile-time warnings
2016-11-28 22:34:38 +01:00
Henry Weller
80db302666 Allwmake: Remove 'set -x' which generates a lot of noise
'set -x' should be used for debugging.

Added command printing into wmake and Allwmake as a replacement for
'set -x' to log current target.
2016-11-13 18:08:22 +00:00
Henry Weller
23795a7fb5 PVblockMeshReader: Removed unnecessary 'UpdateGUI' button
The 'Refresh' button updates the blockMesh and the GUI.
2016-11-11 12:17:53 +00:00
Henry Weller
74cfb6bf34 PVblockMeshReader: Remove old vertex labels on refresh 2016-11-05 21:41:32 +00:00
Henry Weller
a21c3d6332 PVblockMeshReader: Added "Refresh" button to update the blockMesh
Reconstructs the blockMesh and updates the display from the current
blockMeshDict so that any changes can viewed without exiting
paraFoam -block
2016-11-04 20:50:13 +00:00
Henry Weller
3ab919d407 paraFoam -block: Added support for vertex and block names
Patch contributed by Mattijs Janssens
2016-11-04 17:29:02 +00:00
Andrew Heather
af81184ecf MRG: Resolve conflict with latest foundation merge 2016-10-26 15:37:15 +01:00
Henry Weller
009203188f blockMesh: New experimental support for projecting block face point to geometric surfaces
For example, to mesh a sphere with a single block the geometry is defined in the
blockMeshDict as a searchableSurface:

    geometry
    {
        sphere
        {
            type searchableSphere;
            centre (0 0 0);
            radius 1;
        }
    }

The vertices, block topology and curved edges are defined in the usual
way, for example

    v 0.5773502;
    mv -0.5773502;

    a 0.7071067;
    ma -0.7071067;

    vertices
    (
        ($mv $mv $mv)
        ( $v $mv $mv)
        ( $v  $v $mv)
        ($mv  $v $mv)
        ($mv $mv  $v)
        ( $v $mv  $v)
        ( $v  $v  $v)
        ($mv  $v  $v)
    );

    blocks
    (
        hex (0 1 2 3 4 5 6 7) (10 10 10) simpleGrading (1 1 1)
    );

    edges
    (
        arc 0 1 (0 $ma $ma)
        arc 2 3 (0 $a $ma)
        arc 6 7 (0 $a $a)
        arc 4 5 (0 $ma $a)

        arc 0 3 ($ma 0 $ma)
        arc 1 2 ($a 0 $ma)
        arc 5 6 ($a 0 $a)
        arc 4 7 ($ma 0 $a)

        arc 0 4 ($ma $ma 0)
        arc 1 5 ($a $ma 0)
        arc 2 6 ($a $a 0)
        arc 3 7 ($ma $a 0)
    );

which will produce a mesh in which the block edges conform to the sphere
but the faces of the block lie somewhere between the original cube and
the spherical surface which is a consequence of the edge-based
transfinite interpolation.

Now the projection of the block faces to the geometry specified above
can also be specified:

    faces
    (
        project (0 4 7 3) sphere
        project (2 6 5 1) sphere
        project (1 5 4 0) sphere
        project (3 7 6 2) sphere
        project (0 3 2 1) sphere
        project (4 5 6 7) sphere
    );

which produces a mesh that actually conforms to the sphere.

See OpenFOAM-dev/tutorials/mesh/blockMesh/sphere

This functionality is experimental and will undergo further development
and generalization in the future to support more complex surfaces,
feature edge specification and extraction etc.  Please get involved if
you would like to see blockMesh become a more flexible block-structured
mesher.

Henry G. Weller, CFD Direct.
2016-10-13 15:05:24 +01:00
Henry Weller
8dd18cc077 vtkPVblockMeshConvert: Updated to use the new blockDescriptor::edgesPointsWeights 2016-10-09 17:52:52 +01:00
Henry Weller
50b549f368 blockMesh: rationalizing class and member names 2016-10-08 19:48:39 +01:00
Andrew Heather
9fbd612672 GIT: Initial state after latest Foundation merge 2016-09-20 14:49:08 +01:00
Mark Olesen
17f0aa1db8 STYLE: propogate WM_CC for CMake (fixes #226)
- reported by Bruno
2016-09-06 16:17:20 +02:00
Henry Weller
72bd9fd6cd ParaView: GUI resource files in plugins are no longer supported
Patch contributed by Bruno Santos
Resolves bug-report http://bugs.openfoam.org/view.php?id=2192
2016-08-16 08:46:39 +01:00
Henry Weller
58f905ff70 C++11: Replaced the C NULL with the safer C++11 nullptr
Requires gcc version 4.7 or higher
2016-08-05 17:19:38 +01:00
Mark Olesen
ecfbdce3da ENH: avoid deprecated resource xml when building paraview plugins (fixes #181)
- remove old VTK_CONVEX_POINT_SET code, since VTK_POLYHEDRON exists
  since several years

ENH: improve robustness of paraFoam script

- only check the relevant plugin types,
  fallback to native reader if needed/possible.
2016-07-12 11:17:57 +02:00
Henry Weller
dea6a3c6e8 wmake/Allwmake: Completed support for targetType 'objects'
Patch contributed by Mattijs Janssens
2016-06-24 15:25:11 +01:00
Mark Olesen
726aa8cdb9 ENH: out of source build for paraview plugins
- more consistent with the rest of the OpenFOAM source tree

- improve wmake / wclean behaviour
2016-06-20 11:18:24 +02:00
Henry Weller
67de20df25 Further standardization of loop index naming: pointI -> pointi, patchI -> patchi 2016-05-18 21:20:42 +01:00
Henry Weller
a9b8bb13e0 applications/.*/Allwmake: Updated to support "stop on 1st error"
Patch contributed by Bruno Santos
Resolved bug-report http://www.openfoam.org/mantisbt/view.php?id=2042
2016-04-04 09:03:40 +01:00
Henry Weller
350d03246e scripts: Reformat with consistent section separators 2016-02-15 18:30:24 +00:00