-
-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a perpendicular-flap tutorial case for Dune #239
Changes from 1 commit
0cc4752
9c45a19
5058082
5845086
5d8977a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
## Setup | ||
|
||
The solid-dune participant consists of the following files: | ||
|
||
* Dune module containing the files to build the tutorial | ||
* A file to run the tutorial | ||
* A cleanup file to delete the precice and paraview output | ||
* The mesh file containing the grid of the solid participant | ||
|
||
The Dune module depends on the Dune core modules, the Dune-preCICE adapter and | ||
on Dune-elastodynamics providing the necessary tools for structural simulation. | ||
|
||
It can be found here: | ||
https://github.com/maxfirmbach/dune-elastodynamics | ||
|
||
The Dune module can be build with: | ||
`<path-to-dune-common/bin/dunecontrol> --current all` | ||
|
||
The generated executable file solid-duneis found in: | ||
`dune-perpendicular-flap/build-cmake/src/` | ||
|
||
and needs to be copied to the solid-dune folder. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
$MeshFormat | ||
2.2 0 8 | ||
$EndMeshFormat | ||
$Nodes | ||
64 | ||
1 -0.05 0 -0.5 | ||
2 -0.05 1 -0.5 | ||
3 0.05 1 -0.5 | ||
4 0.05 0 -0.5 | ||
5 -0.05 0.0666666666665325 -0.5 | ||
6 -0.05 0.1333333333330848 -0.5 | ||
7 -0.05 0.1999999999995569 -0.5 | ||
8 -0.05 0.266666666666029 -0.5 | ||
9 -0.05 0.3333333333325011 -0.5 | ||
10 -0.05 0.3999999999989731 -0.5 | ||
11 -0.05 0.4666666666654452 -0.5 | ||
12 -0.05 0.5333333333321025 -0.5 | ||
13 -0.05 0.599999999998945 -0.5 | ||
14 -0.05 0.6666666666657876 -0.5 | ||
15 -0.05 0.73333333333263 -0.5 | ||
16 -0.05 0.7999999999994725 -0.5 | ||
17 -0.05 0.8666666666663151 -0.5 | ||
18 -0.05 0.9333333333331575 -0.5 | ||
19 -0.0166666666667507 1 -0.5 | ||
20 0.01666666666657628 1 -0.5 | ||
21 0.05 0.9333333333330558 -0.5 | ||
22 0.05 0.866666666666204 -0.5 | ||
23 0.05 0.8 -0.5 | ||
24 0.05 0.7333333333337959 -0.5 | ||
25 0.05 0.6666666666675918 -0.5 | ||
26 0.05 0.6000000000013874 -0.5 | ||
27 0.05 0.5333333333351832 -0.5 | ||
28 0.05 0.466666666668609 -0.5 | ||
29 0.05 0.4000000000016649 -0.5 | ||
30 0.05 0.3333333333347207 -0.5 | ||
31 0.05 0.2666666666677765 -0.5 | ||
32 0.05 0.2000000000008324 -0.5 | ||
33 0.05 0.1333333333338883 -0.5 | ||
34 0.05 0.06666666666694399 -0.5 | ||
35 0.0166666666667507 0 -0.5 | ||
36 -0.01666666666657628 0 -0.5 | ||
37 -0.0166666666665879 0.06666666666666968 -0.5 | ||
38 0.01666666666673907 0.06666666666680683 -0.5 | ||
39 -0.01666666666659953 0.1333333333333527 -0.5 | ||
40 0.01666666666672744 0.1333333333336205 -0.5 | ||
41 -0.01666666666661116 0.1999999999999821 -0.5 | ||
42 0.01666666666671581 0.2000000000004072 -0.5 | ||
43 -0.01666666666662279 0.2666666666666115 -0.5 | ||
44 0.01666666666670419 0.266666666667194 -0.5 | ||
45 -0.01666666666663442 0.333333333333241 -0.5 | ||
46 0.01666666666669255 0.3333333333339808 -0.5 | ||
47 -0.01666666666664605 0.3999999999998704 -0.5 | ||
48 0.01666666666668092 0.4000000000007675 -0.5 | ||
49 -0.01666666666665767 0.4666666666664998 -0.5 | ||
50 0.01666666666666931 0.4666666666675544 -0.5 | ||
51 -0.01666666666666929 0.5333333333331293 -0.5 | ||
52 0.01666666666665767 0.5333333333341564 -0.5 | ||
53 -0.01666666666668093 0.5999999999997592 -0.5 | ||
54 0.01666666666664605 0.6000000000005733 -0.5 | ||
55 -0.01666666666669255 0.666666666666389 -0.5 | ||
56 0.01666666666663442 0.6666666666669904 -0.5 | ||
57 -0.01666666666670419 0.7333333333330185 -0.5 | ||
58 0.0166666666666228 0.7333333333334071 -0.5 | ||
59 -0.01666666666671581 0.7999999999996483 -0.5 | ||
60 0.01666666666661116 0.7999999999998242 -0.5 | ||
61 -0.01666666666672744 0.8666666666662781 -0.5 | ||
62 0.01666666666659953 0.8666666666662408 -0.5 | ||
63 -0.01666666666673907 0.9333333333331235 -0.5 | ||
64 0.0166666666665879 0.9333333333330895 -0.5 | ||
$EndNodes | ||
$Elements | ||
81 | ||
1 1 2 3 1 1 5 | ||
2 1 2 3 1 5 6 | ||
3 1 2 3 1 6 7 | ||
4 1 2 3 1 7 8 | ||
5 1 2 3 1 8 9 | ||
6 1 2 3 1 9 10 | ||
7 1 2 3 1 10 11 | ||
8 1 2 3 1 11 12 | ||
9 1 2 3 1 12 13 | ||
10 1 2 3 1 13 14 | ||
11 1 2 3 1 14 15 | ||
12 1 2 3 1 15 16 | ||
13 1 2 3 1 16 17 | ||
14 1 2 3 1 17 18 | ||
15 1 2 3 1 18 2 | ||
16 1 2 3 2 2 19 | ||
17 1 2 3 2 19 20 | ||
18 1 2 3 2 20 3 | ||
19 1 2 3 3 3 21 | ||
20 1 2 3 3 21 22 | ||
21 1 2 3 3 22 23 | ||
22 1 2 3 3 23 24 | ||
23 1 2 3 3 24 25 | ||
24 1 2 3 3 25 26 | ||
25 1 2 3 3 26 27 | ||
26 1 2 3 3 27 28 | ||
27 1 2 3 3 28 29 | ||
28 1 2 3 3 29 30 | ||
29 1 2 3 3 30 31 | ||
30 1 2 3 3 31 32 | ||
31 1 2 3 3 32 33 | ||
32 1 2 3 3 33 34 | ||
33 1 2 3 3 34 4 | ||
34 1 2 1 4 4 35 | ||
35 1 2 1 4 35 36 | ||
36 1 2 1 4 36 1 | ||
37 3 2 1 1 1 5 37 36 | ||
38 3 2 1 1 36 37 38 35 | ||
39 3 2 1 1 35 38 34 4 | ||
40 3 2 1 1 5 6 39 37 | ||
41 3 2 1 1 37 39 40 38 | ||
42 3 2 1 1 38 40 33 34 | ||
43 3 2 1 1 6 7 41 39 | ||
44 3 2 1 1 39 41 42 40 | ||
45 3 2 1 1 40 42 32 33 | ||
46 3 2 1 1 7 8 43 41 | ||
47 3 2 1 1 41 43 44 42 | ||
48 3 2 1 1 42 44 31 32 | ||
49 3 2 1 1 8 9 45 43 | ||
50 3 2 1 1 43 45 46 44 | ||
51 3 2 1 1 44 46 30 31 | ||
52 3 2 1 1 9 10 47 45 | ||
53 3 2 1 1 45 47 48 46 | ||
54 3 2 1 1 46 48 29 30 | ||
55 3 2 1 1 10 11 49 47 | ||
56 3 2 1 1 47 49 50 48 | ||
57 3 2 1 1 48 50 28 29 | ||
58 3 2 1 1 11 12 51 49 | ||
59 3 2 1 1 49 51 52 50 | ||
60 3 2 1 1 50 52 27 28 | ||
61 3 2 1 1 12 13 53 51 | ||
62 3 2 1 1 51 53 54 52 | ||
63 3 2 1 1 52 54 26 27 | ||
64 3 2 1 1 13 14 55 53 | ||
65 3 2 1 1 53 55 56 54 | ||
66 3 2 1 1 54 56 25 26 | ||
67 3 2 1 1 14 15 57 55 | ||
68 3 2 1 1 55 57 58 56 | ||
69 3 2 1 1 56 58 24 25 | ||
70 3 2 1 1 15 16 59 57 | ||
71 3 2 1 1 57 59 60 58 | ||
72 3 2 1 1 58 60 23 24 | ||
73 3 2 1 1 16 17 61 59 | ||
74 3 2 1 1 59 61 62 60 | ||
75 3 2 1 1 60 62 22 23 | ||
76 3 2 1 1 17 18 63 61 | ||
77 3 2 1 1 61 63 64 62 | ||
78 3 2 1 1 62 64 21 22 | ||
79 3 2 1 1 18 2 19 63 | ||
80 3 2 1 1 63 19 20 64 | ||
81 3 2 1 1 64 20 3 21 | ||
$EndElements |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh | ||
set -e -u | ||
|
||
. ../../tools/cleaning-tools.sh | ||
|
||
clean_dune . |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
cmake_minimum_required(VERSION 3.13) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This directory ( |
||
project(dune-perpendicular-flap CXX) | ||
|
||
if(NOT (dune-common_DIR OR dune-common_ROOT OR | ||
"${CMAKE_PREFIX_PATH}" MATCHES ".*dune-common.*")) | ||
string(REPLACE ${PROJECT_NAME} dune-common dune-common_DIR | ||
${PROJECT_BINARY_DIR}) | ||
endif() | ||
|
||
#find dune-common and set the module path | ||
find_package(dune-common REQUIRED) | ||
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/modules" | ||
${dune-common_MODULE_PATH}) | ||
|
||
#include the dune macros | ||
include(DuneMacros) | ||
|
||
# start a dune project with information from dune.module | ||
dune_project() | ||
|
||
dune_enable_all_packages() | ||
|
||
add_subdirectory(src) | ||
add_subdirectory(dune) | ||
add_subdirectory(doc) | ||
add_subdirectory(cmake/modules) | ||
|
||
# finalize the dune project, e.g. generating config.h etc. | ||
finalize_dune_project(GENERATE_CONFIG_H_CMAKE) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
Preparing the Sources | ||
========================= | ||
|
||
Additional to the software mentioned in README you'll need the | ||
following programs installed on your system: | ||
|
||
cmake >= 3.13 | ||
|
||
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! |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
set(modules "DunePerpendicularFlapMacros.cmake") | ||
|
||
install(FILES ${modules} DESTINATION ${DUNE_INSTALL_MODULEDIR}) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# File for module specific CMake tests. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* begin dune-perpendicular-flap | ||
put the definitions for config.h specific to | ||
your project here. Everything above will be | ||
overwritten | ||
*/ | ||
|
||
/* begin private */ | ||
/* Name of package */ | ||
#define PACKAGE "@DUNE_MOD_NAME@" | ||
|
||
/* Define to the address where bug reports for this package should be sent. */ | ||
#define PACKAGE_BUGREPORT "@DUNE_MAINTAINER@" | ||
|
||
/* Define to the full name of this package. */ | ||
#define PACKAGE_NAME "@DUNE_MOD_NAME@" | ||
|
||
/* Define to the full name and version of this package. */ | ||
#define PACKAGE_STRING "@DUNE_MOD_NAME@ @DUNE_MOD_VERSION@" | ||
|
||
/* Define to the one symbol short name of this package. */ | ||
#define PACKAGE_TARNAME "@DUNE_MOD_NAME@" | ||
|
||
/* Define to the home page for this package. */ | ||
#define PACKAGE_URL "@DUNE_MOD_URL@" | ||
|
||
/* Define to the version of this package. */ | ||
#define PACKAGE_VERSION "@DUNE_MOD_VERSION@" | ||
|
||
/* end private */ | ||
|
||
/* Define to the version of dune-perpendicular-flap */ | ||
#define DUNE_PERPENDICULAR_FLAP_VERSION "@DUNE_PERPENDICULAR_FLAP_VERSION@" | ||
|
||
/* Define to the major version of dune-perpendicular-flap */ | ||
#define DUNE_PERPENDICULAR_FLAP_VERSION_MAJOR @DUNE_PERPENDICULAR_FLAP_VERSION_MAJOR@ | ||
|
||
/* Define to the minor version of dune-perpendicular-flap */ | ||
#define DUNE_PERPENDICULAR_FLAP_VERSION_MINOR @DUNE_PERPENDICULAR_FLAP_VERSION_MINOR@ | ||
|
||
/* Define to the revision of dune-perpendicular-flap */ | ||
#define DUNE_PERPENDICULAR_FLAP_VERSION_REVISION @DUNE_PERPENDICULAR_FLAP_VERSION_REVISION@ | ||
|
||
/* end dune-perpendicular-flap | ||
Everything below here will be overwritten | ||
*/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
add_subdirectory("doxygen") |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# shortcut for creating the Doxyfile.in and Doxyfile | ||
add_doxygen_target() |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# This file contains local changes to the doxygen configuration | ||
# please use '+=' to add files/directories to the lists | ||
|
||
# The INPUT tag can be used to specify the files and/or directories that contain | ||
# documented source files. You may enter file names like "myfile.cpp" or | ||
# directories like "/usr/src/myproject". Separate the files or directories | ||
# with spaces. | ||
|
||
INPUT += @top_srcdir@/dune/ | ||
# see e.g. dune-grid for the examples of mainpage and modules | ||
# INPUT += @srcdir@/mainpage \ | ||
# @srcdir@/modules | ||
|
||
# The EXCLUDE tag can be used to specify files and/or directories that should | ||
# be excluded from the INPUT source files. This way you can easily exclude a | ||
# subdirectory from a directory tree whose root is specified with the INPUT tag. | ||
|
||
# EXCLUDE += @top_srcdir@/dune/perpendicular-flap/test | ||
|
||
# The EXAMPLE_PATH tag can be used to specify one or more files or | ||
# directories that contain example code fragments that are included (see | ||
# the \include command). | ||
|
||
# EXAMPLE_PATH += @top_srcdir@/src | ||
|
||
# The IMAGE_PATH tag can be used to specify one or more files or | ||
# directories that contain image that are included in the documentation (see | ||
# the \image command). | ||
|
||
# IMAGE_PATH += @top_srcdir@/dune/perpendicular-flap/pics |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
prefix=@prefix@ | ||
exec_prefix=@exec_prefix@ | ||
libdir=@libdir@ | ||
includedir=@includedir@ | ||
CXX=@CXX@ | ||
CC=@CC@ | ||
DEPENDENCIES=@REQUIRES@ | ||
|
||
Name: @PACKAGE_NAME@ | ||
Version: @VERSION@ | ||
Description: dune-perpendicular-flap module | ||
URL: http://dune-project.org/ | ||
Requires: dune-common dune-geometry dune-uggrid dune-grid dune-istl dune-functions dune-elastodynamics dune-precice | ||
Libs: -L${libdir} | ||
Cflags: -I${includedir} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
################################ | ||
# Dune module information file # | ||
################################ | ||
|
||
# Name of the module | ||
Module: dune-perpendicular-flap | ||
Version: 1.0 | ||
Maintainer: [email protected] | ||
# Required build dependencies | ||
Depends: dune-common dune-geometry dune-uggrid dune-grid dune-istl dune-functions dune-elastodynamics dune-precice | ||
# Optional build dependencies | ||
#Suggests: |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
add_subdirectory(perpendicular-flap) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#install headers | ||
install(FILES perpendicular-flap.hh DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dune/perpendicular-flap) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#ifndef DUNE_PERPENDICULAR_FLAP_HH | ||
#define DUNE_PERPENDICULAR_FLAP_HH | ||
|
||
// add your classes here | ||
|
||
#endif // DUNE_PERPENDICULAR_FLAP_HH |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have essentially two places to provide all relevant information: tutorial specific information belong into the tutorial README and the adapter specific information belong onto an adapter webpage (to be created https://github.com/precice/precice.github.io/edit/master/pages/docs/adapters/dune) . I can help with this if you like. However, the participant directory doesn't contain a README.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would appreciate some help ;)