|
| 1 | +# FloPy C4 diagrams |
| 2 | + |
| 3 | +Documenting prospective FloPy architecture. |
| 4 | + |
| 5 | +```mermaid |
| 6 | +C4Context |
| 7 | + title [Context] FloPy / MF6 |
| 8 | +
|
| 9 | + Enterprise_Boundary(ec, "EC Framework") { |
| 10 | + Person(hydrologist, "Hydrologist", "determines optimal pumping rate for well field") |
| 11 | + Person(student, "Student", "simulates salt water intrusion in coastal aquifer") |
| 12 | + Person(professor, "Professor", "teaches groundwater modeling course") |
| 13 | + Person(institution, "Lab/Institution", "maintains pre-/post-processing extensions") |
| 14 | + Person(developer, "Developer", "debugs issues, develops features/models") |
| 15 | +
|
| 16 | + System(flopy, "FloPy") |
| 17 | + System(mf6, "MODFLOW 6") |
| 18 | +
|
| 19 | + Rel(flopy, mf6, "wraps") |
| 20 | + Rel(hydrologist, flopy, "uses") |
| 21 | + Rel(student, flopy, "uses") |
| 22 | + Rel(professor, flopy, "uses") |
| 23 | + Rel(institution, flopy, "extends") |
| 24 | + Rel(developer, flopy, "develops") |
| 25 | + UpdateRelStyle(hydrologist, flopy, $lineColor="blue") |
| 26 | + UpdateRelStyle(student, flopy, $lineColor="blue") |
| 27 | + UpdateRelStyle(professor, flopy, $lineColor="blue") |
| 28 | + UpdateRelStyle(institution, flopy, $lineColor="blue", $offsetX="-190", $offsetY="10") |
| 29 | + UpdateRelStyle(developer, flopy, $lineColor="blue") |
| 30 | +
|
| 31 | + } |
| 32 | +
|
| 33 | +``` |
| 34 | + |
| 35 | +```mermaid |
| 36 | +C4Container |
| 37 | + title [Containers] FloPy / MF6 |
| 38 | +
|
| 39 | + Enterprise_Boundary(ec, "EC Framework") { |
| 40 | +
|
| 41 | + Boundary(mf6, "MODFLOW 6"){ |
| 42 | + SystemDb(dfn, "Definition files") |
| 43 | + } |
| 44 | +
|
| 45 | + Boundary(flopy, "FloPy") { |
| 46 | + Boundary(devs, "Developer APIs") { |
| 47 | + System(fpycodegen, "Code generation") |
| 48 | + System(fpycore, "Core framework") |
| 49 | + } |
| 50 | + Boundary(users, "User APIs") { |
| 51 | + System(fpymf6, "MODFLOW 6 module") |
| 52 | + System(fpyprepost, "Pre-/post-processing") |
| 53 | + } |
| 54 | + Rel(fpymf6, fpycore, "imports") |
| 55 | + Rel(fpyprepost, fpycore, "imports") |
| 56 | + |
| 57 | + Rel(fpycodegen, dfn, "inspects") |
| 58 | + Rel(fpycodegen, fpymf6, "generates") |
| 59 | + } |
| 60 | +
|
| 61 | + Person(dev, "Developer", "") |
| 62 | + Person(user, "User", "") |
| 63 | +
|
| 64 | + Rel(dev, dfn, "develops") |
| 65 | + Rel(dev, fpycore, "develops") |
| 66 | + Rel(dev, fpycodegen, "uses") |
| 67 | + Rel(user, fpymf6, "uses") |
| 68 | + Rel(user, fpyprepost, "uses") |
| 69 | + UpdateRelStyle(dev, dfn, $lineColor="blue", $offsetX="-20" $offsetY="-30") |
| 70 | + UpdateRelStyle(dev, fpycore, $lineColor="blue", $offsetY="90") |
| 71 | + UpdateRelStyle(dev, fpycodegen, $lineColor="blue", $offsetY="50") |
| 72 | + UpdateRelStyle(user, fpymf6, $lineColor="blue", $offsetY="50") |
| 73 | + UpdateRelStyle(user, fpyprepost, $lineColor="blue", $offsetY="50") |
| 74 | + UpdateRelStyle(user, fpycore, $lineColor="blue", $offsetX="-20" $offsetY="-10") |
| 75 | + } |
| 76 | +
|
| 77 | + UpdateLayoutConfig($c4ShapeInRow="5", $c4BoundaryInRow="5") |
| 78 | +``` |
| 79 | + |
| 80 | +```mermaid |
| 81 | +C4Component |
| 82 | + title [Component] FloPy code generation |
| 83 | +
|
| 84 | + Container_Boundary(fpycodegen, "Code generation") { |
| 85 | + Component(templates, "Jinja templates") |
| 86 | + Component(genscript, "Generator script") |
| 87 | + } |
| 88 | +
|
| 89 | + Container_Boundary(fpymf6, "MF6 module") { |
| 90 | + Component(comp1, "IDM component 1") |
| 91 | + Component(comp2, "IDM component 2") |
| 92 | + } |
| 93 | +
|
| 94 | + Container_Boundary(fpycore, "Core framework") { |
| 95 | + Component(ctx, "Input contexts") |
| 96 | + } |
| 97 | +
|
| 98 | + Rel(genscript, templates, "uses") |
| 99 | + Rel(genscript, comp1, "creates") |
| 100 | + Rel(genscript, comp2, "creates") |
| 101 | + Rel(genscript, ctx, "uses") |
| 102 | + Rel(comp1, ctx, "imports") |
| 103 | + Rel(comp2, ctx, "imports") |
| 104 | +``` |
0 commit comments