Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
f31e389
Add a non-uniform domain decomposition variant based on geometric pro…
IshaanDesai Apr 8, 2026
8868c4e
Add config option for nonuniform domain decomposition
IshaanDesai Apr 8, 2026
e581b57
Use correct keyword: nonuniform
IshaanDesai Apr 9, 2026
63c4b88
Merge branch 'develop' into custom-domain-decomposition
IshaanDesai Apr 9, 2026
191575d
Remove unnecessary bracket
IshaanDesai Apr 9, 2026
31fbecf
Merge branch 'develop' into custom-domain-decomposition
IshaanDesai Apr 10, 2026
0258157
Change the zero sims on rank case from Exception to a warning
IshaanDesai Apr 12, 2026
0a6cb4d
Add the decomposition type that was incorrectly removed
IshaanDesai Apr 12, 2026
6f6da63
Add minimum_access_region_size as a configurable parameter to control…
IshaanDesai Apr 12, 2026
d76b08f
Refactor DomainDecomposer class
IshaanDesai Apr 12, 2026
33d7f78
Fix tests
IshaanDesai Apr 12, 2026
acac860
Fix tests of micro_manager userside functions
IshaanDesai Apr 12, 2026
05ece78
Fix geometric-type progression decomposition
IshaanDesai Apr 12, 2026
68504f5
First working prototype of geometric sequence for domain decomposition
IshaanDesai Apr 12, 2026
cc5b0ca
Fix summation of dx in calculating the mesh bounds
IshaanDesai Apr 13, 2026
0861609
Fix tests
IshaanDesai Apr 13, 2026
77e2982
Merge branch 'develop' into custom-domain-decomposition
IshaanDesai Apr 13, 2026
56932c3
Add Exception when a rank does not have any simulations but lazy init…
IshaanDesai Apr 15, 2026
435e61b
Add changelog entry
IshaanDesai Apr 15, 2026
1dd8744
Add new configuration parameters to docs
IshaanDesai Apr 15, 2026
724dcfe
Simplify calculation of uniform bounds in domain decomposition
IshaanDesai Apr 15, 2026
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## latest

- Refactored `DomainDecomposer` class and added a new variant of non-uniform decomposition [#243](https://github.com/precice/micro-manager/pull/243)
- Fixed load balancing configuration `partitioning` parameter setting [#245](https://github.com/precice/micro-manager/pull/245)
- Fixed comparison of zero values of type float32 and float64 in simulation deactivation [#244](https://github.com/precice/micro-manager/pull/244)
- Optimized norm calculations and further fixed lazy initialization [#241](https://github.com/precice/micro-manager/pull/241)
Expand Down
18 changes: 11 additions & 7 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,20 @@ Apart from the base settings, there are three main sections in the configuration

## Simulation Parameters

| Parameter | Description | Default |
|-----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------|
| `macro_domain_bounds` | Minimum and maximum bounds of the macro-domain, having the format `[xmin, xmax, ymin, ymax, zmin, zmax]` in 3D and `[xmin, xmax, ymin, ymax]` in 2D. | - |
| `decomposition` | List of number of ranks in each axis with format `[xranks, yranks, zranks]` in 3D and `[xranks, yranks]` in 2D. | `[1, 1, 1]` or `[1, 1]` |
| `micro_dt` | Initial time window size (dt) of the micro simulation. | - |
| `adaptivity` | Set `true` for simulations with adaptivity. See section on [adaptivity](#adaptivity). | `false` |
| `load_balancing` | Set `true` for load balancing. See section on [load balancing](#load-balancing). | `false` |
| Parameter | Description | Default |
| --- | --- | --- |
| `macro_domain_bounds` | Minimum and maximum bounds of the macro-domain, having the format `[xmin, xmax, ymin, ymax, zmin, zmax]` in 3D and `[xmin, xmax, ymin, ymax]` in 2D. | - |
| `decomposition` | List of number of ranks in each axis with format `[xranks, yranks, zranks]` in 3D and `[xranks, yranks]` in 2D. | `[1, 1, 1]` or `[1, 1]` |
| `decomposition_type` | Type of domain decomposition. Either `uniform` or `nonuniform`. | `uniform` |
| `minimum_access_region_size` | If `nonuniform` decomposition, optionally set a minimum domain width in each axis. Format `[xmin, ymin, zmin]` | - |
| `micro_dt` | Initial time window size (dt) of the micro simulation. | - |
| `adaptivity` | Set `true` for simulations with adaptivity. See section on [adaptivity](#adaptivity). | `false` |
| `load_balancing` | Set `true` for load balancing. See section on [load balancing](#load-balancing). | `false` |

The total number of partitions ranks in the `decomposition` list should be the same as the number of ranks in the `mpirun` or `mpiexec` command.

Non-uniform domain decomposition is based on a geometric progression.

## Diagnostics

| Parameter | Description | Default |
Expand Down
50 changes: 50 additions & 0 deletions micro_manager/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,12 @@ def __init__(self, config_file_name):
self._write_data_names = None
self._micro_dt = None

# Domain decomposition information
self._macro_domain_bounds = None
self._ranks_per_axis = None
self._decomposition_type = "uniform"
self._minimum_access_region_size: list = []

self._micro_output_n = 1
self._diagnostics_data_names = None

Expand Down Expand Up @@ -258,6 +262,30 @@ def read_json_micro_manager(self):
self._logger.log_info_rank_zero(
"Axis-wise domain decomposition: " + str(self._ranks_per_axis)
)
if self._data["simulation_params"]["decomposition_type"]:
self._decomposition_type = self._data["simulation_params"][
"decomposition_type"
]
if self._decomposition_type not in ["uniform", "nonuniform"]:
raise Exception(
"Decomposition type can be either 'uniform' or 'nonuniform'."
)
if (
self._data["simulation_params"]["decomposition_type"]
== "nonuniform"
):
if self._data["simulation_params"]["minimum_access_region_size"]:
self._minimum_access_region_size = self._data[
"simulation_params"
]["minimum_access_region_size"]
else:
self._logger.log_info_rank_zero(
"Minimum access region size is not specified. Calculating it as 1 / (2^ranks_per_axis - 1) of the macro domain size in each axis."
)

self._logger.log_info_rank_zero(
"Domain decomposition type: " + self._decomposition_type
)
except BaseException:
self._logger.log_info_rank_zero(
"Domain decomposition is not specified, so the Micro Manager will expect to be run in serial."
Expand Down Expand Up @@ -743,6 +771,28 @@ def get_ranks_per_axis(self):
"""
return self._ranks_per_axis

def get_decomposition_type(self):
"""
Get the type of domain decomposition.

Returns
-------
decomposition_type : str
Type of domain decomposition, can be either "uniform" or "non-uniform".
"""
return self._decomposition_type

def get_minimum_access_region_size(self):
"""
Get the minimum access region size for non-uniform domain decomposition.

Returns
-------
minimum_access_region_size : list
List containing the minimum access region size in each axis for non-uniform domain decomposition.
"""
return self._minimum_access_region_size

def get_micro_file_name(self):
"""
Get the path to the Python script of the micro-simulation.
Expand Down
Loading
Loading