Commit Graph

51 Commits

Author SHA1 Message Date
Mark Olesen
ca5d91239d STYLE: use edgeHashes include
STYLE: use initial hash size 128 instead of 100 in a few places
2018-08-08 23:54:27 +02:00
mattijs
70801d7f48 ENH: checkMesh: output mask field. Fixes #958. 2018-08-01 13:02:07 +01:00
Andrew Heather
aec949d7cc ENH: Consistency improvement for setting postProcessing directory name 2018-02-27 14:37:05 +00:00
Mark Olesen
fc5895f1df STYLE: rename toLabel, toLabelRange classes -> labelOp, labelRangeOp
- make purpose as functors _slightly_ clearer.

- base definition removed for stricter enforcement of the specialization
  requirement.
2018-04-11 22:48:03 +02:00
Mark Olesen
660f3e5492 ENH: cleanup autoPtr class (issue #639)
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_();
2018-02-26 12:00:00 +01:00
Mark Olesen
15f7260884 ENH: cleanup of ListOps, ListListOps. Adjustments to List, PackedList.
- relocated ListAppendEqOp and ListUniqueEqOp to ListOps::appendEqOp
  and ListOps::UniqueEqOp, respectively for better code isolation and
  documentation of purpose.

- relocated setValues to ListOps::setValue() with many more
  alternative selectors possible

- relocated createWithValues to ListOps::createWithValue
  for better code isolation. The default initialization value is itself
  now a default parameter, which allow for less typing.

  Negative indices in the locations to set are now silently ignored,
  which makes it possible to use an oldToNew mapping that includes
  negative indices.

- additional ListOps::createWithValue taking a single position to set,
  available both in copy assign and move assign versions.
  Since a negative index is ignored, it is possible to combine with
  the output of List::find() etc.

STYLE: changes for PackedList

- code simplication in the PackedList iterators, including dropping
  the unused operator() on iterators, which is not available in plain
  list versions either.

- improved sizing for PackedBoolList creation from a labelUList.

ENH: additional List constructors, for handling single element list.

- can assist in reducing constructor ambiguity, but can also helps
  memory optimization when creating a single element list.
  For example,

    labelListList labels(one(), identity(mesh.nFaces()));
2018-03-01 14:12:51 +01:00
Mark Olesen
e42c228155 ENH: cleanup List constructors (issue #725)
- add copy construct from UList

- remove copy construct from dissimilar types.

  This templated constructor was too generous in what it accepted.
  For the special cases where a copy constructor is required with
  a change in the data type, now use the createList factory method,
  which accepts a unary operator. Eg,

      auto scalars = scalarList::createList
      (
          labels,
          [](const label& val){ return 1.5*val; }
      );
2018-02-08 08:53:14 +01:00
Mark Olesen
8399277d7d STYLE: eliminate duplicate includes (issue #293) 2017-07-17 14:44:05 +02:00
Mark Olesen
1fc2a73213 ENH: use meshedSurf API for surface writers (issue #104)
- Allows passing of additional information (per-face zone ids) or possibly
  other things, while reducing the number of arguments to pass.

- In sampledTriSurfaceMesh, preserve the region information that was
  read in, passing it onwards via the UnsortedMeshSurface content.

  The Nastran surface writer is currently the only writer making use
  of this per-face zone information.
  Passing it through as a PSHELL attribute, which should retain the
  distinction for parts. (issue #204)
2016-08-10 15:41:24 +02:00
Andrew Heather
9fbd612672 GIT: Initial state after latest Foundation merge 2016-09-20 14:49:08 +01:00
Henry Weller
aa30d0e7d5 checkMesh: Added option to write sets
- the checking for point-connected multiple-regions now also writes the
    conflicting points to a pointSet
  - with the -writeSets option it now also reconstructs & writes pointSets
2016-07-22 16:53:49 +01:00
Henry Weller
08bd802b42 checkGeometry, moveDynamicMesh: Convert processor IDs to 'List<label>'
Resolves bug-report http://bugs.openfoam.org/view.php?id=2140
2016-07-09 20:47:06 +01:00
Henry Weller
9e1486fee5 checkMesh, moveDynamicMesh: option -checkAMI writes the reconstructed AMI weights
Patch contributed by Mattijs Janssens
2016-07-05 15:35:16 +01:00
Henry Weller
e2336fefd3 checkMesh: Added writing of faceSets and cellSets containing errors
In parallel the sets are reconstructed. e.g.

mpirun -np 6 checkMesh -parallel -allGeometry -allTopology -writeSets vtk

will create a postProcessing/ folder with the vtk files of the
(reconstructed) faceSets and cellSets.

Also improved analysis of disconnected regions now also checks for point
connectivity with is useful for detecting if AMI regions have duplicate
points.

Patch contributed by Mattijs Janssens
2016-06-12 20:51:07 +01:00
Henry Weller
450728ea84 Standardized cell, patch, face and processor loop index names 2016-04-25 12:00:53 +01:00
andy
fd9d801e2d GIT: Initial commit after latest foundation merge 2016-04-25 11:40:48 +01:00
Henry Weller
43beb06018 Standardized cell, patch and face loop index names 2016-04-25 10:28:32 +01:00
Henry Weller
2d5ff31649 boundaryField() -> boundaryFieldRef() 2016-04-24 22:07:37 +01:00
Henry Weller
8c6fa81eba vector::zero -> Zero 2016-04-16 18:34:41 +01:00
Andrew Heather
3f55f752fc GIT: Resolve conflict with upstream merge from Foundation 2015-12-07 17:07:20 +00:00
mattijs
61dd625227 ENH: checkMesh: have -writeSets option
- checkMesh has option to write faceSets or (outside of) cellSets as
sampledSurface format. It automatically reconstructs the set on the master
and writes it to the postProcessing folder (as any sampledSurface). E.g.

    mpirun -np 6 checkMesh -allTopology -allGeometry -writeSets vtk -parallel

- fixed order writing of symmTensor in Ensight writers
2015-11-23 15:24:33 +00:00
Henry Weller
e2ef006b91 applications: Update ...ErrorIn -> ...ErrorInFunction
Avoids the clutter and maintenance effort associated with providing the
function signature string.
2015-11-10 17:53:31 +00:00
Henry Weller
eb1080c933 checkMesh: Provide the number of geometric and solution directions.
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1872
2015-10-17 13:56:34 +01:00
Henry Weller
430d894e37 Added ROOTSMALL 2015-09-02 15:29:54 +01:00
andy
709b92d907 ENH: mesh motion updates 2014-06-03 14:42:39 +01:00
laurence
6f9823d0de Merge branch 'master' into feature/cvMesh
Conflicts:
	src/OpenFOAM/algorithms/indexedOctree/indexedOctree.C
	src/OpenFOAM/algorithms/indexedOctree/indexedOctree.H
	src/dynamicMesh/polyMeshFilter/polyMeshFilter.C
	src/meshTools/indexedOctree/treeDataPrimitivePatch.C
	src/meshTools/indexedOctree/treeDataTriSurface.C
	src/meshTools/triSurface/triSurfaceSearch/triSurfaceSearch.C
2013-05-08 12:20:52 +01:00
andy
9ebd8a851a Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev 2013-05-03 17:33:37 +01:00
mattijs
487103fa60 ENH: checkMesh: volume ratio too tight 2013-04-29 15:21:20 +01:00
andy
4435d64047 STYLE: Corrected spelling mistakes 2013-04-16 17:01:23 +01:00
laurence
963e659666 Merge branch 'master' into feature/cvMesh 2013-04-16 16:39:24 +01:00
mattijs
415cdb6a63 ENH: checkMesh: check volume ratio and face interpolation weights 2013-04-15 16:55:59 +01:00
laurence
21163c9591 BUG: Prevent overflow on integer multiplication 2013-04-11 20:07:26 +01:00
mattijs
ceecb84573 ENH: checkMesh: moved some checking functionality to polyMesh 2012-12-17 13:45:19 +00:00
laurence
4cdb4a2c43 ENH: Ensure checkCoupledPoints works in parallel 2012-12-11 17:13:41 +00:00
mattijs
bc976819b4 BUG: checkMesh: reduce maximum size of face 2012-08-20 15:18:55 +01:00
mattijs
d316b94de3 ENH: checkGeometry: reorganise coupled points check 2012-08-20 12:41:50 +01:00
mattijs
0b97b9aeaf ENH: checkMesh: check all points on coupled boundaries. 2012-08-20 11:21:17 +01:00
Henry
cd51a5eea3 Consistency: Changed exponent FORTRAN style 'E' to C style 'e' 2012-04-17 16:48:27 +01:00
mattijs
2d192faa50 COMP: coupledPolyPatch: screwed up merge. 2011-08-30 11:58:23 +01:00
mattijs
a242a3787b ENH: checkMesh: added check for coupled point synchronisation 2011-08-24 08:58:48 +01:00
graham
ebb9a9e1ac ENH: tet decomposed particle tracking.
Squashed merge of particleInteractions up to
commit e7cb5bcf0315c359539ef1e715e1d51991343391
2010-09-17 16:59:17 +01:00
mattijs
d2d8b813be STYLE: checkGeometry.C 80char line length 2010-07-27 10:33:33 +01:00
mattijs
e3f20df12f ENH: checkMesh : wedge & empty checking improved
- aspect ratio and cellDeterminant do not use 3rd direction
- wedges are properly check for having opposite one
2010-07-23 12:06:42 +01:00
mattijs
883dbc2e2d ENH: Add concave cell checking 2010-03-30 21:48:57 +01:00
mattijs
d01adb74e3 ENH: Added tet volume check to checkMesh and snappyHexMesh 2010-03-26 13:39:51 +00:00
mattijs
e931525a0f BUG: sets relating to geometry (most mesh errors) should be written to
pointsInstance.

For now also dump topology related sets to pointsInstance since otherwise
paraFoam cannot see them (only looks at first 'sets' directory when searching
back)
2010-01-28 12:19:17 +00:00
mattijs
c49b302aa3 added solutionD and geometricD 2009-02-24 19:20:55 +00:00
Mark Olesen
dcc82bf77b boundingBox has mag() and span() methods - use them 2008-12-31 17:58:23 +01:00
mattijs
0bbc8fd2c4 parallel checkMesh 2008-10-07 18:24:56 +01:00
mattijs
e1938c7a0c Edge alignment check for 2D cases 2008-05-08 23:42:20 +01:00