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 :)
Fixed a critical bug where the wrong participant was used as the "origin" of a receive_mesh_node.
Updated the generic test; the command changed and the directories / filenames of the examples.
Added a test for receive-mesh nodes.
Somehow this was not a multi coupling scheme at all
It could have happened that participants are defined with different dimensionalities. This means that exchanges and thus also mappings occurred, where the involved meshes had different dimensions. This has been fixed now. I am unsure, however, if just setting the other meshes dimensions to the higher dimensions is a "good" solution.
Include spec file
Otherwise it will show an error when comparing the unused participants adapter config. While it is not ideal to simply remove this item, i also do not see why an empty participant would be helpful
Changed indentation apparently :-)
Now they represent the parameters better.
This disallows exchanges from a participant to itself.
New and improved (😼) project description, updated requirements and usage, updated links
A new file describing the topology.yaml file.
Mention optional dependencies for testing
Apparently it is not allowed to use the delimiting quotes inside an f-string
Here as well
@Logende 's suggestion
move displacement to intensive data
I forgot to put this everywhere 😵💫
Minor changes; it includes the `precice_config_file_path` and new mesh names if it uses intensive and extensive data
It is clearer now since there is also preprocessing in the node_creator.py
Includes the checking if the exchanges are unique up to patches, as suggested by @uekerman
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.