diff --git a/BaseCode/Makefile b/BaseCode/Makefile index 13bdab2..db1b817 100644 --- a/BaseCode/Makefile +++ b/BaseCode/Makefile @@ -3,18 +3,18 @@ # Specify library locations here (add or remove "#" marks to comment/uncomment lines for your platform) # Mac OS X -DDG_INCLUDE_PATH = -DDG_LIBRARY_PATH = -DDG_BLAS_LIBS = -framework Accelerate -DDG_SUITESPARSE_LIBS = -lspqr -lumfpack -lcholmod -lmetis -lcolamd -lccolamd -lcamd -lamd -ltbb -lm -lsuitesparseconfig -DDG_OPENGL_LIBS = -framework OpenGL -framework GLUT +#DDG_INCLUDE_PATH = +#DDG_LIBRARY_PATH = +#DDG_BLAS_LIBS = -framework Accelerate +#DDG_SUITESPARSE_LIBS = -lspqr -lumfpack -lcholmod -lmetis -lcolamd -lccolamd -lcamd -lamd -ltbb -lm -lsuitesparseconfig +#DDG_OPENGL_LIBS = -framework OpenGL -framework GLUT # # Linux -# DDG_INCLUDE_PATH = -# DDG_LIBRARY_PATH = -# DDG_BLAS_LIBS = -llapack -lblas -lgfortran -# DDG_SUITESPARSE_LIBS = -lspqr -lcholmod -lmetis -lcolamd -lccolamd -lcamd -lamd -lm -# DDG_OPENGL_LIBS = -lglut -lGL -lGLU -lX11 +DDG_INCLUDE_PATH = -I/usr/include/suitesparse +DDG_LIBRARY_PATH = +DDG_BLAS_LIBS = -llapack -lblas -lgfortran -lumfpack +DDG_SUITESPARSE_LIBS = -lspqr -lcholmod -lmetis -lcolamd -lccolamd -lcamd -lamd -lm +DDG_OPENGL_LIBS = -lglut -lGL -lGLU -lX11 # # Windows / Cygwin # DDG_INCLUDE_PATH = -I/usr/include/opengl -I/usr/include/suitesparse diff --git a/BaseCode/ddg b/BaseCode/ddg new file mode 100755 index 0000000..331f8af Binary files /dev/null and b/BaseCode/ddg differ diff --git a/BaseCode/include/Camera.h b/BaseCode/include/Camera.h index 8ca662e..0c21bfe 100644 --- a/BaseCode/include/Camera.h +++ b/BaseCode/include/Camera.h @@ -11,14 +11,12 @@ #include "Quaternion.h" -#ifdef __CYGWIN__ -#define GLUT_DISABLE_ATEXIT_HACK -#include -#include -#include -#include -#else +#ifdef __APPLE__ #include +#else +#include +#include +#include #endif namespace DDG diff --git a/BaseCode/include/DenseMatrix.h b/BaseCode/include/DenseMatrix.h index 4932907..4faa31f 100644 --- a/BaseCode/include/DenseMatrix.h +++ b/BaseCode/include/DenseMatrix.h @@ -34,6 +34,7 @@ #include "Types.h" #include +#include namespace DDG { diff --git a/BaseCode/include/Shader.h b/BaseCode/include/Shader.h index cb4c662..f84957f 100644 --- a/BaseCode/include/Shader.h +++ b/BaseCode/include/Shader.h @@ -21,7 +21,13 @@ #ifndef DDG_SHADER_H #define DDG_SHADER_H +#ifdef __APPLE__ #include +#else +#include +#include +#include +#endif #include namespace DDG diff --git a/BaseCode/include/SparseMatrix.h b/BaseCode/include/SparseMatrix.h index 7530d40b..5323530 100644 --- a/BaseCode/include/SparseMatrix.h +++ b/BaseCode/include/SparseMatrix.h @@ -37,6 +37,7 @@ #include #include #include +#include #include "Types.h" namespace DDG diff --git a/BaseCode/include/Viewer.h b/BaseCode/include/Viewer.h index fb13a3e..6d0b77d 100644 --- a/BaseCode/include/Viewer.h +++ b/BaseCode/include/Viewer.h @@ -10,7 +10,13 @@ #ifndef DDG_VIEWER_H #define DDG_VIEWER_H +#ifdef __APPLE__ #include +#else +#include +#include +#include +#endif #include "Mesh.h" #include "Camera.h" #include "Shader.h" diff --git a/BaseCode/src/SparseMatrix.cpp b/BaseCode/src/SparseMatrix.cpp index 61d2358..005afaa 100644 --- a/BaseCode/src/SparseMatrix.cpp +++ b/BaseCode/src/SparseMatrix.cpp @@ -19,8 +19,8 @@ namespace DDG resize( m, n ); double* pr = (double*) cData->x; - UF_long* ir = (UF_long*) cData->i; - UF_long* jc = (UF_long*) cData->p; + SuiteSparse_long* ir = (SuiteSparse_long*) cData->i; + SuiteSparse_long* jc = (SuiteSparse_long*) cData->p; // iterate over columns for( int col = 0; col < n; col++ ) @@ -54,8 +54,8 @@ namespace DDG resize( m, n ); double* pr = (double*) cData->x; - UF_long* ir = (UF_long*) cData->i; - UF_long* jc = (UF_long*) cData->p; + SuiteSparse_long* ir = (SuiteSparse_long*) cData->i; + SuiteSparse_long* jc = (SuiteSparse_long*) cData->p; // iterate over columns for( int col = 0; col < n; col++ ) @@ -199,8 +199,8 @@ namespace DDG int t0 = clock(); cholmod_sparse* Ac = A.to_cholmod(); int n = Ac->nrow; - UF_long* Ap = (UF_long*) Ac->p; - UF_long* Ai = (UF_long*) Ac->i; + SuiteSparse_long* Ap = (SuiteSparse_long*) Ac->p; + SuiteSparse_long* Ai = (SuiteSparse_long*) Ac->i; double* Ax = (double*) Ac->x; void* Symbolic; void* Numeric; diff --git a/BaseCode/src/SparseMatrix.inl b/BaseCode/src/SparseMatrix.inl index 307fc85..4b1cb96 100644 --- a/BaseCode/src/SparseMatrix.inl +++ b/BaseCode/src/SparseMatrix.inl @@ -391,8 +391,8 @@ namespace DDG // build compressed matrix (note that EntryMap stores entries in column-major order) double* pr = (double*) cData->x; - UF_long* ir = (UF_long*) cData->i; - UF_long* jc = (UF_long*) cData->p; + SuiteSparse_long* ir = (SuiteSparse_long*) cData->i; + SuiteSparse_long* jc = (SuiteSparse_long*) cData->p; int i = 0; int j = -1; for( const_iterator e = begin(); @@ -499,8 +499,8 @@ namespace DDG int t0 = clock(); cholmod_sparse* Ac = A.to_cholmod(); int n = Ac->nrow; - UF_long* Ap = (UF_long*) Ac->p; - UF_long* Ai = (UF_long*) Ac->i; + SuiteSparse_long* Ap = (SuiteSparse_long*) Ac->p; + SuiteSparse_long* Ai = (SuiteSparse_long*) Ac->i; double* Ax = (double*) Ac->x; void* Symbolic; void* Numeric; diff --git a/Connection/Makefile b/Connection/Makefile index c26cb53..4bec6b1 100644 --- a/Connection/Makefile +++ b/Connection/Makefile @@ -3,18 +3,18 @@ # Specify library locations here (add or remove "#" marks to comment/uncomment lines for your platform) # Mac OS X -DDG_INCLUDE_PATH = -DDG_LIBRARY_PATH = -DDG_BLAS_LIBS = -framework Accelerate -DDG_SUITESPARSE_LIBS = -lspqr -lumfpack -lcholmod -lmetis -lcolamd -lccolamd -lcamd -lamd -ltbb -lm -lsuitesparseconfig -DDG_OPENGL_LIBS = -framework OpenGL -framework GLUT +#DDG_INCLUDE_PATH = +#DDG_LIBRARY_PATH = +#DDG_BLAS_LIBS = -framework Accelerate +#DDG_SUITESPARSE_LIBS = -lspqr -lumfpack -lcholmod -lmetis -lcolamd -lccolamd -lcamd -lamd -ltbb -lm -lsuitesparseconfig +#DDG_OPENGL_LIBS = -framework OpenGL -framework GLUT # # Linux -# DDG_INCLUDE_PATH = -# DDG_LIBRARY_PATH = -# DDG_BLAS_LIBS = -llapack -lblas -lgfortran -# DDG_SUITESPARSE_LIBS = -lspqr -lcholmod -lmetis -lcolamd -lccolamd -lcamd -lamd -lm -# DDG_OPENGL_LIBS = -lglut -lGL -lGLU -lX11 +DDG_INCLUDE_PATH = -I/usr/include/suitesparse +DDG_LIBRARY_PATH = +DDG_BLAS_LIBS = -llapack -lblas -lgfortran -lumfpack +DDG_SUITESPARSE_LIBS = -lspqr -lcholmod -lmetis -lcolamd -lccolamd -lcamd -lamd -lm +DDG_OPENGL_LIBS = -lglut -lGL -lGLU -lX11 # # Windows / Cygwin # DDG_INCLUDE_PATH = -I/usr/include/opengl -I/usr/include/suitesparse diff --git a/Connection/connection b/Connection/connection new file mode 100755 index 0000000..a1c502e Binary files /dev/null and b/Connection/connection differ diff --git a/Connection/include/Camera.h b/Connection/include/Camera.h index 8ca662e..0c21bfe 100644 --- a/Connection/include/Camera.h +++ b/Connection/include/Camera.h @@ -11,14 +11,12 @@ #include "Quaternion.h" -#ifdef __CYGWIN__ -#define GLUT_DISABLE_ATEXIT_HACK -#include -#include -#include -#include -#else +#ifdef __APPLE__ #include +#else +#include +#include +#include #endif namespace DDG diff --git a/Connection/include/DenseMatrix.h b/Connection/include/DenseMatrix.h index 4932907..4faa31f 100644 --- a/Connection/include/DenseMatrix.h +++ b/Connection/include/DenseMatrix.h @@ -34,6 +34,7 @@ #include "Types.h" #include +#include namespace DDG { diff --git a/Connection/include/Shader.h b/Connection/include/Shader.h index cb4c662..f84957f 100644 --- a/Connection/include/Shader.h +++ b/Connection/include/Shader.h @@ -21,7 +21,13 @@ #ifndef DDG_SHADER_H #define DDG_SHADER_H +#ifdef __APPLE__ #include +#else +#include +#include +#include +#endif #include namespace DDG diff --git a/Connection/include/SparseMatrix.h b/Connection/include/SparseMatrix.h index 7530d40b..5323530 100644 --- a/Connection/include/SparseMatrix.h +++ b/Connection/include/SparseMatrix.h @@ -37,6 +37,7 @@ #include #include #include +#include #include "Types.h" namespace DDG diff --git a/Connection/include/Viewer.h b/Connection/include/Viewer.h index 5a03bbf..6a3c903 100644 --- a/Connection/include/Viewer.h +++ b/Connection/include/Viewer.h @@ -10,7 +10,14 @@ #ifndef DDG_VIEWER_H #define DDG_VIEWER_H +#ifdef __APPLE__ #include +#else +#include +#include +#include +#endif + #include "Mesh.h" #include "Camera.h" #include "Shader.h" diff --git a/Connection/src/SparseMatrix.cpp b/Connection/src/SparseMatrix.cpp index 61d2358..005afaa 100644 --- a/Connection/src/SparseMatrix.cpp +++ b/Connection/src/SparseMatrix.cpp @@ -19,8 +19,8 @@ namespace DDG resize( m, n ); double* pr = (double*) cData->x; - UF_long* ir = (UF_long*) cData->i; - UF_long* jc = (UF_long*) cData->p; + SuiteSparse_long* ir = (SuiteSparse_long*) cData->i; + SuiteSparse_long* jc = (SuiteSparse_long*) cData->p; // iterate over columns for( int col = 0; col < n; col++ ) @@ -54,8 +54,8 @@ namespace DDG resize( m, n ); double* pr = (double*) cData->x; - UF_long* ir = (UF_long*) cData->i; - UF_long* jc = (UF_long*) cData->p; + SuiteSparse_long* ir = (SuiteSparse_long*) cData->i; + SuiteSparse_long* jc = (SuiteSparse_long*) cData->p; // iterate over columns for( int col = 0; col < n; col++ ) @@ -199,8 +199,8 @@ namespace DDG int t0 = clock(); cholmod_sparse* Ac = A.to_cholmod(); int n = Ac->nrow; - UF_long* Ap = (UF_long*) Ac->p; - UF_long* Ai = (UF_long*) Ac->i; + SuiteSparse_long* Ap = (SuiteSparse_long*) Ac->p; + SuiteSparse_long* Ai = (SuiteSparse_long*) Ac->i; double* Ax = (double*) Ac->x; void* Symbolic; void* Numeric; diff --git a/Connection/src/SparseMatrix.inl b/Connection/src/SparseMatrix.inl index 307fc85..4b1cb96 100644 --- a/Connection/src/SparseMatrix.inl +++ b/Connection/src/SparseMatrix.inl @@ -391,8 +391,8 @@ namespace DDG // build compressed matrix (note that EntryMap stores entries in column-major order) double* pr = (double*) cData->x; - UF_long* ir = (UF_long*) cData->i; - UF_long* jc = (UF_long*) cData->p; + SuiteSparse_long* ir = (SuiteSparse_long*) cData->i; + SuiteSparse_long* jc = (SuiteSparse_long*) cData->p; int i = 0; int j = -1; for( const_iterator e = begin(); @@ -499,8 +499,8 @@ namespace DDG int t0 = clock(); cholmod_sparse* Ac = A.to_cholmod(); int n = Ac->nrow; - UF_long* Ap = (UF_long*) Ac->p; - UF_long* Ai = (UF_long*) Ac->i; + SuiteSparse_long* Ap = (SuiteSparse_long*) Ac->p; + SuiteSparse_long* Ai = (SuiteSparse_long*) Ac->i; double* Ax = (double*) Ac->x; void* Symbolic; void* Numeric; diff --git a/Elasticity/Makefile b/Elasticity/Makefile index 6aa464a..79f459f 100644 --- a/Elasticity/Makefile +++ b/Elasticity/Makefile @@ -3,18 +3,18 @@ # Specify library locations here (add or remove "#" marks to comment/uncomment lines for your platform) # Mac OS X -DDG_INCLUDE_PATH = -DDG_LIBRARY_PATH = -DDG_BLAS_LIBS = -framework Accelerate -DDG_SUITESPARSE_LIBS = -lspqr -lumfpack -lcholmod -lmetis -lcolamd -lccolamd -lcamd -lamd -ltbb -lm -lsuitesparseconfig -DDG_OPENGL_LIBS = -framework OpenGL -framework GLUT +#DDG_INCLUDE_PATH = +#DDG_LIBRARY_PATH = +#DDG_BLAS_LIBS = -framework Accelerate +#DDG_SUITESPARSE_LIBS = -lspqr -lumfpack -lcholmod -lmetis -lcolamd -lccolamd -lcamd -lamd -ltbb -lm -lsuitesparseconfig +#DDG_OPENGL_LIBS = -framework OpenGL -framework GLUT # # Linux -# DDG_INCLUDE_PATH = -# DDG_LIBRARY_PATH = -# DDG_BLAS_LIBS = -llapack -lblas -lgfortran -# DDG_SUITESPARSE_LIBS = -lspqr -lcholmod -lmetis -lcolamd -lccolamd -lcamd -lamd -lm -# DDG_OPENGL_LIBS = -lglut -lGL -lGLU -lX11 +DDG_INCLUDE_PATH = -I/usr/include/suitesparse +DDG_LIBRARY_PATH = +DDG_BLAS_LIBS = -llapack -lblas -lgfortran -lumfpack +DDG_SUITESPARSE_LIBS = -lspqr -lcholmod -lmetis -lcolamd -lccolamd -lcamd -lamd -lm +DDG_OPENGL_LIBS = -lglut -lGL -lGLU -lX11 # # Windows / Cygwin # DDG_INCLUDE_PATH = -I/usr/include/opengl -I/usr/include/suitesparse diff --git a/Elasticity/elasticity b/Elasticity/elasticity new file mode 100755 index 0000000..92cd347 Binary files /dev/null and b/Elasticity/elasticity differ diff --git a/Elasticity/include/.Viewer.h.swp b/Elasticity/include/.Viewer.h.swp deleted file mode 100644 index 53c02ba..0000000 Binary files a/Elasticity/include/.Viewer.h.swp and /dev/null differ diff --git a/Elasticity/include/Application.h b/Elasticity/include/Application.h index 63fdd03..bfafc58 100644 --- a/Elasticity/include/Application.h +++ b/Elasticity/include/Application.h @@ -150,7 +150,6 @@ namespace DDG v ++ ) { Complex sum; - Vector pi = v->position; HalfEdgeIter he = v->he; do { diff --git a/Elasticity/include/Camera.h b/Elasticity/include/Camera.h index 8ca662e..0c21bfe 100644 --- a/Elasticity/include/Camera.h +++ b/Elasticity/include/Camera.h @@ -11,14 +11,12 @@ #include "Quaternion.h" -#ifdef __CYGWIN__ -#define GLUT_DISABLE_ATEXIT_HACK -#include -#include -#include -#include -#else +#ifdef __APPLE__ #include +#else +#include +#include +#include #endif namespace DDG diff --git a/Elasticity/include/DenseMatrix.h b/Elasticity/include/DenseMatrix.h index 4932907..4faa31f 100644 --- a/Elasticity/include/DenseMatrix.h +++ b/Elasticity/include/DenseMatrix.h @@ -34,6 +34,7 @@ #include "Types.h" #include +#include namespace DDG { diff --git a/Elasticity/include/Shader.h b/Elasticity/include/Shader.h index cb4c662..f84957f 100644 --- a/Elasticity/include/Shader.h +++ b/Elasticity/include/Shader.h @@ -21,7 +21,13 @@ #ifndef DDG_SHADER_H #define DDG_SHADER_H +#ifdef __APPLE__ #include +#else +#include +#include +#include +#endif #include namespace DDG diff --git a/Elasticity/include/SparseMatrix.h b/Elasticity/include/SparseMatrix.h index 7530d40b..5323530 100644 --- a/Elasticity/include/SparseMatrix.h +++ b/Elasticity/include/SparseMatrix.h @@ -37,6 +37,7 @@ #include #include #include +#include #include "Types.h" namespace DDG diff --git a/Elasticity/include/Viewer.h b/Elasticity/include/Viewer.h index 20653a3..8e1e90a 100644 --- a/Elasticity/include/Viewer.h +++ b/Elasticity/include/Viewer.h @@ -10,7 +10,14 @@ #ifndef DDG_VIEWER_H #define DDG_VIEWER_H +#ifdef __APPLE__ #include +#else +#include +#include +#include +#endif + #include "Mesh.h" #include "Camera.h" #include "Shader.h" diff --git a/Elasticity/src/SparseMatrix.cpp b/Elasticity/src/SparseMatrix.cpp index 61d2358..005afaa 100644 --- a/Elasticity/src/SparseMatrix.cpp +++ b/Elasticity/src/SparseMatrix.cpp @@ -19,8 +19,8 @@ namespace DDG resize( m, n ); double* pr = (double*) cData->x; - UF_long* ir = (UF_long*) cData->i; - UF_long* jc = (UF_long*) cData->p; + SuiteSparse_long* ir = (SuiteSparse_long*) cData->i; + SuiteSparse_long* jc = (SuiteSparse_long*) cData->p; // iterate over columns for( int col = 0; col < n; col++ ) @@ -54,8 +54,8 @@ namespace DDG resize( m, n ); double* pr = (double*) cData->x; - UF_long* ir = (UF_long*) cData->i; - UF_long* jc = (UF_long*) cData->p; + SuiteSparse_long* ir = (SuiteSparse_long*) cData->i; + SuiteSparse_long* jc = (SuiteSparse_long*) cData->p; // iterate over columns for( int col = 0; col < n; col++ ) @@ -199,8 +199,8 @@ namespace DDG int t0 = clock(); cholmod_sparse* Ac = A.to_cholmod(); int n = Ac->nrow; - UF_long* Ap = (UF_long*) Ac->p; - UF_long* Ai = (UF_long*) Ac->i; + SuiteSparse_long* Ap = (SuiteSparse_long*) Ac->p; + SuiteSparse_long* Ai = (SuiteSparse_long*) Ac->i; double* Ax = (double*) Ac->x; void* Symbolic; void* Numeric; diff --git a/Elasticity/src/SparseMatrix.inl b/Elasticity/src/SparseMatrix.inl index 307fc85..4b1cb96 100644 --- a/Elasticity/src/SparseMatrix.inl +++ b/Elasticity/src/SparseMatrix.inl @@ -391,8 +391,8 @@ namespace DDG // build compressed matrix (note that EntryMap stores entries in column-major order) double* pr = (double*) cData->x; - UF_long* ir = (UF_long*) cData->i; - UF_long* jc = (UF_long*) cData->p; + SuiteSparse_long* ir = (SuiteSparse_long*) cData->i; + SuiteSparse_long* jc = (SuiteSparse_long*) cData->p; int i = 0; int j = -1; for( const_iterator e = begin(); @@ -499,8 +499,8 @@ namespace DDG int t0 = clock(); cholmod_sparse* Ac = A.to_cholmod(); int n = Ac->nrow; - UF_long* Ap = (UF_long*) Ac->p; - UF_long* Ai = (UF_long*) Ac->i; + SuiteSparse_long* Ap = (SuiteSparse_long*) Ac->p; + SuiteSparse_long* Ai = (SuiteSparse_long*) Ac->i; double* Ax = (double*) Ac->x; void* Symbolic; void* Numeric; diff --git a/Fairing/Makefile b/Fairing/Makefile index 7711510..1fb5abd 100644 --- a/Fairing/Makefile +++ b/Fairing/Makefile @@ -3,18 +3,18 @@ # Specify library locations here (add or remove "#" marks to comment/uncomment lines for your platform) # Mac OS X -DDG_INCLUDE_PATH = -DDG_LIBRARY_PATH = -DDG_BLAS_LIBS = -framework Accelerate -DDG_SUITESPARSE_LIBS = -lspqr -lumfpack -lcholmod -lmetis -lcolamd -lccolamd -lcamd -lamd -ltbb -lm -lsuitesparseconfig -DDG_OPENGL_LIBS = -framework OpenGL -framework GLUT +#DDG_INCLUDE_PATH = +#DDG_LIBRARY_PATH = +#DDG_BLAS_LIBS = -framework Accelerate +#DDG_SUITESPARSE_LIBS = -lspqr -lumfpack -lcholmod -lmetis -lcolamd -lccolamd -lcamd -lamd -ltbb -lm -lsuitesparseconfig +#DDG_OPENGL_LIBS = -framework OpenGL -framework GLUT # # Linux -# DDG_INCLUDE_PATH = -# DDG_LIBRARY_PATH = -# DDG_BLAS_LIBS = -llapack -lblas -lgfortran -# DDG_SUITESPARSE_LIBS = -lspqr -lcholmod -lmetis -lcolamd -lccolamd -lcamd -lamd -lm -# DDG_OPENGL_LIBS = -lglut -lGL -lGLU -lX11 +DDG_INCLUDE_PATH = -I/usr/include/suitesparse +DDG_LIBRARY_PATH = +DDG_BLAS_LIBS = -llapack -lblas -lgfortran -lumfpack +DDG_SUITESPARSE_LIBS = -lspqr -lcholmod -lmetis -lcolamd -lccolamd -lcamd -lamd -lm +DDG_OPENGL_LIBS = -lglut -lGL -lGLU -lX11 # # Windows / Cygwin # DDG_INCLUDE_PATH = -I/usr/include/opengl -I/usr/include/suitesparse diff --git a/Fairing/fairing b/Fairing/fairing new file mode 100755 index 0000000..a8bcf33 Binary files /dev/null and b/Fairing/fairing differ diff --git a/Fairing/include/Camera.h b/Fairing/include/Camera.h index 8ca662e..0c21bfe 100644 --- a/Fairing/include/Camera.h +++ b/Fairing/include/Camera.h @@ -11,14 +11,12 @@ #include "Quaternion.h" -#ifdef __CYGWIN__ -#define GLUT_DISABLE_ATEXIT_HACK -#include -#include -#include -#include -#else +#ifdef __APPLE__ #include +#else +#include +#include +#include #endif namespace DDG diff --git a/Fairing/include/DenseMatrix.h b/Fairing/include/DenseMatrix.h index 4932907..4faa31f 100644 --- a/Fairing/include/DenseMatrix.h +++ b/Fairing/include/DenseMatrix.h @@ -34,6 +34,7 @@ #include "Types.h" #include +#include namespace DDG { diff --git a/Fairing/include/Shader.h b/Fairing/include/Shader.h index cb4c662..f84957f 100644 --- a/Fairing/include/Shader.h +++ b/Fairing/include/Shader.h @@ -21,7 +21,13 @@ #ifndef DDG_SHADER_H #define DDG_SHADER_H +#ifdef __APPLE__ #include +#else +#include +#include +#include +#endif #include namespace DDG diff --git a/Fairing/include/SparseMatrix.h b/Fairing/include/SparseMatrix.h index 7530d40b..5323530 100644 --- a/Fairing/include/SparseMatrix.h +++ b/Fairing/include/SparseMatrix.h @@ -37,6 +37,7 @@ #include #include #include +#include #include "Types.h" namespace DDG diff --git a/Fairing/include/Viewer.h b/Fairing/include/Viewer.h index 278d28f..2904822 100644 --- a/Fairing/include/Viewer.h +++ b/Fairing/include/Viewer.h @@ -10,7 +10,14 @@ #ifndef DDG_VIEWER_H #define DDG_VIEWER_H +#ifdef __APPLE__ #include +#else +#include +#include +#include +#endif + #include "Mesh.h" #include "Camera.h" #include "Shader.h" diff --git a/Fairing/src/SparseMatrix.cpp b/Fairing/src/SparseMatrix.cpp index 61d2358..005afaa 100644 --- a/Fairing/src/SparseMatrix.cpp +++ b/Fairing/src/SparseMatrix.cpp @@ -19,8 +19,8 @@ namespace DDG resize( m, n ); double* pr = (double*) cData->x; - UF_long* ir = (UF_long*) cData->i; - UF_long* jc = (UF_long*) cData->p; + SuiteSparse_long* ir = (SuiteSparse_long*) cData->i; + SuiteSparse_long* jc = (SuiteSparse_long*) cData->p; // iterate over columns for( int col = 0; col < n; col++ ) @@ -54,8 +54,8 @@ namespace DDG resize( m, n ); double* pr = (double*) cData->x; - UF_long* ir = (UF_long*) cData->i; - UF_long* jc = (UF_long*) cData->p; + SuiteSparse_long* ir = (SuiteSparse_long*) cData->i; + SuiteSparse_long* jc = (SuiteSparse_long*) cData->p; // iterate over columns for( int col = 0; col < n; col++ ) @@ -199,8 +199,8 @@ namespace DDG int t0 = clock(); cholmod_sparse* Ac = A.to_cholmod(); int n = Ac->nrow; - UF_long* Ap = (UF_long*) Ac->p; - UF_long* Ai = (UF_long*) Ac->i; + SuiteSparse_long* Ap = (SuiteSparse_long*) Ac->p; + SuiteSparse_long* Ai = (SuiteSparse_long*) Ac->i; double* Ax = (double*) Ac->x; void* Symbolic; void* Numeric; diff --git a/Fairing/src/SparseMatrix.inl b/Fairing/src/SparseMatrix.inl index 307fc85..4b1cb96 100644 --- a/Fairing/src/SparseMatrix.inl +++ b/Fairing/src/SparseMatrix.inl @@ -391,8 +391,8 @@ namespace DDG // build compressed matrix (note that EntryMap stores entries in column-major order) double* pr = (double*) cData->x; - UF_long* ir = (UF_long*) cData->i; - UF_long* jc = (UF_long*) cData->p; + SuiteSparse_long* ir = (SuiteSparse_long*) cData->i; + SuiteSparse_long* jc = (SuiteSparse_long*) cData->p; int i = 0; int j = -1; for( const_iterator e = begin(); @@ -499,8 +499,8 @@ namespace DDG int t0 = clock(); cholmod_sparse* Ac = A.to_cholmod(); int n = Ac->nrow; - UF_long* Ap = (UF_long*) Ac->p; - UF_long* Ai = (UF_long*) Ac->i; + SuiteSparse_long* Ap = (SuiteSparse_long*) Ac->p; + SuiteSparse_long* Ai = (SuiteSparse_long*) Ac->i; double* Ax = (double*) Ac->x; void* Symbolic; void* Numeric; diff --git a/Flatten/include/Camera.h b/Flatten/include/Camera.h index 8ca662e..0c21bfe 100644 --- a/Flatten/include/Camera.h +++ b/Flatten/include/Camera.h @@ -11,14 +11,12 @@ #include "Quaternion.h" -#ifdef __CYGWIN__ -#define GLUT_DISABLE_ATEXIT_HACK -#include -#include -#include -#include -#else +#ifdef __APPLE__ #include +#else +#include +#include +#include #endif namespace DDG diff --git a/Flatten/include/DenseMatrix.h b/Flatten/include/DenseMatrix.h index 4932907..4faa31f 100644 --- a/Flatten/include/DenseMatrix.h +++ b/Flatten/include/DenseMatrix.h @@ -34,6 +34,7 @@ #include "Types.h" #include +#include namespace DDG { diff --git a/Flatten/include/Shader.h b/Flatten/include/Shader.h index cb4c662..f84957f 100644 --- a/Flatten/include/Shader.h +++ b/Flatten/include/Shader.h @@ -21,7 +21,13 @@ #ifndef DDG_SHADER_H #define DDG_SHADER_H +#ifdef __APPLE__ #include +#else +#include +#include +#include +#endif #include namespace DDG diff --git a/Flatten/include/SparseMatrix.h b/Flatten/include/SparseMatrix.h index 7530d40b..5323530 100644 --- a/Flatten/include/SparseMatrix.h +++ b/Flatten/include/SparseMatrix.h @@ -37,6 +37,7 @@ #include #include #include +#include #include "Types.h" namespace DDG diff --git a/Flatten/include/Viewer.h b/Flatten/include/Viewer.h index a68e943..8274772 100644 --- a/Flatten/include/Viewer.h +++ b/Flatten/include/Viewer.h @@ -10,7 +10,14 @@ #ifndef DDG_VIEWER_H #define DDG_VIEWER_H +#ifdef __APPLE__ #include +#else +#include +#include +#include +#endif + #include "Mesh.h" #include "Camera.h" #include "Shader.h" diff --git a/Flatten/src/SparseMatrix.cpp b/Flatten/src/SparseMatrix.cpp index 61d2358..005afaa 100644 --- a/Flatten/src/SparseMatrix.cpp +++ b/Flatten/src/SparseMatrix.cpp @@ -19,8 +19,8 @@ namespace DDG resize( m, n ); double* pr = (double*) cData->x; - UF_long* ir = (UF_long*) cData->i; - UF_long* jc = (UF_long*) cData->p; + SuiteSparse_long* ir = (SuiteSparse_long*) cData->i; + SuiteSparse_long* jc = (SuiteSparse_long*) cData->p; // iterate over columns for( int col = 0; col < n; col++ ) @@ -54,8 +54,8 @@ namespace DDG resize( m, n ); double* pr = (double*) cData->x; - UF_long* ir = (UF_long*) cData->i; - UF_long* jc = (UF_long*) cData->p; + SuiteSparse_long* ir = (SuiteSparse_long*) cData->i; + SuiteSparse_long* jc = (SuiteSparse_long*) cData->p; // iterate over columns for( int col = 0; col < n; col++ ) @@ -199,8 +199,8 @@ namespace DDG int t0 = clock(); cholmod_sparse* Ac = A.to_cholmod(); int n = Ac->nrow; - UF_long* Ap = (UF_long*) Ac->p; - UF_long* Ai = (UF_long*) Ac->i; + SuiteSparse_long* Ap = (SuiteSparse_long*) Ac->p; + SuiteSparse_long* Ai = (SuiteSparse_long*) Ac->i; double* Ax = (double*) Ac->x; void* Symbolic; void* Numeric; diff --git a/Flatten/src/SparseMatrix.inl b/Flatten/src/SparseMatrix.inl index 307fc85..4b1cb96 100644 --- a/Flatten/src/SparseMatrix.inl +++ b/Flatten/src/SparseMatrix.inl @@ -391,8 +391,8 @@ namespace DDG // build compressed matrix (note that EntryMap stores entries in column-major order) double* pr = (double*) cData->x; - UF_long* ir = (UF_long*) cData->i; - UF_long* jc = (UF_long*) cData->p; + SuiteSparse_long* ir = (SuiteSparse_long*) cData->i; + SuiteSparse_long* jc = (SuiteSparse_long*) cData->p; int i = 0; int j = -1; for( const_iterator e = begin(); @@ -499,8 +499,8 @@ namespace DDG int t0 = clock(); cholmod_sparse* Ac = A.to_cholmod(); int n = Ac->nrow; - UF_long* Ap = (UF_long*) Ac->p; - UF_long* Ai = (UF_long*) Ac->i; + SuiteSparse_long* Ap = (SuiteSparse_long*) Ac->p; + SuiteSparse_long* Ai = (SuiteSparse_long*) Ac->i; double* Ax = (double*) Ac->x; void* Symbolic; void* Numeric; diff --git a/Geodesics/Makefile b/Geodesics/Makefile index ea778bc..45f6ef8 100644 --- a/Geodesics/Makefile +++ b/Geodesics/Makefile @@ -3,18 +3,18 @@ # Specify library locations here (add or remove "#" marks to comment/uncomment lines for your platform) # Mac OS X -DDG_INCLUDE_PATH = -DDG_LIBRARY_PATH = -DDG_BLAS_LIBS = -framework Accelerate -DDG_SUITESPARSE_LIBS = -lspqr -lumfpack -lcholmod -lmetis -lcolamd -lccolamd -lcamd -lamd -ltbb -lm -lsuitesparseconfig -DDG_OPENGL_LIBS = -framework OpenGL -framework GLUT +#DDG_INCLUDE_PATH = +#DDG_LIBRARY_PATH = +#DDG_BLAS_LIBS = -framework Accelerate +#DDG_SUITESPARSE_LIBS = -lspqr -lumfpack -lcholmod -lmetis -lcolamd -lccolamd -lcamd -lamd -ltbb -lm -lsuitesparseconfig +#DDG_OPENGL_LIBS = -framework OpenGL -framework GLUT # # Linux -# DDG_INCLUDE_PATH = -# DDG_LIBRARY_PATH = -# DDG_BLAS_LIBS = -llapack -lblas -lgfortran -# DDG_SUITESPARSE_LIBS = -lspqr -lcholmod -lmetis -lcolamd -lccolamd -lcamd -lamd -lm -# DDG_OPENGL_LIBS = -lglut -lGL -lGLU -lX11 +DDG_INCLUDE_PATH = -I/usr/include/suitesparse +DDG_LIBRARY_PATH = +DDG_BLAS_LIBS = -llapack -lblas -lgfortran -lumfpack +DDG_SUITESPARSE_LIBS = -lspqr -lcholmod -lmetis -lcolamd -lccolamd -lcamd -lamd -lm +DDG_OPENGL_LIBS = -lglut -lGL -lGLU -lX11 # # Windows / Cygwin # DDG_INCLUDE_PATH = -I/usr/include/opengl -I/usr/include/suitesparse diff --git a/Geodesics/geodesics b/Geodesics/geodesics new file mode 100755 index 0000000..0736167 Binary files /dev/null and b/Geodesics/geodesics differ diff --git a/Geodesics/include/Camera.h b/Geodesics/include/Camera.h index 8ca662e..0c21bfe 100644 --- a/Geodesics/include/Camera.h +++ b/Geodesics/include/Camera.h @@ -11,14 +11,12 @@ #include "Quaternion.h" -#ifdef __CYGWIN__ -#define GLUT_DISABLE_ATEXIT_HACK -#include -#include -#include -#include -#else +#ifdef __APPLE__ #include +#else +#include +#include +#include #endif namespace DDG diff --git a/Geodesics/include/DenseMatrix.h b/Geodesics/include/DenseMatrix.h index 4932907..4faa31f 100644 --- a/Geodesics/include/DenseMatrix.h +++ b/Geodesics/include/DenseMatrix.h @@ -34,6 +34,7 @@ #include "Types.h" #include +#include namespace DDG { diff --git a/Geodesics/include/Shader.h b/Geodesics/include/Shader.h index cb4c662..f84957f 100644 --- a/Geodesics/include/Shader.h +++ b/Geodesics/include/Shader.h @@ -21,7 +21,13 @@ #ifndef DDG_SHADER_H #define DDG_SHADER_H +#ifdef __APPLE__ #include +#else +#include +#include +#include +#endif #include namespace DDG diff --git a/Geodesics/include/SparseMatrix.h b/Geodesics/include/SparseMatrix.h index 7530d40b..5323530 100644 --- a/Geodesics/include/SparseMatrix.h +++ b/Geodesics/include/SparseMatrix.h @@ -37,6 +37,7 @@ #include #include #include +#include #include "Types.h" namespace DDG diff --git a/Geodesics/include/Viewer.h b/Geodesics/include/Viewer.h index 509c011..226b0b4 100644 --- a/Geodesics/include/Viewer.h +++ b/Geodesics/include/Viewer.h @@ -10,7 +10,14 @@ #ifndef DDG_VIEWER_H #define DDG_VIEWER_H +#ifdef __APPLE__ #include +#else +#include +#include +#include +#endif + #include "Mesh.h" #include "Camera.h" #include "Shader.h" diff --git a/Geodesics/src/Shader.cpp b/Geodesics/src/Shader.cpp index 9cd6c31..1f9d2ed 100644 --- a/Geodesics/src/Shader.cpp +++ b/Geodesics/src/Shader.cpp @@ -133,7 +133,7 @@ namespace DDG string line; while( getline( in, line )) { - source += line; + source += line + '\n'; } return true; diff --git a/Geodesics/src/SparseMatrix.cpp b/Geodesics/src/SparseMatrix.cpp index 61d2358..005afaa 100644 --- a/Geodesics/src/SparseMatrix.cpp +++ b/Geodesics/src/SparseMatrix.cpp @@ -19,8 +19,8 @@ namespace DDG resize( m, n ); double* pr = (double*) cData->x; - UF_long* ir = (UF_long*) cData->i; - UF_long* jc = (UF_long*) cData->p; + SuiteSparse_long* ir = (SuiteSparse_long*) cData->i; + SuiteSparse_long* jc = (SuiteSparse_long*) cData->p; // iterate over columns for( int col = 0; col < n; col++ ) @@ -54,8 +54,8 @@ namespace DDG resize( m, n ); double* pr = (double*) cData->x; - UF_long* ir = (UF_long*) cData->i; - UF_long* jc = (UF_long*) cData->p; + SuiteSparse_long* ir = (SuiteSparse_long*) cData->i; + SuiteSparse_long* jc = (SuiteSparse_long*) cData->p; // iterate over columns for( int col = 0; col < n; col++ ) @@ -199,8 +199,8 @@ namespace DDG int t0 = clock(); cholmod_sparse* Ac = A.to_cholmod(); int n = Ac->nrow; - UF_long* Ap = (UF_long*) Ac->p; - UF_long* Ai = (UF_long*) Ac->i; + SuiteSparse_long* Ap = (SuiteSparse_long*) Ac->p; + SuiteSparse_long* Ai = (SuiteSparse_long*) Ac->i; double* Ax = (double*) Ac->x; void* Symbolic; void* Numeric; diff --git a/Geodesics/src/SparseMatrix.inl b/Geodesics/src/SparseMatrix.inl index 307fc85..4b1cb96 100644 --- a/Geodesics/src/SparseMatrix.inl +++ b/Geodesics/src/SparseMatrix.inl @@ -391,8 +391,8 @@ namespace DDG // build compressed matrix (note that EntryMap stores entries in column-major order) double* pr = (double*) cData->x; - UF_long* ir = (UF_long*) cData->i; - UF_long* jc = (UF_long*) cData->p; + SuiteSparse_long* ir = (SuiteSparse_long*) cData->i; + SuiteSparse_long* jc = (SuiteSparse_long*) cData->p; int i = 0; int j = -1; for( const_iterator e = begin(); @@ -499,8 +499,8 @@ namespace DDG int t0 = clock(); cholmod_sparse* Ac = A.to_cholmod(); int n = Ac->nrow; - UF_long* Ap = (UF_long*) Ac->p; - UF_long* Ai = (UF_long*) Ac->i; + SuiteSparse_long* Ap = (SuiteSparse_long*) Ac->p; + SuiteSparse_long* Ai = (SuiteSparse_long*) Ac->i; double* Ax = (double*) Ac->x; void* Symbolic; void* Numeric; diff --git a/Hot2/Makefile b/Hot2/Makefile index a76bc96..5c93100 100644 --- a/Hot2/Makefile +++ b/Hot2/Makefile @@ -3,18 +3,18 @@ # Specify library locations here (add or remove "#" marks to comment/uncomment lines for your platform) # Mac OS X -DDG_INCLUDE_PATH = -DDG_LIBRARY_PATH = -DDG_BLAS_LIBS = -framework Accelerate -DDG_SUITESPARSE_LIBS = -lspqr -lumfpack -lcholmod -lmetis -lcolamd -lccolamd -lcamd -lamd -ltbb -lm -lsuitesparseconfig -DDG_OPENGL_LIBS = -framework OpenGL -framework GLUT +#DDG_INCLUDE_PATH = +#DDG_LIBRARY_PATH = +#DDG_BLAS_LIBS = -framework Accelerate +#DDG_SUITESPARSE_LIBS = -lspqr -lumfpack -lcholmod -lmetis -lcolamd -lccolamd -lcamd -lamd -ltbb -lm -lsuitesparseconfig +#DDG_OPENGL_LIBS = -framework OpenGL -framework GLUT # # Linux -# DDG_INCLUDE_PATH = -# DDG_LIBRARY_PATH = -# DDG_BLAS_LIBS = -llapack -lblas -lgfortran -# DDG_SUITESPARSE_LIBS = -lspqr -lcholmod -lmetis -lcolamd -lccolamd -lcamd -lamd -lm -# DDG_OPENGL_LIBS = -lglut -lGL -lGLU -lX11 +DDG_INCLUDE_PATH = -I/usr/include/suitesparse +DDG_LIBRARY_PATH = +DDG_BLAS_LIBS = -llapack -lblas -lgfortran -lumfpack +DDG_SUITESPARSE_LIBS = -lspqr -lcholmod -lmetis -lcolamd -lccolamd -lcamd -lamd -lm +DDG_OPENGL_LIBS = -lglut -lGL -lGLU -lX11 # # Windows / Cygwin # DDG_INCLUDE_PATH = -I/usr/include/opengl -I/usr/include/suitesparse diff --git a/Hot2/hot2 b/Hot2/hot2 new file mode 100755 index 0000000..3b521bf Binary files /dev/null and b/Hot2/hot2 differ diff --git a/Hot2/include/Camera.h b/Hot2/include/Camera.h index 8ca662e..0c21bfe 100644 --- a/Hot2/include/Camera.h +++ b/Hot2/include/Camera.h @@ -11,14 +11,12 @@ #include "Quaternion.h" -#ifdef __CYGWIN__ -#define GLUT_DISABLE_ATEXIT_HACK -#include -#include -#include -#include -#else +#ifdef __APPLE__ #include +#else +#include +#include +#include #endif namespace DDG diff --git a/Hot2/include/DenseMatrix.h b/Hot2/include/DenseMatrix.h index 4932907..4faa31f 100644 --- a/Hot2/include/DenseMatrix.h +++ b/Hot2/include/DenseMatrix.h @@ -34,6 +34,7 @@ #include "Types.h" #include +#include namespace DDG { diff --git a/Hot2/include/Shader.h b/Hot2/include/Shader.h index cb4c662..f84957f 100644 --- a/Hot2/include/Shader.h +++ b/Hot2/include/Shader.h @@ -21,7 +21,13 @@ #ifndef DDG_SHADER_H #define DDG_SHADER_H +#ifdef __APPLE__ #include +#else +#include +#include +#include +#endif #include namespace DDG diff --git a/Hot2/include/SparseMatrix.h b/Hot2/include/SparseMatrix.h index 7530d40b..5323530 100644 --- a/Hot2/include/SparseMatrix.h +++ b/Hot2/include/SparseMatrix.h @@ -37,6 +37,7 @@ #include #include #include +#include #include "Types.h" namespace DDG diff --git a/Hot2/include/Viewer.h b/Hot2/include/Viewer.h index 4305055..66aafcb 100644 --- a/Hot2/include/Viewer.h +++ b/Hot2/include/Viewer.h @@ -10,7 +10,14 @@ #ifndef DDG_VIEWER_H #define DDG_VIEWER_H +#ifdef __APPLE__ #include +#else +#include +#include +#include +#endif + #include "Mesh.h" #include "Camera.h" #include "Shader.h" diff --git a/Hot2/src/SparseMatrix.cpp b/Hot2/src/SparseMatrix.cpp index 61d2358..005afaa 100644 --- a/Hot2/src/SparseMatrix.cpp +++ b/Hot2/src/SparseMatrix.cpp @@ -19,8 +19,8 @@ namespace DDG resize( m, n ); double* pr = (double*) cData->x; - UF_long* ir = (UF_long*) cData->i; - UF_long* jc = (UF_long*) cData->p; + SuiteSparse_long* ir = (SuiteSparse_long*) cData->i; + SuiteSparse_long* jc = (SuiteSparse_long*) cData->p; // iterate over columns for( int col = 0; col < n; col++ ) @@ -54,8 +54,8 @@ namespace DDG resize( m, n ); double* pr = (double*) cData->x; - UF_long* ir = (UF_long*) cData->i; - UF_long* jc = (UF_long*) cData->p; + SuiteSparse_long* ir = (SuiteSparse_long*) cData->i; + SuiteSparse_long* jc = (SuiteSparse_long*) cData->p; // iterate over columns for( int col = 0; col < n; col++ ) @@ -199,8 +199,8 @@ namespace DDG int t0 = clock(); cholmod_sparse* Ac = A.to_cholmod(); int n = Ac->nrow; - UF_long* Ap = (UF_long*) Ac->p; - UF_long* Ai = (UF_long*) Ac->i; + SuiteSparse_long* Ap = (SuiteSparse_long*) Ac->p; + SuiteSparse_long* Ai = (SuiteSparse_long*) Ac->i; double* Ax = (double*) Ac->x; void* Symbolic; void* Numeric; diff --git a/Hot2/src/SparseMatrix.inl b/Hot2/src/SparseMatrix.inl index 307fc85..4b1cb96 100644 --- a/Hot2/src/SparseMatrix.inl +++ b/Hot2/src/SparseMatrix.inl @@ -391,8 +391,8 @@ namespace DDG // build compressed matrix (note that EntryMap stores entries in column-major order) double* pr = (double*) cData->x; - UF_long* ir = (UF_long*) cData->i; - UF_long* jc = (UF_long*) cData->p; + SuiteSparse_long* ir = (SuiteSparse_long*) cData->i; + SuiteSparse_long* jc = (SuiteSparse_long*) cData->p; int i = 0; int j = -1; for( const_iterator e = begin(); @@ -499,8 +499,8 @@ namespace DDG int t0 = clock(); cholmod_sparse* Ac = A.to_cholmod(); int n = Ac->nrow; - UF_long* Ap = (UF_long*) Ac->p; - UF_long* Ai = (UF_long*) Ac->i; + SuiteSparse_long* Ap = (SuiteSparse_long*) Ac->p; + SuiteSparse_long* Ai = (SuiteSparse_long*) Ac->i; double* Ax = (double*) Ac->x; void* Symbolic; void* Numeric;