- Feb 05, 2019
-
-
Andrew Heather authored
-
- Jan 25, 2019
-
-
Mark OLESEN authored
-
- Jan 24, 2019
-
-
Mark OLESEN authored
- use for-range when iterating - dictionary access/search methods - autoPtr for memory management
-
- Jan 23, 2019
-
-
Mark OLESEN authored
-
- Dec 12, 2018
-
-
Mark OLESEN authored
- also replaced a few instances of readIfPresent with opt<> for constant values.
-
- Oct 19, 2018
-
-
Mark OLESEN authored
- as part of the cleanup of dictionary access methods (c6520033) made the dictionary class single inheritance from IDLList<entry>. This eliminates any ambiguities for iterators and allows for simple use of range-for looping. Eg, for (const entry& e : topDict)) { Info<< "entry:" << e.keyword() << " is dict:" << e.isDict() << nl; } vs forAllConstIter(dictionary, topDict, iter)) { Info<< "entry:" << iter().keyword() << " is dict:" << iter().isDict() << nl; }
-
- Oct 15, 2018
-
-
Mark OLESEN authored
-
Mark OLESEN authored
- use keyType::option enum to consolidate searching options. These enumeration names should be more intuitive to use and improve code readability. Eg, lookupEntry(key, keyType::REGEX); vs lookupEntry(key, false, true); or Eg, lookupEntry(key, keyType::LITERAL_RECURSIVE); vs lookupEntry(key, true, false); - new findEntry(), findDict(), findScoped() methods with consolidated search options for shorter naming and access names more closely aligned with other components. Behave simliarly to the methods lookupEntryPtr(), subDictPtr(), lookupScopedEntryPtr(), respectively. Default search parameters consistent with lookupEntry(). Eg, const entry* e = dict.findEntry(key); vs const entry* e = dict.lookupEntryPtr(key, false, true); - added '*' and '->' dereference operators to dictionary searchers.
-
- Aug 16, 2018
-
-
Andrew Heather authored
-
- Aug 09, 2018
-
-
Mark OLESEN authored
- more consistent with dictionary method naming. The get<> or getList<> returns a value, doesn't read into a existing location.
-
- Aug 08, 2018
-
-
Mark OLESEN authored
- allows single or multiple entries
-
- Jul 30, 2018
-
-
Mark OLESEN authored
- avoids compiler ambiguity when virtual methods such as IOdictionary::read() exist. - the method was introduced in 1806, and was thus not yet widely used
-
- Jun 19, 2018
-
-
Mark OLESEN authored
-
- May 29, 2018
-
-
Mark OLESEN authored
- improves backward compatibility and more naming consistency. Retain setMany(iter1, iter2) to avoid ambiguity with the PackedList::set(index, value) method.
-
- Dec 13, 2017
-
-
Andrew Heather authored
-
- Mar 14, 2018
-
-
Mark OLESEN authored
- this also provides a better separation of the intent (ie, inserting a single value, or inserting multiply values)
-
- Feb 26, 2018
-
-
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_();
-
- Feb 22, 2018
-
-
Mark OLESEN authored
- the wordHashSet typedef is always available when HashSet has been included. - use default HashTable key (word) instead of explicitly mentioning it
-
- Feb 21, 2018
-
-
Mark OLESEN authored
- this permits direct storage of a list with additional matcher capabilities - provide wordRes::matcher class for similar behaviour as previously
-
- Jan 08, 2018
-
-
Mark OLESEN authored
- use succincter method names that more closely resemble dictionary and HashTable method names. This improves method name consistency between classes and also requires less typing effort: args.found(optName) vs. args.optionFound(optName) args.readIfPresent(..) vs. args.optionReadIfPresent(..) ... args.opt<scalar>(optName) vs. args.optionRead<scalar>(optName) args.read<scalar>(index) vs. args.argRead<scalar>(index) - the older method names forms have been retained for code compatibility, but are now deprecated
-
Mark OLESEN authored
- direct parsing of -funcs to ITstream. - use direct lookup when the option is a word/string
-
- Nov 28, 2017
-
-
Mark OLESEN authored
- this is a provision for defining execute actions that can be called largely independently of the normal time-loop constraints. This can be useful to provide hooks for sub-cycling, or to define an action that can be triggered manually or on some other event.
-
- Nov 22, 2017
-
-
Mark OLESEN authored
- in most cases already checked valid() so don't need additional check for setting an existing pointer
-
- Aug 29, 2017
-
-
mattijs authored
There are a few issues: - error would only throw exceptions if not parallel - if we change this we also need to make sure the functionObjectList construction is synchronised - bounding box overlap was not returning the correct status so the code to avoid the issue of 'badly formed bounding box' was not triggered.
-
- Jun 06, 2018
-
-
mattijs authored
-
- Aug 09, 2017
-
-
Andrew Heather authored
When specifying the averaging data, a new `windowType` option is available, taking the values: - none: no windowing - approximate: past functionality (v1706 and earlier) - exact: exact moving average - will store and write (for restart) all fields in the window
-
- Oct 30, 2017
-
-
mattijs authored
-
- Aug 02, 2017
-
-
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
-
- Jul 29, 2017
-
-
Mark OLESEN authored
- error::throwExceptions(bool) returning the previous state makes it easier to set and restore states. - throwing() method to query the current handling (if required). - the normal error::throwExceptions() and error::dontThrowExceptions() also return the previous state, to make it easier to restore later.
-
- Jul 20, 2017
-
-
Mark OLESEN authored
-
- Jul 14, 2017
-
-
Mark OLESEN authored
-
- Jul 21, 2017
-
-
Mark OLESEN authored
- makes the purpose clearer. In some places, string::resize() is even simpler. - use C++11 string::back() in preference to str[str.size()-1]
-
- Sep 06, 2017
-
-
Andrew Heather authored
-
- Jul 07, 2017
-
-
Andrew Heather authored
Original commit message: ------------------------ Parallel IO: New collated file format When an OpenFOAM simulation runs in parallel, the data for decomposed fields and mesh(es) has historically been stored in multiple files within separate directories for each processor. Processor directories are named 'processorN', where N is the processor number. This commit introduces an alternative "collated" file format where the data for each decomposed field (and mesh) is collated into a single file, which is written and read on the master processor. The files are stored in a single directory named 'processors'. The new format produces significantly fewer files - one per field, instead of N per field. For large parallel cases, this avoids the restriction on the number of open files imposed by the operating system limits. The file writing can be threaded allowing the simulation to continue running while the data is being written to file. NFS (Network File System) is not needed when using the the collated format and additionally, there is an option to run without NFS with the original uncollated approach, known as "masterUncollated". The controls for the file handling are in the OptimisationSwitches of etc/controlDict: OptimisationSwitches { ... //- Parallel IO file handler // uncollated (default), collated or masterUncollated fileHandler uncollated; //- collated: thread buffer size for queued file writes. // If set to 0 or not sufficient for the file size threading is not used. // Default: 2e9 maxThreadFileBufferSize 2e9; //- masterUncollated: non-blocking buffer size. // If the file exceeds this buffer size scheduled transfer is used. // Default: 2e9 maxMasterFileBufferSize 2e9; } When using the collated file handling, memory is allocated for the data in the thread. maxThreadFileBufferSize sets the maximum size of memory in bytes that is allocated. If the data exceeds this size, the write does not use threading. When using the masterUncollated file handling, non-blocking MPI communication requires a sufficiently large memory buffer on the master node. maxMasterFileBufferSize sets the maximum size in bytes of the buffer. If the data exceeds this size, the system uses scheduled communication. The installation defaults for the fileHandler choice, maxThreadFileBufferSize and maxMasterFileBufferSize (set in etc/controlDict) can be over-ridden within the case controlDict file, like other parameters. Additionally the fileHandler can be set by: - the "-fileHandler" command line argument; - a FOAM_FILEHANDLER environment variable. A foamFormatConvert utility allows users to convert files between the collated and uncollated formats, e.g. mpirun -np 2 foamFormatConvert -parallel -fileHandler uncollated An example case demonstrating the file handling methods is provided in: $FOAM_TUTORIALS/IO/fileHandling The work was undertaken by Mattijs Janssens, in collaboration with Henry Weller.
-
- Apr 06, 2017
-
- Mar 21, 2017
-
-
Andrew Heather authored
ENH: Function objects - updated logic to determine whether or not to instantiate a time-based function object. Fixes #439
-
- Sep 29, 2016
-
-
Andrew Heather authored
-
- Sep 23, 2016
-
-
Andrew Heather authored
-
- Sep 09, 2016
-
-
Henry Weller authored
Now the postProcess utility '-region' option works correctly, e.g. for the chtMultiRegionSimpleFoam/heatExchanger case postProcess -region air -func "mag(U)" calculates 'mag(U)' for all the time steps in region 'air'.
-
- Aug 05, 2016
-
-
Henry Weller authored
Requires gcc version 4.7 or higher
-