Skip to content

Commit

Permalink
Fixed memory leak in lsWriteVisualizationMesh and prepared release 1.…
Browse files Browse the repository at this point in the history
…3.0.
  • Loading branch information
XaverKlemenschits committed Oct 6, 2020
1 parent 305a8b3 commit a7dc082
Show file tree
Hide file tree
Showing 450 changed files with 7,406 additions and 3,419 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.4)

project(
"ViennaLS"
VERSION 1.2.0)
VERSION 1.3.0)

add_definitions(-DVIENNALS_VERSION=${PROJECT_VERSION})

Expand Down
6 changes: 6 additions & 0 deletions Examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ cmake_minimum_required(VERSION 3.4)

project(ViennaLSExamples)

## Enable Clang sanitizer for debug builds
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address" CACHE STRING "")
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUGS} -fno-omit-frame-pointer -fsanitize=address" CACHE STRING "")
endif()

MACRO(SUBDIRLIST result curdir)
FILE(GLOB children RELATIVE ${curdir} ${curdir}/*)
SET(dirlist "")
Expand Down
26 changes: 26 additions & 0 deletions Wrapping/pyWrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#include <lsToVoxelMesh.hpp>
#include <lsVTKReader.hpp>
#include <lsVTKWriter.hpp>
#include <lsWriteVisualizationMesh.hpp>
#include <lsWriter.hpp>

// always use double for python export
Expand Down Expand Up @@ -829,4 +830,29 @@ PYBIND11_MODULE(VIENNALS_MODULE_NAME, module) {
.def("setFileName", &lsWriter<T, D>::setFileName,
"Set the filename for the output file.")
.def("apply", &lsWriter<T, D>::apply, "Write to file.");

// lsWriteVisualizationMesh
pybind11::class_<lsWriteVisualizationMesh<T, D>,
lsSmartPointer<lsWriteVisualizationMesh<T, D>>>(
module, "lsWriteVisualizationMesh")
// constructors
.def(pybind11::init(
&lsSmartPointer<lsWriteVisualizationMesh<T, D>>::New<>))
.def(pybind11::init(&lsSmartPointer<lsWriteVisualizationMesh<T, D>>::New<
lsSmartPointer<lsDomain<T, D>> &>))
// methods
.def("insertNextLevelSet",
&lsWriteVisualizationMesh<T, D>::insertNextLevelSet,
"Insert next level set to convert. Bigger level sets wrapping "
"smaller ones, should be inserted last.")
.def("setFileName", &lsWriteVisualizationMesh<T, D>::setFileName,
"Set Name of File to write.")
.def("setExtractHullMesh",
&lsWriteVisualizationMesh<T, D>::setExtractHullMesh,
"Whether to extract a hull mesh. Defaults to false.")
.def("setExtractVolumeMesh",
&lsWriteVisualizationMesh<T, D>::setExtractVolumeMesh,
" Whether to extract a tetra volume mesh. Defaults to true.")
.def("apply", &lsWriteVisualizationMesh<T, D>::apply,
"Make and write mesh.");
}
2 changes: 1 addition & 1 deletion cmake/ViennaLSConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ if(@VIENNALS_USE_VTK@)
endif(NOT VTK_DIR)
find_package(VTK QUIET)
if(VTK_FOUND)
message(STATUS "Found VTK")
#message(STATUS "Found VTK")
add_compile_definitions(VIENNALS_USE_VTK)
include(${VTK_USE_FILE})
# only link needed vtk libraries for static builds
Expand Down
191 changes: 184 additions & 7 deletions docs/doxygen/html/AirGapDeposition_8cpp-example.html

Large diffs are not rendered by default.

21 changes: 14 additions & 7 deletions docs/doxygen/html/AirGapDeposition_8cpp.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="generator" content="Doxygen 1.8.16"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>ViennaLS: Examples/AirGapDeposition/AirGapDeposition.cpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
Expand All @@ -14,8 +14,9 @@
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(initResizable);
</script>
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
Expand All @@ -37,18 +38,21 @@
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<!-- Generated by Doxygen 1.8.16 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</script>
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
Expand All @@ -62,7 +66,9 @@
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('AirGapDeposition_8cpp.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
Expand Down Expand Up @@ -117,8 +123,9 @@ <h2 class="memtitle"><span class="permalink"><a href="#ae66f6b31b5ad750f1fe042a7
</tr>
</table>
</div><div class="memdoc">
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="AirGapDeposition_8cpp-example.html#a3">AirGapDeposition.cpp</a>.</dd>
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="AirGapDeposition_8cpp-example.html#a3">AirGapDeposition.cpp</a>.</dd>
</dl>

</div>
</div>
</div><!-- contents -->
Expand All @@ -129,7 +136,7 @@ <h2 class="memtitle"><span class="permalink"><a href="#ae66f6b31b5ad750f1fe042a7
<li class="navelem"><a class="el" href="dir_03680f297d755c096b0a1ead13ee12b7.html">Examples</a></li><li class="navelem"><a class="el" href="dir_4ed0eb80ca16f085a9da84a86c7aac74.html">AirGapDeposition</a></li><li class="navelem"><a class="el" href="AirGapDeposition_8cpp.html">AirGapDeposition.cpp</a></li>
<li class="footer">Generated by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.16 </li>
</ul>
</div>
</body>
Expand Down
Loading

0 comments on commit a7dc082

Please sign in to comment.