Skip to content

Commit

Permalink
Squashed 'core/' changes from 7a0c805..f5520ad
Browse files Browse the repository at this point in the history
f5520ad fix mesh partitioning bug with FF v4.11
b9c7e33 add link to biodeg ui repo in readme
37f42c1 add joss paper to publication list
a1f7abb add joss and license badges to readme

git-subtree-dir: core
git-subtree-split: f5520ad391d376935d9698454bdf72f5f20d1230
  • Loading branch information
mbarzegary committed Dec 5, 2022
1 parent 19746a8 commit 2e5d246
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 5 deletions.
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# BioDeg, a biodegradation and corrosion simulation code for metallic materials

[![DOI](https://joss.theoj.org/papers/10.21105/joss.04281/status.svg)](https://doi.org/10.21105/joss.04281)
[![license: GPL v3](https://img.shields.io/badge/license-GPLv3-blue.svg)](LICENSE)

## About

This repository contains the source code of BioDeg, a code for simulating the biodegradation and corrosion behavior of metallic materials.
This repository contains the source code of BioDeg, a code for simulating the biodegradation and corrosion behavior of metallic materials. A full release of BioDeg, including a graphical user interface (GUI), the computational core (this repository), user manual, theory guide, and preprocessor can be found and downloaded from [this repository](https://github.com/mbarzegary/BioDeg-UI).

<img src="doc/screw_degradation.jpg" width="600" height="auto">
<p>
Expand Down Expand Up @@ -40,6 +43,19 @@ This code has been used in the following publications so far. In scientific work
doi = {10.1177/10943420211045939},
}

@article{Barzegari2022JOSS,
author = {Mojtaba Barzegari and Liesbet Geris},
title = {BioDeg: A finite element software for the simulation of the corrosion and biodegradation process in metallic biomaterials},
journal = {Journal of Open Source Software},
year = {2022},
publisher = {The Open Journal},
volume = {7},
number = {74},
pages = {4281},
doi = {10.21105/joss.04281},
}


## Getting started

The code is implemented in FreeFEM, a domain-specific language for finite element computing. So, a parallel version of FreeFEM should be installed. A proper MPI runtime is required to run parallel FreeFEM (such as OpenMPI or MPICH). The PETSc module should also be installed and linked to FreeFEM (which is usually the default config for installing/compiling FreeFEM). The installation procedure can be found [here](https://doc.freefem.org/introduction/installation.html) for different platforms.
Expand Down
2 changes: 1 addition & 1 deletion src/export.idp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if (exportScaffoldMesh)
phiTemp = phi;
phiTemp[] .*= A.D;

int[int] rst = restrict(SpaceP1, SpaceBackup, n2oGlobal);
int[int] rst = restrict(SpaceP1, SpaceBackup, n2oGlob);

phiG = 0;
for[i, v : rst] phiG[][v] = phiTemp[][i];
Expand Down
4 changes: 2 additions & 2 deletions src/geometry.idp
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ if (mpirank == 0)
print("Partitioning the mesh...")

int[int] n2oOverlap;
int[int] n2oGlobal;
NewMacro MeshN2O() n2oGlobal EndMacro
int[int] n2oGlob;
NewMacro MeshN2O() n2oGlob EndMacro

Mat NS, A;
buildDmesh(Mesh);
Expand Down
2 changes: 1 addition & 1 deletion src/solver.idp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if (doRedistance) // if it is configured to redistance distance function
phiTemp = phi;
phiTemp[] .*= A.D;

int[int] rst = restrict(SpaceP1, SpaceBackup, n2oGlobal);
int[int] rst = restrict(SpaceP1, SpaceBackup, n2oGlob);

phiG = 0;
for[i, v : rst] phiG[][v] = phiTemp[][i];
Expand Down

0 comments on commit 2e5d246

Please sign in to comment.