You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packaging/homebrew/HOMEBREW.md
+185-5Lines changed: 185 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,101 @@ This document describes the Homebrew formula for installing MFC on macOS systems
6
6
7
7
The Homebrew formula enables one-command installation of MFC on macOS (both Intel and Apple Silicon). The formula handles all dependencies, builds the three main MFC binaries, and installs them in a standard Homebrew location.
8
8
9
+
## Quick Start Guide
10
+
11
+
### Prerequisites
12
+
13
+
- macOS 11 (Big Sur) or later
14
+
-[Homebrew](https://brew.sh/) installed on your system
15
+
- Internet connection for downloading dependencies
16
+
17
+
### Installation
18
+
19
+
The installation method depends on how the formula is distributed:
20
+
21
+
#### Option 1: Official Homebrew Repository (Future)
22
+
23
+
Once the formula is accepted into `homebrew-core`, install with:
24
+
25
+
```bash
26
+
brew install mfc
27
+
```
28
+
29
+
#### Option 2: Third-Party Tap
30
+
31
+
If the formula is available in a tap repository:
32
+
33
+
```bash
34
+
# Add the tap
35
+
brew tap MFlowCode/mfc
36
+
37
+
# Install MFC
38
+
brew install MFlowCode/mfc/mfc
39
+
```
40
+
41
+
#### Option 3: Install from Local Formula File
42
+
43
+
If you have the formula file locally (e.g., from cloning the MFC repository):
# Run a test case (recommended: copy to working directory first)
151
251
mfc run case.py
152
252
153
253
# Or run directly from the installed examples directory
154
254
mfc run $(brew --prefix mfc)/examples/1D_sodshocktube/case.py
155
255
156
-
# Run just preprocessing
256
+
# Run with specific number of processors
257
+
mfc run case.py -j 4
258
+
```
259
+
260
+
### Using Individual Binaries
261
+
262
+
You can also use the binaries directly:
263
+
264
+
```bash
265
+
# Run preprocessing step
157
266
pre_process -i input.dat
158
267
159
268
# Run simulation
160
269
simulation -i input.dat
161
270
162
-
#Post-process results
271
+
#Run post-processing
163
272
post_process -i input.dat
273
+
274
+
# Check binary versions
275
+
pre_process --version
276
+
simulation --version
277
+
post_process --version
278
+
```
279
+
280
+
### Common MFC Commands
281
+
282
+
```bash
283
+
# Get help
284
+
mfc --help
285
+
286
+
# Build MFC (if you have source code)
287
+
mfc build
288
+
289
+
# Run tests
290
+
mfc test
291
+
292
+
# Clean build artifacts
293
+
mfc clean
294
+
295
+
# Check system requirements
296
+
mfc syscheck
297
+
```
298
+
299
+
### Working with Your Own Cases
300
+
301
+
```bash
302
+
# Create a new case directory
303
+
mkdir my_case
304
+
cd my_case
305
+
306
+
# Create your case.py file (see MFC documentation for format)
307
+
# Then run it
308
+
mfc run case.py
309
+
310
+
# Run with custom parameters
311
+
mfc run case.py --param value
312
+
```
313
+
314
+
### Finding Installed Files
315
+
316
+
```bash
317
+
# Get the installation prefix
318
+
brew --prefix mfc
319
+
320
+
# Find examples
321
+
ls $(brew --prefix mfc)/examples
322
+
323
+
# Find toolchain
324
+
ls $(brew --prefix mfc)/toolchain
325
+
326
+
# Check installed version
327
+
brew info mfc
328
+
```
329
+
330
+
### Troubleshooting
331
+
332
+
```bash
333
+
# Verify installation
334
+
brew list mfc
335
+
336
+
# Check for issues
337
+
brew doctor
338
+
339
+
# Reinstall if needed
340
+
brew reinstall mfc
341
+
342
+
# View installation logs
343
+
brew install --verbose mfc
164
344
```
165
345
166
-
Note: The `brew --prefix mfc` command returns the "opt" symlink location (e.g., `/usr/local/opt/mfc` or `/opt/homebrew/opt/mfc`), not the actual versioned Cellar path. The "opt" directory points to the currently active version in the Cellar, making examples work on both Intel and Apple Silicon systems. If you need the actual versioned installation path, look in the Cellar directory (e.g., `/usr/local/Cellar/mfc/VERSION`).
346
+
**Note**: The `brew --prefix mfc` command returns the "opt" symlink location (e.g., `/usr/local/opt/mfc` or `/opt/homebrew/opt/mfc`), not the actual versioned Cellar path. The "opt" directory points to the currently active version in the Cellar, making examples work on both Intel and Apple Silicon systems. If you need the actual versioned installation path, look in the Cellar directory (e.g., `/usr/local/Cellar/mfc/VERSION`).
0 commit comments