- 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.
- this allows filling in the VTK structures without intermediate data
and without sequencial insertion. Should be faster and smaller
than the previous cell-wise insertion methods.
Most importantly, it improves code reuse.
- 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.
- less clutter and typing to use the default template parameter when
the key is 'word' anyhow.
- use EdgeMap instead of the longhand HashTable version where
appropriate
- 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.
- 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
- remove old (ParaView-3) files
- Works in 4.4.0, 5.0.1, 5.2.0 etc
STYLE:
- slots now use SM properties directly without a second lookup.
This reduces exposure of the QT elements and simplifies the coding.
- avoid focus borders on the Qt elements
- place the "use Polyhedron" checkbox into a column
- move "Cache Mesh" down in the GUI (an advanced feature and thus
should be less prominent)
- obtain button labels/tooltip directly from the XML content
- 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.
- Could be related to interrupted builds.
So if there are any parts of the build that rely on an explicit
'wmakeLnInclude', make sure that the contents are properly updated.
--
ENH: improved feedback from top-level Allwmake
- Report which section (libraries, applications) is being built.
- Provide final summary of date, version, etc, which can be helpful
for later diagnosis or record keeping.
- The -log=XXX option for Allwmake now accepts a directory name
and automatically appends an appropriate log name.
Eg,
./Allwmake -log=logs/ ->> logs/log.linux64GccDPInt32Opt
The default name is built from the value of WM_OPTIONS.
--
BUG: shell not exiting properly in combination with -log option
- the use of 'tee' causes the shell to hang around.
Added an explicit exit to catch this.
--
- Detecting the '-k' (-non-stop) option at the top-level Allwmake, which
may improve robustness.
- Explicit continue-on-error for foamyMesh (as optional component)
- unify format of script messages for better readability
COMP: reduce warnings when building Pstream (old-style casts in openmpi)
- Cannot test if these older reader modules actually build,
owning largely to build issues since with paraview 3.14 (Feb 2012)
and paraview 3.98 (Dec 2012) themselves.
Note: classes are prefixed with 'foamVtk' instead of 'vtk' to avoid potential
conflicts with VTK itself.
foamVtkCore
~~~~~~~~~~~
- General very low-level functionality.
foamVtkPTraits
~~~~~~~~~~~~~~
- Traits type of functionality for VTK
foamVtkOutputOptions
~~~~~~~~~~~~~~~~~~~~
- The various format output options as a class that can be passed to
formatters etc.
foamVtkCells
~~~~~~~~~~~~
- Intended for unifying vtkTopo and PV-Reader code in the future.
- Handles polyhedron decompose internally etc
foamVtkOutput, foamVtkFormatter
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Output helpers.
- Selector for individual formatters.
Currently write all scalar data a 'float' (not 'double'). Can
revisit this in the future.
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.
- There will be triangles rendered inside the mesh (when
surface-rendering), because one of the cell's triangles is defined
as a quadrangle in VTK_WEDGE.
- Therefore, this VTK_WEDGE representation is only used when
decomposing the mesh, otherwise the correct representation is done
by VTK_POLYHEDRON.
- Furthermore, using VTK_PYRAMID gave worse result, because it renders
2 triangles inside the mesh for the collapsed quadrangle, likely due
to mismatch with the adjacent cell's face.
- Using VTK_HEXAHEDRON was not tested in this iteration, given that it
should give even worse results, when compared to using VTK_PYRAMID.
Patch contributed by Bruno Santos
Resolves bug-report http://bugs.openfoam.org/view.php?id=2099