-
Notifications
You must be signed in to change notification settings - Fork 28
/
Phantom_Cell_graphic_mods
208 lines (180 loc) · 9.67 KB
/
Phantom_Cell_graphic_mods
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b317c59..8ed524c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -134,14 +134,30 @@ find_package( OpenMP)
# message("OPENMP NOT FOUND")
#endif(OPENMP_FOUND)
+set(ImageMagick_FOUND TRUE)
+set(ImageMagick_INCLUDE_DIRS /usr/local/include/ImageMagick-7)
+set(ImageMagick_LIBRARIES /usr/local/lib/libMagickWand-7.Q16HDRI.a
+ /usr/local/lib/libMagick++-7.Q16HDRI.a
+ /usr/local/lib/libMagickCore-7.Q16HDRI.a
+ /usr/lib/libz.dylib /usr/lib/libxml2.dylib /usr/local/lib/libpng.a
+ /usr/local/lib/libopenjp2.a /usr/local/lib/liblzma.a /usr/local/lib/libjpeg.a
+ /usr/local/lib/liblcms2.a /usr/X11/lib/libX11.dylib /usr/local/lib/libtiff.a /usr/local/lib/libwebp.a
+ /usr/local/lib/libwebpmux.a /usr/X11/lib/libXext.dylib /usr/local/lib/libfreetype.a /usr/lib/libbz2.dylib)
+set(ImageMagick_LIBRARY /usr/local/lib/libMagick++-7.Q16HDRI.a /usr/local/lib/libwebpdemux.a)
+set(ImageMagick_VERSION_STRING 7.0.1)
+set(ImageMagick_MagickWand_FOUND TRUE)
+set(ImageMagick_MagickWand_INCLUDE_DIRS /usr/local/include/ImageMagick-7)
+set(ImageMagick_MagickWand_LIBRARIES /usr/local/lib/libMagickWand-7.Q16HDRI.a)
+
#find_package(ImageMagick COMPONENTS MagickCore MagickWand)
-find_package(ImageMagick COMPONENTS MagickWand)
+#find_package(ImageMagick COMPONENTS MagickWand)
# ImageMagick_FOUND - TRUE if all components are found.
# ImageMagick_INCLUDE_DIRS - Full paths to all include dirs.
# ImageMagick_LIBRARIES - Full paths to all libraries.
# ImageMagick_<component>_FOUND - TRUE if <component> is found.
# ImageMagick_<component>_INCLUDE_DIRS - Full path to <component> include dirs.
# ImageMagick_<component>_LIBRARIES - Full path to <component> libraries.
+#set(ImageMagick_FOUND yes)
if (ImageMagick_FOUND)
if (ImageMagick_MagickWand_FOUND)
add_definitions(-DHAVE_MAGICKWAND)
@@ -158,18 +174,18 @@ if (ImageMagick_FOUND)
# add_definitions(-DMAGICKCORE_QUANTUM_DEPTH=16)
include_directories(${ImageMagick_INCLUDE_DIRS})
endif (ImageMagick_MagickWand_FOUND)
-
-# message("ImageMagick_FOUND ${ImageMagick_FOUND}")
-# message("ImageMagick_INCLUDE_DIRS ${ImageMagick_INCLUDE_DIRS}")
-# message("ImageMagick_LIBRARIES ${ImageMagick_LIBRARIES}")
-## message("ImageMagick_MagickCore_FOUND ${ImageMagick_MagickCore_FOUND}")
-## message("ImageMagick_MagickCore_INCLUDE_DIRS ${ImageMagick_MagickCore_INCLUDE_DIRS}")
-## message("ImageMagick_MagickCore_LIBRARIES ${ImageMagick_MagickCore_LIBRARIES}")
-# message("ImageMagick_MagickWand_FOUND ${ImageMagick_MagickWand_FOUND}")
-# message("ImageMagick_MagickWand_INCLUDE_DIRS ${ImageMagick_MagickWand_INCLUDE_DIRS}")
-# message("ImageMagick_MagickWand_LIBRARIES ${ImageMagick_MagickWand_LIBRARIES}")
endif (ImageMagick_FOUND)
+ message("ImageMagick_FOUND ${ImageMagick_FOUND}")
+ message("ImageMagick_INCLUDE_DIRS ${ImageMagick_INCLUDE_DIRS}")
+ message("ImageMagick_LIBRARIES ${ImageMagick_LIBRARIES}")
+# message("ImageMagick_MagickCore_FOUND ${ImageMagick_MagickCore_FOUND}")
+# message("ImageMagick_MagickCore_INCLUDE_DIRS ${ImageMagick_MagickCore_INCLUDE_DIRS}")
+# message("ImageMagick_MagickCore_LIBRARIES ${ImageMagick_MagickCore_LIBRARIES}")
+ message("ImageMagick_MagickWand_FOUND ${ImageMagick_MagickWand_FOUND}")
+ message("ImageMagick_MagickWand_INCLUDE_DIRS ${ImageMagick_MagickWand_INCLUDE_DIRS}")
+ message("ImageMagick_MagickWand_LIBRARIES ${ImageMagick_MagickWand_LIBRARIES}")
+
#-----------------------------------------------------------------------------
# HDF5 support
diff --git a/clamr_cpuonly.cpp b/clamr_cpuonly.cpp
index d58ddce..0c68866 100644
--- a/clamr_cpuonly.cpp
+++ b/clamr_cpuonly.cpp
@@ -222,7 +222,7 @@ int main(int argc, char **argv) {
crux = new Crux(crux_type, num_of_rollback_states, restart);
- circ_radius = 6.0;
+ circ_radius = 40.0;
// Scale the circle appropriately for the mesh size.
circ_radius = circ_radius * (real_t) nx / 128.0;
int boundary = 1;
diff --git a/graphics/graphics.c b/graphics/graphics.c
index 5e1f18a..e1c3bec 100644
--- a/graphics/graphics.c
+++ b/graphics/graphics.c
@@ -230,14 +230,14 @@ void DrawSquaresToFile(int graph_num, int ncycle, double simTime, int rollback_i
int magick_step = MAGICK_NCOLORS/(graphics_proc[graphics_mysize-1]+1);
- if (graphics_outline) {
+ //if (graphics_outline) {
PixelGetBlack(pixel_wand);
DrawSetStrokeColor(draw_wand,pixel_wand);
DrawSetStrokeWidth(draw_wand,0.01);
DrawSetStrokeAntialias(draw_wand,1);
DrawSetStrokeOpacity(draw_wand,1);
- }
+ //}
if (data_type == DATA_DOUBLE){
@@ -247,13 +247,13 @@ void DrawSquaresToFile(int graph_num, int ncycle, double simTime, int rollback_i
sprintf(cstring,"rgba(%d,%d,%d,%d)",MagickRainbow[magick_color].Red,
MagickRainbow[magick_color].Green,
MagickRainbow[magick_color].Blue,120);
- PixelSetColor(pixel_wand, cstring);
-
+ sprintf(cstring,"rgba(%d,%d,%d,%d)",0,0,0,0);
+ //PixelSetColor(pixel_wand, cstring);
- DrawSetFillColor(draw_wand, pixel_wand);
+ //DrawSetFillColor(draw_wand, pixel_wand);
- DrawRectangle(draw_wand, x_double[i], y_double[i],
- x_double[i]+dx_double[i], y_double[i]+dy_double[i]);
+ //DrawRectangle(draw_wand, x_double[i], y_double[i],
+ // x_double[i]+dx_double[i], y_double[i]+dy_double[i]);
/*
printf("DEBUG -- i %d magick_color %d magick_step %d graphics_proc %d cstring %s corners %lg %lg %lg %lg\n",
i,magick_color,magick_step,graphics_proc[i],cstring,
@@ -262,7 +262,7 @@ void DrawSquaresToFile(int graph_num, int ncycle, double simTime, int rollback_i
*/
}
- if (graphics_outline) {
+ //if (graphics_outline) {
PixelSetColor(pixel_wand,"black");
DrawSetStrokeColor(draw_wand,pixel_wand);
DrawSetStrokeWidth(draw_wand,0.01);
@@ -282,7 +282,7 @@ void DrawSquaresToFile(int graph_num, int ncycle, double simTime, int rollback_i
xold = xnew;
yold = ynew;
}
- }
+ //}
/*
// Set up a 12 point black font
@@ -313,15 +313,15 @@ void DrawSquaresToFile(int graph_num, int ncycle, double simTime, int rollback_i
sprintf(cstring,"rgba(%d,%d,%d,%d)",MagickRainbow[magick_color].Red,
MagickRainbow[magick_color].Green,
MagickRainbow[magick_color].Blue,120);
- PixelSetColor(pixel_wand, cstring);
+ //PixelSetColor(pixel_wand, cstring);
- DrawSetFillColor(draw_wand, pixel_wand);
+ //DrawSetFillColor(draw_wand, pixel_wand);
- DrawRectangle(draw_wand, x_float[i], y_float[i],
- x_float[i]+dx_float[i], y_float[i]+dy_float[i]);
+ //DrawRectangle(draw_wand, x_float[i], y_float[i],
+ // x_float[i]+dx_float[i], y_float[i]+dy_float[i]);
}
- if (graphics_outline) {
+ //if (graphics_outline) {
PixelSetColor(pixel_wand,"black");
DrawSetStrokeColor(draw_wand,pixel_wand);
DrawSetStrokeWidth(draw_wand,0.01);
@@ -341,7 +341,7 @@ void DrawSquaresToFile(int graph_num, int ncycle, double simTime, int rollback_i
xold = xnew;
yold = ynew;
}
- }
+ //}
}
@@ -481,14 +481,14 @@ void DisplayStateToFile(int graph_num, int ncycle, double simTime, int rollback_
int magick_step = MAGICK_NCOLORS/(scaleMax - scaleMin);
- if (graphics_outline) {
+ //if (graphics_outline) {
PixelGetBlack(pixel_wand);
DrawSetStrokeColor(draw_wand,pixel_wand);
DrawSetStrokeWidth(draw_wand,0.01);
DrawSetStrokeAntialias(draw_wand,1);
DrawSetStrokeOpacity(draw_wand,1);
- }
+ //}
if (data_type == DATA_DOUBLE){
@@ -509,6 +509,7 @@ void DisplayStateToFile(int graph_num, int ncycle, double simTime, int rollback_
sprintf(cstring,"rgba(%d,%d,%d,%d)",MagickRainbow[magick_color].Red,
MagickRainbow[magick_color].Green,
MagickRainbow[magick_color].Blue,120);
+ sprintf(cstring,"rgba(%d,%d,%d,%d)",0,0,0,0);
PixelSetColor(pixel_wand, cstring);
DrawSetFillColor(draw_wand, pixel_wand);
@@ -541,12 +542,12 @@ void DisplayStateToFile(int graph_num, int ncycle, double simTime, int rollback_
sprintf(cstring,"rgba(%d,%d,%d,%d)",MagickRainbow[magick_color].Red,
MagickRainbow[magick_color].Green,
MagickRainbow[magick_color].Blue,120);
- PixelSetColor(pixel_wand, cstring);
+ //PixelSetColor(pixel_wand, cstring);
- DrawSetFillColor(draw_wand, pixel_wand);
+ //DrawSetFillColor(draw_wand, pixel_wand);
- DrawRectangle(draw_wand, x_float[i], y_float[i],
- x_float[i]+dx_float[i], y_float[i]+dy_float[i]);
+ //DrawRectangle(draw_wand, x_float[i], y_float[i],
+ // x_float[i]+dx_float[i], y_float[i]+dy_float[i]);
}
}