- 27 Mar, 2019 1 commit
-
-
mattijs authored
-
- 06 Feb, 2019 1 commit
-
-
OpenFOAM bot authored
-
- 17 Jan, 2019 1 commit
-
-
mattijs authored
-
- 11 Dec, 2018 2 commits
-
-
Mark OLESEN authored
- makes the intent clearer and avoids the need for additional constructor casting. Eg, labelList(10, Zero) vs. labelList(10, 0) scalarField(10, Zero) vs. scalarField(10, scalar(0)) vectorField(10, Zero) vs. vectorField(10, vector::zero)
-
Mark OLESEN authored
-
- 18 Oct, 2018 1 commit
-
-
Mark OLESEN authored
- more dictionary-like methods, enforce keyType::LITERAL for all lookups to avoid any spurious keyword matching. - new readEntry, readIfPresent methods - The get() method replaces the now deprecate lookup() method. - Deprecate lookupOrFailsafe() Failsafe behaviour is now an optional parameter for lookupOrDefault, which makes it easier to tailor behaviour at runtime. - output of the names is now always flatted without line-breaks. Thus, os << flatOutput(someEnumNames.names()) << nl; os << someEnumNames << nl; both generate the same output. - Constructor now uses C-string (const char*) directly instead of Foam::word in its initializer_list. - Remove special enum + initializer_list constructor form since it can create unbounded lookup indices. - Removd old hasEnum, hasName forms that were provided during initial transition from NamedEnum. - Added static_assert on Enum contents to restrict to enum or integral values. Should not likely be using this class to enumerate other things since it internally uses an 'int' for its values. Changed volumeType accordingly to enumerate on its type (enum), not the class itself.
-
- 11 Oct, 2018 1 commit
-
-
Mark OLESEN authored
- avoids some doubled slashes STYLE: simplify concatenation of processor directory names
-
- 05 Oct, 2018 1 commit
-
-
Mark OLESEN authored
- instead of dict.lookup(name) >> val; can use dict.readEntry(name, val); for checking of input token sizes. This helps catch certain types of input errors: { key1 ; // <- Missing value key2 1234 // <- Missing ';' terminator key3 val; } STYLE: readIfPresent() instead of 'if found ...' in a few more places.
-
- 01 Jun, 2018 1 commit
-
-
Mark OLESEN authored
- Since 'bool' and 'Switch' use the _identical_ input mechanism (ie, both accept true/false, on/off, yes/no, none, 1/0), the main reason to prefer one or the other is the output. The output for Switch is as text (eg, "true"), whereas for bool it is label (0 or 1). If the output is required for a dictionary, Switch may be appropriate. If the output is not required, or is only used for Pstream exchange, bool can be more appropriate.
-
- 29 May, 2018 1 commit
-
-
Mark OLESEN authored
- improves backward compatibility and more naming consistency. Retain setMany(iter1, iter2) to avoid ambiguity with the PackedList::set(index, value) method.
-
- 14 Mar, 2018 1 commit
-
-
Mark OLESEN authored
- this also provides a better separation of the intent (ie, inserting a single value, or inserting multiply values)
-
- 13 Mar, 2018 1 commit
-
-
Mark OLESEN authored
- eliminate iterators from PackedList since they were unused, had lower performance than direct access and added unneeded complexity. - eliminate auto-vivify for the PackedList '[] operator. The set() method provides any required auto-vivification and removing this ability from the '[]' operator allows for a lower when accessing the values. Replaced the previous cascade of iterators with simpler reference class. PackedBoolList: - (temporarily) eliminate logic and addition operators since these contained partially unclear semantics. - the new test() method tests the value of a single bit position and returns a bool without any ambiguity caused by the return type (like the get() method), nor the const/non-const access (like operator[] has). The name corresponds to what std::bitset uses. - more consistent use of PackedBoolList test(), set(), unset() methods for fewer operation and clearer code. Eg, if (list.test(index)) ... | if (list[index]) ... if (!list.test(index)) ... | if (list[index] == 0u) ... list.set(index); | list[index] = 1u; list.unset(index); | list[index] = 0u; - deleted the operator=(const labelUList&) and replaced with a setMany() method for more clarity about the intended operation and to avoid any potential inadvertent behaviour.
-
- 07 Mar, 2018 1 commit
-
-
Mark OLESEN authored
- The bitSet class replaces the old PackedBoolList class. The redesign provides better block-wise access and reduced method calls. This helps both in cases where the bitSet may be relatively sparse, and in cases where advantage of contiguous operations can be made. This makes it easier to work with a bitSet as top-level object. In addition to the previously available count() method to determine if a bitSet is being used, now have simpler queries: - all() - true if all bits in the addressable range are empty - any() - true if any bits are set at all. - none() - true if no bits are set. These are faster than count() and allow early termination. The new test() method tests the value of a single bit position and returns a bool without any ambiguity caused by the return type (like the get() method), nor the const/non-const access (like operator[] has). The name corresponds to what std::bitset uses. The new find_first(), find_last(), find_next() methods provide a faster means of searching for bits that are set. This can be especially useful when using a bitSet to control an conditional: OLD (with macro): forAll(selected, celli) { if (selected[celli]) { sumVol += mesh_.cellVolumes()[celli]; } } NEW (with const_iterator): for (const label celli : selected) { sumVol += mesh_.cellVolumes()[celli]; } or manually for ( label celli = selected.find_first(); celli != -1; celli = selected.find_next() ) { sumVol += mesh_.cellVolumes()[celli]; } - When marking up contiguous parts of a bitset, an interval can be represented more efficiently as a labelRange of start/size. For example, OLD: if (isA<processorPolyPatch>(pp)) { forAll(pp, i) { ignoreFaces.set(i); } } NEW: if (isA<processorPolyPatch>(pp)) { ignoreFaces.set(pp.range()); }
-
- 26 Feb, 2018 1 commit
-
-
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_();
-
- 08 Jan, 2018 1 commit
-
-
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
-
- 19 Nov, 2017 1 commit
-
-
Mark OLESEN authored
-
- 10 Nov, 2017 1 commit
-
-
Mark OLESEN authored
- constructor for empty cell/face/point Zones, with contents to be transferred in later. - ZoneMesh::operator(const word&) to return existing zone or a new empty one.
-
- 06 Sep, 2017 1 commit
-
-
mattijs authored
-
- 16 Jan, 2018 1 commit
-
-
Andrew Heather authored
-
- 03 Jul, 2017 1 commit
-
-
Mark OLESEN authored
-
- 16 Nov, 2016 1 commit
-
-
mattijs authored
-
- 10 Aug, 2016 1 commit
-
-
Mark Olesen authored
- use surfFaces() to return the templated list of faces. This frees up the method 'faces()' to be used as a virtual method, which will be needed at a later stage.
-
- 18 May, 2016 1 commit
-
-
Henry Weller authored
-
- 25 Apr, 2016 2 commits
-
-
Henry Weller authored
-
Henry Weller authored
-
- 24 Apr, 2016 1 commit
-
-
Henry Weller authored
-
- 27 Jun, 2016 1 commit
-
-
Andrew Heather authored
-
- 02 Feb, 2016 1 commit
-
-
Henry Weller authored
This change ensures that these patches are named consistently so that they can be looked-up as required in e.g. patchMeanVelocityForce
-
- 25 Jan, 2016 1 commit
-
-
mattijs authored
Moved file path handling to regIOobject and made it type specific so now every object can have its own rules. Examples: - faceZones are now processor local (and don't search up anymore) - timeStampMaster is now no longer hardcoded inside IOdictionary (e.g. uniformDimensionedFields support it as well) - the distributedTriSurfaceMesh is properly processor-local; no need for fileModificationChecking manipulation.
-
- 10 Nov, 2015 1 commit
-
-
Henry Weller authored
Avoids the clutter and maintenance effort associated with providing the function signature string.
-
- 14 Oct, 2015 2 commits
-
-
mattijs authored
Refinement: ----------- // Optionally avoid patch merging - keeps hexahedral cells // (to be used with automatic refinement/unrefinement) //mergePatchFaces off; // Optional multiple locationsInMesh with corresponding optional cellZone // (automatically generates faceZones inbetween) locationsInMesh ( ((-0.09 -0.039 -0.049) bottomAir) // cellZone bottomAir ((-0.09 0.009 -0.049) topAir) // cellZone topAir ); // Optional faceType and patchType specification for these faceZones faceZoneControls { bottomAir_to_topAir { faceType baffle; } } / Optional checking of 'bleeding' of mesh through a specifying a locations // outside the mesh locationsOutsideMesh ((0 0 0)(12.3 101.17 3.98)); // Improved refinement: refine all cells with all (or all but one) sides refined // Improved refinement: refine all cells with opposing faces with different // refinement level. These cells can happen on multiply curved surfaces. // Default on, can be switched off with //interfaceRefine false; Snapping -------- // Optional smoothing of points at refinement interfaces. This will reduce // the non-orthogonality at refinement interfaces. //nSmoothInternal $nSmoothPatch; Layering -------- // Layers can be added to patches or to any side of a faceZone. // (Any faceZone internally gets represented as two patches) // The angle to merge patch faces can be set independently of the // featureAngle. This is especially useful for large feature angles // Default is the same as the featureAngle. //mergePatchFacesAngle 45; // Optional mesh shrinking type 'displacementMotionSolver'. It uses any // displacementMotionSolver, e.g. displacementSBRStress // (default is the medial-axis algorithm, 'displacementMedialAxis') //meshShrinker displacementMotionSolver;
-
Refinement: ----------- // Optionally avoid patch merging - keeps hexahedral cells // (to be used with automatic refinement/unrefinement) //mergePatchFaces off; // Optional multiple locationsInMesh with corresponding optional cellZone // (automatically generates faceZones inbetween) locationsInMesh ( ((-0.09 -0.039 -0.049) bottomAir) // cellZone bottomAir ((-0.09 0.009 -0.049) topAir) // cellZone topAir ); // Optional faceType and patchType specification for these faceZones faceZoneControls { bottomAir_to_topAir { faceType baffle; } } / Optional checking of 'bleeding' of mesh through a specifying a locations // outside the mesh locationsOutsideMesh ((0 0 0)(12.3 101.17 3.98)); // Improved refinement: refine all cells with all (or all but one) sides refined // Improved refinement: refine all cells with opposing faces with different // refinement level. These cells can happen on multiply curved surfaces. // Default on, can be switched off with //interfaceRefine false; Snapping -------- // Optional smoothing of points at refinement interfaces. This will reduce // the non-orthogonality at refinement interfaces. //nSmoothInternal $nSmoothPatch; Layering -------- // Layers can be added to patches or to any side of a faceZone. // (Any faceZone internally gets represented as two patches) // The angle to merge patch faces can be set independently of the // featureAngle. This is especially useful for large feature angles // Default is the same as the featureAngle. //mergePatchFacesAngle 45; // Optional mesh shrinking type 'displacementMotionSolver'. It uses any // displacementMotionSolver, e.g. displacementSBRStress // (default is the medial-axis algorithm, 'displacementMedialAxis') //meshShrinker displacementMotionSolver;
-
- 18 May, 2015 1 commit
-
-
Henry authored
-
- 04 May, 2015 2 commits
- 02 Jul, 2014 1 commit
-
-
andy authored
-
- 21 May, 2013 1 commit
-
-
mattijs authored
-
- 21 Feb, 2013 1 commit
-
-
andy authored
-
- 04 Feb, 2013 1 commit
-
-
mattijs authored
-
- 28 Jan, 2013 1 commit
-
-
mattijs authored
-