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 #50

Open
wants to merge 39 commits into
base: main
Choose a base branch
from
Open

Feat/poisson equation #50

wants to merge 39 commits into from

Conversation

HenningScheufler
Copy link
Collaborator

Motivation

Solve the pressure Equation with icoNeoFOAM

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. Mainly leaving some TODO notes what needs to be implemented again.

@@ -0,0 +1,7 @@
# SPDX-License-Identifier: Unlicense
#
# 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

@@ -2,3 +2,5 @@
# SPDX-FileCopyrightText: 2024 NeoFOAM authors

add_subdirectory(scalarAdvection)
add_subdirectory(icoNeoFoam)
Copy link
Contributor

Choose a reason for hiding this comment

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

should we name it neoIcoFoam or icoNeoFoam?

@@ -0,0 +1,7 @@
# SPDX-License-Identifier: Unlicense
#
# 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

@@ -32,17 +32,19 @@ bool checkEntryType(const Foam::entry& entry)
}
catch (const Foam::IOerror& ioErr)
{
FatalError.throwExceptions(false);
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe add a docstring/comment what is happening here? Also i think this can be refactored by having a return variable.

Comment on lines 33 to +42
catch (const Foam::IOerror& ioErr)
{
FatalError.throwExceptions(false);
FatalIOError.throwExceptions(false);
return false;
}
catch (const Foam::error& err)
{
FatalError.throwExceptions(false);
FatalIOError.throwExceptions(false);
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
catch (const Foam::IOerror& ioErr)
{
FatalError.throwExceptions(false);
FatalIOError.throwExceptions(false);
return false;
}
catch (const Foam::error& err)
{
FatalError.throwExceptions(false);
FatalIOError.throwExceptions(false);
bool ret {true};
catch (const Foam::IOerror& ioErr)
{
ret = false;
}
catch (const Foam::error& err)
{
ret = false;
}
FatalError.throwExceptions(false);
FatalIOError.throwExceptions(false);
return ret;

Comment on lines +30 to +35

// NeoFOAM::Executor exec = GENERATE(
// NeoFOAM::Executor(NeoFOAM::SerialExecutor {}),
// NeoFOAM::Executor(NeoFOAM::CPUExecutor {}),
// NeoFOAM::Executor(NeoFOAM::GPUExecutor {})
// );
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 {}),
// NeoFOAM::Executor(NeoFOAM::CPUExecutor {}),
// NeoFOAM::Executor(NeoFOAM::GPUExecutor {})
// );
// TODO: use generator
// NeoFOAM::Executor exec = GENERATE(
// NeoFOAM::Executor(NeoFOAM::SerialExecutor {}),
// NeoFOAM::Executor(NeoFOAM::CPUExecutor {}),
// NeoFOAM::Executor(NeoFOAM::GPUExecutor {})
// );

@@ -0,0 +1,67 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// 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

Comment on lines +9 to +14
#include "NeoFOAM/finiteVolume/cellCentred/operators/sparsityPattern.hpp"


#include "gaussConvectionScheme.H"
#include "NeoFOAM/core/input.hpp"
#include "NeoFOAM/dsl/explicit.hpp"
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
#include "NeoFOAM/finiteVolume/cellCentred/operators/sparsityPattern.hpp"
#include "gaussConvectionScheme.H"
#include "NeoFOAM/core/input.hpp"
#include "NeoFOAM/dsl/explicit.hpp"
#include "gaussConvectionScheme.H"
#include "NeoFOAM/NeoFOAM.hpp"

@@ -0,0 +1,64 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// 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

Comment on lines +28 to +31

NeoFOAM::Executor exec = GENERATE(NeoFOAM::Executor(NeoFOAM::SerialExecutor {})
// NeoFOAM::Executor(NeoFOAM::CPUExecutor {}),
// NeoFOAM::Executor(NeoFOAM::GPUExecutor {})
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 {})
// NeoFOAM::Executor(NeoFOAM::CPUExecutor {}),
// NeoFOAM::Executor(NeoFOAM::GPUExecutor {})
// TODO: implement other executors again
NeoFOAM::Executor exec = GENERATE(NeoFOAM::Executor(NeoFOAM::SerialExecutor {})
// NeoFOAM::Executor(NeoFOAM::CPUExecutor {}),
// NeoFOAM::Executor(NeoFOAM::GPUExecutor {})

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