Commit Graph

723 Commits

Author SHA1 Message Date
Henry Weller
f5ce43069d functionObjects, foamCalcFunctions, fvOptions: Standardized keywords for selecting fields and objects
Generally fields and objects are selected using the 'field[s]' and
'object[s]' keywords but this was not consistent between all
functionObject, fvOptions etc. and now fixed by applying the following
renaming:

fieldName -> field
fieldNames -> fields
objectName -> object
objectNames -> objects
2016-05-21 20:15:21 +01:00
Henry Weller
67de20df25 Further standardization of loop index naming: pointI -> pointi, patchI -> patchi 2016-05-18 21:20:42 +01:00
Henry Weller
5af1a7e4f3 functionObjects::partialWrite: Redundant and removed
the equivalent functionality is provided by the writeRegisteredObject
   functionObject in a MUCH simpler, easier and extensible manner.

functionObject: Removed the now redundant 'timeSet' function.
2016-05-18 12:23:29 +01:00
Henry Weller
83bae2efd3 functionObjects: Renamed dictionary entry 'functionObjectLibs' -> 'libs'
This changes simplifies the specification of functionObjects in
controlDict and is consistent with the 'libs' option in controlDict to
load special solver libraries.

Support for the old 'functionObjectLibs' name is supported for backward compatibility.
2016-05-16 22:09:01 +01:00
Henry Weller
a44857b4f2 functionObjects: Simply functionObjects requiring access to the fvMesh using fvMeshFunctionObject 2016-05-16 16:21:06 +01:00
Henry Weller
78d2971b21 functionObjects: rewritten to all be derived from 'functionObject'
- Avoids the need for the 'OutputFilterFunctionObject' wrapper
  - Time-control for execution and writing is now provided by the
    'timeControlFunctionObject' which instantiates the processing
    'functionObject' and controls its operation.
  - Alternative time-control functionObjects can now be written and
    selected at run-time without the need to compile wrapped version of
    EVERY existing functionObject which would have been required in the
    old structure.
  - The separation of 'execute' and 'write' functions is now formalized in the
    'functionObject' base-class and all derived classes implement the
    two functions.
  - Unnecessary implementations of functions with appropriate defaults
    in the 'functionObject' base-class have been removed reducing
    clutter and simplifying implementation of new functionObjects.
  - The 'coded' 'functionObject' has also been updated, simplified and tested.
  - Further simplification is now possible by creating some general
    intermediate classes derived from 'functionObject'.
2016-05-15 16:40:01 +01:00
Henry Weller
ce0cd35185 Patches contributed by Mattijs Janssens:
splitMeshRegions: handle flipping of faces for surface fields

subsetMesh: subset dimensionedFields

decomposePar: use run-time selection of decomposition constraints. Used to
    keep cells on particular processors. See the decomposeParDict in

$FOAM_UTILITIES/parallel/decomposePar:
  - preserveBaffles: keep baffle faces on same processor
  - preserveFaceZones: keep faceZones owner and neighbour on same processor
  - preservePatches: keep owner and neighbour on same processor. Note: not
    suitable for cyclicAMI since these are not coupled on the patch level
  - singleProcessorFaceSets: keep complete faceSet on a single processor
  - refinementHistory: keep cells originating from a single cell on the
    same processor.

decomposePar: clean up decomposition of refinement data from snappyHexMesh

reconstructPar: reconstruct refinement data (refineHexMesh, snappyHexMesh)

reconstructParMesh: reconstruct refinement data (refineHexMesh, snappyHexMesh)

redistributePar:
  - corrected mapping surfaceFields
  - adding processor patches in order consistent with decomposePar

argList: check that slaves are running same version as master

fvMeshSubset: move to dynamicMesh library

fvMeshDistribute:
  - support for mapping dimensionedFields
  - corrected mapping of surfaceFields

parallel routines: allow parallel running on single processor

Field: support for
  - distributed mapping
  - mapping with flipping

mapDistribute: support for flipping

