Commit Graph

44 Commits

Author SHA1 Message Date
2d731e1af3 ENH: processorFaPatch: use internal-edge algos for processor edges to ensure parallel consistency
- The edgeInterpolation::makeCorrectionVectors() disables the non-orthogonality
correction if the calculated non-orthogonality coefficient is below 0.1.
However, this activation routine only considers internal edges, and excludes
any processor edges, resulting in inconsistent parallel calculations. This
routine is removed.
- Fatal errors are replaced with zero-valued fields for non-orthogonality-
and skewness-correction routines.
2024-12-19 10:09:16 +00:00
0b9391ff3b COMP: avoid remove dangling reference (finiteArea) 2024-06-19 12:14:21 +02:00
d03a225061 ENH: finiteArea: reduce various code footprint 2024-03-05 18:13:59 +00:00
47232ccf66 ENH: finiteArea: replace raw pointers with unique_ptr 2024-03-05 18:13:59 +00:00
1cbbcf15d3 ENH: finiteArea: remove redundant header files 2024-03-05 18:13:59 +00:00
b393d6eca1 STYLE: finiteArea: add/fix comments
STYLE: finiteArea: consistent use of =delete for removed ctors/assignments
2024-03-05 18:13:59 +00:00
149cd7042f ENH: use thisDb reference when referencing/creating finite-area fields
COMP: remove faMesh::operator()() in favour of mesh() or thisDb() instead

- makes the purpose and usage clearer
2023-12-07 17:42:24 +01:00
2cf200aef4 ENH: more consistent min edge lengths (finite-area)
- for robustness with small edges (which can occur with snappy meshes),
  the Le() and magLe() are limited to SMALL (commit a0f1e98d24).
  Now use factor sqrt(1/3) in the components to maintain magnitude of 1.

ENH: add fvMesh::unitSf() and faMesh::unitLe() methods

- simple wrappers around Sf()/magSf() and Le()/magLe() but with
  the potential for additional/alternative corrections.

STYLE: thisDb() in faMesh code to simplify future changes in storage

ENH: do not register finite-area geometric fields

- consistent with finite-volume treatment
2023-04-18 14:01:17 +02:00
25bc7d65f7 STYLE: prefer REGISTER/NO_REGISTER instead of true/false for IOobject
- self-documenting
2023-03-10 14:16:32 +00:00
d88272f031 ENH: relocate zero_one to pTraits, allows reuse for scalar clamping
ENH: add pTraits and IO for std::int8_t

STYLE: cull some implicitly available includes

- pTraits.H is included by label/scalar etc
- zero.H is included by UList

STYLE: cull redundant forward declarations for Istream/Ostream
2023-02-27 15:41:25 +01:00
1cc72ea7e3 STYLE: use clamp/clamp_range instead of min(max(..., upper), lower) 2023-02-21 10:10:43 +01:00
4d45cfd5a9 ENH: lerp for patch/neighbour weights 2023-02-21 10:10:43 +01:00
911c28f17d STYLE: use vector::magSqr when checking size 2023-01-31 12:45:34 +01:00
94a79ef24f STYLE: explicit reference to mesh db for schemes, interfaceTracking etc 2023-01-23 15:05:04 +01:00
a0f1e98d24 ENH: finiteArea: improve robustness in code sections vulnerable to math errors
It has been observed that the finite-area framework is prone to numerical
issues when zero-valued edge lenghts, edge/face normals and face areas exist.

To improve exception handling at identified code sections to gracefully
overcome math errors, the problematic entities are lower-bounded by SMALL.
2022-12-14 10:18:23 +00:00
d5b7200295 ENH: edgeInterpolation: make skewness-correction optimisation compile-time optional 2022-12-14 10:18:23 +00:00
689b2ab2a9 ENH: leastSquaresEdgeInterpolation: new edge interpolation method 2022-12-01 12:24:27 +00:00
b1a8bb1b12 STYLE: remove old/fragile volSurfaceMapping mappings 2022-09-22 17:18:20 +02:00
84db37f62f ENH: improved bookkeeping for finite-area to volume mesh correspondence
- whichPolyPatches() = the polyPatches related to the areaMesh.

  This helps when pre-calculating (and caching) any patch-specific
  content.

- whichPatchFaces() = the poly-patch/patch-face for each of the faceLabels.

  This allows more convenient lookups and, since the list is cached on
  the area mesh, reduces the number of calls to whichPatch() etc.

- whichFace() = the area-face corresponding to the given mesh-face

ENH: more flexible/consistent volume->area mapper functions
2022-09-22 16:09:14 +02:00
9ccc2d8fd5 ENH: edgeInterpolation: avoid division-by-zero errors in skew corrections 2022-08-03 13:28:44 +01:00
63cfb77fa5 ENH: use vector removeCollinear/normalise in NVDscheme 2022-06-10 15:50:49 +02:00
60b31fc8e2 ENH: add primitiveMeshTools support for face lists
- allows reuse by finiteArea, for example.
- simplify edge looping with face thisLabel/nextLabel method

ENH: additional storage checks for mesh weights (faMesh + fvMesh)

- allow finite-area field decomposition without edge weights.

STYLE: use tmp New in various places. Simpler updateGeom check
2022-04-29 11:44:28 +02:00
442c309dca BUG: cut/paste error in searchableExtrudedCircle
- use vector::removeCollinear a few places

COMP: incorrect initialization order in edgeFaceCirculator

