Skip to content
Merged
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
15 changes: 9 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ include("cmake/cpm.cmake")

CPMAddPackage(
NAME ViennaCore
VERSION 1.9.0
VERSION 1.9.1
GIT_REPOSITORY "https://github.com/ViennaTools/ViennaCore"
EXCLUDE_FROM_ALL ${VIENNAPS_BUILD_PYTHON}
OPTIONS "VIENNACORE_USE_GPU ${VIENNAPS_USE_GPU}")
Expand All @@ -122,13 +122,13 @@ CPMAddPackage(
EXCLUDE_FROM_ALL ${VIENNAPS_BUILD_PYTHON}
OPTIONS "VIENNARAY_USE_GPU ${VIENNAPS_USE_GPU}")

CPMFindPackage(
CPMAddPackage(
NAME ViennaLS
VERSION 5.4.0
GIT_REPOSITORY "https://github.com/ViennaTools/ViennaLS"
EXCLUDE_FROM_ALL ${VIENNAPS_BUILD_PYTHON})

CPMFindPackage(
CPMAddPackage(
NAME ViennaCS
VERSION 1.1.1
GIT_REPOSITORY "https://github.com/ViennaTools/ViennaCS"
Expand All @@ -143,6 +143,7 @@ target_link_libraries(${PROJECT_NAME} INTERFACE ViennaTools::ViennaCore ViennaTo

if(VIENNAPS_PRECOMPILE_HEADERS)
set(VIENNAPS_LINKAGE SHARED)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH ON)

if(VIENNAPS_STATIC_BUILD)
set(VIENNAPS_LINKAGE STATIC)
Expand All @@ -152,8 +153,10 @@ if(VIENNAPS_PRECOMPILE_HEADERS)
add_library(${LIB_NAME} ${VIENNAPS_LINKAGE})

target_link_libraries(${LIB_NAME} PRIVATE ${PROJECT_NAME})
target_compile_definitions(${LIB_NAME} PRIVATE VIENNAPS_USE_PRECOMPILED)
target_sources(${LIB_NAME} PRIVATE "lib/specializations.cpp")
target_compile_definitions(${LIB_NAME} PRIVATE VIENNAPS_USE_PRECOMPILED=1
VIENNACORE_COMPILE_SHARED_LIB=1)
target_sources(${LIB_NAME} PRIVATE "lib/specMain.cpp" "lib/specGeometries.cpp"
"lib/specModels.cpp")

set_target_properties(
${LIB_NAME}
Expand Down Expand Up @@ -227,4 +230,4 @@ packageProject(
INCLUDE_DIR ${PROJECT_SOURCE_DIR}/include/viennaps
INCLUDE_DESTINATION include/viennaps-${PROJECT_VERSION}
COMPATIBILITY SameMajorVersion
DEPENDENCIES "ViennaCore;ViennaLS;ViennaRay;ViennaCS;OpenMP")
DEPENDENCIES "ViennaCore;ViennaLS;ViennaRay;ViennaCS")
1 change: 1 addition & 0 deletions include/viennaps/psCreateSurfaceMesh.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <lsDomain.hpp>
#include <lsMesh.hpp>
#include <lsToSurfaceMesh.hpp>

#include <rayMesh.hpp>

Expand Down
12 changes: 8 additions & 4 deletions include/viennaps/psVTKRenderWindow.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,9 @@ void InteractorOnChar(vtkRenderWindowInteractor *rwi,
// Full definition of Custom3DInteractorStyle after VTKRenderWindow is complete
class Custom3DInteractorStyle : public vtkInteractorStyleTrackballCamera {
public:
static Custom3DInteractorStyle *New();
static Custom3DInteractorStyle *New() {
VTK_STANDARD_NEW_BODY(Custom3DInteractorStyle);
}
vtkTypeMacro(Custom3DInteractorStyle, vtkInteractorStyleTrackballCamera);

void OnChar() override {
Expand All @@ -626,11 +628,13 @@ class Custom3DInteractorStyle : public vtkInteractorStyleTrackballCamera {
viennaps::VTKRenderWindow<double, 3> *Window = nullptr;
}; // namespace viennaps

vtkStandardNewMacro(Custom3DInteractorStyle);
// vtkStandardNewMacro(Custom3DInteractorStyle);

class Custom2DInteractorStyle : public vtkInteractorStyleImage {
public:
static Custom2DInteractorStyle *New();
static Custom2DInteractorStyle *New() {
VTK_STANDARD_NEW_BODY(Custom2DInteractorStyle);
}
vtkTypeMacro(Custom2DInteractorStyle, vtkInteractorStyleImage);

void OnLeftButtonDown() override { this->StartPan(); }
Expand All @@ -649,7 +653,7 @@ class Custom2DInteractorStyle : public vtkInteractorStyleImage {
viennaps::VTKRenderWindow<double, 2> *Window = nullptr;
}; // namespace viennaps

vtkStandardNewMacro(Custom2DInteractorStyle);
// vtkStandardNewMacro(Custom2DInteractorStyle);

// VTKRenderWindow::initialize() implementation - defined after
// Custom3DInteractorStyle
Expand Down
18 changes: 18 additions & 0 deletions lib/specGeometries.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#include <geometries/psGeometryFactory.hpp>
#include <geometries/psMakeFin.hpp>
#include <geometries/psMakeHole.hpp>
#include <geometries/psMakePlane.hpp>
#include <geometries/psMakeStack.hpp>
#include <geometries/psMakeTrench.hpp>

namespace viennaps {

// Precompile specializations for geometries
PRECOMPILE_SPECIALIZE(GeometryFactory)
PRECOMPILE_SPECIALIZE(MakeFin)
PRECOMPILE_SPECIALIZE(MakeHole)
PRECOMPILE_SPECIALIZE(MakePlane)
PRECOMPILE_SPECIALIZE(MakeStack)
PRECOMPILE_SPECIALIZE(MakeTrench)

} // namespace viennaps
38 changes: 38 additions & 0 deletions lib/specMain.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#include <gds/psGDSGeometry.hpp>
#include <gds/psGDSReader.hpp>

#include <process/psProcess.hpp>
#include <process/psProcessModel.hpp>

#include <psDomain.hpp>
#include <psDomainSetup.hpp>
#include <psExtrude.hpp>
#include <psPlanarize.hpp>
#include <psRateGrid.hpp>
#include <psReader.hpp>
#include <psSlice.hpp>
#include <psToDiskMesh.hpp>
#include <psWriter.hpp>

#include <lsPreCompileMacros.hpp>

// this include may only appear in a single source file:
#include <optix_function_table_definition.h>

namespace viennaps {

// Precompile specializations for commonly used classes
PRECOMPILE_SPECIALIZE(Domain)
PRECOMPILE_SPECIALIZE(Process)
PRECOMPILE_SPECIALIZE(Planarize)
PRECOMPILE_SPECIALIZE(ProcessModelCPU)
PRECOMPILE_SPECIALIZE(Reader)
PRECOMPILE_SPECIALIZE(Writer)
PRECOMPILE_SPECIALIZE(GDSGeometry)
PRECOMPILE_SPECIALIZE(GDSReader)
PRECOMPILE_SPECIALIZE(ToDiskMesh)
PRECOMPILE_SPECIALIZE(RateGrid)
PRECOMPILE_SPECIALIZE_PRECISION(Extrude)
PRECOMPILE_SPECIALIZE_PRECISION(Slice)

} // namespace viennaps
63 changes: 0 additions & 63 deletions lib/specializations.cpp → lib/specModels.cpp
Original file line number Diff line number Diff line change
@@ -1,43 +1,3 @@
#include <gds/psGDSGeometry.hpp>
#include <gds/psGDSReader.hpp>

#include <process/psProcess.hpp>
#include <process/psProcessModel.hpp>

#include <psDomain.hpp>
#include <psDomainSetup.hpp>
#include <psExtrude.hpp>
#include <psPlanarize.hpp>
#include <psRateGrid.hpp>
#include <psReader.hpp>
#include <psSlice.hpp>
#include <psToDiskMesh.hpp>
#include <psWriter.hpp>

#include <lsPreCompileMacros.hpp>

namespace viennaps {

// Precompile specializations for commonly used classes
PRECOMPILE_SPECIALIZE(Domain)
PRECOMPILE_SPECIALIZE(Process)
PRECOMPILE_SPECIALIZE(Planarize)
PRECOMPILE_SPECIALIZE(ProcessModelCPU)
PRECOMPILE_SPECIALIZE(Reader)
PRECOMPILE_SPECIALIZE(Writer)
PRECOMPILE_SPECIALIZE(GDSGeometry)
PRECOMPILE_SPECIALIZE(GDSReader)
PRECOMPILE_SPECIALIZE(ToDiskMesh)
PRECOMPILE_SPECIALIZE(RateGrid)
PRECOMPILE_SPECIALIZE_PRECISION(Extrude)
PRECOMPILE_SPECIALIZE_PRECISION(Slice)

} // namespace viennaps

// ----------------------------------------------------------------
// Specializations for process models
// ----------------------------------------------------------------

#include <models/psCF4O2Etching.hpp>
#include <models/psCSVFileProcess.hpp>
#include <models/psDirectionalProcess.hpp>
Expand Down Expand Up @@ -99,27 +59,4 @@ PRECOMPILE_SPECIALIZE(SingleParticleALD)
// Other Models
PRECOMPILE_SPECIALIZE(OxideRegrowth)

} // namespace viennaps

// ----------------------------------------------------------------
// Specializations for geometries
// ----------------------------------------------------------------

#include <geometries/psGeometryFactory.hpp>
#include <geometries/psMakeFin.hpp>
#include <geometries/psMakeHole.hpp>
#include <geometries/psMakePlane.hpp>
#include <geometries/psMakeStack.hpp>
#include <geometries/psMakeTrench.hpp>

namespace viennaps {

// Precompile specializations for geometries
PRECOMPILE_SPECIALIZE(GeometryFactory)
PRECOMPILE_SPECIALIZE(MakeFin)
PRECOMPILE_SPECIALIZE(MakeHole)
PRECOMPILE_SPECIALIZE(MakePlane)
PRECOMPILE_SPECIALIZE(MakeStack)
PRECOMPILE_SPECIALIZE(MakeTrench)

} // namespace viennaps
Loading