- Nov 20, 2017
-
-
Mark OLESEN authored
-
- Nov 18, 2017
-
-
Mark OLESEN authored
- constructor for empty cell/face/point Zones, with contents to be transferred in later. - ZoneMesh::operator(const word&) to return existing zone or a new empty one.
-
Mark OLESEN authored
- this provides a better typesafe means of locating predefined cell models than relying on strings. The lookup is now ptr() or ref() directly. The lookup functions behave like on-demand singletons when loading "etc/cellModels". Functionality is now located entirely in cellModel but a forwarding version of cellModeller is provided for API (but not ABI) compatibility with older existing user code. STYLE: use constexpr for cellMatcher constants
-
- Nov 13, 2017
-
-
Mark OLESEN authored
- makes for clearer code ENH: make writeIfDifferent part of Ostream
-
mattijs authored
-
Mark OLESEN authored
-
Mark OLESEN authored
- reduces ambiguity between matching a list of strings and a single string.
-
mattijs authored
-
- Nov 09, 2017
-
-
Mark OLESEN authored
-
Mark OLESEN authored
-
Andrew Heather authored
-
- Nov 08, 2017
-
-
Mark OLESEN authored
- when dictionary keywords change between versions, the programmer can use these compatibility methods to help with migration. * csearchCompat, foundCompat, lookupEntryPtrCompat, lookupEntryCompat, lookupCompat, lookupOrDefaultCompat, readIfPresentCompat, ... They behave like their similarly named base versions, but accept an additional list of older keyword names augmented by a version number. For example, dict.readIfPresentCompat ( "key", {{"olderName", 1612}, {"veryOld", 240}}, myscalar ); where 1612=OpenFOAM-v1612, 240=OpenFOAM-v2.4.x, etc.
-
Mark OLESEN authored
- If the entry could be directly inserted: a pointer to the inserted entry. - If a dictionary merge was required: a pointer to the dictionary that received the entry. - Return nullptr on any type of insertion failure. This change is code compatible with existing code since it only alters a bool return value to be a pointer return value.
-
Mark OLESEN authored
-
Andrew Heather authored
-
- Nov 07, 2017
-
-
Mark OLESEN authored
-
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
-
Mark OLESEN authored
-
Mark OLESEN authored
- support send/receive with embedded '\0' characters
-
Andrew Heather authored
-
- Nov 04, 2017
-
-
Mark OLESEN authored
-
- Nov 03, 2017
-
-
Mark OLESEN authored
- avoid meshModifier contents from being read immediately upon construction, since this recreates an existing modifier instead of allowing us to specify our own.
-
Mark OLESEN authored
- make single-parameter construct (label) explicit - consolidate iterators - slightly reduced overhead for some HashSet types - improved resizing behaviour - compact output for empty Ptr hashes
-
Mark OLESEN authored
- unused, unmaintained and slower than the regular HashTable
-
Mark OLESEN authored
- the zero::null and one::null sub-classes add an additional null output adapter. The function of the nil class (special-purpose class only used for HashSet) is now taken by zero::null.
-
- Oct 29, 2017
-
-
Mark OLESEN authored
- consistent with C++ STL conventions, the reverse iterators should use operator++ to transit the list from rbegin() to rend(). The previous implementation used raw pointers, which meant that they had the opposite behaviour: operator-- to transit from rbegin() to rend(). The updated version only has operator++ defined, thus the compiler should catch any possible instances where people were using the old (incorrect) versions. - updated forAllReverseIters() and forAllConstReverseIters() macros to be consistent with new implementation and with C++ STL conventions.
-
Mark OLESEN authored
- forAllReverseIters and forAllReverseConstIters macros - stdFoam::rbegin(), stdFoam::rend() stdFoam::crbegin(), stdFoam::crend()
-
Mark OLESEN authored
- Instead of relying on #inputMode to effect a global change it is now possible (and recommended) to a temporary change in the inputMode for the following entry. #default : provide default value if entry is not already defined #overwrite : silently remove a previously existing entry #warn : warn about duplicate entries #error : error if any duplicate entries occur #merge : merge sub-dictionaries when possible (the default mode) This is generally less cumbersome than the switching the global inputMode. For example to provide a set of fallback values. #includeIfPresent "user-files" ... #default value uniform 10; vs. #includeIfPresent "user-files" #inputMode protect ... value uniform 10; #inputMode merge // _Assuming_ we actually had this before These directives can also be used to suppress the normal dictionary merge semantics: #overwrite dict { entry val; ... }
-
Mark OLESEN authored
- patterns only supported for the final element. To create an element as a pattern instead of a word, an embedded string quote (single or double) is used for that element. Any of the following examples: "/top/sub/dict/'(p|U).*" 100; "/top/sub/dict/'(p|U).*'" 100; "/top/sub/dict/\"(p|U).*" 100; "/top/sub/dict/\"(p|U).*\"" 100; are equivalent to the longer form: top { sub { dict { "(p|U).*" 100; } } } It is not currently possible to auto-vivify intermediate dictionaries with patterns. NOK "/nonexistent.*/value" 100; OK "/existing.*/value" 100; - full scoping also works for the #remove directive #remove "/dict1/subdict2/entry1"
-
Mark OLESEN authored
- convenience -diffEtc option that behaves like -diff, but invokes foamEtcFile searching STYLE: modernize code.
-
- Oct 28, 2017
-
-
Mark OLESEN authored
-
Mark OLESEN authored
- this increases the flexibility of the interface - Add stringOps 'natural' string sorting comparison. Digits are sorted in their natural order, which means that (file10.txt file05.txt file2.txt) are sorted as (file2.txt file05.txt file10.txt) STYLE: consistent naming of template parameters for comparators - Compare for normal binary predicates - ListComparePredicate for list compare binary predicates
-
Mark OLESEN authored
-
Mark OLESEN authored
- similar to word::validate to allow stripping of invalid characters without triggering a FatalError. - use this validated fileName in Foam::readDir to avoid problems when a directory contains files with invalid characters in their names - adjust rmDir to handle filenames with invalid characters - fileName::equals() static method to compare strings while ignoring any differences that are solely due to duplicate slashes
-
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.
-
- Oct 26, 2017
- Oct 25, 2017
-
-
Mark OLESEN authored
- The problem occurs when using atof to parse values such as "1e-39" since this is out of range for a float and _can_ set errno to ERANGE. Similar to parsing of integers, now parse with the longest floating point representation "long double" via strtold (guaranteed to be part of C++11) and verify against the respective VGREAT values for overflow. Treat anything smaller than VSMALL to be zero.
-