Commit Graph

1614 Commits

Author SHA1 Message Date
Mark Olesen
2c69b7d7c4 STYLE: adjust some line lengths, doxygen comments 2017-07-20 13:50:35 +02:00
Andrew Heather
67e6f54808 Merge branch 'feature-streams-cleanup' into 'develop'
Feature streams cleanup

See merge request !127
2017-07-18 12:48:31 +01:00
Mark Olesen
263d7efae2 Merge branch 'stylefix-checkMesh' into 'develop'
STYLE: checkMesh: remove duplicate writeSets entry from header (resolves #293)

See merge request !125
2017-07-18 12:17:01 +01:00
Mark Olesen
86ef9e86dc ENH: make treatment of stream allocators more uniform (issue #532)
- use allocator class to wrap the stream pointers instead of passing
  them into ISstream, OSstream and using a dynamic cast to delete
  then. This is especially important if we will have a bidirectional
  stream (can't delete twice!).

STYLE:

- file stream constructors with std::string (C++11)

- for rewind, explicit about in|out direction. This is not currently
  important, but avoids surprises with any future bidirectional access.

- combined string streams in StringStream.H header.
  Similar to <sstream> include that has both input and output string
  streams.
2017-07-17 15:14:38 +02:00
Mark Olesen
8399277d7d STYLE: eliminate duplicate includes (issue #293) 2017-07-17 14:44:05 +02:00
Pete Bachant
dd0c26568a STYLE: checkMesh: remove duplicate writeSets entry from header (resolves #293) 2017-07-16 10:31:33 -04:00
mattijs
2183907afe Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2017-07-12 09:19:01 +01:00
mattijs
f932e25556 ENH: mergeOrSplitBaffles: fix header. See #468. 2017-07-12 09:17:48 +01:00
Mark Olesen
bc1f2fa97e STYLE: use auto and cfind to simplify selector usage (issue #512) 2017-07-03 10:36:03 +02:00
Mark Olesen
6a0a8b99b3 STYLE: use ""_deg user-literal for degrees to radians conversion
ENH: add degToRad() multiplier (useful for scalar fields)

- use degToRad() functions throughout instead of scattered local solutions
2017-07-04 15:36:46 +02:00
Mark Olesen
f55c568f13 ENH: upgrade from NamedEnum to Enum (issue #515) 2017-07-03 21:43:33 +02:00
Mark Olesen
1bcb454f6d STYLE: hash constructors with power-of-two
- use 1024 instead of 1000 since it will be changed internally to 1024 anyhow.
2017-07-05 10:46:50 +02:00
Mark Olesen
80d69c27b1 COMP: compilation with WM_SP
- STLpoint.H
- isoAdvection.C
- checkMesh/writeFields.C

STYLE: drop construct STLpoint(Istream&), since it doesn't make much sense

- No use case for reading via an OpenFOAM stream and tokenizer.
  Should always be parsing ASCII or reading binary directly.
2017-06-26 17:11:46 +02:00
Mark Olesen
02edc5b206 STYLE: tabs and line length in files, very dubious NULL in ensight reader.
- disable automatically upgrading copyrights in files since changes to
  not automatically imply a change in copyright. Eg, fixing a typo in
  comments, or changing a variable from 'loopI' to 'loopi' etc.
2017-06-26 13:43:05 +02:00
Mark Olesen
6ecddbe4a5 STYLE: use #includeEtc in tutorial cases
#includeEtc "caseDicts/setConstraintTypes"
 vs.
    #include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
2017-06-21 16:42:57 +01:00
Mark Olesen
cde12ad9e5 ENH: consolidate vtk classes into 'Foam::vtk' namespace
- elminate the foamVtkFormatter operator() in favour of xmlAttr.
  Improves readability and the purpose is clearer.
2017-06-13 14:10:07 +02:00
Mark Olesen
c4f1349496 ENH: construct VTK writers with the outputOptions and adjust internally
- this shifts responsibility away from caller to the individual writers
  for knowing which file formats are supported and which file ending is
  appropriate. When the writer receives the output format request,
  it can elect to downgrade or otherwise adjust it to what it can
  actually manage (eg, legacy vs xml vs xml-append).

  But currently still just with legacy format backends.
2017-05-31 22:08:54 +02:00
Mark Olesen
418ebe4a87 ENH: replace writeFuncs in setSet with foamVtk library utilities 2017-05-19 12:28:13 +02:00
mattijs
fd665b4a3c ENH: overset: Initial release of overset capability.
Adds overset discretisation to selected physics:
- diffusion : overLaplacianDyMFoam
- incompressible steady : overSimpleFoam
- incompressible transient : overPimpleDyMFoam
- compressible transient: overRhoPimpleDyMFoam
- two-phase VOF: overInterDyMFoam

The overset method chosen is a parallel, fully implicit implementation
whereby the interpolation (from donor to acceptor) is inserted as an
adapted discretisation on the donor cells, such that the resulting matrix
can be solved using the standard linear solvers.

Above solvers come with a set of tutorials, showing how to create and set-up
simple simulations from scratch.
2017-06-14 09:51:02 +01:00
Mark Olesen
8da6e8eb74 DEFEATURE: remove CCM combine boundary code
- was generally somewhat fragile. The main problem stems from the fact
  that several interfaces may be attached to a boundary. No trivial
  means of solving this without too much work for a feature that is only
  "nice-to-have".
2017-05-31 12:34:07 +02:00
Mark Olesen
c6c79ab313 STYLE: use std::pair (not Tuple2) in conjunction with std::initializer_list
- no penalty compared to Tuple2, potential future benefits with C++
  constructor forwarding.
2017-05-29 11:07:39 +02:00
Mark Olesen
fb4971644f ENH: cleanup of NamedEnum
- Remove the unused enums() method since it delivers wholly unreliable
  results. It is not guaranteed to cover the full enumeration range,
  but only the listed names.

- Remove the unused strings() method.
  Duplicated functionality of the words(), but was never used.

- Change access of words() method from static to object.
  Better code isolation. Permits the constructor to take over
  as the single point of failure for bad input.

- Add values() method

- do not expose internal (HashTable) lookup since it makes it more
  difficult to enforce constness and the implementation detail should
  not be exposed. However leave toc() and sortedToc() for the interface.

STYLE: relocated NamedEnum under primitives (was containers)

- internal typedef as 'value_type' for some consistency with STL conventions
2017-05-29 10:30:55 +02:00
Andrew Heather
db5348880e MRG: resolved merge conflicts from merge from develop branch 2017-05-19 16:29:54 +01:00
Andrew Heather
6e72ceddd0 Merge branch 'enh-iter-cleanup' into 'develop'
Further hash table iter clean-up

See merge request !113
2017-05-19 12:44:05 +01:00
Andrew Heather
bb67ccd37d ENH: Cleaned up hash table item found checks 2017-05-19 11:15:35 +01:00
Mark Olesen
3814762785 ENH: relocate triSurface classes into surfMesh library (issue #294)
- simplifies organization, includes, linkage etc.
2017-05-18 10:42:05 +02:00
Andrew Heather
2e9bead519 MRG: merged develop line back into integration branch 2017-05-18 11:11:12 +01:00
Mark Olesen
d6e721a9bd ENH: simplify subsetMesh using new IOobjectList methods 2017-05-17 18:35:08 +02:00
Andrew Heather
91b90da4f3 Integrated Foundation code to commit 104aac5 2017-05-17 16:35:18 +01:00
mattijs
1889ea83e3 Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2017-05-15 10:17:57 +01:00
Mark Olesen
8728e8353f STYLE: avoid explicit use of 'word' as HashTable template parameter
- less clutter and typing to use the default template parameter when
  the key is 'word' anyhow.

- use EdgeMap instead of the longhand HashTable version where
  appropriate
2017-05-10 13:44:27 +02:00
mattijs
91585fd32e STYLE: checkMesh: formatting help 2017-05-08 11:54:48 +01:00
mattijs
134f7abd57 ENH: checkMesh: output vol fields of mesh quality. Fixes #466. 2017-05-08 10:50:59 +01:00
Mark Olesen
45c29be341 COMP: avoid clang compiler warnings 2017-05-02 13:33:40 +02:00
Andrew Heather
a8e3482591 Merge branch 'edge-labelPair-containers' into 'develop'
Use updated edge and labelPair containers

See merge request !106
2017-05-02 16:35:54 +01:00
Andrew Heather
1a24be6e54 Merge branch 'feature-random-numbers' into 'develop'
Updated random numbers

See merge request !107
2017-04-28 10:11:18 +01:00
Andrew Heather
7f0cc0045d ENH: Random numbers - updated dependent code from change cachedRandom->Random class 2017-04-28 09:15:52 +01:00
Mark Olesen
633e4c9c7f ENH: Use edgeHashes.H and labelPairHashes.H
- avoids some duplicate code.
2017-04-27 10:15:56 +02:00
Andrew Heather
4ce77f6843 Merge branch 'master' into develop 2017-04-25 12:31:22 +01:00
Henry Weller
c085c5df25 Merged the edgeMesh library into the meshTools library 2017-04-21 10:38:53 +01:00
Mark Olesen
89f2eff565 STYLE: improve usage notes for transformPoints, surfaceTransformPoints 2017-04-20 16:27:44 +02:00
Henry Weller
5c51836501 The "<type>Coeffs" sub-dictionary is now optional for most model parameters
except turbulence and lagrangian which will also be updated shortly.

For example in the nonNewtonianIcoFoam offsetCylinder tutorial the viscosity
model coefficients may be specified in the corresponding "<type>Coeffs"
sub-dictionary:

transportModel  CrossPowerLaw;

CrossPowerLawCoeffs
{
    nu0         [0 2 -1 0 0 0 0]  0.01;
    nuInf       [0 2 -1 0 0 0 0]  10;
    m           [0 0 1 0 0 0 0]   0.4;
    n           [0 0 0 0 0 0 0]   3;
}

BirdCarreauCoeffs
{
    nu0         [0 2 -1 0 0 0 0]  1e-06;
    nuInf       [0 2 -1 0 0 0 0]  1e-06;
    k           [0 0 1 0 0 0 0]   0;
    n           [0 0 0 0 0 0 0]   1;
}

which allows a quick change between models, or using the simpler

transportModel  CrossPowerLaw;

nu0         [0 2 -1 0 0 0 0]  0.01;
nuInf       [0 2 -1 0 0 0 0]  10;
m           [0 0 1 0 0 0 0]   0.4;
n           [0 0 0 0 0 0 0]   3;

if quick switching between models is not required.

To support this more convenient parameter specification the inconsistent
specification of seedSampleSet in the streamLine and wallBoundedStreamLine
functionObjects had to be corrected from

    // Seeding method.
    seedSampleSet   uniform;  //cloud; //triSurfaceMeshPointSet;

    uniformCoeffs
    {
        type        uniform;
        axis        x;  //distance;

        // Note: tracks slightly offset so as not to be on a face
        start       (-1.001 -0.05 0.0011);
        end         (-1.001 -0.05 1.0011);
        nPoints     20;
    }

to the simpler

    // Seeding method.
    seedSampleSet
    {
        type        uniform;
        axis        x;  //distance;

        // Note: tracks slightly offset so as not to be on a face
        start       (-1.001 -0.05 0.0011);
        end         (-1.001 -0.05 1.0011);
        nPoints     20;
    }

which also support the "<type>Coeffs" form

    // Seeding method.
    seedSampleSet
    {
        type        uniform;

        uniformCoeffs
        {
            axis        x;  //distance;

            // Note: tracks slightly offset so as not to be on a face
            start       (-1.001 -0.05 0.0011);
            end         (-1.001 -0.05 1.0011);
            nPoints     20;
        }
    }
2017-04-20 09:14:48 +01:00
Andrew Heather
c072f911c9 BUG: Corrected compilation errors 2017-04-19 13:44:54 +01:00
mattijs
f95dbc2049 ENH: refineWallLayer: enable parallel operation. Fixes #454. 2017-04-13 16:30:46 +01:00
mattijs
dbc1e37a62 BUG: shm: layerSets gets removed. Fixes #453. 2017-04-13 11:26:35 +01:00
Mark Olesen
140c5110fe STYLE: remove tabs from files and shorten line-length. 2017-04-10 16:11:33 +02:00
Mark Olesen
5d15a13247 STYLE: use FOAM_UTILITIES in Make/options
- consistent with use of FOAM_SOLVERS, and reduces reliance on the FOAM_APP
  env variable
2017-04-07 08:17:43 +02:00
Mark Olesen
96fd3c9367 STYLE: consistent use of LIB_SRC in Make/options
- had occasional remnant use of FOAM_SRC
2017-04-06 23:56:23 +02:00
Mark Olesen
dd78e042fe ENH: reduce reliance on FOAM_EXT_LIBBIN during builds
- just check WM_PROJECT_DIR instead.

- provide a fallback value when FOAM_EXT_LIBBIN might actually be needed.

Only strictly need FOAM_EXT_LIBBIN for scotch/metis decomposition, and
when these are actually supplied by ThirdParty.
All other ThirdParty dependencies are referenced by BOOST_ARCH_PATH etc.

Can therefore drop the FOAM_EXT_LIBBIN dependency for VTK-related
things, which do not use scotch/metis anyhow.
2017-04-04 15:28:42 +02:00
Mark Olesen
7d048c71be Merge remote-tracking branch 'origin/master' into develop 2017-04-04 16:15:10 +02:00