Skip to content

Commit

Permalink
updated acknowledgments, documentation, removed elements
Browse files Browse the repository at this point in the history
  • Loading branch information
arvedes committed Jan 11, 2021
1 parent cafdf34 commit c7b2c2f
Show file tree
Hide file tree
Showing 11 changed files with 43 additions and 419 deletions.
Binary file added EU-ERC.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,9 @@ Pyelmer is published under the [GPLv3 license](https://www.gnu.org/licenses/gpl-

## Acknowledgements

This package was developed in the [Nemocrys project](https://www.researchgate.net/project/NEMOCRYS-Next-Generation-Multiphysical-Models-for-Crystal-Growth-Processes) which is founded by the [European Research Council](https://erc.europa.eu/).
This project has received funding from the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme ([grant agreement No 851768](https://cordis.europa.eu/project/id/851768/)).

![European Union, European Research Council](./EU-ERC.png)

## Contribution

Expand Down
2 changes: 1 addition & 1 deletion pyelmer/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import pyelmer.elements
"""A python interface to Elmer."""
import pyelmer.elmer
import pyelmer.execute
import pyelmer.gmsh_utils
Expand Down
314 changes: 0 additions & 314 deletions pyelmer/elements.py

This file was deleted.

21 changes: 2 additions & 19 deletions pyelmer/elmer.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import yaml


DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'data')
DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'data')


class Simulation:
Expand All @@ -36,22 +36,6 @@ def __init__(self):
}
self.settings = {}

@property
def transient(self):
"""Returns information wether simulation is transient or not.
Returns: bool
"""
try:
if self.settings['Simulation Type'].lower() == 'transient':
return True
else:
return False
except KeyError:
print('Warning: Simulation type not set.')
return False


def write_sif(self, simulation_dir):
"""Write sif file.
Expand Down Expand Up @@ -118,8 +102,7 @@ def write_startinfo(self, simulation_dir):
"""
with open(simulation_dir + '/ELMERSOLVER_STARTINFO', 'w') as f:
f.write('case.sif\n')
f.write('1\n')

f.write('1\n')

def write_boundary_ids(self, simulation_dir):
"""Write yaml-file containing the boundary names and the
Expand Down
7 changes: 4 additions & 3 deletions pyelmer/execute.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"""Utility functions for the execution of ElmerSolver and ElmerGrid."""
import os
import shutil
import subprocess
Expand Down Expand Up @@ -36,7 +37,7 @@ def run_elmer_grid(sim_dir, meshfile, elmergrid=None):


def run_elmer_solver(sim_dir, elmersolver=None):
"""Run ElmerSolver with input file case.sif
"""Run ElmerSolver with input file case.sif.
Args:
sim_dir (str): Simulation directory
Expand All @@ -54,9 +55,9 @@ def run_elmer_solver(sim_dir, elmersolver=None):
with open(sim_dir + '/elmersolver.log', 'w') as f:
subprocess.run(args, cwd=sim_dir, stdout=f, stderr=f)


def run_multicore(count, sim_dirs, meshfiles, elmergrid=None, elmersolver=None):
"""Run multiple instances of ElmerGrid, ElmerSolver on multiple
cores.
"""Run multiple instances of ElmerGrid, ElmerSolver.
Args:
count (int): Number of processes
Expand Down
Loading

0 comments on commit c7b2c2f

Please sign in to comment.