Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/poisson equation #267

Open
wants to merge 24 commits into
base: stack/implicitOperators
Choose a base branch
from

Conversation

HenningScheufler
Copy link
Collaborator

Motivation

Solve the pressure Equation with icoNeoFOAM

@HenningScheufler HenningScheufler changed the base branch from main to stack/implicitOperators February 23, 2025 16:49
Copy link

Deployed test documentation to https://exasim-project.com/NeoFOAM/Build_PR_267

Copy link
Contributor

@greole greole left a comment

Choose a reason for hiding this comment

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

some quick comments.

Comment on lines +22 to 24
<< "key requested: " << key << "requested type " << demangle(typeid(T).name()) << "\n"
<< "actual type " << demangle(data.at(key).type().name()) << "\n"
<< e.what() << std::endl;
Copy link
Contributor

Choose a reason for hiding this comment

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

would https://en.cppreference.com/w/cpp/utility/format/format work? Could look like (not tested):

Suggested change
<< "key requested: " << key << "requested type " << demangle(typeid(T).name()) << "\n"
<< "actual type " << demangle(data.at(key).type().name()) << "\n"
<< e.what() << std::endl;
<< std::format("Caught a bad_any_cast exception: key requested: {}, requested type: {}, actual type: {}\n" ,
key,
demangle(typeid(T).name()),
demangle(data.at(key).type().name()))

@@ -145,9 +145,9 @@ Vector operator*(const scalar& sclr, Vector rhs)
}

KOKKOS_INLINE_FUNCTION
Vector operator&(const Vector& lhs, Vector rhs)
scalar operator&(const Vector& lhs, Vector rhs)
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe it makes sense to have both? preferably i would say this should be implemented in a free function.

Suggested change
scalar operator&(const Vector& lhs, Vector rhs)
/* @brief dot product */
scalar operator*(const Vector& lhs, Vector rhs) {return dotProduct(lhs, rhs)}
/* @brief inner product */
Vector operator&(const Vector& lhs, Vector rhs) {return innerProduct(lhs, rhs)}

@@ -0,0 +1,116 @@
// SPDX-License-Identifier: MIT
// SPDX-FileCopyrightText: 2023 NeoFOAM authors
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// SPDX-FileCopyrightText: 2023 NeoFOAM authors
// SPDX-FileCopyrightText: 2025 NeoFOAM authors

@@ -0,0 +1,49 @@
// SPDX-License-Identifier: MIT
// SPDX-FileCopyrightText: 2023 NeoFOAM authors
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// SPDX-FileCopyrightText: 2023 NeoFOAM authors
// SPDX-FileCopyrightText: 2025 NeoFOAM authors

@@ -0,0 +1,70 @@
// SPDX-License-Identifier: MIT
// SPDX-FileCopyrightText: 2024 NeoFOAM authors
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// SPDX-FileCopyrightText: 2024 NeoFOAM authors
// SPDX-FileCopyrightText: 2025 NeoFOAM authors

TEST_CASE("uncorrected")
{
const size_t nCells = 10;
NeoFOAM::Executor exec = GENERATE(NeoFOAM::Executor(NeoFOAM::SerialExecutor {})
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
NeoFOAM::Executor exec = GENERATE(NeoFOAM::Executor(NeoFOAM::SerialExecutor {})
// FIXME: test with all executors
NeoFOAM::Executor exec = GENERATE(NeoFOAM::Executor(NeoFOAM::SerialExecutor {})

@@ -0,0 +1,229 @@
// SPDX-License-Identifier: MIT
// SPDX-FileCopyrightText: 2023 NeoFOAM authors
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// SPDX-FileCopyrightText: 2023 NeoFOAM authors
// SPDX-FileCopyrightText: 2025 NeoFOAM authors

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