From 1534fad2510974674c1d7b86ec64ae23d2fd8311 Mon Sep 17 00:00:00 2001 From: Simon Praetorius Date: Mon, 21 Sep 2020 21:26:06 +0200 Subject: [PATCH] add a meaningful readme file --- README | 53 ----------------------------------------------------- README.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 53 deletions(-) delete mode 100644 README create mode 100644 README.md diff --git a/README b/README deleted file mode 100644 index b7f6577..0000000 --- a/README +++ /dev/null @@ -1,53 +0,0 @@ -Preparing the Sources -========================= - -Additional to the software mentioned in README you'll need the -following programs installed on your system: - - cmake >= 2.8.12 - -Getting started ---------------- - -If these preliminaries are met, you should run - - dunecontrol all - -which will find all installed dune modules as well as all dune modules -(not installed) which sources reside in a subdirectory of the current -directory. Note that if dune is not installed properly you will either -have to add the directory where the dunecontrol script resides (probably -./dune-common/bin) to your path or specify the relative path of the script. - -Most probably you'll have to provide additional information to dunecontrol -(e. g. compilers, configure options) and/or make options. - -The most convenient way is to use options files in this case. The files -define four variables: - -CMAKE_FLAGS flags passed to cmake (during configure) - -An example options file might look like this: - -#use this options to configure and make if no other options are given -CMAKE_FLAGS=" \ --DCMAKE_CXX_COMPILER=g++-5 \ --DCMAKE_CXX_FLAGS='-Wall -pedantic' \ --DCMAKE_INSTALL_PREFIX=/install/path" #Force g++-5 and set compiler flags - -If you save this information into example.opts you can pass the opts file to -dunecontrol via the --opts option, e. g. - - dunecontrol --opts=example.opts all - -More info ---------- - -See - - dunecontrol --help - -for further options. - - -The full build system is described in the dune-common/doc/buildsystem (Git version) or under share/doc/dune-common/buildsystem if you installed DUNE! diff --git a/README.md b/README.md new file mode 100644 index 0000000..5d0d773 --- /dev/null +++ b/README.md @@ -0,0 +1,42 @@ +# Dune-Gmsh4 +File reader for the Gmsh MSH file format version 4. + +## Summary +Provides a file reader to read MSH file format version 4. It supports various +grid-creator policies. Higher-order parametrized grids can be read using a +`LagrangeGridCreator`. + +## Usage +Either construct a grid directly +```c++ +#include +#include +#include + +int main() +{ + using namespace Dune; + using Grid = UGGrid<2>; + std::unique_ptr grid = Gmsh4Reader::createGridFromFile("filename.msh"); +} +``` + +or explicitly use a grid-creator +```c++ +#include +#include +#include + +int main() +{ + using namespace Dune; + using Grid = FoamGrid<2,3>; + GridFactory factory; + Gmsh4::LagrangeGridCreator creator{factory}; + Gmsh4Reader reader{creator}; + + reader.read("filename.msh"); + auto grid = factory.createGrid(); +} +``` +Note, the grid-creator itself is a grid-function. \ No newline at end of file -- GitLab