- 15 Dec, 2021 2 commits
-
-
- 19 Apr, 2021 1 commit
-
-
- additional dummy template parameter to assist with supporting derived classes. Currently just used for string types, but can be extended. - provide hash specialization for various integer types. Removes the need for any forwarding. - change default hasher for HashSet/HashTable from 'string::hash' to `Hash<Key>`. This avoids questionable hashing calls and/or avoids compiler resolution problems. For example, HashSet<label>::hasher and labelHashSet::hasher now both properly map to Hash<label> whereas previously HashSet<label> would have persistently mapped to string::hash, which was incorrect. - standardize internal hashing functors. Functor name is 'hasher', as per STL set/map and the OpenFOAM HashSet/HashTable definitions. Older code had a local templated name, which added unnecessary clutter and the template parameter was always defaulted. For example, Old: `FixedList<label, 3>::Hash<>()` ...
-
- 05 Aug, 2020 1 commit
-
-
Mark OLESEN authored
-
- 04 May, 2020 1 commit
-
-
Mark OLESEN authored
-
- 31 Oct, 2019 1 commit
-
-
OpenFOAM bot authored
-
- 24 Sep, 2019 1 commit
-
-
OpenFOAM bot authored
-
- 07 Jun, 2019 1 commit
-
-
Sergio Ferraris authored
Integration of VOF MULES new interfaces. Update of VOF solvers and all instances of MULES in the code. Integration of reactingTwoPhaseEuler and reactingMultiphaseEuler solvers and sub-models Updating reactingEuler tutorials accordingly (most of them tested) New eRefConst thermo used in tutorials. Some modifications at thermo specie level affecting mostly eThermo. hThermo mostly unaffected New chtMultiRegionTwoPhaseEulerFoam solver for quenching and tutorial. Phases sub-models for reactingTwoPhaseEuler and reactingMultiphaseEuler were moved to src/phaseSystemModels/reactingEulerFoam in order to be used by BC for chtMultiRegionTwoPhaseEulerFoam. Update of interCondensatingEvaporatingFoam solver.
-
- 06 Feb, 2019 1 commit
-
-
OpenFOAM bot authored
-
- 07 Jan, 2019 1 commit
-
-
Mark OLESEN authored
- reduced clutter when iterating over containers
-
- 09 Jan, 2019 1 commit
-
-
Mark OLESEN authored
-
- 03 Nov, 2018 1 commit
-
-
Mark OLESEN authored
- this helps for trapping unguarded dictionary lookups.
-
- 16 Oct, 2018 1 commit
-
-
Mark OLESEN authored
- clarifies the meanings of get<T> etc, avoids later ambiguities. ENH: simplify phaseProperties construction, add input checks
-
- 12 Oct, 2018 1 commit
-
-
Mark OLESEN authored
- use the dictionary 'get' methods instead of readScalar for additional checking Unchecked: readScalar(dict.lookup("key")); Checked: dict.get<scalar>("key"); - In templated classes that also inherit from a dictionary, an additional 'template' keyword will be required. Eg, this->coeffsDict().template get<scalar>("key"); For this common use case, the predefined getXXX shortcuts may be useful. Eg, this->coeffsDict().getScalar("key");
-
- 28 Mar, 2018 1 commit
-
-
Andrew Heather authored
-
- 21 Mar, 2018 1 commit
-
-
Mark OLESEN authored
- both autoPtr and tmp are defined with an implicit construct from nullptr (but with explicit construct from a pointer to null). Thus is it safe to use 'nullptr' when returning an empty autoPtr or tmp.
-
- 16 Mar, 2018 1 commit
-
-
Mark OLESEN authored
- when constructing dimensioned fields that are to be zero-initialized, it is preferrable to use a form such as dimensionedScalar(dims, Zero) dimensionedVector(dims, Zero) rather than dimensionedScalar("0", dims, 0) dimensionedVector("zero", dims, vector::zero) This reduces clutter and also avoids any suggestion that the name of the dimensioned quantity has any influence on the field's name. An even shorter version is possible. Eg, dimensionedScalar(dims) but reduces the clarity of meaning. - NB: UniformDimensionedField is an exception to these style changes since it does use the name of the dimensioned type (instead of the regIOobject).
-
- 26 Feb, 2018 2 commits
-
-
Mark OLESEN authored
-
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_();
-
- 09 Feb, 2018 1 commit
-
-
Mark OLESEN authored
- more consistent with STL practices for function classes. - string::hash function class now operates on std::string rather than Foam::string since we have now avoided inadvertent use of string conversion from int in more places.
-
- 05 Nov, 2017 1 commit
-
-
Mark OLESEN authored
- makes for clearer code ENH: make writeIfDifferent part of Ostream
-
- 23 Nov, 2017 1 commit
-
-
The combustion and chemistry models no longer select and own the thermodynamic model; they hold a reference instead. The construction of the combustion and chemistry models has been changed to require a reference to the thermodyanmics, rather than the mesh and a phase name. At the solver-level the thermo, turbulence and combustion models are now selected in sequence. The cyclic dependency between the three models has been resolved, and the raw-pointer based post-construction step for the combustion model has been removed. The old solver-level construction sequence (typically in createFields.H) was as follows: autoPtr<combustionModels::psiCombustionModel> combustion ( combustionModels::psiCombustionModel::New(mesh) ); psiReactionThermo& thermo = combustion->thermo(); // Create rho, U, phi, etc... autoPtr<compressible::turbulenceModel> turbulence ( compressible::turbulenceModel::New(rho, U, phi, thermo) ); combustion->setTurbulence(*turbulence); The new sequence is: autoPtr<psiReactionThermo> thermo(psiReactionThermo::New(mesh)); // Create rho, U, phi, etc... autoPtr<compressible::turbulenceModel> turbulence ( compressible::turbulenceModel::New(rho, U, phi, *thermo) ); autoPtr<combustionModels::psiCombustionModel> combustion ( combustionModels::psiCombustionModel::New(*thermo, *turbulence) ); ENH: combustionModel, chemistryModel: Simplified model selection The combustion and chemistry model selection has been simplified so that the user does not have to specify the form of the thermodynamics. Examples of new combustion and chemistry entries are as follows: In constant/combustionProperties: combustionModel PaSR; combustionModel FSD; In constant/chemistryProperties: chemistryType { solver ode; method TDAC; } All the angle bracket parts of the model names (e.g., <psiThermoCombustion,gasHThermoPhysics>) have been removed as well as the chemistryThermo entry. The changes are mostly backward compatible. Only support for the angle bracket form of chemistry solver names has been removed. Warnings will print if some of the old entries are used, as the parts relating to thermodynamics are now ignored. ENH: combustionModel, chemistryModel: Simplified model selection Updated all tutorials to the new format STYLE: combustionModel: Namespace changes Wrapped combustion model make macros in the Foam namespace and removed combustion model namespace from the base classes. This fixes a namespace specialisation bug in gcc 4.8. It is also somewhat less verbose in the solvers. This resolves bug report https://bugs.openfoam.org/view.php?id=2787 ENH: combustionModels: Default to the "none" model When the constant/combustionProperties dictionary is missing, the solver will now default to the "none" model. This is consistent with how radiation models are selected.
-
- 01 Dec, 2017 1 commit
-
-
Mixture molecular weight is now evaluated in heThermo like everything else, relying on the low level specie mixing rules. Units have also been corrected. SpecieMixture: Pure virtual definition for W to prevent Clang warning
-
- 04 Jul, 2017 1 commit
-
-
Mark OLESEN authored
ENH: add degToRad() multiplier (useful for scalar fields) - use degToRad() functions throughout instead of scattered local solutions
-
- 22 Jun, 2017 1 commit
-
-
using the continuity error correction formulation developed for twoPhaseEulerFoam and reactingEulerFoam.
-
- 24 May, 2017 1 commit
-
-
Andrew Heather authored
-
- 27 Apr, 2017 1 commit
-
-
Andrew Heather authored
-
- 05 Aug, 2016 1 commit
-
-
Henry Weller authored
Requires gcc version 4.7 or higher
-
- 28 Apr, 2016 1 commit
-
-
Henry Weller authored
When the GeometricBoundaryField template class was originally written it was a separate class in the Foam namespace rather than a sub-class of GeometricField as it is now. Without loss of clarity and simplifying code which access the boundary field of GeometricFields it is better that GeometricBoundaryField be renamed Boundary for consistency with the new naming convention for the type of the dimensioned internal field: Internal, see commit 4a57b9be This is a very simple text substitution change which can be applied to any code which compiles with the OpenFOAM-dev libraries.
-
- 27 Apr, 2016 1 commit
-
-
Henry Weller authored
Given that the type of the dimensioned internal field is encapsulated in the GeometricField class the name need not include "Field"; the type name is "Internal" so volScalarField::DimensionedInternalField -> volScalarField::Internal In addition to the ".dimensionedInternalField()" access function the simpler "()" de-reference operator is also provided to greatly simplify FV equation source term expressions which need not evaluate boundary conditions. To demonstrate this kEpsilon.C has been updated to use dimensioned internal field expressions in the k and epsilon equation source terms.
-
- 25 Apr, 2016 1 commit
-
-
Henry Weller authored
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1938 Because C++ does not support overloading based on the return-type there is a problem defining both const and non-const member functions which are resolved based on the const-ness of the object for which they are called rather than the intent of the programmer declared via the const-ness of the returned type. The issue for the "boundaryField()" member function is that the non-const version increments the event-counter and checks the state of the stored old-time fields in case the returned value is altered whereas the const version has no side-effects and simply returns the reference. If the the non-const function is called within the patch-loop the event-counter may overflow. To resolve this it in necessary to avoid calling the non-const form of "boundaryField()" if the results is not altered and cache the reference outside the patch-loop when mutation of the patch fields is needed. The most straight forward way of resolving this problem is to name the const and non-const forms of the member functions differently e.g. the non-const form could be named: mutableBoundaryField() mutBoundaryField() nonConstBoundaryField() boundaryFieldRef() Given that in C++ a reference is non-const unless specified as const: "T&" vs "const T&" the logical convention would be boundaryFieldRef() boundaryFieldConstRef() and given that the const form which is more commonly used is it could simply be named "boundaryField()" then the logical convention is GeometricBoundaryField& boundaryFieldRef(); inline const GeometricBoundaryField& boundaryField() const; This is also consistent with the new "tmp" class for which non-const access to the stored object is obtained using the ".ref()" member function. This new convention for non-const access to the components of GeometricField will be applied to "dimensionedInternalField()" and "internalField()" in the future, i.e. "dimensionedInternalFieldRef()" and "internalFieldRef()".
-
- 26 Feb, 2016 1 commit
-
-
Henry Weller authored
The deprecated non-const tmp functionality is now on the compiler switch NON_CONST_TMP which can be enabled by adding -DNON_CONST_TMP to EXE_INC in the Make/options file. However, it is recommended to upgrade all code to the new safer tmp by using the '.ref()' member function rather than the non-const '()' dereference operator when non-const access to the temporary object is required. Please report any problems on Mantis. Henry G. Weller CFD Direct.
-
- 20 Feb, 2016 1 commit
-
-
Henry Weller authored
To be used instead of zeroGradientFvPatchField for temporary fields for which zero-gradient extrapolation is use to evaluate the boundary field but avoiding fields derived from temporary field using field algebra inheriting the zeroGradient boundary condition by the reuse of the temporary field storage. zeroGradientFvPatchField should not be used as the default patch field for any temporary fields and should be avoided for non-temporary fields except where it is clearly appropriate; extrapolatedCalculatedFvPatchField and calculatedFvPatchField are generally more suitable defaults depending on the manner in which the boundary values are specified or evaluated. The entire OpenFOAM-dev code-base has been updated following the above recommendations. Henry G. Weller CFD Direct
-
- 10 Nov, 2015 1 commit
-
-
Henry Weller authored
Avoids the clutter and maintenance effort associated with providing the function signature string.
-
- 05 Nov, 2015 1 commit
-
-
Henry Weller authored
-
- 01 Nov, 2015 1 commit
-
-
Henry Weller authored
The new NotImplemented macro uses __PRETTY_FUNCTION__ for GNU compatible compilers otherwise __func__ to provide the function name string.
-
- 11 Sep, 2015 1 commit
-
-
Henry Weller authored
-
- 28 Aug, 2015 1 commit
-
-
Henry Weller authored
The previous method using a HashTable required a separate ordered list of names which is hard to work with and maintain.
-
- 26 Jun, 2015 1 commit
-
-
Henry Weller authored
LTS is selected by the ddt scheme e.g. in the tutorials/multiphase/interFoam/ras/DTCHull case: ddtSchemes { default localEuler rDeltaT; } LTSInterFoam is no longer needed now that interFoam includes LTS support.
-
- 29 Apr, 2015 1 commit
-
-
Henry authored
consistent with multiphaseInterFoam and other VoF solvers
-