Skip to content

Conversation

@dschwoerer
Copy link
Owner

No description provided.

dschwoerer and others added 30 commits February 4, 2024 20:39
mesh may not be initialised or be a different mesh
Use the new track feature (better name required) to dump the different
components of the ddt() as well as the residuum for the evolved fields.
This keeps track of all the changes done to the field and stores them to
a OptionsObject.
This keeps track of all the changes done to the field and stores them to
a OptionsObject.
This allows to also run the tests with 3D metrics.

It also tightens the tollerances, as this is a regression test.

Also removing the preconditioner is needed.
This reverts commit 8485353.

The parallel metric components are loaded, thus we can take meaningful
derivatives in y-direction.
Directly iterate over the points
This avoids errors in the MMS tests
This partially reverts 0bcc047

It seems the achieved accuracy depends on some factors that are not well
controlled.
Likely this is not needed.
@dschwoerer dschwoerer closed this Mar 12, 2025
@dschwoerer dschwoerer reopened this Mar 12, 2025
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

There were too many comments to post at once. Showing the first 25 out of 383. Check the log or trigger a new build to see more.

******************************************************************/

#define PVODE_BAND_ELEM(A,i,j) ((A->data)[j][i-j+(A->smu)])
#define PVODE_BAND_ELEM(A, i, j) ((A->data)[j][i - j + (A->smu)])

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: function-like macro 'PVODE_BAND_ELEM' used; consider a 'constexpr' template function [cppcoreguidelines-macro-usage]

#define PVODE_BAND_ELEM(A, i, j) ((A->data)[j][i - j + (A->smu)])
        ^

******************************************************************/

#define PVODE_BAND_ELEM(A,i,j) ((A->data)[j][i-j+(A->smu)])
#define PVODE_BAND_ELEM(A, i, j) ((A->data)[j][i - j + (A->smu)])

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: macro argument should be enclosed in parentheses [bugprone-macro-parentheses]

Suggested change
#define PVODE_BAND_ELEM(A, i, j) ((A->data)[j][i - j + (A->smu)])
#define PVODE_BAND_ELEM(A, i, j) (((A)->data)[j][i - j + (A->smu)])

******************************************************************/

#define PVODE_BAND_ELEM(A,i,j) ((A->data)[j][i-j+(A->smu)])
#define PVODE_BAND_ELEM(A, i, j) ((A->data)[j][i - j + (A->smu)])

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: macro argument should be enclosed in parentheses [bugprone-macro-parentheses]

Suggested change
#define PVODE_BAND_ELEM(A, i, j) ((A->data)[j][i - j + (A->smu)])
#define PVODE_BAND_ELEM(A, i, j) ((A->data)[j][(i) - j + (A->smu)])

******************************************************************/

#define PVODE_BAND_ELEM(A,i,j) ((A->data)[j][i-j+(A->smu)])
#define PVODE_BAND_ELEM(A, i, j) ((A->data)[j][i - j + (A->smu)])

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: macro argument should be enclosed in parentheses [bugprone-macro-parentheses]

Suggested change
#define PVODE_BAND_ELEM(A, i, j) ((A->data)[j][i - j + (A->smu)])
#define PVODE_BAND_ELEM(A, i, j) ((A->data)[j][i - (j) + (A->smu)])

******************************************************************/

#define PVODE_BAND_ELEM(A,i,j) ((A->data)[j][i-j+(A->smu)])
#define PVODE_BAND_ELEM(A, i, j) ((A->data)[j][i - j + (A->smu)])

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: macro argument should be enclosed in parentheses [bugprone-macro-parentheses]

Suggested change
#define PVODE_BAND_ELEM(A, i, j) ((A->data)[j][i - j + (A->smu)])
#define PVODE_BAND_ELEM(A, i, j) ((A->data)[j][i - j + ((A)->smu)])

int abs_offset() const { return 1; }

#if BOUT_USE_METRIC_3D == 0
BoutReal& ynext(Field2D& f) const { return f[ind().yp(by).xp(bx)]; }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: no header providing "Field2D" is directly included [misc-include-cleaner]

include/bout/boundary_iterator.hxx:2:

- #include "bout/mesh.hxx"
+ #include "bout/field2d.hxx"
+ #include "bout/mesh.hxx"

const BoutReal& yprev(const Field2D& f) const { return f[ind().yp(-by).xp(-bx)]; }
#endif

const int dir;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: member 'dir' of type 'const int' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members]

  const int dir;
            ^

const BoutReal& yprev(const Field2D& f) const { return f[ind().yp(-by).xp(-bx)]; }
#endif

const int dir;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: member variable 'dir' has public visibility [cppcoreguidelines-non-private-member-variables-in-classes]

  const int dir;
            ^

const int dir;

protected:
int z{0};

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: member variable 'z' has protected visibility [cppcoreguidelines-non-private-member-variables-in-classes]

  int z{0};
      ^


protected:
int z{0};
int x;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: member variable 'x' has protected visibility [cppcoreguidelines-non-private-member-variables-in-classes]

  int x;
      ^

That might format more code at once, but should avoid
a CI loop.
@dschwoerer dschwoerer closed this Nov 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants