This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% FEATool Multiphysics script example for extruding/interpolating a 2D solution to a 3D domain. | |
% | |
% Note! This will only work as is for 1st order/linear shape functions. For | |
% higher order shape functions interpolation order is more complicated | |
% due to degrees of freedom corresponding to cell center and edge mid points. | |
% Define and solve Poisson problem on 2x1 2D rectangle. | |
fea.sdim = {'x', 'y'}; | |
fea.geom.objects = {gobj_rectangle(0, 2, 0, 1)}; | |
fea.grid = gridgen(fea ,' hmax', 0.1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"meta":{"app":"FEATool Multiphysics","author":"Precise Simulation","build":"1.15.0","date":"04-Nov-2021","descr":"Meshing example with setting local boundary mesh sizes","dim":2,"image":"","keyw":"mesh","mlver":"","name":"local_boundary_mesh_size_example","phys":[],"system":"PCWIN64","time":738464,"title":"local_boundary_mesh_size_example","type":"mesh_example","user":"precsim","ver":[1,15,0]}, | |
"fields":["type","id","ui_arg","fcn_type","fcn_oarg"], | |
"data":[ | |
["uipushtool","Standard.NewFigure",[],"ClickedCallback",[]], | |
["uicontrol","button_dlgnew_ok",[],"Callback",[]], | |
["uimenu",["Geometry","Create Object...","Rectangle"],[],"Callback",[]], | |
["uicontrol","button_dlggobj_ok",[],"Callback",[]], | |
["uimenu",["Geometry","Create Object...","Rectangle"],[],"Callback",[]], | |
["uicontrol","edit_x_min","1","Callback",[]], | |
["uicontrol","edit_x_max","2","Callback",[]], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [ fea ] = featool_solver_hook_example() | |
%FEATOOL_SOLVER_HOOK_EXAMPLE | |
% | |
% Solver hook example to add a constraint that sum(ci_j) = 0 for two | |
% dependent variables c1 and c2 (and j is the nodes/degrees of freedom). | |
% Copyright 2021 Precise Simulation, Ltd. | |
% Geometry and grid. | |
fea.sdim = { 'x', 'y' }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% 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)']; |