summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--global.mk2
-rw-r--r--src/contrib/MakeHeader21
-rw-r--r--src/contrib/contrib2D.h38
-rw-r--r--src/contrib/contrib2D.hh25
-rw-r--r--src/contrib/module.mk (renamed from src/refinement/module.mk)0
-rw-r--r--src/contrib/refinement/MakeHeader (renamed from src/refinement/MakeHeader)0
-rw-r--r--src/contrib/refinement/coupler2D.cpp (renamed from src/refinement/coupler2D.cpp)0
-rw-r--r--src/contrib/refinement/coupler2D.h (renamed from src/refinement/coupler2D.h)0
-rw-r--r--src/contrib/refinement/coupler2D.hh (renamed from src/refinement/coupler2D.hh)10
-rw-r--r--src/contrib/refinement/grid2D.cpp (renamed from src/refinement/grid2D.cpp)0
-rw-r--r--src/contrib/refinement/grid2D.h (renamed from src/refinement/grid2D.h)0
-rw-r--r--src/contrib/refinement/grid2D.hh (renamed from src/refinement/grid2D.hh)0
-rw-r--r--src/contrib/refinement/module.mk27
-rw-r--r--src/contrib/refinement/refinement2D.h (renamed from src/refinement/refinement2D.h)0
-rw-r--r--src/contrib/refinement/refinement2D.hh (renamed from src/refinement/refinement2D.hh)0
-rw-r--r--src/olb2D.h1
-rw-r--r--src/olb2D.hh1
17 files changed, 123 insertions, 2 deletions
diff --git a/global.mk b/global.mk
index e2e8329..79cedc9 100644
--- a/global.mk
+++ b/global.mk
@@ -71,6 +71,8 @@ LIBS := -l$(LIB) -lz
SUBDIRS := src/boundary \
src/communication \
src/dynamics \
+ src/contrib \
+ src/contrib/functors \
src/core \
src/geometry \
src/external/tinyxml \
diff --git a/src/contrib/MakeHeader b/src/contrib/MakeHeader
new file mode 100644
index 0000000..67c5005
--- /dev/null
+++ b/src/contrib/MakeHeader
@@ -0,0 +1,21 @@
+# This file is part of the OpenLB library
+#
+# Copyright (C) 2007 Mathias Krause
+# E-mail contact: info@openlb.net
+# The most recent release of OpenLB can be downloaded at
+# <http://www.openlb.net/>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with this program; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
diff --git a/src/contrib/contrib2D.h b/src/contrib/contrib2D.h
new file mode 100644
index 0000000..eeb5b79
--- /dev/null
+++ b/src/contrib/contrib2D.h
@@ -0,0 +1,38 @@
+/* This file is part of the OpenLB library
+ *
+ * Copyright (C) 2007 the OpenLB project
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+*/
+
+/** \file
+ * Groups all the 2D include files in the contrib directory.
+ */
+
+#include "advectionDiffusionVelocityCouplingPostProcessor2D.h"
+#include "HerschelBulkleyBGKdynamics.h"
+//#include "movingBoundaryBGKdynamics.h"
+//#include "movingBoundaryFunctors.h"
+#include "keepIncomingBoundary2D.h"
+#include "keepIncomingDynamics.h"
+//#include "straightBouzidiBoundary2D.h"
+//#include "straightBouzidiDynamics.h"
+#include "entropicLatticeDescriptors.h"
+#include "optEntropicDynamics.h"
+#include "shanLatticeDescriptors.h"
+#include "SmagorinskyHerschelBulkleyPorousBGKdynamics.h"
+//#include "graphLoadBalancer.h"
+#include "refinement/refinement2D.h"
diff --git a/src/contrib/contrib2D.hh b/src/contrib/contrib2D.hh
new file mode 100644
index 0000000..00f6c20
--- /dev/null
+++ b/src/contrib/contrib2D.hh
@@ -0,0 +1,25 @@
+/* This file is part of the OpenLB library
+ *
+ * Copyright (C) 2007 the OpenLB project
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+*/
+
+/** \file
+ * Groups all the generic 2D template files in the contrib directory.
+ */
+
+#include "refinement/refinement2D.hh"
diff --git a/src/refinement/module.mk b/src/contrib/module.mk
index 6e42e3e..6e42e3e 100644
--- a/src/refinement/module.mk
+++ b/src/contrib/module.mk
diff --git a/src/refinement/MakeHeader b/src/contrib/refinement/MakeHeader
index bfcbf33..bfcbf33 100644
--- a/src/refinement/MakeHeader
+++ b/src/contrib/refinement/MakeHeader
diff --git a/src/refinement/coupler2D.cpp b/src/contrib/refinement/coupler2D.cpp
index 733d7c9..733d7c9 100644
--- a/src/refinement/coupler2D.cpp
+++ b/src/contrib/refinement/coupler2D.cpp
diff --git a/src/refinement/coupler2D.h b/src/contrib/refinement/coupler2D.h
index 9b310b7..9b310b7 100644
--- a/src/refinement/coupler2D.h
+++ b/src/contrib/refinement/coupler2D.h
diff --git a/src/refinement/coupler2D.hh b/src/contrib/refinement/coupler2D.hh
index 800986d..4c8b424 100644
--- a/src/refinement/coupler2D.hh
+++ b/src/contrib/refinement/coupler2D.hh
@@ -109,7 +109,9 @@ void FineCoupler2D<T,DESCRIPTOR>::store()
{
auto& coarseLattice = this->_coarse.getSuperLattice();
+#ifdef PARALLEL_MODE_OMP
#pragma omp parallel for
+#endif
for (int y=0; y < this->_coarseSize; ++y) {
const auto pos = this->getCoarseLatticeR(y);
T rho{};
@@ -161,7 +163,9 @@ void FineCoupler2D<T,DESCRIPTOR>::interpolate()
{
auto& coarseLattice = this->_coarse.getSuperLattice();
+#ifdef PARALLEL_MODE_OMP
#pragma omp parallel for
+#endif
for (int y=0; y < this->_coarseSize; ++y) {
Cell<T,DESCRIPTOR> coarseCell;
coarseLattice.get(this->getCoarseLatticeR(y), coarseCell);
@@ -186,7 +190,9 @@ void FineCoupler2D<T,DESCRIPTOR>::couple()
const auto& coarseLattice = this->_coarse.getSuperLattice();
auto& fineLattice = this->_fine.getSuperLattice();
+#ifdef PARALLEL_MODE_OMP
#pragma omp parallel for
+#endif
for (int y=0; y < this->_coarseSize; ++y) {
const auto& coarsePos = this->getCoarseLatticeR(y);
const auto& finePos = this->getFineLatticeR(2*y);
@@ -204,7 +210,9 @@ void FineCoupler2D<T,DESCRIPTOR>::couple()
fineLattice.set(finePos, cell);
}
+#ifdef PARALLEL_MODE_OMP
#pragma omp parallel for
+#endif
for (int y=1; y < this->_coarseSize-2; ++y) {
const auto rho = order4interpolation(_c2f_rho, y);
const auto u = order4interpolation(_c2f_u, y);
@@ -309,7 +317,9 @@ void CoarseCoupler2D<T,DESCRIPTOR>::couple()
const auto& fineLattice = this->_fine.getSuperLattice();
auto& coarseLattice = this->_coarse.getSuperLattice();
+#ifdef PARALLEL_MODE_OMP
#pragma omp parallel for
+#endif
for (int y=0; y < this->_coarseSize; ++y) {
const auto& finePos = this->getFineLatticeR(2*y);
const auto& coarsePos = this->getCoarseLatticeR(y);
diff --git a/src/refinement/grid2D.cpp b/src/contrib/refinement/grid2D.cpp
index 4472fc7..4472fc7 100644
--- a/src/refinement/grid2D.cpp
+++ b/src/contrib/refinement/grid2D.cpp
diff --git a/src/refinement/grid2D.h b/src/contrib/refinement/grid2D.h
index 51d19ce..51d19ce 100644
--- a/src/refinement/grid2D.h
+++ b/src/contrib/refinement/grid2D.h
diff --git a/src/refinement/grid2D.hh b/src/contrib/refinement/grid2D.hh
index d4310e5..d4310e5 100644
--- a/src/refinement/grid2D.hh
+++ b/src/contrib/refinement/grid2D.hh
diff --git a/src/contrib/refinement/module.mk b/src/contrib/refinement/module.mk
new file mode 100644
index 0000000..6e42e3e
--- /dev/null
+++ b/src/contrib/refinement/module.mk
@@ -0,0 +1,27 @@
+# This file is part of the OpenLB library
+#
+# Copyright (C) 2017 Markus Mohrhard
+# E-mail contact: info@openlb.net
+# The most recent release of OpenLB can be downloaded at
+# <http://www.openlb.net/>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with this program; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+current_dir := $(dir $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)))
+
+include $(addsuffix /MakeHeader, $(current_dir))
+
+LIB_OBJECTS += $(foreach file, $($(BUILDTYPE)), $(OBJDIR)/$(current_dir)$(file).o)
diff --git a/src/refinement/refinement2D.h b/src/contrib/refinement/refinement2D.h
index 2dc726d..2dc726d 100644
--- a/src/refinement/refinement2D.h
+++ b/src/contrib/refinement/refinement2D.h
diff --git a/src/refinement/refinement2D.hh b/src/contrib/refinement/refinement2D.hh
index b21af48..b21af48 100644
--- a/src/refinement/refinement2D.hh
+++ b/src/contrib/refinement/refinement2D.hh
diff --git a/src/olb2D.h b/src/olb2D.h
index a5d72df..1f2caa1 100644
--- a/src/olb2D.h
+++ b/src/olb2D.h
@@ -7,4 +7,3 @@
#include <io/io2D.h>
#include <utilities/utilities2D.h>
#include <particles/hlbm/hlbmDynamics2D.h>
-#include <refinement/refinement2D.h>
diff --git a/src/olb2D.hh b/src/olb2D.hh
index 77189a9..481ab5b 100644
--- a/src/olb2D.hh
+++ b/src/olb2D.hh
@@ -7,4 +7,3 @@
#include <io/io2D.hh>
#include <utilities/utilities2D.hh>
#include <particles/hlbm/hlbmDynamics2D.hh>
-#include <refinement/refinement2D.hh>