- 05 Aug, 2020 6 commits
-
-
Mark Olesen authored
-
Mark Olesen authored
- reduces the number of files, eases code refactoring
-
Mark Olesen authored
-
Mark Olesen authored
Reduce the number of phaseSystems libraries: - phaseSystems previously had a number of smaller libraries to provide interface and model properties, etc. This potential flexibility was never actually used anywhere, but causes cyclic dependencies between phaseSystem and the models (and turbulence) that causes extreme difficulty for mingw linking (issue #1238). - libincompressibleMultiphaseSystems - removed: libmassTransferModels - libmultiphaseSystem - removed: libcompressibleMultiphaseEulerianInterfacialModels - libreactingMultiphaseSystem - removed: libreactingPhaseSystem - removed: libreactingEulerianFvPatchFields - removed: libreactingEulerianInterfacialCompositionModels - removed: libreactingEulerianInterfacialModels - removed: libmultiphaseReactingTurbulenceModels - libreactingTwoPhaseSystem - removed: libreactingPhaseSystem - removed: libreactingEulerianFvPatchFields - removed: libreactingEulerianInterfacialCompositionModels - removed: libreactingEulerianInterfacialModels Avoid duplicate symbol for phaseCompressibleTurbulenceModels Common turbulence models are defined in libreactingMultiphaseSystem, and libmultiphaseReactingTurbulenceModels is now redundant. The libtwoPhaseReactingTurbulenceModels extends the common models for reactingTwoPhaseSystem.
-
Mark Olesen authored
- prelude to code refactoring NOTE no source code change in this commit, only relocation, renaming and adjustment of Make/{files,options}
-
Mark Olesen authored
- since the context (laminar/RAS/LES) is already given by the sub-dictionary, it is redundant to use as prefix as well. - silently support the longer names as compat methods
-
- 04 Aug, 2020 2 commits
-
-
Mark Olesen authored
-
Mark Olesen authored
-
- 03 Aug, 2020 1 commit
-
-
Mark Olesen authored
-
- 31 Jul, 2020 1 commit
-
-
Mark Olesen authored
- include fvOptions header, Smagorinsky header
-
- 30 Jul, 2020 3 commits
-
-
Mark Olesen authored
- old code just checked for pointer vs non-pointer. Should actually treat CREF and REF types differently Overseen in commit be058bec. Only affects develop branch ENH: improved naming consistency in tmp, refPtr - also use long-form to check for pointer type instead of the isTmp() method. Makes differences between PTR, CREF, REF easier to spot. STYLE: typeName() for tmp, refPtr is static
-
Mark Olesen authored
-
Mark Olesen authored
-
- 29 Jul, 2020 1 commit
-
-
Sergio Ferraris authored
In fvSolution is possible to cache the limiter. This surface field is stored in the database to be read later. The internal tmp management of the field was not working properly.
-
- 28 Jul, 2020 8 commits
-
-
Sergio Ferraris authored
In certain turbulence models such as kEpsilon, kOmegaSST, etc when used in the multiphase context throw an error in the preconditioner. This is due to alpha being zero. Fixes #1789.
-
Mark Olesen authored
-
Mark Olesen authored
-
Mark Olesen authored
- using HashPtrTable::set() with the same key twice did not guarantee proper cleanup of memory since it simply used the underlying HashTable::set() without doing anything about the old memory. Now check for pre-existing storage and delete it when it does not correspond to the newly stored pointer. This problem is independent of potential memory slicing previously flagged (#1286) and only partially resolved.
-
Mark Olesen authored
- naming similarity with autoPtr, unique_ptr and other containers. For UPtrList derivatives, this is equivalent to the existing operator(). The read-only variant is also equivalent to the single-parameter 'set(label)' method. With PtrList<T> list(...) : const T* ptr = list.get(10); if (ptr) { ptr->method(); } vs. if (list.set(10)) { list[10].method(); } For HashPtrTable there is only a read-only variant which is equivalent to testing for existence and for value. With HashPtrTable<T> hash(...) : const T* ptr = list.get("key"); if (ptr) { ptr->method(); } vs. if (list.found("key")) { // Fails on null pointer!! list["key"].method(); } Use of get() is largely a matter of taste or local coding requirements
-
Mark Olesen authored
- emplace methods Eg, m.internalCoeffs().emplace(patchi, fc.size(), Zero); vs. m.internalCoeffs().set(patchi, new Field<Type>(fc.size(), Zero)); - handle insert/append of refPtr wherever tmp was already supported COMP: incorrect variable names in PtrListOpsTemplates.C
-
Mark Olesen authored
- forwarding like the emplace() method, but overwriting existing entries as required - propagate similar changes to HashPtrTable For example, with HashPtrTable<labelList> table(...) : With 'insert' semantics table.emplace("list1", 1000); vs if (!table.found("list1")) { table.set("list1", new labelList(1000)); } or table.insert("list1", autoPtr<labelList>::New(1000)); Note that the last example invokes an unnecessary allocation/deletion if the insertion is unsuccessful. With 'set' semantics: table.emplace_set("list1", 15); vs table.set("list1", new labelList(15));
-
Mark Olesen authored
- constructs such as the following will no longer worked, but that is also a good thing. ptrlist.set(i, scalarField(nFaces, Zero)); this called set(.., const tmp<scalarField>&), which meant under the hood: - create local temporary const scalarField& - wrap as const tmp& - use tmp::ptr(), to clone the const-ref This implies an additional allocation (for the const scalarField&) which is immediately discarded. Doubtful that compiler optimization would do anything.
-
- 27 Jul, 2020 7 commits
-
-
Mark Olesen authored
-
Mark Olesen authored
- backported fix from develop COMP: incorrect variable names in PtrListOpsTemplates.C
-
Mark Olesen authored
-
Mark Olesen authored
-
Mark Olesen authored
STYLE: use global operator instead of HashSet -= operator
-
Mark Olesen authored
-
Mark Olesen authored
- offers similarity with bitSet STYLE: remove remnant parent::operator= from HashSet STYLE: code formatting in HashTables
-
- 24 Jul, 2020 1 commit
-
-
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.
-
- 23 Jul, 2020 2 commits
-
-
Mark Olesen authored
-
Mark Olesen authored
-
- 22 Jul, 2020 2 commits
-
-
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
-
- 23 Jul, 2020 3 commits
- 21 Jul, 2020 2 commits
-
-
Sergio Ferraris 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.
-
- 20 Jul, 2020 1 commit
-
-
Mark Olesen authored
-