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

Use block preconditioner for mixed Poisson problem #3580

Merged
merged 31 commits into from
Jan 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
77be161
Switch to iterative solver for mixed-Poisson demo
garth-wells Dec 28, 2024
5066671
Update for complex types
garth-wells Dec 28, 2024
96baaec
Update
garth-wells Dec 28, 2024
7243f2f
Work on block preconditioned mixed Poisson solver
garth-wells Jan 5, 2025
4228e65
Text updates
garth-wells Jan 5, 2025
3962835
Small text fixes
garth-wells Jan 5, 2025
1d11014
Disable fast fail
garth-wells Jan 5, 2025
01845b2
Skip Hypre solver in complex mode
garth-wells Jan 5, 2025
68752f7
Revert CI change
garth-wells Jan 5, 2025
6b22011
Merge remote-tracking branch 'origin/main' into garth/mixed-poisson-b…
garth-wells Jan 5, 2025
b67418e
Merge branch 'main' into garth/mixed-poisson-block
garth-wells Jan 8, 2025
9637029
Update python/demo/demo_mixed-poisson.py
garth-wells Jan 8, 2025
72808e7
Update python/demo/demo_mixed-poisson.py
garth-wells Jan 8, 2025
0e3b3b8
Update python/demo/demo_mixed-poisson.py
garth-wells Jan 8, 2025
03917ed
Update python/demo/demo_mixed-poisson.py
garth-wells Jan 8, 2025
0d1f9e0
Update python/demo/demo_mixed-poisson.py
garth-wells Jan 8, 2025
0fdaf29
Update output
garth-wells Jan 8, 2025
d8c7c7e
Updates
garth-wells Jan 10, 2025
e787504
Updates
garth-wells Jan 10, 2025
809b20b
Support zero form
garth-wells Jan 11, 2025
93967c2
Merge branch 'garth/mixed-poisson-block' of github.com:FEniCS/dolfinx…
garth-wells Jan 11, 2025
c9f26d0
Simplify
garth-wells Jan 11, 2025
8b460bf
Install blas in CI
garth-wells Jan 11, 2025
811fd7d
Install lapack
garth-wells Jan 11, 2025
a4c7dfc
Fix typo
garth-wells Jan 11, 2025
43e79a4
Bump macos-15
garth-wells Jan 11, 2025
e4260e6
Use superlu_dist
garth-wells Jan 11, 2025
bfac154
LU solver work-arounds
garth-wells Jan 11, 2025
1cbd301
Ruff fix
garth-wells Jan 11, 2025
fe6f168
Fix typo
garth-wells Jan 11, 2025
4d59cc7
Fix typos
garth-wells Jan 11, 2025
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
6 changes: 4 additions & 2 deletions .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
find . -type f \( -name "*.cmake" -o -name "*.cmake.in" -o -name "CMakeLists.txt" \) | xargs cmake-format --check

build:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
needs: [fenicsx-refs, lint]
env:
OMPI_ALLOW_RUN_AS_ROOT: 1
Expand All @@ -93,7 +93,9 @@ jobs:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install catch2 cmake g++ libboost-dev libhdf5-mpi-dev libparmetis-dev libpugixml-dev libspdlog-dev mpi-default-dev ninja-build pkg-config
sudo apt-get install catch2 cmake g++ libblas-dev libboost-dev libhdf5-mpi-dev \
liblapack-dev libparmetis-dev libpugixml-dev libspdlog-dev mpi-default-dev \
ninja-build pkg-config
- name: Set up Python
uses: actions/setup-python@v5
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

mac-os-build:
name: macOS Homebrew install and test
runs-on: macos-14
runs-on: macos-15
needs: fenicsx-refs
env:
PETSC_ARCH: arch-darwin-c-opt
Expand Down
2 changes: 2 additions & 0 deletions cpp/dolfinx/fem/assemble_vector_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -1295,8 +1295,10 @@ void assemble_vector(
std::shared_ptr<const mesh::Mesh<U>> mesh = L.mesh();
assert(mesh);
if constexpr (std::is_same_v<U, scalar_value_type_t<T>>)
{
assemble_vector(b, L, mesh->geometry().dofmap(), mesh->geometry().x(),
constants, coefficients);
}
else
{
auto x = mesh->geometry().x();
Expand Down
18 changes: 9 additions & 9 deletions cpp/dolfinx/fem/discreteoperators.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ namespace dolfinx::fem
/// a Lagrange finite element function in \f$V_0 \subset H^1\f$ into a
/// Nédélec (first kind) space \f$V_1 \subset H({\rm curl})\f$, i.e.
/// \f$\nabla V_0 \rightarrow V_1\f$. If \f$u_0\f$ is the
/// degree-of-freedom vector associated with \f$V_0\f$, the hen
/// degree-of-freedom vector associated with \f$V_0\f$, then
/// \f$u_1=Au_0\f$ where \f$u_1\f$ is the degrees-of-freedom vector for
/// interpolating function in the \f$H({\rm curl})\f$ space. An example
/// of where discrete gradient operators are used is the creation of
/// algebraic multigrid solvers for \f$H({\rm curl})\f$ and
/// \f$H({\rm div})\f$ problems.
/// algebraic multigrid solvers for \f$H({\rm curl})\f$ and \f$H({\rm
/// div})\f$ problems.
///
/// @note The sparsity pattern for a discrete operator can be
/// initialised using sparsitybuild::cells. The space `V1` should be
Expand All @@ -44,9 +44,9 @@ namespace dolfinx::fem
///
/// @param[in] topology Mesh topology
/// @param[in] V0 Lagrange element and dofmap for corresponding space to
/// interpolate the gradient from
/// @param[in] V1 Nédélec (first kind) element and and dofmap for
/// corresponding space to interpolate into
/// interpolate the gradient from.
/// @param[in] V1 Nédélec (first kind) element and dofmap for
/// corresponding space to interpolate into.
/// @param[in] mat_set A functor that sets values in a matrix
template <dolfinx::scalar T,
std::floating_point U = dolfinx::scalar_value_type_t<T>>
Expand Down Expand Up @@ -148,9 +148,9 @@ void discrete_gradient(mesh::Topology& topology,
/// initialised using sparsitybuild::cells. The space `V1` should be
/// used for the rows of the sparsity pattern, `V0` for the columns.
///
/// @param[in] V0 The space to interpolate from
/// @param[in] V1 The space to interpolate to
/// @param[in] mat_set A functor that sets values in a matrix
/// @param[in] V0 Space to interpolate from.
/// @param[in] V1 Space to interpolate to.
/// @param[in] mat_set Functor that sets values in a matrix.
template <dolfinx::scalar T, std::floating_point U>
void interpolation_matrix(const FunctionSpace<U>& V0,
const FunctionSpace<U>& V1, auto&& mat_set)
Expand Down
2 changes: 1 addition & 1 deletion python/demo/demo_half_loaded_waveguide.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ def Omega_v(x):
# Verify if kz is consistent with the analytical equations
assert verify_mode(kz, w, h, d, lmbd0, eps_d, eps_v, threshold=1e-4)

print(f"eigenvalue: {-kz**2}")
print(f"eigenvalue: {-(kz**2)}")
print(f"kz: {kz}")
print(f"kz/k0: {kz / k0}")

Expand Down
Loading
Loading