AMIInterpolation: avoid constructing localPoints
2016-05-15 16:36:48 +01:00
Henry Weller
6164c2f262 Standardized the naming of functions which control the writing of fields etc.
to have the prefix 'write' rather than 'output'

So outputTime() -> writeTime()

but 'outputTime()' is still supported for backward-compatibility.

Also removed the redundant secondary-writing functionality from Time
which has been superseded by the 'writeRegisteredObject' functionObject.
2016-05-12 17:38:01 +01:00
Henry Weller
c983670c91 functionObjects: Changed options 'outputControl' -> 'writeControl' and 'outputInterval' -> 'writeInterval'
for consistency with the time controls in controlDict and to avoid
unnecessary confusion.  All code and tutorials have been updated.

The old names 'outputControl' and 'outputInterval' are but supported for
backward compatibility but deprecated.
2016-05-12 11:38:11 +01:00
Henry Weller
437030a57d functionObjects: Removed the redundant "viable" member function
Construction failure and recovery is not handled with exceptions in functionObjectList
2016-05-11 12:57:17 +01:00
Henry Weller
080908732d src/postProcessing/functionObjects: Removed unused IOOutputFilter clutter 2016-05-10 12:54:42 +01:00
Henry Weller
1ab0875293 writeVTK: New functionObject to write fields is VTK format
Description
    This functionObject writes objects registered to the database in VTK format
    using the foamToVTK library.

    Currently only the writing of the cell-values of volFields is supported but
    support for other field types, patch fields, Lagrangian data etc. will be
    added.

    Example of function object specification:
    \verbatim
        writeVTK1
        {
            type        writeVTK;
            functionObjectLibs ("libIOFunctionObjects.so");
            ...
            objectNames (obj1 obj2);
        }
    \endverbatim

    \heading Function object usage
    \table
        Property     | Description             | Required    | Default value
        type         | type name: writeVTK     | yes         |
        objectNames  | objects to write        | yes         |
    \endtable
2016-05-10 10:06:19 +01:00
Henry Weller
5469e21fe2 execFlowFunctionObjects: Replaced with script providing instructions to use the '-postProcess' option 2016-05-09 17:02:00 +01:00
Henry Weller
9461c7828f foamToVTK: Added Allwmake 2016-05-06 17:42:22 +01:00
Henry Weller
14abfa742b primitives/direction: Changed from "char" to "int8_t" and added IO operators
to avoid problems when writing "nComponents"
2016-05-06 17:40:49 +01:00
Henry Weller
a50015a423 foamToVTK: Use UPtrList rather than PtrList 2016-05-06 14:11:38 +01:00
Henry Weller
566f2734b9 foamToVTK: Separated into the library libfoamToVTK and the utility foamToVTK 2016-05-04 15:16:33 +01:00
Henry Weller
f6c670dcac functionObjects: Updated docs 2016-05-04 08:51:39 +01:00
Henry Weller
32762aa1f9 Change field loop index from "fieldI" to "fieldi" 2016-05-02 18:20:48 +01:00
Henry Weller
0534a225fd functionObjects: Moved into the functionObjects namespace and rationalized and simplified failable construction
Rather than requiring each functionObject to handle failed construction
internally (using the active_ flag) the static member function "viable"
is provided which returns true if construction of the functionObject is
likely to be successful.  Failed construction is then handled by the
wrapper-class which constructs the functionObject,
e.g. "OutputFilterFunctionObject".
2016-05-02 16:28:24 +01:00
Henry Weller
81f31acbb3 Updated headers 2016-04-30 21:53:19 +01:00
Henry Weller
3c053c2fe6 GeometricField: Renamed internalField() -> primitiveField() and dimensionedInternalField() -> internalField()
These new names are more consistent and logical because:

primitiveField():
primitiveFieldRef():
    Provides low-level access to the Field<Type> (primitive field)
    without dimension or mesh-consistency checking.  This should only be
    used in the low-level functions where dimensional consistency is
    ensured by careful programming and computational efficiency is
    paramount.

