- 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
-
- 20 Dec, 2017 1 commit
-
-
mattijs 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; }
-
- 09 Nov, 2017 2 commits
-
-
Mark Olesen authored
-
Mark Olesen authored
-
- 05 Nov, 2017 4 commits
-
-
Mark Olesen authored
- makes for clearer code ENH: make writeIfDifferent part of Ostream
-
Mark Olesen authored
- simplify string output code
-
Mark Olesen authored
- improved memory alignment reduces overhead for Int32 compilation - added move/swap semantics - made the type() readonly in favour of setVariant() to allow change of variant within a particular storage representation. Eg, STRING -> VERBATIMSTRING.
-
Mark Olesen authored
- move append() single element to List and DynamicList ENH: add stringOps::count to avoid unnecessary string conversions
-
- 06 Nov, 2017 1 commit
-
-
Mark Olesen authored
-
- 04 Nov, 2017 2 commits
-
-
Mark Olesen authored
- support send/receive with embedded '\0' characters
-
Mark Olesen authored
-
- 27 Oct, 2017 1 commit
-
-
so the write thread does not have to do any parallel communication. This avoids the bugs in the threading support in OpenMPI. Patch contributed by Mattijs Janssens Resolves bug-report https://bugs.openfoam.org/view.php?id=2669
-
- 17 Nov, 2017 1 commit
-
-
Mark Olesen authored
- warn or fatal if Pstream::init or Pstream::exit are called multiple times. - additional Pstream::initNull method as failsafe to initialize MPI when the underlying OpenFOAM process is not running in parallel but the application still needs MPI. - Pstream::exit() can now also be called without having used MPI::init(), which means it can be used to cleanup serial process or for applications that used the special purpose Pstream::initNull() mechanism.
-
- 26 Sep, 2017 1 commit
-
-
Mark Olesen authored
-
- 22 Sep, 2017 1 commit
-
-
Mark Olesen authored
-
- 10 Aug, 2017 2 commits
-
-
Mark Olesen authored
- access tokenType enum values more consistently.
-
Mark Olesen authored
- the tokenType was being send via write(char), which includes isspace filtering. If the tokenType enumeration coincides with a whitespace character, it would be suppressed. Now add character directly to the buffer. STYLE: some additional minor private methods to help refactoring - readStringFromBuffer, writeStringToBuffer for common string operation.
-
- 03 Nov, 2017 1 commit
-
-
Andrew Heather authored
-
- 26 Oct, 2017 1 commit
-
-
Mark Olesen authored
- more consistent naming: * Versions that hold and manage their own memory: IListStream, OListStream * Versions that reference a fixed size external memory: UIListStream, UOListStream - use List storage instead of DynamicList within OListStream. Avoids duplicate bookkeeping, more direct handling of resizing.
-
- 24 Oct, 2017 3 commits
-
-
Mark Olesen authored
-
Mark Olesen authored
- reduce coding clutter, avoiding allocated pointers when possible. IFstream and OFstream continue to use pointers since they handle compressed files, other streams can do without them.
-
Mark Olesen authored
- an output stream to a DynamicList
-
- 23 Oct, 2017 2 commits
-
-
Mark Olesen authored
- these provide a similar functionality to string-streams, but operate on a externally provided memory buffer which can be used to reduce the amount of copying. - classes were previously staged as part of the ADIOS community repository.
-
Mark Olesen authored
- for convenience and symmetry with OStringStream STYLE: void return value for stream rewind() methods - this makes it easier to design bidirectional streams
-
- 20 Oct, 2017 1 commit
-
-
Mark Olesen authored
- low-level beginRaw(), writeRaw(), endRaw() methods. These can be used to directly add '()' decorators for serial output or prepare/cleanup parallel buffers. Used, for example, when outputting indirect lists in binary to avoid.
-
- 09 Aug, 2017 1 commit
-
-
Mark Olesen authored
-
- 02 Aug, 2017 1 commit
-
-
Mark Olesen authored
- consolidate word::validated() into word::validate() and also allow as short form for string::validate<word>(). Also less confusing than having similarly named methods that essentially do the same thing. - more consistent const access when iterating over strings - add valid(char) for keyType and wordRe
-
- 18 Jul, 2017 1 commit
-
-
Mark Olesen authored
- clear error flags. Special handling for igzstream.
-
- 17 Jul, 2017 1 commit
-
-
Mark Olesen authored
- resets the output buffer completely - implementing what rewind was likely meant to have accomplished for many use cases. STYLE: OSHA1stream reset() for symmetry. Deprecate rewind().
-