- Jul 27, 2020
-
-
Mark OLESEN authored
-
Mark OLESEN authored
- offers similarity with bitSet STYLE: remove remnant parent::operator= from HashSet STYLE: code formatting in HashTables
-
- Jul 24, 2020
-
-
Mark OLESEN authored
The fakeError function object emits FatalError at different stages (or does nothing), which is useful for testing purposes (issue #1779). Can request errors from constructor, execute and write methods.
-
- Jul 22, 2020
-
-
Mark OLESEN authored
- previously setting FOAM_ABORT would preempt checks for throwing exceptions. Now check for throwing first, to allow try/catch code to do its job. However, ignore exception throwing for abort(). These are used infrequently in the code, but indicate that recovery is deemed impossible. STYLE: use unique_ptr for internal stream buffer management
-
Mark OLESEN authored
-
- Jul 23, 2020
- Jul 21, 2020
-
-
sergio authored
The function evaluate was returning true every outer loop, triggering the re-calculation of ddt0 in every outer loop. The evaluation of the term ddt0 should be performed once per time step. The corrected function updates the timeIndex of ddt0 to avoid the re-evaluation of this term in the outer loops.
-
Mark OLESEN authored
- improves flexibility. Can tag a tmp as allowing non-const access to the reference and skip additional const_cast in following code. For example, tmp<volScalarField> tfld(nullptr); auto* ptr = getObjectPtr<volScalarField>("field"); if (ptr) { tfld.ref(*ptr); } else { tfld.reset(volScalarField::New(...)); } auto& fld = tfld.ref(); ENH: renamed tmpNrc to refPtr - the name 'refPtr' (reference|pointer) should be easier to remember than tmpNrc (tmp, but non-ref-counted). - provide tmpNrc typedef and header for code compatibility NOTE - in some places refPtr and tmp can be used instead of a std::reference_wrapper for handling external references. Unlike std::reference_wrapper, it can be default constructed (holding nothing), whereas reference_wrapper may need a dummy reference. However, the lifetime extension of references _may_ be better with reference_wrapper.
-
- Jul 20, 2020
-
-
Mark OLESEN authored
-
- Jul 17, 2020
-
-
Andrew Heather authored
autoPtr/tmp cleanup See merge request !378
-
- Jul 16, 2020
-
-
Mark OLESEN authored
- Cannot call ptr_->clone() with a null pointer!
-
Mark OLESEN authored
- autoPtr: less clutter using plain tests with the bool operator (!ptr) vs (ptr.empty()) (ptr) vs (!ptr.empty()) - tmp: was entirely unused.
-
Mark OLESEN authored
- previously this was marked as '= delete' for consistency with assignment from an empty pointer being a runtime error. However, these can be considered semantically different and it makes sense to permit this as equivalent to reset(nullptr). This change does not break existing code since the operator was previously unavailable (deleted). STYLE: refactor tmp operator=(T*) - delegate to reset() after initial checks
-
Mark OLESEN authored
- Previously considered to be valid() if it was any reference (null or non-null) or a non-null pointer. This appears to be a holdover from old code (pre-2015) where reinterpret_cast<..>(0) was used instead of the NullObject. A reference via a null pointer isn't really possible anywhere. Even for things like labelList::null(), they now use the NullObject, which has a non-zero memory location. - now simply check for a non-zero memory address. Regardless of pointer or referenced object.
-
Mark OLESEN authored
- combine reset() methods by adding a default parameter - improve top-level visibility of empty/valid/get methods for symmetry symmetry with autoPtr, future adjustment
-
Mark OLESEN authored
- cleaner code, more similarity with unique_ptr Now if (ptr) if (!ptr) instead if (ptr.valid()) if (!ptr.valid())
-
Mark OLESEN authored
- with '&&' conditions, often better to check for non-null autoPtr first (it is cheap) - check as bool instead of valid() method for cleaner code, especially when the wrapped item itself has a valid/empty or good. Also when handling multiple checks. Now if (ptr && ptr->valid()) if (ptr1 || ptr2) instead if (ptr.valid() && ptr->valid()) if (ptr1.valid() || ptr2.valid())
-
Mark OLESEN authored
- less clutter using plain tests with the bool operator: (!ptr) vs (ptr.empty()) (ptr) vs (!ptr.empty())
-
- Jul 15, 2020
-
-
Mark OLESEN authored
- same as FixedList<bool,3> for I/O
-
Mark OLESEN authored
- since only pointers are stored, autoPtr is better fit than tmp
-
- Jul 14, 2020
-
-
Andrew Heather authored
Feature dynamic library - issue #1737 See merge request !375
-
Mark OLESEN authored
- This reflects the pre-existing coding situation where const_cast was used throughout to effect the same. STYLE: fix private/protected access - CodedField, codedMixedFvPatchField
-
Mark OLESEN authored
- libs() singleton method for global library handling - explicit handling of empty filename for dlLibraryTable open/close. Largely worked before, but now be more explicit about its behaviour. - add (key, dict) constructor and open() methods. More similarity to dimensionedType, Enum etc, and there is no ambiguity with the templated open(). - construct or open from initializer_list of names - optional verbosity when opening with auxiliary table, avoid duplicate messages or spurious messages for these. - basename and fullname methods (migrated from dynamicCode). - centralise low-level load/unload hooks - adjust close to also dlclose() aliased library names.
-
- Jul 13, 2020
-
-
mattijs authored
This is for a very specific use case where the faceZones are imprinted after meshing the normal geometry. This sometimes splits off badly connected bits of the mesh. One way to remove these is to use e.g. subsetMesh. This embeds the same functionality inside snappyHexMesh.
-
mattijs authored
-
mattijs authored
-
- Jul 10, 2020
-
-
Mark OLESEN authored
- replace `%namespace` directive with simpler `%static` directive. We always encapsulate Lemon parser routines in an anonymous namespace, so a simpler static linkage directive suffices. This reduces the size of the Lemon patch (program and template).
-
- Jul 09, 2020
-
-
Mark OLESEN authored
- makes it easier to distinguish between pointers referring to pool data versus pointers actually holding storage, avoids manual demand-driven deletion and autoPtr. ENH: simplify/improve Pstream profiling - times now double (not scalar) for consistency with what cpuTime delivers - use bool to track suspend state
-
mattijs authored
-
- Jul 08, 2020
-
-
mattijs authored
-
- Jul 03, 2020
-
-
Andrew Heather authored
-
- Jul 01, 2020
-
-
mattijs authored
-
- Jun 30, 2020
-
-
Andrew Heather authored
-
- Jun 29, 2020
-
-
Andrew Heather authored
-
Andrew Heather authored
-
Andrew Heather authored
-
Andrew Heather authored
-
Andrew Heather authored
-