internalField():
internalFieldRef():
    Provides access to the DimensionedField<Type, GeoMesh> of values on
    the internal mesh-type for which the GeometricField is defined and
    supports dimension and checking and mesh-consistency checking.
2016-04-30 21:40:09 +01:00
Henry Weller
ccd958a8f1 GeometricField::dimensionedInteralFieldRef() -> GeometricField::ref()
In order to simplify expressions involving dimensioned internal field it
is preferable to use a simpler access convention.  Given that
GeometricField is derived from DimensionedField it is simply a matter of
de-referencing this underlying type unlike the boundary field which is
peripheral information.  For consistency with the new convention in
"tmp"  "dimensionedInteralFieldRef()" has been renamed "ref()".
2016-04-30 18:43:51 +01:00
Henry Weller
5df2b96489 GeometricField::internalField() -> GeometricField::internalFieldRef()
Non-const access to the internal field now obtained from a specifically
named access function consistent with the new names for non-canst access
to the boundary field boundaryFieldRef() and dimensioned internal field
dimensionedInternalFieldRef().

See also commit 22f4ad32b1
2016-04-30 14:25:21 +01:00
Henry Weller
67e2d02800 functionObjectFile: Separated into functionObjectFile and functionObjectFiles
functionObjectFile provides basic directory, file and formatting functions
functionObjectFiles provides multi-file cache
2016-04-30 09:18:42 +01:00
Henry Weller
15b36331fe Remove .internalField() clutter for const-access to the internal field 2016-04-28 12:37:31 +01:00
Henry Weller
ea5401c770 GeometricField::GeometricBoundaryField -> GeometricField::Boundary
When the GeometricBoundaryField template class was originally written it
was a separate class in the Foam namespace rather than a sub-class of
GeometricField as it is now.  Without loss of clarity and simplifying
code which access the boundary field of GeometricFields it is better
that GeometricBoundaryField be renamed Boundary for consistency with the
new naming convention for the type of the dimensioned internal field:
Internal, see commit 4a57b9be2e

This is a very simple text substitution change which can be applied to
any code which compiles with the OpenFOAM-dev libraries.
2016-04-28 07:22:02 +01:00
Henry Weller
4a57b9be2e GeometricField: Rationalized and simplified access to the dimensioned internal field
Given that the type of the dimensioned internal field is encapsulated in
the GeometricField class the name need not include "Field"; the type
name is "Internal" so

volScalarField::DimensionedInternalField -> volScalarField::Internal

In addition to the ".dimensionedInternalField()" access function the
simpler "()" de-reference operator is also provided to greatly simplify
FV equation source term expressions which need not evaluate boundary
conditions.  To demonstrate this kEpsilon.C has been updated to use
dimensioned internal field expressions in the k and epsilon equation
source terms.
2016-04-27 21:32:45 +01:00
Henry Weller
f539fd4c4b Replaced StaticAssert with the C++11 equivalent static_assert 2016-04-26 20:44:55 +01:00
Henry Weller
070515e9db Revert "src/postProcessing/functionObjects/field/Make/files: Corrected"
This reverts commit 3cfc54ba09.
2016-04-26 20:33:45 +01:00
Henry Weller
3cfc54ba09 src/postProcessing/functionObjects/field/Make/files: Corrected 2016-04-26 20:31:58 +01:00
Henry Weller
dc2951ca2f GeometricField::dimensionedInternalField() -> GeometricField::dimensionedInternalFieldRef()
See also commit 22f4ad32b1
2016-04-26 16:29:43 +01:00
Henry Weller
450728ea84 Standardized cell, patch, face and processor loop index names 2016-04-25 12:00:53 +01:00
Henry Weller
43beb06018 Standardized cell, patch and face loop index names 2016-04-25 10:28:32 +01:00
Henry Weller
2d5ff31649 boundaryField() -> boundaryFieldRef() 2016-04-24 22:07:37 +01:00
Henry Weller
bbd6bfff22 foamCalcFunctions: Avoid the inclusion of fvCFD.H 2016-04-22 14:21:50 +01:00
Henry Weller
8c6fa81eba vector::zero -> Zero 2016-04-16 18:34:41 +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
730f89dc9d Use Zero rather than pTraits<Type>::zero unless a static typed '0' is required 2016-03-22 17:46:52 +00:00
Henry Weller
e57874859a Updated Doxygen documentation and files
Contributed by Bruno Santos
Resolves patch report http://www.openfoam.org/mantisbt/view.php?id=2023

