Version 2 of Case Generate#3
Open
orlandoisepic wants to merge 131 commits into
Open
Conversation
Reflect new project structure
Exclude logs from git
Updated the schema to reflect new topology, which is more accessible
A custom logger
A class to read and validate the topology
A class to create the precice configuration file based on config-graph nodes
A class to create nodes based on a topology file
Helper functions and values for the node creator
Updated the main to reflect the project structure and functionality
Moved displacement to "extensive-data"
They contain the precice beginner tutorials and a more complex multi coupling
Removed old TODOs
Rearranged entries and added some explanations
Make logs folder hidden on unix
Make `create_config_str()` "private"
Create a new class for patches
Create patch nodes and naming improvements
Create a class for creating adapter configurations
update the main method to include adapter config generation
Updated description to reflect double usage of the method
A schema for the adapter-config.json files.
Validate created adapter configs against the schema
Updated name to "_validate..." to reflect changes in adapter config creator
Changed imports
Add a new helper function for solver i.e. participant directories
Use new helper function
They were adopted from the previous version
Created a new class for creating the utility files. The readme is somewhat inspired by the old version, but contains less words and more information :)
Switch to 'colored' package instead of manually setting color
add colored as a dependency
Incorporate new config-graph functionality
They now use the correct output path.
Test to ensure correct parsing of scientific notation
The schema is now imported through the "precice-adapter-config" dependency
Fixed a typo
fsimonis
reviewed
May 6, 2026
fsimonis
reviewed
May 6, 2026
fsimonis
reviewed
May 6, 2026
Member
fsimonis
left a comment
There was a problem hiding this comment.
IMHO the only thing blocking this PR from my perspective is the compatibility with the preicice-cli.
Co-authored-by: Frédéric Simonis <simonisfrederic@gmail.com>
A shorter default path
I think this is makes sense as it is one of the main interfaces. Just importing it seems like a workaround.
ummm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
This changes everything
🤯🤩The biggest overarching change is the inclusion of preCICE Config Graph as a dependency and a change to the topology schema.
Process flow
precice-config.xmlfileadapter-config.jsonbased on the nodesChanges to the topology
The topology only takes the two arguments (or "main" elements)
participantsandexchanges. A detailed overview over the topology can be found inprecicecasegenerate/schemas/README.md.The elements
coupling-schemeandaccelerationwere removed to reduce complexity.Preprocessing
Preprocessing includes checking if the topology is valid. The following checks are executed:
These checks are necessary to guarantee a valid topology and adapter-configs.
Changes to the generating process
Well, it was redesigned from the ground up.
I tried to make everything as modular as possible, so that single functions can be modified without influencing others.
The main logic now relies on the preCICE Config Graph and its nodes. These nodes are created in the following sequence:
The patches names might be altered and this step MUST be executed before data nodes are initialized.
These include: A --Color (scalar)-> B and A --Color (vector) -> B, which needs to be resolved into two data nodes, "Color-Vector" and "Color-Scalar".
Another possibility is A --Color-> B and B --Color-> A, which means that one of the "Color"'s needs to be changed to something unique, like "Pretty-Color". This is why, during preprocessing, it is checked whether any data name contains such a special "uniquifier".
A full list of these uniquifiers, intensive and extensive data, as well as data->data-type map can be found in
precicecasegenerate/cli_helper.pyIf participants with different dimensionalities try to exchange data, the dimension of the mesh with lower dimensionality is increased.
Extensive data leads to a write-conservative mapping, intensive data leads to a read-consistent mapping.
However, since no coupling-scheme configuration is given, any coupling-scheme must be inferred from them. Since "strong" exchanges do no necessarily lead to implicit coupling schemes, only a list of "potential couplings" is created.
First, the list of "potential couplings" is scanned to find bidirectional strong couplings. If any exist, an implicit-, or multi-coupling-scheme, is created.
Next, explicit coupling-scheme are created based on the remaining "potential couplings"
As mentioned above, each of these steps can be modified without influencing the other steps, as long as necessary return values remain in their original format.
The code for this can be found in
precicecasegenereate/node_creator.py.New features
At least I was not aware of them before:
Changes to utility files
The
README.mdtemplate has been reworked slightly, as well as theclean.shfile.Changes to tests
Tests now include validating topologies against predefined ones with the config-graph's new
check_config_equivalence()function as well as running the config-checker.