Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -803,9 +803,10 @@ if (MFC_DOCUMENTATION)
\"${CMAKE_CURRENT_SOURCE_DIR}/docs/custom.css\"")

# > Generate Documentation & Landing Page
GEN_DOCS(pre_process "MFC: Pre-Process")
GEN_DOCS(simulation "MFC: Simulation")
GEN_DOCS(post_process "MFC: Post-Process")
GEN_DOCS(pre_process "MFC")
GEN_DOCS(simulation "MFC")
GEN_DOCS(post_process "MFC")
GEN_DOCS(api "MFC")
GEN_DOCS(documentation "MFC")

# Generate API landing pages for pre_process, simulation, post_process.
Expand All @@ -826,6 +827,7 @@ if (MFC_DOCUMENTATION)
add_dependencies(pre_process_doxygen gen_api_landing)
add_dependencies(simulation_doxygen gen_api_landing)
add_dependencies(post_process_doxygen gen_api_landing)
add_dependencies(api_doxygen gen_api_landing)

# Fix @file/@brief headers to match actual module/program declarations.
# Handles mixed-case Fortran names and catches stale module renames.
Expand Down
17 changes: 17 additions & 0 deletions docs/api/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
@mainpage API Documentation

MFC's source code is organized into three components that form a complete simulation pipeline. Each component has full module-level API documentation.

### [Pre-Process](../pre_process/index.html)

The pre-process component generates initial conditions and computational meshes for MFC simulations. It supports patch-based geometry construction, multi-component material initialization, and immersed boundary geometry.

### [Simulation](../simulation/index.html)

The simulation component is the core flow solver. It advances the governing equations in time using high-order finite-volume methods on structured grids with GPU acceleration via OpenACC/OpenMP offloading.

### [Post-Process](../post_process/index.html)

The post-process component reads raw simulation output and computes derived quantities for visualization. It produces silo/HDF5 files compatible with VisIt, ParaView, and other visualization tools.

All three components share a set of **common modules** for MPI communication, variable conversion, derived types, and utility functions. These are documented within each component's API reference.
6 changes: 6 additions & 0 deletions docs/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
* Overrides for doxygen-awesome theme
*/

/* Hide empty nav-path footer (kept for navtree.js height calculation) */
#nav-path {
height: 0;
overflow: hidden;
}
Comment thread
sbryngelson marked this conversation as resolved.

/* Cross-navigation panel at top of sidebar */
#mfc-nav {
display: flex;
Expand Down
3 changes: 3 additions & 0 deletions docs/footer.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<!-- HTML footer for doxygen 1.9.1-->
<!-- start footer part -->
<!--BEGIN GENERATE_TREEVIEW-->
<div id="nav-path" class="navpath">
<ul></ul>
</div>
<!--END GENERATE_TREEVIEW-->
<!--BEGIN !GENERATE_TREEVIEW-->
<!--END !GENERATE_TREEVIEW-->
Expand Down
33 changes: 31 additions & 2 deletions docs/gen_api_landing.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#!/usr/bin/env python3
"""Generate API landing pages for pre_process, simulation, and post_process.
"""Generate API landing pages for MFC documentation.

Usage: python3 gen_api_landing.py [source_dir]
source_dir defaults to current directory.

Scans src/{target}/*.fpp,*.f90 and src/common/*.fpp,*.f90 to produce module
tables in docs/{target}/readme.md. Intro text is defined below per target.
tables in docs/{target}/readme.md. Also generates a unified API landing page
at docs/api/readme.md that links to all three sub-project APIs.
"""

from __future__ import annotations
Expand Down Expand Up @@ -149,3 +150,31 @@ def get_modules(directory: Path) -> list[tuple[str, str]]:
out.parent.mkdir(parents=True, exist_ok=True)
out.write_text("\n".join(lines), encoding="utf-8")
print(f"Generated {out}")

# --- Unified API landing page ---
api_lines = [
"@mainpage API Documentation",
"",
"MFC's source code is organized into three components that form a complete "
"simulation pipeline. Each component has full module-level API documentation.",
"",
]

for target, info in TARGETS.items():
label = info["title"].replace("MFC ", "")
api_lines.append(f"### [{label}](../{target}/index.html)")
api_lines.append("")
api_lines.append(info["intro"])
api_lines.append("")

api_lines.append(
"All three components share a set of **common modules** for MPI communication, "
"variable conversion, derived types, and utility functions. "
"These are documented within each component's API reference."
)
api_lines.append("")

api_out = src_dir / "docs" / "api" / "readme.md"
api_out.parent.mkdir(parents=True, exist_ok=True)
api_out.write_text("\n".join(api_lines), encoding="utf-8")
print(f"Generated {api_out}")
13 changes: 9 additions & 4 deletions docs/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,21 @@
nav.id = 'mfc-nav';
var items = [
['../documentation/index.html', 'documentation', 'User Guide'],
['../pre_process/index.html', 'pre_process', 'Pre-Process API'],
['../simulation/index.html', 'simulation', 'Simulation API'],
['../post_process/index.html', 'post_process', 'Post-Process API']
['../api/index.html', 'api', 'API Documentation']
];
var path = window.location.pathname;
var apiPaths = ['/api/', '/pre_process/', '/simulation/', '/post_process/'];
for (var i = 0; i < items.length; i++) {
var a = document.createElement('a');
a.href = items[i][0];
a.textContent = items[i][2];
if (path.indexOf('/' + items[i][1] + '/') !== -1) a.className = 'active';
if (items[i][1] === 'api') {
for (var j = 0; j < apiPaths.length; j++) {
if (path.indexOf(apiPaths[j]) !== -1) { a.className = 'active'; break; }
}
} else {
if (path.indexOf('/' + items[i][1] + '/') !== -1) a.className = 'active';
}
nav.appendChild(a);
}
var sideNav = document.getElementById('side-nav');
Expand Down
Loading