Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions include/bout/coordinates.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,14 @@ public:
/// Covariant metric tensor
FieldMetric g_11, g_22, g_33, g_12, g_13, g_23;

/// Normalise metric for FCI
/// This normalises B by Bnorm and all lengths by rho_0
void normaliseFCI(BoutReal Bnorm, BoutReal rho_0);

/// get g_22 at the cell faces;
const FieldMetric& g_22_ylow() const;
const FieldMetric& g_22_yhigh() const;
FieldMetric& g_22_ylow();
FieldMetric& g_22_yhigh();

// Cell Areas
const FieldMetric& cell_area_xlow() const {
if (_cell_area_xlow.has_value()) {
Expand Down
29 changes: 29 additions & 0 deletions src/mesh/coordinates.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1874,3 +1874,32 @@ void Coordinates::_compute_cell_volume() const {
std::shared_ptr<YBoundary> Coordinates::makeYBoundary(YBndryType type) const {
return std::make_shared<YBoundary>(type, localoptions, *localmesh);
}

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) {
                                                                    ^

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) {
                                                                    ^

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) {
                                                                    ^

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) {
                                                                    ^

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) {
                                                                    ^

g23 *= 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
g23 *= SQ(rho_s0);
g23 *= SQ(rho_0);
Additional context

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

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


J /= rho_s0 * rho_s0 * 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
J /= rho_s0 * rho_s0 * rho_s0;
J /= rho_0 * rho_s0 * rho_s0;
Additional context

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

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

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
J /= rho_s0 * rho_s0 * rho_s0;
J /= rho_s0 * rho_0 * rho_s0;
Additional context

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

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

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
J /= rho_s0 * rho_s0 * rho_s0;
J /= rho_s0 * rho_s0 * rho_0;
Additional context

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

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


g_11 /= 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_11 /= SQ(rho_s0);
g_11 /= SQ(rho_0);
Additional context

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

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

g_22 /= 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 /= SQ(rho_s0);
g_22 /= SQ(rho_0);
Additional context

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

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

g_33 /= 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_33 /= SQ(rho_s0);
g_33 /= SQ(rho_0);
Additional context

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

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

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) {
                                                                    ^

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) {
                                                                    ^

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) {
                                                                    ^


Bxy /= Bnorm;

geometry(); // Calculate other metrics

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) {
                                                                    ^

(*_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) {
                                                                    ^

}
}
Loading