F06 default profile

Forums NastPad Discussions Contents Viewer Profiles F06 default profile

This topic contains 0 replies, has 1 voice, and was last updated by  admin 4 years, 2 months ago.

  • Author
    Posts
  • #267

    admin
    Keymaster

    The F06 default profile will probably be the most useful for NastPad users working with F06 files. The content of the F06 files varies considerably depending on the solution run, and the output requested. It is difficult and may be unreasonable to try to cover everything in a single profile, but users can always modify the default profile and save it as something else. For example, you can tailor the profile to suit static solutions and automatically apply it to F06 files with a name filter like *_static.f06.
    The following describes some of the regular expression tricks currently used in the default profile so users can tailor them to suit specific needs. Feel free to reply to this topic with any questions or suggest additions to the default F06 profile…

    "MAXIMUM MATRIX-TO-FACTOR-DIAGONAL RATIO OF(.+)","Max Ratio [~\1~]"
    This expression finds the max ratio and picks the value using (.+). The label then used the backreference \1 to show it in the Contents Viewer. The backreference is encapsulated in ~ characters to invoke the script engine, which will simply evaluate the text as a number and so convert it from scientific notation to decimal notation.

    "^0 (?:.+SUBCASE (\d+))?(?:[^\n]*\n){2}\K +L O A D V E C T O R","Load Vectors [\1]"
    This expression is typical of the expressions used to find result headers. The first half ^0 (?:.+SUBCASE (\d+))?(?:[^\n]*\n){2}\K finds a line starting with 0 and optionally containing SUBCASE (as indicated by the ? immediately following the group brackets). The ?: at the start of the group indicates a non-capturing group (so it can’t be backreferenced). The subcase ID (if exists) is captured in group 1 using (\d+) which looks for one or more number characters. The (?:[^\n]*\n){2} simply advances two lines, which can be adjusted if needed by changing the number in the {}, or even use a range, e.g. {2,3} will match two to three lines. Anything prior to the \K will not appear in the final match. This simply allows the Contents Viewer to bookmark the line containing L O A D V E C T O R instead of two lines prior where the header starts.

    "R E A L E I G E N V A L U E S(?s).{0,800}?\K^ {8}1.{15}(.{20}).{20}(.{20})"," Eig #1 = ~\1~ (~\2~ Hz)"
    This expression uses a different approach for finding text over multiple lines. The (?s) will disable single-line mode for the remainder of the expression so that the dot matches any character including line-breaks. This option should be used with care, and so in this example the dot is followed by a non-greedy repetition quantifier {0,800}? which will limit the search to 800 characters beyond the header.

You must be logged in to reply to this topic.