Skip to content

Add API to normalise metric for FCI#3424

Open
dschwoerer wants to merge 2 commits into
nextfrom
normalise-fci
Open

Add API to normalise metric for FCI#3424
dschwoerer wants to merge 2 commits into
nextfrom
normalise-fci

Conversation

@dschwoerer

Copy link
Copy Markdown
Contributor

Alternative to #3423

It might be nice to do something similar for FA, but I think there are more variants around.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

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

Comment thread src/mesh/coordinates.cxx
}

void Coordinates::normaliseFCI(const BoutReal Bnorm, const BoutReal rho_0) {
g11 *= SQ(rho_s0);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

warning: use of undeclared identifier 'rho_s0'; did you mean 'rho_0'? [clang-diagnostic-error]

Suggested change
g11 *= SQ(rho_s0);
g11 *= SQ(rho_0);
Additional context

src/mesh/coordinates.cxx:1877: 'rho_0' declared here

void Coordinates::normaliseFCI(const BoutReal Bnorm, const BoutReal rho_0) {
                                                                    ^

Comment thread src/mesh/coordinates.cxx

void Coordinates::normaliseFCI(const BoutReal Bnorm, const BoutReal rho_0) {
g11 *= SQ(rho_s0);
g22 *= SQ(rho_s0);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

warning: use of undeclared identifier 'rho_s0'; did you mean 'rho_0'? [clang-diagnostic-error]

Suggested change
g22 *= SQ(rho_s0);
g22 *= SQ(rho_0);
Additional context

src/mesh/coordinates.cxx:1877: 'rho_0' declared here

void Coordinates::normaliseFCI(const BoutReal Bnorm, const BoutReal rho_0) {
                                                                    ^

Comment thread src/mesh/coordinates.cxx
void Coordinates::normaliseFCI(const BoutReal Bnorm, const BoutReal rho_0) {
g11 *= SQ(rho_s0);
g22 *= SQ(rho_s0);
g33 *= SQ(rho_s0);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

warning: use of undeclared identifier 'rho_s0'; did you mean 'rho_0'? [clang-diagnostic-error]

Suggested change
g33 *= SQ(rho_s0);
g33 *= SQ(rho_0);
Additional context

src/mesh/coordinates.cxx:1877: 'rho_0' declared here

void Coordinates::normaliseFCI(const BoutReal Bnorm, const BoutReal rho_0) {
                                                                    ^

Comment thread src/mesh/coordinates.cxx
g11 *= SQ(rho_s0);
g22 *= SQ(rho_s0);
g33 *= SQ(rho_s0);
g12 *= SQ(rho_s0);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

warning: use of undeclared identifier 'rho_s0'; did you mean 'rho_0'? [clang-diagnostic-error]

Suggested change
g12 *= SQ(rho_s0);
g12 *= SQ(rho_0);
Additional context

src/mesh/coordinates.cxx:1877: 'rho_0' declared here

void Coordinates::normaliseFCI(const BoutReal Bnorm, const BoutReal rho_0) {
                                                                    ^

Comment thread src/mesh/coordinates.cxx
g22 *= SQ(rho_s0);
g33 *= SQ(rho_s0);
g12 *= SQ(rho_s0);
g13 *= SQ(rho_s0);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

warning: use of undeclared identifier 'rho_s0'; did you mean 'rho_0'? [clang-diagnostic-error]

Suggested change
g13 *= SQ(rho_s0);
g13 *= SQ(rho_0);
Additional context

src/mesh/coordinates.cxx:1877: 'rho_0' declared here

void Coordinates::normaliseFCI(const BoutReal Bnorm, const BoutReal rho_0) {
                                                                    ^

Comment thread src/mesh/coordinates.cxx
g_11 /= SQ(rho_s0);
g_22 /= SQ(rho_s0);
g_33 /= SQ(rho_s0);
g_12 /= SQ(rho_s0);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

warning: use of undeclared identifier 'rho_s0'; did you mean 'rho_0'? [clang-diagnostic-error]

Suggested change
g_12 /= SQ(rho_s0);
g_12 /= SQ(rho_0);
Additional context

src/mesh/coordinates.cxx:1877: 'rho_0' declared here

void Coordinates::normaliseFCI(const BoutReal Bnorm, const BoutReal rho_0) {
                                                                    ^

Comment thread src/mesh/coordinates.cxx
g_22 /= SQ(rho_s0);
g_33 /= SQ(rho_s0);
g_12 /= SQ(rho_s0);
g_13 /= SQ(rho_s0);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

warning: use of undeclared identifier 'rho_s0'; did you mean 'rho_0'? [clang-diagnostic-error]

Suggested change
g_13 /= SQ(rho_s0);
g_13 /= SQ(rho_0);
Additional context

src/mesh/coordinates.cxx:1877: 'rho_0' declared here

void Coordinates::normaliseFCI(const BoutReal Bnorm, const BoutReal rho_0) {
                                                                    ^

Comment thread src/mesh/coordinates.cxx
g_33 /= SQ(rho_s0);
g_12 /= SQ(rho_s0);
g_13 /= SQ(rho_s0);
g_23 /= SQ(rho_s0);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

warning: use of undeclared identifier 'rho_s0'; did you mean 'rho_0'? [clang-diagnostic-error]

Suggested change
g_23 /= SQ(rho_s0);
g_23 /= SQ(rho_0);
Additional context

src/mesh/coordinates.cxx:1877: 'rho_0' declared here

void Coordinates::normaliseFCI(const BoutReal Bnorm, const BoutReal rho_0) {
                                                                    ^

Comment thread src/mesh/coordinates.cxx
if (Bxy.isFci()) {
g_22_ylow();
g_22_yhigh();
(*_g_22_ylow) /= SQ(rho_s0);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

warning: use of undeclared identifier 'rho_s0'; did you mean 'rho_0'? [clang-diagnostic-error]

Suggested change
(*_g_22_ylow) /= SQ(rho_s0);
(*_g_22_ylow) /= SQ(rho_0);
Additional context

src/mesh/coordinates.cxx:1877: 'rho_0' declared here

void Coordinates::normaliseFCI(const BoutReal Bnorm, const BoutReal rho_0) {
                                                                    ^

Comment thread src/mesh/coordinates.cxx
g_22_ylow();
g_22_yhigh();
(*_g_22_ylow) /= SQ(rho_s0);
(*_g_22_yhigh) /= SQ(rho_s0);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

warning: use of undeclared identifier 'rho_s0'; did you mean 'rho_0'? [clang-diagnostic-error]

Suggested change
(*_g_22_yhigh) /= SQ(rho_s0);
(*_g_22_yhigh) /= SQ(rho_0);
Additional context

src/mesh/coordinates.cxx:1877: 'rho_0' declared here

void Coordinates::normaliseFCI(const BoutReal Bnorm, const BoutReal rho_0) {
                                                                    ^

@ZedThree

ZedThree commented Jul 8, 2026

Copy link
Copy Markdown
Member

The coordinates refactor is almost ready which will change how this needs to be implemented, so let's hold off momentarily

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.

2 participants