-
Notifications
You must be signed in to change notification settings - Fork 42
Add the first draft of the code structure. #791
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
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -4,4 +4,12 @@ Code structure | |||||
|
|
||||||
| ```{todo} | ||||||
| Go through how the code is actually structured with directories and from core to utilities and pugins. | ||||||
| ``` | ||||||
| ``` | ||||||
|
|
||||||
| The main file that generates the GWB world is `source/world_builder/world.cc` using the specified parameterizations in a given worldbuilder (`*.wb`) file. The executable `gwb-dat` or `gwb-grid` is then used to query the World on a set of specified points or on a grid, respectively. | ||||||
|
|
||||||
| GWB determines where a given point lies in the World amongst the specified tectonic features. The utility functions to compute the distance of point from a feature are defined in the `source/world_builder/utilities.cc`. | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| The available features are described in the `features` directory. The interface class, which defines all feature models—such as continental plates, plumes, oceanic plates, and faults—is located in `source/world_builder/features/interface.cc`. This class includes member functions that are implemented individually within each feature's class. For instance, both `source/world_builder/continental_plate.cc` and `source/world_builder/fault.cc` override the `declare_entries` function from the `Interface` class to include all the parameters required for their respective feature models. | ||||||
|
|
||||||
| For each feature model, the GWB calculates properties such as temperature and composition using the available distributions, which are located in the sub-directory corresponding to that feature model. For example, all available functions describing the composition values of a `fault` are stored in the `source/world_builder/features/fault_models/composition` directory. Similar to feature model types, property types are derived from their respective Interface class, defined in the interface.cc file within the same folder. In this case, the interface file would be `source/world_builder/features/fault_models/composition/interface.cc`. | ||||||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.