COMP: Silence boost bind deprecation warnings (before CGAL-5.2.1)
2022-04-29 11:43:58 +02:00
e98acdc4fc ENH: extend type aliases to include geometric boundary fields (#2348)
STYLE: LduInterfaceFieldPtrsList as alias instead of a class

STYLE: define patch lists typedefs when defining the base patch

- eg, polyPatchList typedef within polyPatch.H

INT: relocate GeometricField::Boundary -> GeometricBoundaryField

- was internal to GeometricField but moving it outside simplifies
  forward declarations etc. Code adapted from openfoam.org
2022-03-30 16:36:03 +02:00
ba8d6bddcc ENH: use singleton method for accessing runtime selection
STYLE: use alias to mark partialFaceAreaWeightAMI deprecation after v2012
2021-11-05 17:21:27 +01:00
ce5e2e7e1c ENH: volSurfaceMapping: new mapToField and mapToSurface funcs 2021-07-16 16:38:06 +00:00
bc430ccdef ENH: New vibro-acoustic model suite
- New solver: `acousticFoam`
  - New base finite-area region class: `regionFaModel`
  - New base shell model classes:
    - `vibrationShellModel`
    - `thermalShellModel`
  - New shell models:
    - A vibration-shell model: `KirchhoffShell`
    - A thermal-shell model: `thermalShell`
  - New finite-area/finite-volume boundary conditions:
    - `clampedPlate`
    - `timeVaryingFixedValue`
    - `acousticWaveTransmissive`
  - New base classes for `fvOption` of finite-area methods: `faOption`
  - New `faOption`s:
    - `contactHeatFluxSource`
    - `externalFileSource`
    - `externalHeatFluxSource`
    - `jouleHeatingSource`
  - New tutorial: `compressible/acousticFoam/obliqueAirJet`

Signed-off-by: Kutalmis Bercin <kutalmis.bercin@esi-group.com>
2020-12-10 13:36:12 +00:00
fdf8d10ab4 Merge commit 'e9219558d7' into develop-v1906 2019-12-05 11:47:19 +00:00
e9219558d7 GIT: Header file updates 2019-10-31 14:48:44 +00:00
4de1215b44 STYLE: use default for constructors/destructors 2019-10-28 16:13:42 +01:00
fb09f56aba ENH: use FatalErrorInLookup macros (#1362) 2019-07-12 18:00:00 +02:00
1d85fecf4d ENH: use Zero when zero-initializing types
- 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)
2018-12-11 23:50:15 +01:00
4d6f0498d6 ENH: use vector::normalise and VectorSpace::normalised for clarity 2018-08-10 15:18:29 +02:00
34a7ea5da7 STYLE: use auto + cfind for constructor tables 2018-07-19 15:55:08 +02:00
f9fe71815a STYLE: consistent use of '= delete' for removed constructors/assignments
- make the purpose more explicit, and reduces some work for the
  compiler as well.
2018-05-30 12:03:17 +02:00
a230e8d408 STYLE: Correcting typos 2018-03-28 17:14:16 +01:00
018124e3bf STYLE: use 'return nullptr' for empty autoPtr/tmp returns
- 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.
2018-03-21 09:31:09 +01:00
52b36f84b5 ENH: cleanup tmp class (issue #639)
Improve alignment of its behaviour with std::shared_ptr

  - element_type typedef
  - swap, reset methods

* additional reference access methods:

cref()
    returns a const reference, synonymous with operator().
    This provides a more verbose alternative to using the '()' operator
    when that is desired.

        Mnemonic: a const form of 'ref()'

constCast()
    returns a non-const reference, regardless if the underlying object
    itself is a managed pointer or a const object.
    This is similar to ref(), but more permissive.

        Mnemonic: const_cast<>

    Using the constCast() method greatly reduces the amount of typing
    and reading. And since the data type is already defined via the tmp
    template parameter, the type deduction is automatically known.

    Previously,

        const tmp<volScalarField>& tfld;

        const_cast<volScalarField&>(tfld()).rename("name");
        volScalarField& fld = const_cast<volScalarField&>(tfld());

    Now,

        tfld.constCast().rename("name");
        auto& fld = tfld.constCast();

--

BUG: attempts to move tmp value that may still be shared.

- old code simply checked isTmp() to decide if the contents could be
  transfered. However, this means that the content of a shared tmp
  would be removed, leaving other instances without content.

* movable() method checks that for a non-null temporary that is
  unique (not shared).
2018-02-26 12:05:00 +01:00
2728a96b9c ENH: finiteArea - faMesh now derived from faSolution, faSchemes and data classes 2017-12-18 10:50:37 +00:00
a14eb71160 COMP: various compilation changes
- label-size 64 build, compiler warnings, unused template argument,
  faMatrix::clone() method

STYLE: faScalarMatrix - moved info message to within a debug scope
2017-11-14 08:41:20 +00:00
9ac1fa417b BUG: finiteArea: corrected reference access to tmps 2017-11-06 11:54:20 +00:00
50d1ac15ef INT: Integration updates in preparation for merge into the develop branch 2017-09-27 09:30:59 +01:00
9aff74aaaf COMP: Updated to compile with Clang 3.7.1 2017-09-20 13:55:42 +01:00
0c64622341 Finite area port, Hrvoje Jasak
- with sphereSurfactantFoam and sphereTransport test case
2017-09-15 12:02:25 +01:00