1. 03 Apr, 2020 3 commits
    • Mark Olesen's avatar
      ENH: add low-level handling for abaqus files (#1600) · 497cdb50
      Mark Olesen authored
      - reads/write shell elements
        Output elements are "bunched" according to type and their set
        without reordering.
      
      - preliminary reading of solids without extraction.
        Handling of *Surface specifications is not implemented
      497cdb50
    • Mark Olesen's avatar
    • 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. 02 Apr, 2020 2 commits
  3. 12 Mar, 2020 3 commits
  4. 27 Feb, 2020 1 commit
    • Mark Olesen's avatar
      ENH: improvements for nastran surface writer (#1571) · b476dd92
      Mark Olesen authored
      - avoid face copying.
        Maintain separate offsets/list for non tri/quad face decomposition,
        which eliminates copying for tri/quad types that represent the bulk
        of geometries
      
      - report inappropriate use of PLOAD2 for higher-ranks only once per
        field instead of per face.  For this case, write its magnitude
        instead of 0.
      
      - perform field output scaling prior to calling the write face
        function. This will make it easier to handle different per-field
        scaling in the future (#1612)
      
      BUG: nastran quad written as "CTRIA3" instead of "CQUAD4"
      b476dd92
  5. 19 Feb, 2020 1 commit
  6. 18 Feb, 2020 2 commits
    • 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
      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
  7. 23 Jan, 2020 1 commit
    • Mark Olesen's avatar
      ENH: stream adjustments · 0ff02713
      Mark Olesen authored
      - make stream constructors explicit
      
      - remove "using std::ifstream", "using std::iofstream" statements
        for a cleaner namespace.
      
      * copy/move assignments for ITstream
      
      * IStringStream: default construct and construct from std::string
        instead of Foam::string
      
      - reduce some overhead in masterOFstream
      
      - simplify Pstream handling of string variants (#1525)
      0ff02713
  8. 16 Jan, 2020 1 commit
  9. 11 Nov, 2019 1 commit
    • Mark Olesen's avatar
      ENH: rationalize some string methods. · 7c1190f0
      Mark Olesen authored
      - silently deprecate 'startsWith', 'endsWith' methods
        (added in 2016: 2b143606), in favour of
        'starts_with', 'ends_with' methods, corresponding to C++20 and
        allowing us to cull then in a few years.
      
      - handle single character versions of starts_with, ends_with.
      
      - add single character version of removeEnd and silently deprecate
        removeTrailing which did the same thing.
      
      - drop the const versions of removeRepeated, removeTrailing.
        Unused and with potential confusion.
      
      STYLE: use shrink_to_fit(), erase()
      7c1190f0
  10. 31 Oct, 2019 1 commit
  11. 22 Oct, 2019 1 commit
  12. 05 Sep, 2019 1 commit
  13. 02 Aug, 2019 1 commit
  14. 17 Jul, 2019 1 commit
  15. 11 Jul, 2019 1 commit
  16. 06 May, 2019 1 commit
  17. 06 Feb, 2019 1 commit
  18. 23 Jan, 2019 1 commit
  19. 18 Jan, 2019 1 commit
  20. 11 Dec, 2018 1 commit
    • Mark Olesen's avatar
      ENH: use Zero when zero-initializing types · 1d85fecf
      Mark Olesen authored
      - 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)
      1d85fecf
  21. 03 Nov, 2018 1 commit
    • Mark Olesen's avatar
      BUG: eof errors in the STARCD, VTK file reader (#1059) · fd54070c
      Mark Olesen authored
      - previously simply read files until the input stream went bad and no
        more lines could be read.  With the more stringent checking of
        values read (commit 0ce7e364) this approach causes problems.
      
        Use the underlying tokenizer instead to decide about termination.
      fd54070c
  22. 01 Nov, 2018 1 commit
  23. 17 Oct, 2018 1 commit
    • Mark Olesen's avatar
      ENH: simplify objectRegistry access names (issue #322) · 8fabc325
      Mark Olesen authored
        New name:  findObject(), cfindObject()
        Old name:  lookupObjectPtr()
      
            Return a const pointer or nullptr on failure.
      
        New name:  findObject()
        Old name:  --
      
            Return a non-const pointer or nullptr on failure.
      
        New name:  getObjectPtr()
        Old name:  lookupObjectRefPtr()
      
            Return a non-const pointer or nullptr on failure.
            Can be called on a const object and it will perform a
            const_cast.
      
      - use these updated names and functionality in more places
      
      NB: The older methods names are deprecated, but continue to be defined.
      8fabc325
  24. 17 Sep, 2018 2 commits
    • Mark Olesen's avatar
      ENH: use some updated vtk output methods · d8375248
      Mark Olesen authored
      d8375248
    • Mark Olesen's avatar
      ENH: improvements for foamVtkOutput, foamVtkFormatter (issue #926) · 05427217
      Mark Olesen authored
      - parallel list output for foamVtkOutput
      
      - simplified '.series' file output
      
      - beginDataArray() method instead of openDataArray() + closeTag()
        since this seems to be the most common use anyhow.
        With an optional argument for leaving the tag open, this works the
        same as openDataArray() which may be deprecated in the future.
      
      - begin/end methods for CellData, PointData, FieldData (commonly used)
      
      - templating parameters for file headers, content version,
        legacy fields. This improves coding robustness and convenience of use.
      
      - use formatter and higher-level methods for legacy output
      
      - attribute quoting character now part of the formatter itself
        instead of as an argument for xmlAttr().
        Toggle with quoting() method.
      
      - pair-wise processing of xml attributes, which also allows them to be
        passed as optional entries when creating an xml tag.
      
      - xmlComment with multiple arguments
      05427217
  25. 08 Aug, 2018 1 commit
    • Mark Olesen's avatar
      ENH: add missing Hash function for List/UList (issue #966) · dd9ecd49
      Mark Olesen authored
      - there were previously no hashing mechanisms for lists so they
        would fall back to the definition for primitives and hash the
        memory location of the allocated List object.
      
      - provide a UList::Hash<> sub-class for inheritance, and also a global
        specialization for UList<T>, List<T> such that the hash value for
        List<List<T>> cascades properly.
      
      - provide similar function in triFace to ensure that it remains
        similar in behaviour to face.
      
      - added SymmHash to Pair, for use when order is unimportant.
      
      STYLE: use string::hash() more consistently
      
      - no particular reason to use Hash<word>() which forwards to
        string::hash() anyhow
      dd9ecd49
  26. 10 Aug, 2018 1 commit
  27. 12 Jun, 2018 1 commit
  28. 30 May, 2018 1 commit
  29. 13 Mar, 2018 1 commit
  30. 28 Mar, 2018 1 commit
  31. 16 Apr, 2018 1 commit
    • Mark Olesen's avatar
      ENH: add alternative STL ASCII parsers · ea71484e
      Mark Olesen authored
      - In addition to the traditional Flex-based parser, added a Ragel-based
        parser and a handwritten one.
      
        Some representative timings for reading 5874387 points (1958129 tris):
      
            Flex   Ragel   Manual
            5.2s   4.8s    6.7s         total reading time
            3.8s   3.4s    5.3s         without point merging
      ea71484e
  32. 05 Mar, 2018 1 commit
  33. 22 Feb, 2018 1 commit