Skip to content
Snippets Groups Projects
  1. Apr 03, 2020
    • Mark OLESEN's avatar
      ENH: support independent specification of surface read/write format (#1600) · 560c053b
      Mark OLESEN authored
      - adjustments to internal handling to improve run-time addition of
        other formats (eg, with additional user library)
      
        For example, to write a binary STL with a '.stl' extension:
      
          $ surfaceMeshConvert input.obj  -write-format stlb  output.stl
      
        Or in a sampler,
        to specify the input type without ambiguity:
      
        surf
        {
            type        meshedSurface;
            surface     sampling.inp;
      
            fileType    starcd;
            scale       0.001;
            ...
        }
      
      STYLE: regularize naming for input/output scaling
      
        * -read-scale   (compat: -scaleIn)
        * -write-scale  (compat: -scaleOut)
      
      CONFIG: change edge/surface selection name for STARCD format
      
      - now select as "starcd" instead of "inp" to avoid naming ambiguity
        with abaqus
      560c053b
  2. Apr 02, 2020
    • Mark OLESEN's avatar
      STYLE: additional surface-related typedefs · 7f32509a
      Mark OLESEN authored
      - face_type, point_type (similar to STL value_type, etc).
        The naming avoids potential confusion with template parameters.
      
      - rename private typedef from ParentType to MeshReference for more
        consistency with polySurface etc.
      7f32509a
  3. Apr 01, 2020
    • Mark OLESEN's avatar
      ENH: add a Pstream::shutdown() method (#1660) · 01f65054
      Mark OLESEN authored
      - previously used a Pstream::exit() invoked from the argList
        destructor to handle all MPI shutdown, but this has the unfortunate
        side-effect of using a fixed return value for the program exit.
      
        Instead use the Pstream::shutdown() method in the destructor and allow
        the normal program exit codes as usual. This means that the
        following code now works as expected.
      
        ```
        argList args(...);
      
        if (...)
        {
            InfoErr<< "some error\n";
            return 1;
        }
        ```
      01f65054
  4. Mar 30, 2020
  5. Mar 26, 2020
  6. Mar 19, 2020
  7. Mar 16, 2020
  8. Mar 12, 2020
  9. Mar 11, 2020
  10. Feb 28, 2020
  11. Feb 26, 2020
  12. Feb 24, 2020
  13. Feb 21, 2020
  14. Feb 20, 2020
  15. Feb 19, 2020
  16. Feb 18, 2020
    • Mark OLESEN's avatar
      ENH: improvements to IOstreamOption · 33f9ae50
      Mark OLESEN authored
      * Support default values for format/compress enum lookups.
      
        - Avoids situations where the preferred default format is not ASCII.
          For example, with dictionary input:
      
              format binar;
      
          The typing mistake would previously have caused formatEnum to
          default to ASCII. We can now properly control its behaviour.
      
              IOstream::formatEnum
              (
                  dict.get<word>("format"), IOstream::BINARY
              );
      
          Allowing us to switch ascii/binary, using BINARY by default even in
          the case of spelling mistakes. The mistakes are flagged, but the
          return value can be non-ASCII.
      
      * The format/compression lookup behave as pass-through if the lookup
        string is empty.
      
        - Allows the following to work without complaint
      
            IOstream::formatEnum
            (
                dict.getOrDefault("format", word::null), IOstream::BINARY
            );
      
        - Or use constructor-like failsafe method
      
            IOstream::formatEnum("format", dict, IOstream::BINARY);
      
        - Apply the same behaviour with setting stream format/compression
          from a word.
      
             is.format("binar");
      
          will emit a warning, but leave the stream format UNCHANGED
      
      * Rationalize versionNumber construction
      
        - constexpr constructors where possible.
          Default construct is the "currentVersion"
      
        - Construct from token to shift the burden to versionNumber.
          Support token as argument to version().
      
          Now:
      
              is.version(headerDict.get<token>("version"));
      
          or failsafe constructor method
      
              is.version
              (
                  IOstreamOption::versionNumber("version", headerDict)
              );
      
          Before (controlled input):
      
              is.version
              (
                  IOstreamOption::versionNumber
                  (
                      headerDict.get<float>("version")
                  )
              );
      
          Old, uncontrolled input - has been removed:
      
              is.version(headerDict.lookup("version"));
      
      * improve consistency, default behaviour for IOstreamOption construct
      
        - constexpr constructors where possible
      
        - add copy construct with change of format.
      
        - construct IOstreamOption from streamFormat is now non-explicit.
          This is a commonly expected result with no ill-effects
      33f9ae50
    • Mark OLESEN's avatar
      ENH: adjustments to Switch · bb53e8ad
      Mark OLESEN authored
      - align Switch more with Enum.
        Now have find(), found() static methods.
        Constructors with failsafe option.
      
        The find() method makes for clearer coding:
      
        OLD
      
           Switch sw(some_string, true); // NB: true = allowBad
      
           if (sw.valid()) ...
      
        NOW
      
           Switch sw = Switch::find(some_string);
      
           if (sw.good()) ...
      
        or
      
           if (Switch::found(some_string)) ...
      
      - improve construct from dictionary to handle all valid token types.
        Previously just read in a word.
      
      - Remove asText() method - replaced by c_str() and str() several
        versions ago.
      bb53e8ad
    • Mark OLESEN's avatar
      4e1bc2d2
    • Mark OLESEN's avatar
      STYLE: adjust names, locations for fileFormats · 4307e171
      Mark OLESEN authored
      - renamed 'core/' -> 'base/' to avoid gitignore masking when re-adding
        files
      
      - rename 'nas/' to 'nastran/' for more clarity
      
      - relocated OBJstream from surfMesh to fileFormats
      
      STYLE: remove unused parseNASCoord. Was deprecated 2017-09
      4307e171
    • Kutalmış Berçin's avatar
      ENH: improve analytical eigendecompositions · 55e7da67
      Kutalmış Berçin authored and Andrew Heather's avatar Andrew Heather committed
        - `tensor` and `tensor2D` returns complex eigenvalues/vectors
        - `symmTensor` and `symmTensor2D` returns real eigenvalues/vectors
        - adds new test routines for eigendecompositions
        - improves numerical stability by:
          - using new robust algorithms,
          - reordering the conditional branches in root-type selection
      55e7da67
    • Kutalmış Berçin's avatar
      ENH: improve funcs and opers in Tensor types · 66b02ca5
      Kutalmış Berçin authored and Andrew Heather's avatar Andrew Heather committed
        - ensures each Tensor-container operates for the following base types:
          - floatScalar
          - doubleScalar
          - complex
      
        - adds/improves test applications for each container and base type:
          - constructors
          - member functions
          - global functions
          - global operators
      
        - misc:
          - silently removes `invariantIII()` for `tensor2D` and `symmTensor2D`
            since the 3rd invariant does not exist for 2x2 matrices
          - fixes `invariantII()` algorithm for `tensor2D` and `symmTensor2D`
          - adds `Cmpt` multiplication to `Vector2D` and `Vector`
          - adds missing access funcs for symmetric containers
          - improves func/header documentations
      66b02ca5
    • Kutalmış Berçin's avatar
      ENH: improve stability in polynomialEqns · 8ca724ff
      Kutalmış Berçin authored and Andrew Heather's avatar Andrew Heather committed
        - replaces floating-point equal comparisons in
          `linearEqn`, `quadraticEqn`, and `cubicEqn`,
        - ensures `quadraticEqn` and `cubicEqn` can return `complex` roots,
        - reorders if-branches in `quadraticEqn` and `cubicEqn` to avoid
          zero-equal comparison,
        - adds Kahan's cancellation-avoiding algorithm into `quadraticEqn` and
          `cubicEqn` for the numerically-sensitive discriminant computation,
      
        - adds/improves `polynomialEqns` tests:
          * adds Test-linearEqn.C
          * adds Test-quadraticEqn.C
          * improves Test-cubicEqn.C
      8ca724ff
    • Mark OLESEN's avatar
      ENH: overhaul ensight handling (#1579) · a9762812
      Mark OLESEN authored and Andrew Heather's avatar Andrew Heather committed
      - includes restructuring and simplification of low-level ensight part
        handling and refactor of backends to improve code reuse.
      
      foamToEnsight
      -------------
      
        * new cellZone support.
          This was previously only possible via a separate foamToEnsightParts
          utility that was not parallelized.
      
        * support for point fields.
      
        * `-nearCellValue` option (as per foamToVTK)
      
        * data indexing now uses values from the time index.
          This is consistent with the ensightWrite function object and
          can help with restarts.
      
        * existing ensight directories are removed, unless the -no-overwrite
          option is supplied
      
      foamToEnsightParts
      ------------------
        * now redundant and removed.
      
      ensightOutputSurface (new class)
      --------------------------------
        * a lightweight wrapper for point/face references that is tailored
          for the ensightSurfaceWriter. It uses compact face/point information
          and is serial only, since this is the format requirements from the
          surfaceWriter class.
      
      ensightMesh (revised class)
      ---------------------------
        * now only holds a polyMesh reference, which removes its dependency
          on finiteVolume and allows it to be relocated under fileFormats
          instead of conversion.
      
      Removed classes: ensightParts, ensighPartFaces, ensightPartCells
      
      - these were used by foamToEnsightParts, but not needed anymore.
      a9762812
  17. Feb 14, 2020
  18. Feb 12, 2020
  19. Feb 06, 2020
  20. Jan 31, 2020
    • Mark OLESEN's avatar
    • Mark OLESEN's avatar
      ENH: added IndirectSubList · 822d052e
      Mark OLESEN authored
      - provides an indirect access to a sub-section of a list that is
        somewhat less efficient than a Foam::SubList, but supports the
        following:
          * adjustment of its addressing range after construction
          * recovery of the original, underlying list at any time
      
        This can be more convenient for some coding cases.
        For example,
      
            template<class Addr>
            void renumberFaces(IndirectListBase<face, Addr>& faces, ...);
      
        which can be called for
      
            * Specific faces:
              UIndirectList<face>(mesh.faces(), facesToChange)
      
            * A sub-range of faces:
              IndirectSubList<face>(mesh.faces(), pp.range())
      
            * All faces:
              IndirectSubList<face>(mesh.faces())
      
      CONFIG: added IndirectListsFwd.H with some common forwarding
      822d052e