Update online documentation http://openfoam.github.io/Documentation-dev/html/
2016-03-14 11:00:24 +00:00
Henry Weller
7ba41e0095 Removed duplicate, inconsistent and spurious comments in .C files 2016-02-29 18:33:54 +00:00
Henry Weller
95d146ecdf Rationalized the indentation of C-preprocessor directives 2016-02-29 15:42:03 +00:00
Henry Weller
cd852be3da OpenFOAM: Updated all libraries, solvers and utilities to use the new const-safe tmp
The deprecated non-const tmp functionality is now on the compiler switch
NON_CONST_TMP which can be enabled by adding -DNON_CONST_TMP to EXE_INC
in the Make/options file.  However, it is recommended to upgrade all
code to the new safer tmp by using the '.ref()' member function rather
than the non-const '()' dereference operator when non-const access to
the temporary object is required.

Please report any problems on Mantis.

Henry G. Weller
CFD Direct.
2016-02-26 17:31:28 +00:00
Henry Weller
99a10ecea6 Boundary conditions: Added extrapolatedCalculatedFvPatchField
To be used instead of zeroGradientFvPatchField for temporary fields for
which zero-gradient extrapolation is use to evaluate the boundary field
but avoiding fields derived from temporary field using field algebra
inheriting the zeroGradient boundary condition by the reuse of the
temporary field storage.

zeroGradientFvPatchField should not be used as the default patch field
for any temporary fields and should be avoided for non-temporary fields
except where it is clearly appropriate;
extrapolatedCalculatedFvPatchField and calculatedFvPatchField are
generally more suitable defaults depending on the manner in which the
boundary values are specified or evaluated.

The entire OpenFOAM-dev code-base has been updated following the above
recommendations.

Henry G. Weller
CFD Direct
2016-02-20 22:44:37 +00:00
Henry Weller
350d03246e scripts: Reformat with consistent section separators 2016-02-15 18:30:24 +00:00
Henry Weller
69b59b6586 Renamed PV4Readers -> PVReaders to avoid confusion when compiling the reader for ParaView-5 2016-02-10 21:12:49 +00:00
Henry Weller
968c888fc4 Rename DataEntry -> Function1
Function1 is an abstract base-class of run-time selectable unary
functions which may be composed of other Function1's allowing the user
to specify complex functions of a single scalar variable, e.g. time.
The implementations need not be a simple or continuous functions;
interpolated tables and polynomials are also supported.  In fact form of
mapping between a single scalar input and a single primitive type output
is supportable.

The primary application of Function1 is in time-varying boundary
conditions, it also used for other functions of time, e.g. injected mass
is spray simulations but is not limited to functions of time.
2016-02-08 16:18:07 +00:00
Henry Weller
7ec6f28c49 Added support for ParaView-5.0.0
PV4FoamReaders: Updated to build with ParaView-5.0.0
paraFoam: Updated to load PV4FoamReaders for ParaView-5.0.0

Currently this is experimental but if it becomes clear that ParaView-4
and ParaView-5 are and will remain consistent with respect to readers
the plan is to rename

PV4 -> PV

or

PV4 -> PV45 if it is assumed that PV6 may need to be different.
2016-02-08 10:03:55 +00:00
Henry Weller
a9bb9c3b99 Updated header 2016-02-07 13:34:03 +00:00
Henry Weller
d1387a8563 DataEntry: Created the DataEntryTypes namespace for all the concrete DataEntry types
to avoid name conflicts with these primitive names in the OpenFOAM namespace
2016-02-07 13:32:38 +00:00