Skip to content

Commit 521fade

Browse files
committed
Implement initial hypersonic CFD solver blueprint
1 parent 6b766c4 commit 521fade

32 files changed

Lines changed: 3114 additions & 0 deletions
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: build-gpu-kernels
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [main]
7+
8+
jobs:
9+
build-kernel-host:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Configure compute kernel
14+
run: cmake -S compute_kernel -B build/compute_kernel
15+
- name: Build compute kernel
16+
run: cmake --build build/compute_kernel
17+
18+
build-containers:
19+
runs-on: ubuntu-latest
20+
needs: build-kernel-host
21+
steps:
22+
- uses: actions/checkout@v4
23+
- name: Build stack images
24+
run: docker compose build

.github/workflows/test-solvers.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: test-solvers
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
jobs:
9+
simulation-api-tests:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-python@v5
14+
with:
15+
python-version: '3.11'
16+
- name: Install API dependencies
17+
working-directory: simulation_api
18+
run: pip install -r requirements.txt
19+
- name: Run conservation checks
20+
working-directory: simulation_api
21+
env:
22+
PYTHONPATH: ${{ github.workspace }}/simulation_api
23+
run: python -m unittest discover -s tests -p 'test_*.py'
24+
- name: Import FastAPI app
25+
working-directory: simulation_api
26+
env:
27+
PYTHONPATH: ${{ github.workspace }}/simulation_api
28+
run: python -c "from app.main import app; print(app.title)"
29+
30+
visualizer-build:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v4
34+
- uses: actions/setup-node@v4
35+
with:
36+
node-version: '20'
37+
- name: Install frontend dependencies
38+
working-directory: cfd_visualizer
39+
run: npm install
40+
- name: Build visualizer
41+
working-directory: cfd_visualizer
42+
run: npm run build

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.DS_Store
2+
__pycache__/
3+
*.pyc
4+
.pytest_cache/
5+
node_modules/
6+
dist/
7+
build/
8+
cmake-build-*/
9+
*.tsbuildinfo
10+
.venv/
11+
*.exe

Makefile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
SHELL := /bin/sh
2+
3+
.PHONY: compile-cuda api-check api-test ui-install ui-build
4+
5+
compile-cuda:
6+
cmake -S compute_kernel -B build/compute_kernel
7+
cmake --build build/compute_kernel
8+
9+
api-check:
10+
python -m compileall simulation_api
11+
12+
api-test:
13+
cd simulation_api && python -m unittest discover -s tests -p "test_*.py"
14+
15+
ui-install:
16+
cd cfd_visualizer && npm install
17+
18+
ui-build:
19+
cd cfd_visualizer && npm run build

cfd_visualizer/Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM node:20-alpine AS build
2+
WORKDIR /app
3+
4+
ARG VITE_SIM_API_URL=http://localhost:8000
5+
ENV VITE_SIM_API_URL=${VITE_SIM_API_URL}
6+
7+
COPY package.json tsconfig.json vite.config.ts ./
8+
COPY index.html ./
9+
COPY src ./src
10+
11+
RUN npm install
12+
RUN npm run build
13+
14+
FROM nginx:1.27-alpine
15+
COPY --from=build /app/dist /usr/share/nginx/html
16+
17+
EXPOSE 80

cfd_visualizer/index.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>Hypersonic CFD Solver</title>
7+
</head>
8+
<body>
9+
<div id="root"></div>
10+
<script type="module" src="/src/index.tsx"></script>
11+
</body>
12+
</html>

0 commit comments

Comments
 (0)