Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Backofen, Rainer
amdis
Commits
83ed9754
Commit
83ed9754
authored
Feb 01, 2012
by
Praetorius, Simon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Png Reader/Writer included
parent
26f42781
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
44 additions
and
6 deletions
+44
-6
AMDiS/AMDISConfig.cmake.in
AMDiS/AMDISConfig.cmake.in
+15
-0
AMDiS/CMakeLists.txt
AMDiS/CMakeLists.txt
+17
-1
AMDiS/src/io/PngReader.cc
AMDiS/src/io/PngReader.cc
+4
-1
AMDiS/src/io/PngReader.h
AMDiS/src/io/PngReader.h
+4
-0
AMDiS/src/io/PngWriter.cc
AMDiS/src/io/PngWriter.cc
+3
-3
AMDiS/src/io/PngWriter.h
AMDiS/src/io/PngWriter.h
+1
-1
No files found.
AMDiS/AMDISConfig.cmake.in
View file @
83ed9754
...
...
@@ -61,6 +61,7 @@ endif(Boost_FOUND)
set(AMDIS_NEED_ZOLTAN @ENABLE_ZOLTAN@)
set(AMDIS_HAS_PARALLEL_DOMAIN @ENABLE_PARALLEL_DOMAIN@)
set(AMDIS_NEED_UMFPACK @ENABLE_UMFPACK@)
set(AMDIS_NEED_PNG @ENABLE_PNG@)
set(AMDIS_NEED_BDDCML @ENABLE_BDDCML@)
set(AMDIS_NEED_MKL @ENABLE_MKL@)
set(AMDIS_USE_FILE ${AMDIS_DIR}/AMDISUse.cmake)
...
...
@@ -102,6 +103,20 @@ if(AMDIS_NEED_UMFPACK)
endif()
endif(AMDIS_NEED_UMFPACK)
if(AMDIS_NEED_PNG)
set(AMDIS_PNG_PATH @PNG_PATH@)
list(APPEND AMDIS_INCLUDE_DIRS ${AMDIS_PNG_PATH})
find_library(PNG_LIB png
HINTS ENV LIBRARY_PATH
DOC "The PNG library")
if(PNG_LIB)
list(APPEND AMDIS_LIBRARIES ${PNG_LIB})
else()
message(FATAL_ERROR "Could not find the PNG library")
endif()
endif(AMDIS_NEED_PNG)
if(AMDIS_NEED_BDDCML)
set(AMDIS_BDDCML_PATH @BDDCML_PATH@)
list(APPEND AMDIS_INCLUDE_DIRS ${AMDIS_BDDCML_PATH})
...
...
AMDiS/CMakeLists.txt
View file @
83ed9754
...
...
@@ -36,6 +36,7 @@ SET(ENABLE_PARALLEL_DOMAIN "OFF" CACHE STRING "use parallel domain decomposition
option
(
USE_PETSC_DEV false
)
option
(
ENABLE_ZOLTAN false
)
option
(
ENABLE_UMFPACK
"Use of UMFPACK solver"
false
)
option
(
ENABLE_PNG
"use png reader/writer"
false
)
option
(
ENABLE_BDDCML
"Use of BDDCML library"
false
)
if
(
ENABLE_INTEL
)
...
...
@@ -157,6 +158,7 @@ SET(AMDIS_SRC ${SOURCE_DIR}/AdaptBase.cc
${
SOURCE_DIR
}
/io/MacroInfo.cc
${
SOURCE_DIR
}
/io/MacroReader.cc
${
SOURCE_DIR
}
/io/MacroWriter.cc
${
SOURCE_DIR
}
/io/PngReader.cc
${
SOURCE_DIR
}
/io/PngWriter.cc
${
SOURCE_DIR
}
/io/PovrayWriter.cc
${
SOURCE_DIR
}
/io/ValueReader.cc
...
...
@@ -277,12 +279,26 @@ if(ENABLE_UMFPACK)
include_directories
(
${
UMFPACK_PATH
}
${
UFCONFIG_PATH
}
${
AMD_PATH
}
)
list
(
APPEND COMPILEFLAGS
"-DHAVE_UMFPACK=1"
"-DMTL_HAS_UMFPACK"
)
else
()
message
(
FATAL_ERROR
"Could not find the UMFPACK header
s
."
)
message
(
FATAL_ERROR
"Could not find the UMFPACK header
umfpack.h
."
)
endif
()
SET
(
RPM_DEPEND_STR
"blas"
)
endif
(
ENABLE_UMFPACK
)
if
(
ENABLE_PNG
)
find_file
(
PNG_H png.h
HINTS ENV CPATH /usr/include
DOC
"headerfile png.h for PNG-READER"
)
if
(
PNG_H
)
get_filename_component
(
PNG_PATH
${
PNG_H
}
PATH
)
include_directories
(
${
PNG_PATH
}
)
list
(
APPEND COMPILEFLAGS
"-DHAVE_PNG=1"
)
else
()
message
(
FATAL_ERROR
"Could not find the PNG header png.h."
)
endif
()
endif
(
ENABLE_PNG
)
if
(
ENABLE_BDDCML
)
SET
(
BDDCML_LINK_LIST
""
CACHE STRING
"Further libraries to be linked with BDDCML"
)
...
...
AMDiS/src/io/PngReader.cc
View file @
83ed9754
...
...
@@ -9,6 +9,8 @@
//
// See also license.opensource.txt in the distribution.
#if defined HAVE_PNG
#include "PngReader.h"
#include "png.h"
...
...
@@ -64,7 +66,6 @@ namespace AMDiS {
cout
<<
"Bytes per pixel: "
<<
bytesPerPixel
<<
endl
;
double
value
=
0
;
const
DOFAdmin
*
admin
=
vec
->
getFeSpace
()
->
getAdmin
();
const
BasisFunction
*
basFcts
=
vec
->
getFeSpace
()
->
getBasisFcts
();
int
numBasFcts
=
basFcts
->
getNumber
();
...
...
@@ -111,3 +112,5 @@ namespace AMDiS {
};
};
#endif
AMDiS/src/io/PngReader.h
View file @
83ed9754
...
...
@@ -23,6 +23,8 @@
#ifndef AMDIS_PNGREADER_H
#define AMDIS_PNGREADER_H
#if defined HAVE_PNG
#include "AMDiS.h"
namespace
AMDiS
{
...
...
@@ -67,3 +69,5 @@ namespace AMDiS {
}
#endif
#endif
AMDiS/src/io/PngWriter.cc
View file @
83ed9754
...
...
@@ -10,7 +10,7 @@
// See also license.opensource.txt in the distribution.
#ifdef HAVE_PNG
#if
def
ined
HAVE_PNG
#include <float.h>
#include <png.h>
...
...
@@ -31,8 +31,8 @@ namespace AMDiS {
TraverseStack
stack
;
ElInfo
*
elInfo
=
stack
.
traverseFirst
(
dataCollector
->
getMesh
(),
-
1
,
Mesh
::
CALL_LEAF_EL
|
Mesh
::
FILL_COORDS
);
double
pointdist
=
min
(
absteukl
(
elInfo
->
getCoord
(
0
),
elInfo
->
getCoord
(
1
)),
min
(
absteukl
(
elInfo
->
getCoord
(
1
),
elInfo
->
getCoord
(
2
)),
double
pointdist
=
std
::
min
(
absteukl
(
elInfo
->
getCoord
(
0
),
elInfo
->
getCoord
(
1
)),
std
::
min
(
absteukl
(
elInfo
->
getCoord
(
1
),
elInfo
->
getCoord
(
2
)),
absteukl
(
elInfo
->
getCoord
(
2
),
elInfo
->
getCoord
(
0
))));
while
(
elInfo
)
{
for
(
int
i
=
0
;
i
<
3
;
i
++
)
{
...
...
AMDiS/src/io/PngWriter.h
View file @
83ed9754
...
...
@@ -23,7 +23,7 @@
#ifndef AMDIS_PNGWRITER_H
#define AMDIS_PNGWRITER_H
#ifdef HAVE_PNG
#if
def
ined
HAVE_PNG
#include "BasisFunction.h"
#include "DataCollector.h"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment