Skip to content

Commit 47803d8

Browse files
authored
Merge pull request #143 from barbagroup/develop
Releasing version 0.4.0
2 parents 1501655 + a20b7fc commit 47803d8

File tree

285 files changed

+19660
-17193
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

285 files changed

+19660
-17193
lines changed

.clang-format

+113
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
---
2+
Language: Cpp
3+
# BasedOnStyle: Google
4+
AccessModifierOffset: -4
5+
AlignAfterOpenBracket: Align
6+
AlignConsecutiveAssignments: false
7+
AlignConsecutiveDeclarations: false
8+
AlignEscapedNewlines: Left
9+
AlignOperands: true
10+
AlignTrailingComments: true
11+
AllowAllParametersOfDeclarationOnNextLine: true
12+
AllowShortBlocksOnASingleLine: false
13+
AllowShortCaseLabelsOnASingleLine: false
14+
AllowShortFunctionsOnASingleLine: All
15+
AllowShortIfStatementsOnASingleLine: true
16+
AllowShortLoopsOnASingleLine: true
17+
AlwaysBreakAfterDefinitionReturnType: None
18+
AlwaysBreakAfterReturnType: None
19+
AlwaysBreakBeforeMultilineStrings: true
20+
AlwaysBreakTemplateDeclarations: true
21+
BinPackArguments: true
22+
BinPackParameters: true
23+
BraceWrapping:
24+
AfterClass: false
25+
AfterControlStatement: false
26+
AfterEnum: false
27+
AfterFunction: false
28+
AfterNamespace: false
29+
AfterObjCDeclaration: false
30+
AfterStruct: false
31+
AfterUnion: false
32+
AfterExternBlock: false
33+
BeforeCatch: false
34+
BeforeElse: false
35+
IndentBraces: false
36+
SplitEmptyFunction: true
37+
SplitEmptyRecord: true
38+
SplitEmptyNamespace: true
39+
BreakBeforeBinaryOperators: None
40+
BreakBeforeBraces: Allman
41+
BreakBeforeInheritanceComma: false
42+
BreakBeforeTernaryOperators: true
43+
BreakConstructorInitializersBeforeComma: false
44+
BreakConstructorInitializers: BeforeColon
45+
BreakAfterJavaFieldAnnotations: false
46+
BreakStringLiterals: true
47+
ColumnLimit: 80
48+
CommentPragmas: '^ IWYU pragma:'
49+
CompactNamespaces: false
50+
ConstructorInitializerAllOnOneLineOrOnePerLine: true
51+
ConstructorInitializerIndentWidth: 4
52+
ContinuationIndentWidth: 4
53+
Cpp11BracedListStyle: true
54+
DerivePointerAlignment: true
55+
DisableFormat: false
56+
ExperimentalAutoDetectBinPacking: false
57+
FixNamespaceComments: true
58+
ForEachMacros:
59+
- foreach
60+
- Q_FOREACH
61+
- BOOST_FOREACH
62+
IncludeBlocks: Preserve
63+
IncludeCategories:
64+
- Regex: '^<ext/.*\.h>'
65+
Priority: 2
66+
- Regex: '^<.*\.h>'
67+
Priority: 1
68+
- Regex: '^<.*'
69+
Priority: 2
70+
- Regex: '.*'
71+
Priority: 3
72+
IncludeIsMainRegex: '([-_](test|unittest))?$'
73+
IndentCaseLabels: true
74+
IndentPPDirectives: None
75+
IndentWidth: 4
76+
IndentWrappedFunctionNames: false
77+
JavaScriptQuotes: Leave
78+
JavaScriptWrapImports: true
79+
KeepEmptyLinesAtTheStartOfBlocks: false
80+
MacroBlockBegin: ''
81+
MacroBlockEnd: ''
82+
MaxEmptyLinesToKeep: 1
83+
NamespaceIndentation: None
84+
ObjCBlockIndentWidth: 2
85+
ObjCSpaceAfterProperty: false
86+
ObjCSpaceBeforeProtocolList: true
87+
PenaltyBreakAssignment: 2
88+
PenaltyBreakBeforeFirstCallParameter: 1
89+
PenaltyBreakComment: 300
90+
PenaltyBreakFirstLessLess: 120
91+
PenaltyBreakString: 1000
92+
PenaltyExcessCharacter: 1000000
93+
PenaltyReturnTypeOnItsOwnLine: 200
94+
PointerAlignment: Left
95+
ReflowComments: true
96+
SortIncludes: true
97+
SortUsingDeclarations: true
98+
SpaceAfterCStyleCast: false
99+
SpaceAfterTemplateKeyword: true
100+
SpaceBeforeAssignmentOperators: true
101+
SpaceBeforeParens: ControlStatements
102+
SpaceInEmptyParentheses: false
103+
SpacesBeforeTrailingComments: 2
104+
SpacesInAngles: false
105+
SpacesInContainerLiterals: true
106+
SpacesInCStyleCastParentheses: false
107+
SpacesInParentheses: false
108+
SpacesInSquareBrackets: false
109+
Standard: Auto
110+
TabWidth: 4
111+
UseTab: Never
112+
...
113+

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@ doc/doxygen_sqlite3.db
1313

1414
# Ignore debugging info files generated by Apple's Xcode
1515
*.dSYM
16+
17+
# Ignore VSCode configuration
18+
.vscode

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ script:
3030
- cd $PETIBM_DIR
3131
- mkdir build
3232
- cd build
33-
- $PETIBM_DIR/configure --prefix=$PETIBM_DIR/install CXX=$PETSC_DIR/$PETSC_ARCH/bin/mpicxx CXXFLAGS="-g -O0 -Wno-deprecated -std=c++11" --with-petsc-dir=$PETSC_DIR --with-petsc-arch=$PETSC_ARCH --enable-yamlcpp --enable-boost --enable-gtest
33+
- $PETIBM_DIR/configure --prefix=$PETIBM_DIR/install CXX=$PETSC_DIR/$PETSC_ARCH/bin/mpicxx CXXFLAGS="-g -O0 -Wno-deprecated -std=c++11" --with-petsc-dir=$PETSC_DIR --with-petsc-arch=$PETSC_ARCH --enable-yamlcpp --enable-gtest
3434
- make all -j2
3535
- make check
3636
- make install

CHANGELOG.md

+32-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,37 @@
22

33
---
44

5+
## 0.4.0
6+
7+
---
8+
9+
### Added
10+
11+
* Add possibility to use configuration arguments `--with-<package>-include=<path>` and `--with-<package>-lib=<path>` (instead of `--with-<package>-dir=<path>`) for yaml-cpp, gtest, AmgX, and AmgXWrapper. (`--with-<package>-dir=<path>` is still supported for those packages.)
12+
* Add classes to monitor the solution in sub-regions or at specific points (using linear interpolation). YAML configuration should be provided in the node "probes". (See Markdown documentation `doc/markdowns/inputs.md` for details on how to use.)
13+
* Install application header files upon make install call. The header files are installed in the include folder of the install directory. A user can now create new classes that inherits from an application class.
14+
* Add a simple class `RigidKinematicsSolver` in the applications folder to handle cases with moving rigid bodies (with prescribed kinematics). The user should create a class that inherits from `RigidKinematcsSolver` and that implements the methods to update the coordinates and velocity of the Lagrangian points, `setCoordinatesBodies` and `setVelocityBodies`.) For example, if you want to compute the flow around a flapping wing, you just have to create a class (outside the PetIBM source directory) that inherits from the application class `RigidKinematicsSolver` and implement the case-specific methods to update the location and velocity of the wing.
15+
* Add possibility to implement different kernels for the regularized delta function. (The 3-point delta function from Roma et al. (1999) and the 4-point delta function from Peskin (2002) are currently available in PetIBM.)
16+
17+
### Changed
18+
19+
* Upgrade to yaml-cpp-0.6.2 when downloading building yaml-cpp at PetIBM configuration time (configuration flag `--enable-yamlcpp`).
20+
* Re-format code with clang-format. The clang-format style file is added to the repository.
21+
* Re-write I/O functions to provide file paths that include the extension.
22+
* Re-write application codes to simplify main functions (move PetIBM object instantiations into the init method of the application class).
23+
* Change the scheme for the prediction of the forces at the beginning of a time step. Now using the forces from the previous time steps as prediction. (This is named "scheme 2" in Li et al., 2016.) Using this scheme avoids having to reset the vector of the Lagrangian momentum forcing every time step. (According to the authors there is little difference in the results between the different forcing schemes.)
24+
* For each example, move the configuration files for the solvers into the sub-folder `config` of the simulation directory.
25+
* Update the example for the 2D in-line oscillating cylinder to use the newly implemented application class `RigidKinematicsSolver`.
26+
27+
### Fixed
28+
29+
30+
### Removed
31+
32+
* Remove Boost dependency; configuration does not check for Boost anymore.
33+
34+
---
35+
536
## 0.3.1
637

738
---
@@ -97,4 +128,4 @@ WARNING: this is a major re-factorization of the code that is not backward compa
97128
### Removed
98129

99130
* Python script `restartFromSolution.py` (not finished and not necessary).
100-
* Non-zero initial guess as default for KSPs; the user should add `-ksp_initial_guess_nonzero true` to the command-line (or configuration file) to switch on a nonzero initial for a specific KSP.
131+
* Non-zero initial guess as default for KSPs; the user should add `-ksp_initial_guess_nonzero true` to the command-line (or configuration file) to switch on a nonzero initial for a specific KSP.

Makefile.in

+4-8
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ subdir = .
9191
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
9292
am__aclocal_m4_deps = $(top_srcdir)/m4/configure_amgx.m4 \
9393
$(top_srcdir)/m4/configure_amgxwrapper.m4 \
94-
$(top_srcdir)/m4/configure_boost.m4 \
9594
$(top_srcdir)/m4/configure_cuda.m4 \
9695
$(top_srcdir)/m4/configure_gtest.m4 \
9796
$(top_srcdir)/m4/configure_petsc.m4 \
@@ -219,26 +218,25 @@ am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
219218
distcleancheck_listfiles = find . -type f -print
220219
ACLOCAL = @ACLOCAL@
221220
AMGXWRAPPER_CPPFLAGS = @AMGXWRAPPER_CPPFLAGS@
222-
AMGXWRAPPER_DIR = @AMGXWRAPPER_DIR@
223221
AMGXWRAPPER_LDFLAGS = @AMGXWRAPPER_LDFLAGS@
224222
AMGXWRAPPER_LIBS = @AMGXWRAPPER_LIBS@
225-
AMGX_DIR = @AMGX_DIR@
223+
AMGX_CPPFLAGS = @AMGX_CPPFLAGS@
224+
AMGX_LDFLAGS = @AMGX_LDFLAGS@
226225
AMTAR = @AMTAR@
227226
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
228227
AR = @AR@
229228
AUTOCONF = @AUTOCONF@
230229
AUTOHEADER = @AUTOHEADER@
231230
AUTOMAKE = @AUTOMAKE@
232231
AWK = @AWK@
233-
BOOST_CPPFLAGS = @BOOST_CPPFLAGS@
234-
BOOST_DIR = @BOOST_DIR@
235232
BUILDDIR = @BUILDDIR@
236233
CC = @CC@
237234
CCDEPMODE = @CCDEPMODE@
238235
CFLAGS = @CFLAGS@
239236
CPP = @CPP@
240237
CPPFLAGS = @CPPFLAGS@
241-
CUDA_DIR = @CUDA_DIR@
238+
CUDA_CPPFLAGS = @CUDA_CPPFLAGS@
239+
CUDA_LDFLAGS = @CUDA_LDFLAGS@
242240
CXX = @CXX@
243241
CXXCPP = @CXXCPP@
244242
CXXDEPMODE = @CXXDEPMODE@
@@ -257,7 +255,6 @@ EXEEXT = @EXEEXT@
257255
FGREP = @FGREP@
258256
GREP = @GREP@
259257
GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
260-
GTEST_DIR = @GTEST_DIR@
261258
GTEST_LDFLAGS = @GTEST_LDFLAGS@
262259
GTEST_LIBS = @GTEST_LIBS@
263260
INSTALL = @INSTALL@
@@ -300,7 +297,6 @@ SHELL = @SHELL@
300297
STRIP = @STRIP@
301298
VERSION = @VERSION@
302299
YAMLCPP_CPPFLAGS = @YAMLCPP_CPPFLAGS@
303-
YAMLCPP_DIR = @YAMLCPP_DIR@
304300
YAMLCPP_LDFLAGS = @YAMLCPP_LDFLAGS@
305301
YAMLCPP_LIBS = @YAMLCPP_LIBS@
306302
abs_builddir = @abs_builddir@

