Commit Graph

21 Commits

Author SHA1 Message Date
Mark Olesen
c9333a5ac8 ENH: improve flexibility of error, messageStream output
- provide a plain stream() method on messageStream to reduce reliance
  on casting operators and slightly opaque operator()() calls etc

- support alternative stream for messageStream serial output.
  This can be used to support local redirection of output.
  For example,

     refPtr<OFstream> logging;   // or autoPtr, unique_ptr etc

     // Later...
     Info.stream(logging.get())
        << "Detailed output ..." << endl;

  This will use the stdout semantics in the normal case, or allow
  redirection to an output file if a target output stream is defined,
  but still effectively use /dev/null on non-master processes.

  This is mostly the same as this ternary

      (logging ? *logging : Info())

  except that the ternary could be incorrect on sub-processes,
  requires more typing etc.

ENH: use case-relative names of dictionary, IOstream for FatalIOError

- normally yields more easily understandable information
2021-11-03 11:46:13 +01:00
Mark Olesen
5eebe5050b ENH: reduce dependencies for foamVersion.H
- have printBuildInfo output to std::ostream
- removed extraneous include "stdFoam.H"

ENH: revert to pre-processor defines for hard-coded paths (#1712)

- redundant information, but more robust at run-time without relying
  on initialization order
2020-05-29 15:48:20 +02:00
Mark Olesen
8cfb483054 STYLE: some general spelling fixes 2020-05-04 09:15:21 +02:00
Andrew Heather
fdf8d10ab4 Merge commit 'e9219558d7' into develop-v1906 2019-12-05 11:47:19 +00:00
OpenFOAM bot
e9219558d7 GIT: Header file updates 2019-10-31 14:48:44 +00:00
Mark Olesen
3c07a1bb6f ENH: Foam::name() of memory address
- returns the memory address formatted in hexadecimal, which can be
  useful for detailed information
2019-08-12 10:46:29 +02:00
Mark Olesen
59da4cf56d STYLE: use uintptr_t cast instead of long when reporting addresses 2019-04-29 08:15:48 +02:00
Mark Olesen
d14f181529 ENH: add tracking of label/scalar size when reading IOobject header
- extracts values from the arch "LSB;label=32;scalar=64" header entry
  to provision for managing dissimilar primitive sizes.

  Compensate for the additional IOobject members by narrowing the types
  for the (objectState, readOption, writeOption) enumerations
2019-04-16 12:23:01 +02:00
Mark Olesen
4b7e11fc8b COMP: adjust headers for more detailed build info in the future (issue #1010)
- this splits a larger changeset for a gradual implementation
2018-11-29 21:01:01 +01:00
Mark Olesen
ac03307258 ENH: improve consistency in version handling (issue #1010)
- use std::string instead of c-string for the string constants

- centralize some definitions of resources into foamVersion.H

  Now expose some of the hard-coded values used in foamEtcFiles()
  so that they can be known or even overridden as required.

  Relocate to src/OpenFOAM/include as a constant location.
2018-11-23 11:08:36 +01:00
Mark Olesen
083e9e9665 ENH: isolate version information in foamVersion names instead of globals
- For compatibility, access to the old global names is provided via
  macros
        #define FOAMversion     foamVersion::version
        #define FOAMbuild       foamVersion::build
        #define FOAMbuildArch   foamVersion::buildArch

- this isolation makes it easier to provide additional scoped methods
  for dealing with version related information.  Eg, printBuildInfo()
2018-11-22 11:50:24 +01:00
Henry
c2dd153a14 Copyright transfered to the OpenFOAM Foundation 2011-08-14 12:17:30 +01:00
andy
eaef8d482b STYLE: Updated 1991 start copyright year to 2004 2011-01-14 16:08:00 +00:00
andy
099cc39e2e Revert "STYLE: 2011 copyright date."
This reverts commit b18f6cc1ce.
2011-01-05 18:24:29 +00:00
graham
b18f6cc1ce STYLE: 2011 copyright date. 2011-01-05 11:14:26 +00:00
Mark Olesen
499d48cfdb STYLE: uniform 'Test-' prefix for all applications/test
- easier to clean, avoid confusion with 'real' applications, etc.
2010-11-23 16:26:04 +01:00
graham
012494fdb5 STYLE: Fixing code style requirements for all apps.
Exception: applyWallFunctionBoundaryConditions.C cannot split #include
directives.
2010-07-27 15:27:05 +01:00
Mark Olesen
d29c438657 STYLE: use url for FSF license instead of postal address, switch to GPL v3 2010-03-29 14:07:56 +02:00
Mark Olesen
f8d87e2ab4 first implementation of filename clean method
- test as independent application first
2009-07-25 20:32:29 +02:00
Mark Olesen
0061e9ed03 added Foam::FOAMbuild to Foam::FOAMversion
- avoids problems with finding files based on FOAMversion
  (reported by Mattijs)
2009-01-09 09:11:50 +01:00
Mark Olesen
7ae9a0d0d9 added tiny applications/test/foamVersion/foamVersionString.C 2009-01-08 14:48:48 +01:00