Skip to content
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

compiling with g++ >= 6.3 (linux) and updating UF_long to suitesparse_long #6

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions BaseCode/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Binary file added BaseCode/ddg
Binary file not shown.
12 changes: 5 additions & 7 deletions BaseCode/include/Camera.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,12 @@

#include "Quaternion.h"

#ifdef __CYGWIN__
#define GLUT_DISABLE_ATEXIT_HACK
#include <windows.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glut.h>
#else
#ifdef __APPLE__
#include <GLUT/glut.h>
#else
#include <GLES3/gl3.h>
#include <GL/glut.h>
#include <GL/freeglut.h>
#endif

namespace DDG
Expand Down
1 change: 1 addition & 0 deletions BaseCode/include/DenseMatrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include "Types.h"

#include <vector>
#include <iostream>

namespace DDG
{
Expand Down
6 changes: 6 additions & 0 deletions BaseCode/include/Shader.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@
#ifndef DDG_SHADER_H
#define DDG_SHADER_H

#ifdef __APPLE__
#include <GLUT/glut.h>
#else
#include <GLES3/gl3.h>
#include <GL/glut.h>
#include <GL/freeglut.h>
#endif
#include <string>

namespace DDG
Expand Down
1 change: 1 addition & 0 deletions BaseCode/include/SparseMatrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include <cholmod.h>
#include <vector>
#include <map>
#include <iostream>
#include "Types.h"

namespace DDG
Expand Down
6 changes: 6 additions & 0 deletions BaseCode/include/Viewer.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@
#ifndef DDG_VIEWER_H
#define DDG_VIEWER_H

#ifdef __APPLE__
#include <GLUT/glut.h>
#else
#include <GLES3/gl3.h>
#include <GL/glut.h>
#include <GL/freeglut.h>
#endif
#include "Mesh.h"
#include "Camera.h"
#include "Shader.h"
Expand Down
12 changes: 6 additions & 6 deletions BaseCode/src/SparseMatrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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++ )
Expand Down Expand Up @@ -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++ )
Expand Down Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions BaseCode/src/SparseMatrix.inl
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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;
Expand Down
20 changes: 10 additions & 10 deletions Connection/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Binary file added Connection/connection
Binary file not shown.
12 changes: 5 additions & 7 deletions Connection/include/Camera.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,12 @@

#include "Quaternion.h"

#ifdef __CYGWIN__
#define GLUT_DISABLE_ATEXIT_HACK
#include <windows.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glut.h>
#else
#ifdef __APPLE__
#include <GLUT/glut.h>
#else
#include <GLES3/gl3.h>
#include <GL/glut.h>
#include <GL/freeglut.h>
#endif

namespace DDG
Expand Down
1 change: 1 addition & 0 deletions Connection/include/DenseMatrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include "Types.h"

#include <vector>
#include <iostream>

namespace DDG
{
Expand Down
6 changes: 6 additions & 0 deletions Connection/include/Shader.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@
#ifndef DDG_SHADER_H
#define DDG_SHADER_H

#ifdef __APPLE__
#include <GLUT/glut.h>
#else
#include <GLES3/gl3.h>
#include <GL/glut.h>
#include <GL/freeglut.h>
#endif
#include <string>

namespace DDG
Expand Down
1 change: 1 addition & 0 deletions Connection/include/SparseMatrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include <cholmod.h>
#include <vector>
#include <map>
#include <iostream>
#include "Types.h"

namespace DDG
Expand Down
7 changes: 7 additions & 0 deletions Connection/include/Viewer.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@
#ifndef DDG_VIEWER_H
#define DDG_VIEWER_H

#ifdef __APPLE__
#include <GLUT/glut.h>
#else
#include <GLES3/gl3.h>
#include <GL/glut.h>
#include <GL/freeglut.h>
#endif

#include "Mesh.h"
#include "Camera.h"
#include "Shader.h"
Expand Down
12 changes: 6 additions & 6 deletions Connection/src/SparseMatrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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++ )
Expand Down Expand Up @@ -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++ )
Expand Down Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions Connection/src/SparseMatrix.inl
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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;
Expand Down
20 changes: 10 additions & 10 deletions Elasticity/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Binary file added Elasticity/elasticity
Binary file not shown.
Binary file removed Elasticity/include/.Viewer.h.swp
Binary file not shown.
1 change: 0 additions & 1 deletion Elasticity/include/Application.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ namespace DDG
v ++ )
{
Complex sum;
Vector pi = v->position;
HalfEdgeIter he = v->he;
do
{
Expand Down
12 changes: 5 additions & 7 deletions Elasticity/include/Camera.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,12 @@

#include "Quaternion.h"

#ifdef __CYGWIN__
#define GLUT_DISABLE_ATEXIT_HACK
#include <windows.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glut.h>
#else
#ifdef __APPLE__
#include <GLUT/glut.h>
#else
#include <GLES3/gl3.h>
#include <GL/glut.h>
#include <GL/freeglut.h>
#endif

namespace DDG
Expand Down
1 change: 1 addition & 0 deletions Elasticity/include/DenseMatrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include "Types.h"

#include <vector>
#include <iostream>

namespace DDG
{
Expand Down
6 changes: 6 additions & 0 deletions Elasticity/include/Shader.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@
#ifndef DDG_SHADER_H
#define DDG_SHADER_H

#ifdef __APPLE__
#include <GLUT/glut.h>
#else
#include <GLES3/gl3.h>
#include <GL/glut.h>
#include <GL/freeglut.h>
#endif
#include <string>

namespace DDG
Expand Down
1 change: 1 addition & 0 deletions Elasticity/include/SparseMatrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include <cholmod.h>
#include <vector>
#include <map>
#include <iostream>
#include "Types.h"

namespace DDG
Expand Down
7 changes: 7 additions & 0 deletions Elasticity/include/Viewer.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@
#ifndef DDG_VIEWER_H
#define DDG_VIEWER_H

#ifdef __APPLE__
#include <GLUT/glut.h>
#else
#include <GLES3/gl3.h>
#include <GL/glut.h>
#include <GL/freeglut.h>
#endif

#include "Mesh.h"
#include "Camera.h"
#include "Shader.h"
Expand Down
Loading