- 31 Oct, 2019 1 commit
-
-
OpenFOAM bot authored
-
- 06 Feb, 2019 1 commit
-
-
OpenFOAM bot authored
-
- 06 Nov, 2018 1 commit
-
-
Mark OLESEN authored
-
- 30 Oct, 2018 1 commit
-
-
mattijs authored
-
- 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 ...
-
- 05 Oct, 2018 1 commit
-
-
Mark OLESEN authored
- instead of dict.lookup(name) >> val; can use dict.readEntry(name, val); for checking of input token sizes. This helps catch certain types of input errors: { key1 ; // <- Missing value key2 1234 // <- Missing ';' terminator key3 val; } STYLE: readIfPresent() instead of 'if found ...' in a few more places.
-
- 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
-
- 26 Mar, 2018 1 commit
-
-
Mark OLESEN authored
- in many cases can just use lookupOrDefault("key", bool) instead of lookupOrDefault<bool> or lookupOrDefault<Switch> since reading a bool from an Istream uses the Switch(Istream&) anyhow STYLE: relocated Switch string names into file-local scope
-
- 13 Mar, 2018 1 commit
-
-
Mark OLESEN authored
- eliminate iterators from PackedList since they were unused, had lower performance than direct access and added unneeded complexity. - eliminate auto-vivify for the PackedList '[] operator. The set() method provides any required auto-vivification and removing this ability from the '[]' operator allows for a lower when accessing the values. Replaced the previous cascade of iterators with simpler reference class. PackedBoolList: - (temporarily) eliminate logic and addition operators since these contained partially unclear semantics. - the new test() method tests the value of a single bit position and returns a bool without any ambiguity caused by the return type (like the get() method), nor the const/non-const access (like operator[] has). The name corresponds to what std::bitset uses. - more consistent use of PackedBoolList test(), set(), unset() methods for fewer operation and clearer code. Eg, if (list.test(index)) ... | if (list[index]) ... if (!list.test(index)) ... | if (list[index] == 0u) ... list.set(index); | list[index] = 1u; list.unset(index); | list[index] = 0u; - deleted the operator=(const labelUList&) and replaced with a setMany() method for more clarity about the intended operation and to avoid any potential inadvertent behaviour.
-
- 07 Mar, 2018 1 commit
-
-
Mark OLESEN authored
- The bitSet class replaces the old PackedBoolList class. The redesign provides better block-wise access and reduced method calls. This helps both in cases where the bitSet may be relatively sparse, and in cases where advantage of contiguous operations can be made. This makes it easier to work with a bitSet as top-level object. In addition to the previously available count() method to determine if a bitSet is being used, now have simpler queries: - all() - true if all bits in the addressable range are empty - any() - true if any bits are set at all. - none() - true if no bits are set. These are faster than count() and allow early termination. The new test() method tests the value of a single bit position and returns a bool without any ambiguity caused by the return type (like the get() method), nor the const/non-const access (like operator[] has). The name corresponds to what std::bitset uses. The new find_first(), find_last(), find_next() methods provide a faster means of searching for bits that are set. This can be especially useful when using a bitSet to control an conditional: OLD (with macro): forAll(selected, celli) { if (selected[celli]) { sumVol += mesh_.cellVolumes()[celli]; } } NEW (with const_iterator): for (const label celli : selected) { sumVol += mesh_.cellVolumes()[celli]; } or manually for ( label celli = selected.find_first(); celli != -1; celli = selected.find_next() ) { sumVol += mesh_.cellVolumes()[celli]; } - When marking up contiguous parts of a bitset, an interval can be represented more efficiently as a labelRange of start/size. For example, OLD: if (isA<processorPolyPatch>(pp)) { forAll(pp, i) { ignoreFaces.set(i); } } NEW: if (isA<processorPolyPatch>(pp)) { ignoreFaces.set(pp.range()); }
-
- 21 Feb, 2018 1 commit
-
-
Mark OLESEN authored
- subsetList, inplaceSubsetList with optional inverted logic. - use moveable elements where possible. - allow optional starting offset for the identity global function. Eg, 'identity(10, start)' vs 'identity(10) + start'
-
- 05 Nov, 2017 1 commit
-
-
Mark OLESEN authored
- makes for clearer code ENH: make writeIfDifferent part of Ostream
-
- 19 Nov, 2017 1 commit
-
-
Mark OLESEN authored
-
- 03 Jul, 2017 1 commit
-
-
Mark OLESEN authored
-
- 29 May, 2017 1 commit
-
-
Mark OLESEN authored
- Remove the unused enums() method since it delivers wholly unreliable results. It is not guaranteed to cover the full enumeration range, but only the listed names. - Remove the unused strings() method. Duplicated functionality of the words(), but was never used. - Change access of words() method from static to object. Better code isolation. Permits the constructor to take over as the single point of failure for bad input. - Add values() method - do not expose internal (HashTable) lookup since it makes it more difficult to enforce constness and the implementation detail should not be exposed. However leave toc() and sortedToc() for the interface. STYLE: relocated NamedEnum under primitives (was containers) - internal typedef as 'value_type' for some consistency with STL conventions
-
- 05 Aug, 2016 1 commit
-
-
Henry Weller authored
Requires gcc version 4.7 or higher
-
- 25 Apr, 2016 2 commits
-
-
Henry Weller authored
-
Henry Weller authored
-
- 16 Apr, 2016 1 commit
-
-
Henry Weller authored
-
- 26 Feb, 2016 1 commit
-
-
Henry Weller authored
-
- 20 Jan, 2016 1 commit
-
-
Henry Weller authored
-
- 17 Nov, 2015 2 commits
-
-
mattijs authored
- redistributePar to have almost (complete) functionality of decomposePar+reconstructPar - low-level distributed Field mapping - support for mapping surfaceFields (including flipping faces) - support for decomposing/reconstructing refinement data
-
mattijs authored
- redistributePar to have almost (complete) functionality of decomposePar+reconstructPar - low-level distributed Field mapping - support for mapping surfaceFields (including flipping faces) - support for decomposing/reconstructing refinement data
-
- 11 Nov, 2015 1 commit
-
-
Henry Weller authored
Avoids the clutter and maintenance effort associated with providing the function signature string.
-
- 25 Feb, 2015 1 commit
-
-
Henry authored
Resolves issues with probes and findRefCell for meshes in which all cell face-pyramids are positive.
-
- 30 Sep, 2014 1 commit
-
-
mattijs authored
In case of point not being found re-search for nearest
-
- 20 Mar, 2014 1 commit
-
-
andy authored
-
- 15 Jan, 2014 1 commit
-
-
andy authored
-
- 21 Nov, 2013 1 commit
-
-
andy authored
-
- 13 Nov, 2013 1 commit
-
-
mattijs authored
-
- 12 Nov, 2013 1 commit
-
-
mattijs authored
-
- 13 Aug, 2013 1 commit
-
-
mattijs authored
-
- 12 Apr, 2013 1 commit
-
-
andy authored
-
- 09 Jan, 2013 1 commit
-
-
mattijs authored
-
- 17 Apr, 2012 1 commit
-
-
Henry authored
-
- 16 Apr, 2012 1 commit
-
-
andy authored
-
- 24 Feb, 2012 1 commit
-
-
mattijs authored
-
- 18 Jan, 2012 1 commit
-
-
andy authored
-
- 15 Dec, 2011 1 commit
-
-
mattijs authored
-
- 13 Dec, 2011 1 commit
-
-
mattijs authored
-