Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Developer of FEATool Multiphysics

Precise Simulation precise-simulation

💭
Developer of FEATool Multiphysics
View GitHub Profile
View fluid_structure1_postprocessing.m
% Prostprocessing MATLAB m-file script for the fluid_structure1 tutorial model.
%
% Used to create the visualization: https://youtu.be/UwANmWvC9YM
close all
miu = 1;
i_int = [5:8,11:13]; % Integration boundaries.
i_cub = 10;
s_tfx = ['nx*p+',num2str(miu),'*(-2*nx*ux-ny*(uy+vx))'];
s_tfy = ['ny*p+',num2str(miu),'*(-nx*(vx+uy)-2*ny*vy)'];
@precise-simulation
precise-simulation / parrun.sh
Last active Jan 2, 2020
Bash xargs script to run parallel MATLAB and Octave jobs
View parrun.sh
#!/bin/bash
#
# Bash script using xargs to run Matlab and Octave jobs in parallel.
#
n_parruns=16 # Total number of runs.
n_parproc=3 # Number of simultaneous parallel processes.
# Define Matlab/Octave executable and main m-scipt file to run.
export runcmd='/mnt/c/Octave/Octave-4.2.1/bin/octave-cli.exe'
@precise-simulation
precise-simulation / fem-poisson-solver-julia-matlab-fortran-benchmark.txt
Created Aug 29, 2017
Julia Matlab Fortran Benchmark - Finite Element FEM Poisson Equation
View fem-poisson-solver-julia-matlab-fortran-benchmark.txt
| 1/h | FEAT2D | FEATool | FEniCS | | SFEA |
|------|---------|---------------|------------|----------|---------|
| | Fortran | Matlab/Octave | Python/C++ | Julia | Fortran |
| | GMG | UMFPACK | PETSc | CHOLMOD? | GMG |
| 128 | 0.025 | 0.368 | 0.19 | 0.18 | 0.049 |
| 256 | 0.05 | 1.718 | 0.79 | 0.322 | 0.064 |
| 512 | 0.21 | 7.406 | 4.65 | 0.9 | 0.11 |
| 1024 | 1.1 | 47.646 | 34.1 | 3.4 | 0.16 |
| 2048 | 6 | 338.14 | - | 14.6 | 0.49 |
@precise-simulation
precise-simulation / fem-matrix-assembly-julia-matlab-fortran-benchmark.txt
Created Aug 29, 2017
Julia Matlab Fortran Benchmark - Finite Element FEM Matrix Assembly
View fem-matrix-assembly-julia-matlab-fortran-benchmark.txt
| 1/h | FEAT2D | FEATool | FEniCS | |
|------|---------|---------------|------------|-------|
| | Fortran | Matlab/Octave | Python/C++ | Julia |
| 128 | 0.05 | 0.05 | 0.05 | 0.24 |
| 256 | 0.13 | 0.14 | 0.12 | 0.57 |
| 512 | 0.42 | 0.43 | 0.31 | 1.7 |
| 1024 | 1.5 | 1.7 | 1.1 | 6.5 |
| 2048 | 6 | 7 | 5 | 26 |
| 4096 | 24 | | | 105 |
@precise-simulation
precise-simulation / fem-benchmark-sparse-matvec.txt
Last active Aug 29, 2017
Julia Matlab Fortran Benchmark - Finite Element Sparse FEM Matrix Vector Product
View fem-benchmark-sparse-matvec.txt
| 1/h | FEAT2D | FEATool | | SFEA |
|------|---------|---------------|-------|---------|
| | Fortran | Matlab/Octave | Julia | Fortran |
| 128 | 0 | 0.002 | 0.03 | 0 |
| 256 | 0.001 | 0.002 | 0.031 | 0 |
| 512 | 0.005 | 0.006 | 0.034 | 0.001 |
| 1024 | 0.024 | 0.021 | 0.05 | 0.002 |
| 2048 | 0.197 | 0.085 | 0.08 | 0.009 |
| 4096 | 0.411 | | 0.25 | 0.034 |
You can’t perform that action at this time.