- May 23, 2024
-
-
Mark OLESEN authored
- can be used with this type of code: ITstream* streamPtr = dict.findStream(name); if (streamPtr) { auto& is = *streamPtr; ... } versus: const entry* eptr = dict.findEntry(name); if (eptr && eptr->isStream()) { auto& is = eptr->stream(); ... } ENH: add findStream(), streamPtr(), isStream() to dictionary search - symmetric with findDict(), dictPtr(), isDict() methods STYLE: use findDict() instead of found() + subDict() pairing COMP: define is_globalIOobject trait at top of IOobject header - more visibility, permits reuse for specializations etc.
-
- Apr 16, 2024
-
-
Mark OLESEN authored
- findStrings, findMatchingStrings now mostly covered by matching intrinsics in wordRe and wordRes. Add static wordRes match() and matching() variants COMP: remove stringListOps include from objectRegistry.H - was already noted for removal (NOV-2018)
-
- Mar 07, 2024
-
-
Mark OLESEN authored
- particularly useful in these combinations: 1. OCharStream buf; // populate ISpanStream is(buf.view()); // parse 2. // read from file ifile.getLine(str); ISpanStream is(str); // parse These avoid making a copy of the character content, compared to versions with stringstream: OStringStream buf; IStringStream is(buf.str());
-
- Mar 06, 2024
-
-
Mark OLESEN authored
ENH: add rank() method for compound tokens ENH: add IOstream::minPrecision(unsigned) - reduced typing, more expressive, no namespace ambiguity with max() new: IOstream::minPrecision(10); old: IOstream::defaultPrecision(max(10u, IOstream::defaultPrecision())); STYLE: namespace qualify min/max for some buffer sizing [clang/hipp]
-
- Feb 07, 2024
-
-
Mark OLESEN authored
-
- Dec 07, 2023
-
-
Mark OLESEN authored
- enables capturing of end entry as an event
-
- Nov 21, 2023
-
-
- code is compiled dynamically on the master node. In the normal (non-distributed) case, simply poll the NFS to see when it appears on the sub-procs. For a case with distributed roots, first broadcast it (via MPI) to the IO master nodes and then poll afterwards. - on startup, detect and create missing processorXXX/ subdirectories on distributed filesystems
-
-
- Nov 18, 2023
-
-
Mark OLESEN authored
- allows construction of string tokens holding character content. For example, data that has been serialized and buffered and that now needs to be written or sent to another process.
-
- this is a primitiveEntry for holding purely formatting content such as blank lines, comments, other placeholders etc
-
Mark OLESEN authored
-
- Oct 16, 2023
-
-
Mark OLESEN authored
- use add_tokens() instead of the old multi-parameter append(.., bool) method which was misleading since it added tokens at the current tokenIndex, not at the end. - stringify ITstream contents with CharStream instead of StringStream. Allows string_view for copying out the content. ENH: set namedDictionary dictionary name from Istream - provides context for error messages etc (#2990)
-
Mark OLESEN authored
- now mark methods with strict deprecation, to make it easier to find their use but without adding extra compilation noise for others ENH: minor update for Enum methods and iterator - add warnOnly (failsafe) option for readEntry and getOrDefault - add good() method to Enum iterator (simliar to HashTable) - replace unused/fragile Enum find() methods with iterator return that can be used more generally
-
- Aug 21, 2023
-
-
Mark OLESEN authored
- simplifies internal handling (like a fileName) and allows the dictionary name to be used with unambiguous addressing. The previous dot (.) separator is ambiguous (ie, as dictionary separator or as part of a keyword). ENH: foamDictionary report -add/-set to stderr
-
- Aug 16, 2023
-
-
Mark OLESEN authored
- simplifies iteration of ITstream using nRemainingTokens() and skip() methods or directly as a list of tokens. The currentToken() method returns const or non-const access to the token at the current tokenIndex. The peekToken(label) method provides failsafe read access to tokens at given locations. ENH: add primitiveEntry construct with moving a single token
-
- Jul 27, 2023
-
-
Mark OLESEN authored
STYLE: use front(), back(), push_front(), push_back() methods
-
- Jul 04, 2023
-
-
Mark OLESEN authored
- returns readable reference to an empty ITstream for functions needing to return an ITstream reference but which don't have anything to return.
-
- May 22, 2023
-
-
Mark OLESEN authored
- consolidate file synchronization checks in dynamicCode STYLE: report missing library on master only (not every rank) - avoid flooding the output with messages Co-authored-by: mattijs <mattijs>
-
- May 18, 2023
-
-
Mark OLESEN authored
- this removes the 'magic' use of the exposed t_ member in favour of a generic dereference
-
- Feb 28, 2023
-
-
Mark OLESEN authored
-
- Feb 27, 2023
-
-
Mark OLESEN authored
ENH: add pTraits and IO for std::int8_t STYLE: cull some implicitly available includes - pTraits.H is included by label/scalar etc - zero.H is included by UList STYLE: cull redundant forward declarations for Istream/Ostream
-
- Feb 21, 2023
-
-
Mark OLESEN authored
- in earlier versions: used 'fixed' notation to force floating point numbers to be printed with at least some decimal digits. However, in the meantime we are more flexible with handling float/int input so remove this constraint. - use ITstream::toString, which makes the string expansion of ${var} and the expression expansion of $[var] consistent.
-
- Dec 01, 2022
-
-
Mark OLESEN authored
- more standard naming than peekFront() etc
-
- Nov 24, 2022
-
-
STYLE: unique_ptr instead of autoPtr for holding std::thread
-
- Nov 08, 2022
-
-
DOC: document which MPI send/recv are associated with commType
-
- Oct 11, 2022
-
-
Mark OLESEN authored
- stem(), replace_name(), replace_ext(), remove_ext() etc - string::contains() method - similar to C++23 method Eg, if (keyword.contains('/')) ... vs if (keyword.find('/') != std::string::npos) ...
-
- Oct 04, 2022
-
-
Mark OLESEN authored
- previously had 'mandatory' (bool) for advanced control of reading dictionary entries but its meaning was unclear in the calling code without extra code comments. Now use IOobjectOption::readOption instead, which allows further options (ie, NO_READ) and is more transparent as to its purpose in the code than a true/false bool flag was. This is a minor breaking change (infrequent, advanced usage only) - minor code cleanup in dictionary lookup methods
-
Mark OLESEN authored
- avoids redundant dictionary searching STYLE: remove dictionary lookupOrDefaultCompat wrapper - deprecated and replaced by getOrDefaultCompat (2019-05). The function is usually specific to internal keyword upgrading (version compatibility) and unlikely to exist in any user code.
-
Mark OLESEN authored
- in expressions BCs in particular, there is various logic handling for if value/refValue/refGradient etc are found or not. Handle the lookups as findEntry and branch to use Field assign or other handling, depending on its existence. STYLE: use wordList instead of wordRes for copy/filter dictionary
-
- Jun 13, 2022
-
-
Mark OLESEN authored
-
- Mar 12, 2022
-
-
Mark OLESEN authored
BUG: masterUncollatedFileOperation checking of file-size - used Foam:fileSize check to decide on scheduled/nonBlocking but this was being done on all ranks and subsequently broadcast. Now avoid unnecessary filesystem access on non-master ranks.
-
- Jan 31, 2022
-
-
Mark OLESEN authored
ENH: reduce code effort for clearing linked-lists ENH: adjust linked-list method name - complement linked-list append() method with prepend() method instead of 'insert', which is not very descriptive
-
- Dec 03, 2021
-
-
Mark OLESEN authored
- exposed by the new embedded function handling. Requires local copies of dictionary content instead (similar to coded BCs handling) BUG: incorrect formatting for expression function output ENH: simpler copyDict version taking wordList instead of wordRes - corresponds to the most common use case at the moment ENH: expression string writeEntry method - write as verbatim for better readability
-
- Nov 25, 2021
-
-
Mark OLESEN authored
- use `#word` to concatenate, expand content with the resulting string being treated as a word token. Can be used in dictionary or primitive context. In dictionary context, it fills the gap for constructing dictionary names on-the-fly. For example, ``` #word "some_prefix_solverInfo_${application}" { type solverInfo; libs (utilityFunctionObjects); ... } ``` The '#word' directive will automatically squeeze out non-word characters. In the block content form, it will also strip out comments. This means that this type of content should also work: ``` #word { some_prefix_solverInfo /* Appended with application name (if defined) */ ${application:+_} // Use '_' separator ${application} // The application } { type solverInfo; libs (utilityFunctionObjects); ... } ``` This is admittedly quite ugly, but illustrates its capabilities. - use `#message` to report expanded string content to stderr. For example, ``` T { solver PBiCG; preconditioner DILU; tolerance 1e-10; relTol 0; #message "using solver: $solver" } ``` Only reports on the master node.
-
- Nov 17, 2021
-
-
Mark OLESEN authored
- provides better context when default values are accessed from a dictionary than reporting a source file location.
-
- Nov 09, 2021
-
-
Mark OLESEN authored
STYLE: declaration order of topoSet, resize_nocopy for sortedOrder STYLE: remove cstring dependency from SHA1 STYLE: use Ostream endEntry()
-
- Nov 05, 2021
-
-
Mark OLESEN authored
STYLE: use alias to mark partialFaceAreaWeightAMI deprecation after v2012
-
Mark OLESEN authored
- a Pstream::master with a Pstream::parRun guard in case Pstream has not yet been initialised, as will be the case for low-level messages during startup. - propagate relativeName handling into IOstreams
-
- Nov 03, 2021
-
-
Mark OLESEN authored
STYLE: more consistent noexcept for dictionary and entry
-
- Jul 15, 2021
-
-
Mark OLESEN authored
STYLE: additional note about include/exclude HashTable.C
-