- 30 Jan, 2019 1 commit
-
-
Mark Olesen authored
-
- 23 Jan, 2019 1 commit
-
-
Mark Olesen authored
-
- 21 Jan, 2019 4 commits
-
-
Mark Olesen authored
-
Mark Olesen authored
-
Mark Olesen authored
-
Mark Olesen authored
-
- 16 Jan, 2019 1 commit
-
-
Mark Olesen authored
-
- 21 Dec, 2018 1 commit
-
-
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)
-
- 24 Nov, 2018 2 commits
-
-
Mark Olesen authored
-
Mark Olesen authored
- parallel list output for foamVtkOutput - simplified '.series' file output - beginDataArray() method instead of openDataArray() + closeTag() since this seems to be the most common use anyhow. With an optional argument for leaving the tag open, this works the same as openDataArray() which may be deprecated in the future. - begin/end methods for CellData, PointData, FieldData (commonly used) - templating parameters for file headers, content version, legacy fields. This improves coding robustness and convenience of use. - use formatter and higher-level methods for legacy output - attribute quoting character now part of the formatter itself instead of as an argument for xmlAttr(). Toggle with quoting() method. - pair-wise processing of xml attributes, which also allows them to be passed as optional entries when creating an xml tag. - xmlComment with multiple arguments
-
- 03 Nov, 2018 1 commit
-
-
Mark Olesen authored
- previously simply read files until the input stream went bad and no more lines could be read. With the more stringent checking of values read (commit f32ed9ff) this approach causes problems. Use the underlying tokenizer instead to decide about termination.
-
- 01 Nov, 2018 1 commit
-
-
Mark Olesen authored
- preliminary work to #1057 - add dictionary selectable format (ascii|binary) to VTKsurfaceFormat, VTPsurfaceFormat
-
- 19 Oct, 2018 1 commit
-
-
Mark Olesen authored
COMP: fix incorrect reference in meshedSurfRef
-
- 17 Oct, 2018 1 commit
-
-
Mark Olesen authored
New name: findObject(), cfindObject() Old name: lookupObjectPtr() Return a const pointer or nullptr on failure. New name: findObject() Old name: -- Return a non-const pointer or nullptr on failure. New name: getObjectPtr() Old name: lookupObjectRefPtr() Return a non-const pointer or nullptr on failure. Can be called on a const object and it will perform a const_cast. - use these updated names and functionality in more places NB: The older methods names are deprecated, but continue to be defined.
-
- 27 Sep, 2018 1 commit
-
-
Mark Olesen authored
- nBoundaryFaces() is often used and is identical to (nFaces() - nInternalFaces()). - forward the mesh nInternalFaces() and nBoundaryFaces() to polyBoundaryMesh as nFaces() and start() respectively, for use when operating on a polyBoundaryMesh. STYLE: - use identity() function with starting offset when creating boundary maps. labelList map ( identity(mesh.nBoundaryFaces(), mesh.nInternalFaces()) ); vs. labelList map(mesh.nBoundaryFaces()); forAll(map, i) { map[i] = mesh.nInternalFaces() + i; }
-
- 13 Aug, 2018 1 commit
-
-
Mark Olesen authored
-
- 09 Aug, 2018 1 commit
-
-
Mark Olesen authored
- there were previously no hashing mechanisms for lists so they would fall back to the definition for primitives and hash the memory location of the allocated List object. - provide a UList::Hash<> sub-class for inheritance, and also a global specialization for UList<T>, List<T> such that the hash value for List<List<T>> cascades properly. - provide similar function in triFace to ensure that it remains similar in behaviour to face. - added SymmHash to Pair, for use when order is unimportant. STYLE: use string::hash() more consistently - no particular reason to use Hash<word>() which forwards to string::hash() anyhow
-
- 18 Jul, 2018 1 commit
-
-
Mark Olesen authored
- aids with detection of excess tokens (issue #762) - deprecated dictionary::operator[] in favour of the lookup() method which offers more flexibilty and clarity of purpose. Additionally, the read<> and get<> forms should generally be used instead anyhow.
-
- 12 Jun, 2018 1 commit
-
-
Mark Olesen authored
-
- 30 May, 2018 2 commits
-
-
Mark Olesen authored
- make the purpose more explicit, and reduces some work for the compiler as well.
-
Mark Olesen authored
- improves backward compatibility and more naming consistency. Retain setMany(iter1, iter2) to avoid ambiguity with the PackedList::set(index, value) method.
-
- 11 May, 2018 1 commit
-
-
Mark Olesen authored
-
- 07 May, 2018 1 commit
-
-
Mark Olesen authored
- improvement documentation for surface sampling. - can now specify alternative sampling scheme for obtaining the face values instead of just using the "cell" value. For example, sampleScheme cellPoint; This can be useful for cases when the surface is close to a boundary cell and there are large gradients in the sampled field. - distanceSurface now handles non-closed surfaces more robustly. Unknown regions (not inside or outside) are marked internally and excluded from consideration. This allows use of 'signed' surfaces where not previously possible.
-
- 27 Apr, 2018 1 commit
-
-
Mark Olesen authored
-
- 24 Apr, 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()); }
-
- 17 Apr, 2018 1 commit
-
-
Andrew Heather authored
-
- 16 Apr, 2018 1 commit
-
-
Mark Olesen authored
- In addition to the traditional Flex-based parser, added a Ragel-based parser and a handwritten one. Some representative timings for reading 5874387 points (1958129 tris): Flex Ragel Manual 5.2s 4.8s 6.7s total reading time 3.8s 3.4s 5.3s without point merging
-
- 12 Apr, 2018 1 commit
-
-
Mark Olesen authored
- make purpose as functors _slightly_ clearer. - base definition removed for stricter enforcement of the specialization requirement.
-
- 03 Apr, 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.
-
- 13 Mar, 2018 1 commit
-
-
Mark Olesen authored
- using const reference to temporary was failing. Remedy by using a direct copy, which is a reasonable solution since surfZone content is quite minimal.
-
- 07 Mar, 2018 4 commits
-
-
Mark Olesen authored
This class is largely a pre-C++11 holdover. It is now possible to simply use move construct/assignment directly. In a few rare cases (eg, polyMesh::resetPrimitives) it has been replaced by an autoPtr.
-
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_();
-
Mark Olesen authored
- constexpr, noexcept. Added an 'at()' method for returning an iterator within the range and changed operator()(label) to have behaviour as per found(). This makes the labelRange usable as a unary predicate. - added templated conversion class 'toLabelRange' - add range() method to polyPatch and surfZone classes, and corresponding templated conversion functors. For example, auto patchDims = ListOps::create<labelRange> ( mesh.boundaryMesh(), toLabelRange<polyPatch>() ); to create a List<labelRange> representing the patch extents.
-
- 22 Feb, 2018 1 commit
-
-
Mark Olesen authored
- the wordHashSet typedef is always available when HashSet has been included. - use default HashTable key (word) instead of explicitly mentioning it
-
- 17 Jan, 2018 1 commit
-
-
Mark Olesen authored
- define regExp::results_type using SubStrings container for handling groups. This makes a later shift to std::smatch easier, but changes the regExp API for matching with groups. Previously had list element 0 for regex group 1, now list element 0 is the entire match and list element 1 is regex group 1. Old: List<std::string> mat; if (re.match(text, mat)) Info<< "group 1: " << mat[0] << nl; New: regExp::results_type mat; if (re.match(text, mat)) Info<< "group 1: " << mat.str(1) << nl;
-
- 16 Jan, 2018 1 commit
-
-
Mark Olesen authored
- problems were introduced by the change 50ddd2ed (issue #686). Affected reading of OBJ files. The fallback zone (used to catch unnamed groups/zones), which was previously filtered away when not needed. Now handle more explicitly. ENH: use stringOps::split and low-level read{Label,Scalar} for parsing OBJ file
-
- 03 Jan, 2018 1 commit
-
-
Mark Olesen authored
- caused by the removal of empty zones when reading the surface files
-
- 24 Nov, 2017 1 commit
-
-
Mark Olesen authored
- eliminates previous code duplication and improves maintainability
-
- 20 Nov, 2017 1 commit
-
-
Mark Olesen authored
-