Added a new internal header for implicit solver defines.
authorLukas Tönne <lukas.toenne@gmail.com>
Wed, 10 Sep 2014 12:25:57 +0000 (14:25 +0200)
committerLukas Tönne <lukas.toenne@gmail.com>
Tue, 20 Jan 2015 08:29:58 +0000 (09:29 +0100)
Should become its own intern wrapper library eventually.

source/blender/blenkernel/CMakeLists.txt
source/blender/blenkernel/intern/implicit.c
source/blender/blenkernel/intern/implicit.h [new file with mode: 0644]
source/blender/blenkernel/intern/implicit_eigen.cpp

index b0f6d4502d7c699373458f519b70b4237eb0b649..a560bcc8be045b764a33c811fe797d99073efb16 100644 (file)
@@ -107,9 +107,10 @@ set(SRC
        intern/idprop.c
        intern/image.c
        intern/image_gen.c
-       intern/implicit.c
+        intern/implicit.h
+        intern/implicit.c
        intern/implicit_eigen.cpp
-       intern/ConstrainedConjugateGradient.h # XXX move this to a better place
+        intern/ConstrainedConjugateGradient.h # XXX move this to a better place
        intern/ipo.c
        intern/key.c
        intern/lamp.c
index 4081a600e266a9b805a5c76dbc148336de35347f..4a2cbd51735f98fb6ee13a3f9c765043b7f32e27 100644 (file)
@@ -29,7 +29,7 @@
  *  \ingroup bke
  */
 
-//#define IMPLICIT_SOLVER_BLENDER
+#include "implicit.h"
 
 #ifdef IMPLICIT_SOLVER_BLENDER
 
@@ -50,7 +50,6 @@
 #include "BKE_effect.h"
 #include "BKE_global.h"
 
-
 #ifdef __GNUC__
 #  pragma GCC diagnostic ignored "-Wtype-limits"
 #endif
diff --git a/source/blender/blenkernel/intern/implicit.h b/source/blender/blenkernel/intern/implicit.h
new file mode 100644 (file)
index 0000000..dd12cb9
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * 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.
+ *
+ * The Original Code is Copyright (C) Blender Foundation
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Lukas Toenne
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#ifndef __BKE_IMPLICIT_H__
+#define __BKE_IMPLICIT_H__
+
+/** \file implicit.h
+ *  \ingroup bke
+ */
+
+#define IMPLICIT_SOLVER_EIGEN
+//#define IMPLICIT_SOLVER_BLENDER
+
+#endif
index 7c28c0d8c3360dc3b3e59b1fb8eeeb769832c8d3..e4f1d11a99ab8b418a8f6d1f1b3c2dcc10ddc939 100644 (file)
  *  \ingroup bke
  */
 
-#define IMPLICIT_SOLVER_EIGEN
+#include "implicit.h"
+
+#ifdef IMPLICIT_SOLVER_EIGEN
 
 //#define USE_EIGEN_CORE
 #define USE_EIGEN_CONSTRAINED_CG
 
-#ifdef IMPLICIT_SOLVER_EIGEN
-
 #include <Eigen/Sparse>
 #include <Eigen/src/Core/util/DisableStupidWarnings.h>