Skip to content

Commit 80dccbc

Browse files
authored
Revise README with mermaid flowcharts (#762)
Updated the README to reflect PINA modules structure and added flowcharts for steps to follow.
1 parent c13901e commit 80dccbc

File tree

1 file changed

+60
-4
lines changed

1 file changed

+60
-4
lines changed

README.md

Lines changed: 60 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,13 +160,69 @@ trainer = Trainer(solver, max_epochs=1000, accelerator='gpu')
160160
trainer.train()
161161
```
162162

163-
## Application Programming Interface
163+
## PINA Modules Structure
164164
Here's a quick look at PINA's main module. For a better experience and full details, check out the [documentation](https://mathlab.github.io/PINA/).
165165

166-
<a href="https://github.com/mathLab/PINA/readme/PINA_API.png">
167-
<img src="./readme/PINA_API.png" />
168-
</a>
166+
```mermaid
167+
flowchart TB
168+
PINA["<h1>pina</h1>The basic module including `Condition`, <tt>LabelTensor</tt>, `Graph` and `Trainer` API"]
169+
170+
subgraph R1[" "]
171+
direction LR
172+
PROB["<h2>pina.problem</h2> Module for defining problems via base class inheritance"]
173+
MODEL["<h2>pina.model</h2> Module for built-in PyTorch models full architectures"]
174+
SOLVER["<h2>pina.solver</h2> Module for built-in solvers and abstract interfaces"]
175+
CALLBACK["<h2>pina.callback</h2> Module for built-in callbacks to integrate training pipelines"]
176+
end
177+
178+
subgraph R2[" "]
179+
direction LR
180+
DOMAIN["<h2>pina.domain</h2> Module for defining geometries and set operations"]
181+
BLOCK["<h2>pina.block</h2> Module for built-in PyTorch models layers only"]
182+
OPTIM["<h2>pina.optim</h2> Module for build or import optimizers and schedulers"]
183+
DATA["<h2>pina.data</h2> Module for DataModules for data processing"]
184+
end
185+
186+
subgraph R3[" "]
187+
direction LR
188+
OPERATOR["<h2>pina.operator</h2> Module for differential operators"]
189+
ADAPT["<h2>pina.adaptive_function</h2> Module for PyTorch learnable activations"]
190+
LOSS["<h2>pina.loss</h2> Module for losses and weighting strategies"]
191+
CONDITION["<h2>pina.condition</h2> Module for model training constraints"]
192+
end
193+
194+
PINA --> PROB
195+
PINA --> MODEL
196+
PINA --> SOLVER
197+
PINA --> CALLBACK
198+
199+
PROB --> DOMAIN
200+
MODEL --> BLOCK
201+
SOLVER --> OPTIM
202+
CALLBACK --> DATA
203+
204+
DOMAIN --> OPERATOR
205+
BLOCK --> ADAPT
206+
OPTIM --> LOSS
207+
DATA --> CONDITION
169208
209+
```
210+
### Steps to Follow
211+
212+
```mermaid
213+
flowchart LR
214+
STEP1["<h2>Problem and Data</h2> Define the mathematical problem<br>Identify constraints or import data"]
215+
STEP2["<h2>Model Design</h2> Build a PyTorch module Choose or customize a model"]
216+
STEP3["<h2>Solver Selection</h2> Use available solvers or define your own strategy"]
217+
STEP4["<h2>Training</h2> Optimize the model with PyTorch Lightning"]
218+
219+
STEP1 e1@--> STEP2
220+
STEP2 e2@--> STEP3
221+
STEP3 e3@--> STEP4
222+
e1@{ animate: true }
223+
e2@{ animate: true }
224+
e3@{ animate: true }
225+
```
170226
## Contributing and Community
171227

172228
We would love to develop PINA together with our community! Best way to get started is to select any issue from the [`good-first-issue` label](https://github.com/mathLab/PINA/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22). If you would like to contribute, please review our [Contributing Guide](CONTRIBUTING.md) for all relevant details.

0 commit comments

Comments
 (0)