- 31 Oct, 2019 1 commit
-
-
OpenFOAM bot authored
-
- 30 Apr, 2019 1 commit
-
-
Mark Olesen authored
- previously would have different SHA1 depending on whether the string was a C-string, a C++-string or if the SHA1 was calculated directly or via the OSHA1stream. - SHA1("string") - OSHA1stream << "string"; - OSHA1stream << string("string"); By avoiding string quoting on output, they now all deliver the same result. This also means that the following will no longer change the SHA1 content, since it does not add anything: osha<< string() << string() << string() << string(); This would have previously add a pair of double quotes each time!
-
- 02 Apr, 2019 1 commit
-
-
Mark Olesen authored
- this improves overall consistency and is independent of higher level tagging as ASCII or BINARY for IFstream, OFstream etc.
-
- 14 Feb, 2019 1 commit
-
-
Mark Olesen authored
- simplifies their use when reordering lists etc. (word, fileName, keyType, wordRe) - "unfriend" IO operators for string types. They require no internal access - add compile/uncompile methods to keyType for symmetry with wordRe - when outputting keyType/wordRe, be more explicit about them using writeQuoted()
-
- 13 Feb, 2019 1 commit
-
-
Mark Olesen authored
-
- 06 Feb, 2019 1 commit
-
-
OpenFOAM bot authored
-
- 23 Jan, 2019 1 commit
-
-
Mark Olesen authored
-
- 16 Jan, 2019 1 commit
-
-
Mark Olesen authored
- when combining lists in processor order this simplifies code and reduces memory overhead. Write this: ---- labelList collected; const globalIndex sizing(input.size()); sizing.gather(input, collected); ---- OR ---- labelList collected; globalIndex::gatherOp(input, collected); ---- Instead of this: ---- labelList collected; List<labelList> scratch(Pstream::nProcs()); scratch[Pstream::myProcNo()] = input; Pstream::gatherList(scratch); if (Pstream::master()) { collected = ListListOps::combine<labelList> ( scratch, accessOp<labelList>() ); } scratch.clear(); ----
-
- 11 Jan, 2019 1 commit
-
-
Mark Olesen authored
- missing verbatim/endverbatim markers, missing "Foam::" prefix, typos
-
- 08 Jan, 2019 1 commit
-
-
Mark Olesen authored
-
- 11 Dec, 2018 1 commit
-
-
Mark Olesen authored
- makes the intent clearer and avoids the need for additional constructor casting. Eg, labelList(10, Zero) vs. labelList(10, 0) scalarField(10, Zero) vs. scalarField(10, scalar(0)) vectorField(10, Zero) vs. vectorField(10, vector::zero)
-
- 25 Nov, 2018 1 commit
-
-
Mark Olesen authored
- useful when generating formatted output such as tables.
-
- 11 Nov, 2018 1 commit
-
-
Mark Olesen authored
- Start brief descriptions with 'Deprecated(YYYY-MM)' so that it is readily visible in the short method description. Consistent date format (YYYY-MM), placed immediately after the \deprecated tag.
-
- 03 Nov, 2018 1 commit
-
-
Mark Olesen authored
-
- 01 Nov, 2018 1 commit
-
-
Mark Olesen authored
- a failed attempt to read a value (eg, word, label, scalar) from a stream now always provokes a FatalIOError. This helps avoid some difficult to trace input errors.
-
- 18 Oct, 2018 1 commit
-
-
Mark Olesen authored
- more dictionary-like methods, enforce keyType::LITERAL for all lookups to avoid any spurious keyword matching. - new readEntry, readIfPresent methods - The get() method replaces the now deprecate lookup() method. - Deprecate lookupOrFailsafe() Failsafe behaviour is now an optional parameter for lookupOrDefault, which makes it easier to tailor behaviour at runtime. - output of the names is now always flatted without line-breaks. Thus, os << flatOutput(someEnumNames.names()) << nl; os << someEnumNames << nl; both generate the same output. - Constructor now uses C-string (const char*) directly instead of Foam::word in its initializer_list. - Remove special enum + initializer_list constructor form since it can create unbounded lookup indices. - Removd old hasEnum, hasName forms that were provided during initial transition from NamedEnum. - Added static_assert on Enum contents to restrict to enum or integral values. Should not likely be using this class to enumerate other things since it internally uses an 'int' for its values. Changed volumeType accordingly to enumerate on its type (enum), not the class itself.
-
- 12 Oct, 2018 1 commit
-
-
Mark Olesen authored
- not used by the ISstream parser, but suitable for other parsing methods where true/false concept should be distinguishable from integer values. Only constructed via the token::boolean() static method, not directly assignable. This avoids any potential ambiguities with label.
-
- 10 Sep, 2018 1 commit
-
-
Mark Olesen authored
- replaces previous pointer conversion
-
- 24 Jul, 2018 1 commit
-
-
Mark Olesen authored
- this eliminates a degree of ambiguity when resolving a read() method in inherited classes.
-
- 18 Jun, 2018 1 commit
-
-
Mark Olesen authored
- major() and minor() are GNU macros in sys/sysmacros.h and generates warning on some systems (eg, Ubuntu 18.04) use getMajor() and getMinor() as method names instead.
-
- 22 Jun, 2018 1 commit
-
-
Mark Olesen authored
- add additional control via a Foam::infoDetailLevel flag, which is supported by a 'DetailLevel' macro. Eg, DetailLevel << "some information" << nl - When infoDetailLevel is zero, the stdout for all Foam::system() calls are also redirected to stderr to prevent child output from appearing on the parent. - close stdin before exec in system call.
-
- 30 May, 2018 1 commit
-
-
Mark Olesen authored
- make the purpose more explicit, and reduces some work for the compiler as well.
-
- 20 Dec, 2017 1 commit
-
-
mattijs authored
-
- 07 May, 2018 1 commit
-
-
Mark Olesen authored
- catch (value) - forward declarations for operator<<() - non-const access to Reaction name() - spurious return statement
-
- 02 May, 2018 1 commit
-
-
Mark Olesen authored
- this avoids some valgrind messages "Uninitialised byte(s) found during client check request"
-
- 27 Apr, 2018 1 commit
-
-
Mark Olesen authored
-
- 25 Apr, 2018 1 commit
-
-
Mark Olesen authored
-
- 13 Apr, 2018 1 commit
-
-
Mark Olesen authored
-
- 12 Apr, 2018 1 commit
-
-
Mark Olesen authored
- IOstreamOption class to encapsulate format, compression, version. This is ordered to avoid internal padding in the structure, which reduces several bytes of memory overhead for stream objects and other things using this combination of data. Byte-sizes: old IOstream:48 PstreamBuffers:88 Time:928 new IOstream:24 PstreamBuffers:72 Time:904 ==== STYLE: remove support for deprecated uncompressed/compressed selectors In older versions, the system/controlDict used these types of specifications: writeCompression uncompressed; writeCompression compressed; As of DEC-2009, these were deprecated in favour of using normal switch names: writeCompression true; writeCompression false; writeCompression on; writeCompression off; Now removed these deprecated names and treat like any other unknown input and issue a warning. Eg, Unknown compression specifier 'compressed', assuming no compression ==== STYLE: provide Enum of stream format names (ascii, binary) ==== COMP: fixed incorrect IFstream construct in FIREMeshReader - spurious bool argument (presumably meant as uncompressed) was being implicitly converted to a versionNumber. Now caught by making IOstreamOption::versionNumber constructor explicit. - bad version specifier in changeDictionary
-
- 28 Mar, 2018 1 commit
-
-
Andrew Heather authored
-
- 03 Apr, 2018 1 commit
-
-
Mark Olesen authored
-
- 05 Mar, 2018 1 commit
-
-
Mark Olesen authored
This class is largely a pre-C++11 holdover. It is now possible to simply use move construct/assignment directly. In a few rare cases (eg, polyMesh::resetPrimitives) it has been replaced by an autoPtr.
-
- 26 Feb, 2018 1 commit
-
-
Mark Olesen authored
Improve alignment of its behaviour with std::unique_ptr - element_type typedef - release() method - identical to ptr() method - get() method to get the pointer without checking and without releasing it. - operator*() for dereferencing Method name changes - renamed rawPtr() to get() - renamed rawRef() to ref(), removed unused const version. Removed methods/operators - assignment from a raw pointer was deleted (was rarely used). Can be convenient, but uncontrolled and potentially unsafe. Do allow assignment from a literal nullptr though, since this can never leak (and also corresponds to the unique_ptr API). Additional methods - clone() method: forwards to the clone() method of the underlying data object with argument forwarding. - reset(autoPtr&&) as an alternative to operator=(autoPtr&&) STYLE: avoid implicit conversion from autoPtr to object type in many places - existing implementation has the following: operator const T&() const { return operator*(); } which means that the following code works: autoPtr<mapPolyMesh> map = ...; updateMesh(*map); // OK: explicit dereferencing updateMesh(map()); // OK: explicit dereferencing updateMesh(map); // OK: implicit dereferencing for clarity it may preferable to avoid the implicit dereferencing - prefer operator* to operator() when deferenced a return value so it is clearer that a pointer is involve and not a function call etc Eg, return *meshPtr_; vs. return meshPtr_();
-
- 20 Feb, 2018 1 commit
-
-
Mark Olesen authored
-
- 08 Feb, 2018 1 commit
-
-
Mark Olesen authored
- reduces some ambiguity and clarifies the expected output and behaviour. STYLE: reduce some automatic conversions of char to string
-
- 22 Jan, 2018 1 commit
-
-
Mark Olesen authored
- simplify structure. - protect against nullptr when resetting memory streams - make UIListStream swappable - add uiliststream as an example of using a plain std::istream
-
- 17 Jan, 2018 1 commit
-
-
Mark Olesen authored
-
- 13 Nov, 2017 1 commit
-
-
Mark Olesen authored
- allows changing the format of the sending OPstream at an arbitrary point in the transmission. The information is passed through the buffer and the receiving IPstream changes its format accordingly. This allows a temporary toggling of ASCII/BINARY mid-stream.
-
- 12 Nov, 2017 2 commits
-
-
Mark Olesen authored
-
Mark Olesen authored
- the return value signals if this method handled this particular type of token. This minor change allows this method to be used as a succinct prefilter an output token stream. It also provides better encapsulation of what the particular output stream handles. Eg, bool ok = os.write(tok); if (!ok) // or if (!ok && os.good()) { os << tok; } instead of if (tok.type() == typeA || tok.type() == typeB || ...) { os.write(tok); } else { os << tok; }
-