Commit Graph

17013 Commits

Author SHA1 Message Date
153f847ad2 BUG: fix pinv() for single-element input matrices
ENH: return zero-valued matrix when input zero-valued matrix in pinv()
2020-06-05 14:35:36 +01:00
af22163492 ENH: improve Matrix classes and tests 2020-06-05 14:35:36 +01:00
5c220a9e2d Merge remote-tracking branch 'origin/master' into develop 2020-06-04 22:30:12 +02:00
11ff01f434 ENH: refactor vtk::internalWriter, vtk::patchWriter
- new vtk::internalMeshWriter, vtk::patchMeshWriter
  intermediate classes without finiteVolume dependencies.

  Enables direct use with a polyMesh.
  Makes vtk::internalWriter, vtk::patchWriter header/template only.
2020-06-04 21:44:26 +02:00
9d2fe2086a BUG: missing compilation for some vtk conversion components (fixes #1720) 2020-06-04 21:07:44 +02:00
ea4c8f4bea ENH: boolVector for specialized bundling of boolean values
- bundled of boolean values as a vector of 3 components with
  element access using x(), y() and z() member functions.
  It also has some methods similar to bitSet.

- Not derived from Vector or VectorSpace since it does not share very
  many vector-like characteristics.
2020-06-04 16:56:21 +02:00
bc9e97cf36 ENH: additional polynomial constructors, improved I/O
- support construct from initializer_list, which can help simplify
  code with constant coefficients.

- add default constructor for polynomialFunction and Istream reading
  to support resizable lists of polynomialFunction.

  A default constructed polynomialFunction is simply equivalent to
  a constant zero.

- no special IO handling for Polynomial required,
  it is the same as VectorSpace anyhow.
2020-06-04 15:02:21 +02:00
95f7ed0342 COM: Separate htc FO from general FO and reactingEuler solvers (#1714)
The phase systems tables for multiphase solvers create conflict
between each other as they are defined in the same namespace and using
similar class names.

Therefore a special htc function object for reactingEulerSolver was
added (reactingEulerHtcModel), located under
src/phaseSystemModels/reactingEulerFoam/functionObjects/

This commit includes the following:

- Relocate solvers/reactingEulerFoam functionObjects to
  src/phaseSystemModels
- Remove links for fieldFunctionObject to multiphase libs to avoid
  conflicts
- New FO for htc for reactingEulerFoam called reactingEulerHtcModel
2020-06-03 20:58:02 +02:00
84d7141e31 STYLE: adjust return branching 2020-06-03 10:38:10 +02:00
3e43edf056 ENH: unify use of dictionary method names
- previously introduced `getOrDefault` as a dictionary _get_ method,
  now complete the transition and use it everywhere instead of
  `lookupOrDefault`. This avoids mixed usage of the two methods that
  are identical in behaviour, makes for shorter names, and promotes
  the distinction between "lookup" access (ie, return a token stream,
  locate and return an entry) and "get" access (ie, the above with
  conversion to concrete types such as scalar, label etc).
2020-06-02 17:26:03 +02:00
31b172217c ENH: support predicate checks for argList (similar to dictionary methods)
- Favour use of argList methods that are more similar to dictionary
  method names with the aim of reducing the cognitive load.

  * Silently deprecate two-parameter get() method in favour of the
    more familiar getOrDefault.
  * Silently deprecate opt() method in favour of get()

  These may be verbosely deprecated in future versions.
2020-06-02 13:51:18 +02:00
695766af16 COMP: no constexpr methods for older gcc (nullObject) 2020-05-31 20:44:12 +02:00
8600d6ba1c COMP: change fieldsFunctionObject library link order (fixes #1714)
- before (-lreactingPhaseSystem -ltwoPhaseReactingTurbulenceModels)
  after  (-ltwoPhaseReactingTurbulenceModels -lreactingPhaseSystem)
  to fix symbol resolution issue on clang.
2020-05-29 15:58:08 +02:00
1d7d5b2d26 ENH: provide lightweight labelFwd, scalarFwd headers
- centralizes sizing information and typedefs
  without dependencies beyond <cstdint>

COMP: ensure label typedef exists for nullObject.H
2020-05-29 15:56:08 +02:00
727ea48e0c STYLE: include scalar.H instead of floatScalar.H/doubleScalar.H separately
STYLE: adjust code comments
2020-05-29 15:55:56 +02:00
1d2391e0b4 ENH: add swallow assignment to nullObject
- similar to the behaviour of std::ignore and consistent with the
  no input / no output nature of nullObject. Similarly accept a
  const reference for its Istream operator.

- make most nullObject methods constexpr
2020-05-29 15:55:27 +02:00
e3367dbdc1 ENH: inline and extend clockValue, clockTime
- mostly wraps std::chrono so can inline much of it, which is potentially
  helpful when used for inner timings.

- add elapsedTime() method for direct cast to double and for
  naming similarity with wall-clock method.

Potential breaking change (minor):

- clockValue construct with a bool parameter is now simply tagged
  dispatch (value is ignored) and always queries the current clock
  value. This avoids needless branching.
  Since this constructor form has primarily been used internally (eg,
  clockTime), breakages in user code are not expected.
2020-05-29 15:48:21 +02:00
45a05012c6 STYLE: use Time::printExecutionTime() method
- makes format of ExecutionTime = ... output configurable (#788)
  and reduces code clutter.
2020-05-29 15:48:20 +02:00
5eebe5050b ENH: reduce dependencies for foamVersion.H
- have printBuildInfo output to std::ostream
- removed extraneous include "stdFoam.H"

ENH: revert to pre-processor defines for hard-coded paths (#1712)

- redundant information, but more robust at run-time without relying
  on initialization order
2020-05-29 15:48:20 +02:00
be417c9841 COMP: erroneous return from void method (fixes #1716) 2020-05-26 10:40:26 +02:00
03c2373d2c ENH: align meshRefinement dictionary wrapper with dictionary code
COMP: do not rely on implicit conversion to PtrList from Istream
2020-05-26 08:56:11 +02:00
997c9a232c STYLE: use compact form for libs () entries 2020-05-23 18:42:47 +02:00
b68ab9bd5a ENH: Function1 and PatchFunction for external wall heat transfer (#1709)
- can define spatial/temporal variations for heat-flux or
  convection coefficient.

- can define temporal variations for power or ambient temperature
2020-05-23 18:42:47 +02:00
5105154b88 ENH: expression versions of Function1 and PatchFunction1 (#1709) 2020-05-23 18:42:47 +02:00
51c2329f97 ENH: additional step function, cleanup autoPtr use in Function1 2020-05-23 18:42:41 +02:00
09d9c5cc03 ENH: consistent autoPtr handling in PatchFunction1 2020-05-23 16:02:35 +02:00
2659c48f36 COMP: change foamVersion::configuredProjectDir to function (#1712)
- exhibited apparent issues with initialization order (on some
  installations of gcc-4.8.5) when a variable was used.
2020-05-23 15:56:25 +02:00
a5a504693a ENH: support disable libs when constructing Time from argList (#1714)
- previously relied on presence/absence of command-line options.
  Can now explicitly disable individually

- provide shorter constructors for dealing with these types of cases.
  Make construction with non-default names for "system" and "constant"
  lengthier so there is no ambiguity.
2020-05-23 15:28:32 +02:00
06ae8dca14 ENH: output Warning messages to stderr when banners are suppressed (#1713) 2020-05-23 13:07:48 +02:00
c47937e337 ENH: add fvPatch::lookupPatch static function
- lookup a fvPatch given a polyPatch reference.
  Replaces ad hoc helpers in patchExprFieldBase
2020-05-22 21:53:42 +02:00
59933555d8 STYLE: remove trailing space, tabs
COMP: deletion of incomplete type
2020-05-22 21:53:13 +02:00
11965904b7 COMP: Avoiding double entry in runTime table TurbulenceModel
multiphaseReactingTurbulenceModels and twoPhaseReactingTurbulenceModels
add models to the same table TurbulenceModel. These two libs were removed
from libreactingPhaseSystem which created the conflict.

The multiphaseReactingTurbulenceModels was added to
reactingMultiPhaseEulerFoam solver and twoPhaseReactingTurbulenceModels to
twoPhaseReactingEulerFoam solver

The FO heatTransferCoeffs for libfieldFunctionObjects needs
twoPhaseReactingTurbulenceModels.

These change avoids linking conflict from multiphaseReactingTurbulenceModels
and twoPhaseReactingTurbulenceModels being linked in the same lib.
2020-05-22 11:01:55 -07:00
486df96fbc ENH: Re-ordering compilation phaseSystemModels 2020-05-21 15:21:23 +01:00
dc04980d5c STYLE: remove trailing space, tabs 2020-05-21 15:21:23 +01:00
8218923b8c ENH: Adding support for two phases Euler solver to heatTransferModel FO 2020-05-21 15:21:23 +01:00
eacba8256c BUG: redistributePar: handle cyclicACMI. Fixes #1558. 2020-05-20 12:55:40 +01:00
7f936ad01f ENH: coded version of PatchFunction1. See #1709. 2020-05-20 10:38:39 +01:00
7a063c58ce BUG: processorCyclic: patch face ordering. Fixes #1704. 2020-05-20 09:29:19 +01:00
f233595a7f ENH: improved granularity for MPI-rebuilds
- Provide Allwmake-mpi scripts for handling the MPI-only build segment.

- Adjust Make/options to support a FOAM_MPI_LIBBIN target location.
  This will simply default to FOAM_LIBBIN/FOAM_MPI, but allows different
  types of builds with out-of-tree targets.

Example,

Build OpenFOAM with default MPI settings (eg, system openmpi)
```
./Allwmake
```

Rebuild MPI-layers with different MPI.

For any given and known type
```
othermpi()
{
    export WM_MPLIB=OPENMPI
    export FOAM_MPI=openmpi-3.1.3

    export OPAL_PREFIX=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$FOAM_MPI
    export MPI_ARCH_PATH="$OPAL_PREFIX"
}
```

May wish to build/rebuild ptscotch
```
(
    othermpi
    $WM_THIRD_PARTY_DIR/makeSCOTCH
)
```

Rebuild the mpi-dependent parts. Can also provide install location
```
for script in $(find src -name Allwmake-mpi)
do
(
    other_mpi
    export FOAM_MPI_LIBBIN="$HOME/tmp/install-prefix/lib/$FOAM_MPI"
)
done
```
2020-05-19 07:13:12 +01:00
c156125669 ENH: construct fixed-length items as a fixed-length subset (#1708)
For example,

    const edge meshE(patch.meshPoints(), patch.edges()[edgei]);
2020-05-18 20:01:18 +02:00
836dc16f30 ENH: support an 'arg()' pseudo-function for fv-based expressions 2020-05-18 18:42:14 +02:00
3d746e8ac9 ENH: leak-detection. Fixes #1572.
The final leak can only be decided once all cells have been
deleted. So only exit on final invocation and give warning-only
beforehand. This avoids a lot of false positives.
The tutorial itself didn't actually produce a mesh with leakage
with the old settings. Upped the refinement level to force it
to go through the hole in the geometry.
2020-05-18 12:40:08 +01:00
2fa0a2ea9a ENH: PatchFunction1: expose variables.
This makes coded versions easier.
2020-05-16 15:49:48 +01:00
2b8af776b4 Merge remote-tracking branch 'origin/master' into develop 2020-05-15 15:32:43 +02:00
72037bc9ea ENH: Injection models - added entry to ignore injection positions outside of the mesh
Example in the injection model input dictionary:

    // New entry to ignore injections out of bounds
    ignoreOutOfBounds yes;
2020-05-15 09:29:27 +01:00
dd4b8cf30d BUG: incorrect startLineNumber for primitiveEntry (fixes #1706) 2020-05-14 17:27:56 +02:00
3d0404af18 STYLE: simpler use of autoPtr, unique_ptr for OSspecific, fileFormats 2020-05-14 11:15:24 +02:00
841b65536b ENH: use unique_ptr for resource handling in dynamicMesh
ENH: defaulting for destructors where possible

STYLE: clear() instead of setSize(0) for plain Lists

STYLE: use bool operator instead of valid()/empty() for autoPtr tests
2020-05-14 02:16:58 +02:00
2c3425ac1e ENH: simplify coding for local faces (in enrichedPatch)
- similar to changes made in PrimitivePatch (commit 8a5d108fd2)
2020-05-13 21:22:13 +02:00
2530bb77ae COMP: add copy assign List from FixedList (was missing) 2020-05-13 21:21:23 +02:00