Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • Nektar Nektar
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 93
    • Issues 93
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 66
    • Merge requests 66
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Nektar
  • NektarNektar
  • Merge requests
  • !1415

Add vars and dirs options in the gradient module to specify fields and partial derivative directions

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Ankang Gao requested to merge gaoak/nektar:fix/ProcessGrad into master Oct 16, 2022
  • Overview 4
  • Commits 8
  • Pipelines 3
  • Changes 5

Issue/feature addressed

The gradient module in the FieldConvert processes all fields and all spatial derivatives, but sometimes we only need the spatial derivatives of some fields at some directions.

Proposed solution

An option "vars" is added to specify the fields to be processed. Both the field numbers and names can also be used, such as "var=0,1,2" or "var=u,v,p". Another option "dirs" is added to specify spatial directions for derivatives. Both number and name can be used, such as "dirs=0,1" or "dirs=x,y".

Implementation

"vars" and "dirs" are set as configures options in m_config in class ProcessGrad

m_config["vars"] =
    ConfigOption(false, "NotSet", "Select variables");
m_config["dirs"] =
    ConfigOption(false, "NotSet", "Select directions");

Tests

Notes

Checklist

  • Functions and classes, or changes to them, are documented.
  • User guide/documentation is updated.
  • Changelog is updated.
  • Suitable tests added for new functionality.
  • Contributed code is correctly formatted. (See the contributing guidelines).
  • License added to any new files.
  • No extraneous files have been added (e.g. compiler output or test data files).

Warning

On the 19.07 the code formatting (code style) was standardised using clang-format, over the whole Nektar++ code. This means changes in your branch will conflict with formatting changes on the master branch. To resolve these conflicts , see #295

Edited Nov 18, 2022 by Chris Cantwell
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: fix/ProcessGrad