aclocal.m4

-1
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,6 @@ AC_SUBST([am__untar])
11881188

11891189
m4_include([m4/configure_amgx.m4])
11901190
m4_include([m4/configure_amgxwrapper.m4])
1191-
m4_include([m4/configure_boost.m4])
11921191
m4_include([m4/configure_cuda.m4])
11931192
m4_include([m4/configure_gtest.m4])
11941193
m4_include([m4/configure_petsc.m4])

applications/Makefile.am

+40-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,43 @@ SUBDIRS = \
33
ibpm \
44
decoupledibpm \
55
vorticity \
6-
createxdmf
6+
createxdmf \
7+
writemesh
8+
9+
lib_LTLIBRARIES = libpetibmapps.la
10+
11+
libpetibmapps_la_SOURCES = \
12+
navierstokes/navierstokes.cpp \
13+
ibpm/ibpm.cpp \
14+
decoupledibpm/decoupledibpm.cpp \
15+
rigidkinematics/rigidkinematics.cpp
16+
17+
libpetibmapps_la_CPPFLAGS = \
18+
-I$(top_srcdir)/include \
19+
navierstokes \
20+
ibpm \
21+
decoupledibpm \
22+
rigidkinematics \
23+
$(PETSC_CPPFLAGS) \
24+
$(YAMLCPP_CPPFLAGS)
25+
26+
libpetibmapps_la_LIBADD = \
27+
$(top_builddir)/src/libpetibm.la \
28+
$(PETSC_LDFLAGS) $(PETSC_LIBS) \
29+
$(YAMLCPP_LDFLAGS) $(YAMLCPP_LIBS)
30+
31+
if WITH_AMGX
32+
libpetibmapps_la_LIBADD += $(AMGXWRAPPER_LDFLAGS) $(AMGXWRAPPER_LIBS)
33+
endif
34+
35+
navierstokesincludedir = $(includedir)/petibm/navierstokes
36+
navierstokesinclude_HEADERS = navierstokes/navierstokes.h
37+
38+
ibpmincludedir = $(includedir)/petibm/ibpm
39+
ibpminclude_HEADERS = ibpm/ibpm.h
40+
41+
decoupledibpmincludedir = $(includedir)/petibm/decoupledibpm
42+
decoupledibpminclude_HEADERS = decoupledibpm/decoupledibpm.h
43+
44+
rigidkinematicsincludedir = $(includedir)/petibm/rigidkinematics
45+
rigidkinematicsinclude_HEADERS = rigidkinematics/rigidkinematics.h

0 commit comments

Comments
 (0)