Skip to content

Commit

Permalink
more translation
Browse files Browse the repository at this point in the history
  • Loading branch information
rboman committed Nov 10, 2023
1 parent e9ecc46 commit adf59f1
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 1 deletion.
24 changes: 24 additions & 0 deletions classes/sph0/louis++/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.14)
PROJECT(LOUIS CXX)

# build type is "" by default in Linux
IF(NOT CMAKE_BUILD_TYPE)
SET( CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE)
ENDIF()

IF(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP") # parallel build with MSVC
ENDIF()

# enable C++11
SET(CMAKE_CXX_STANDARD 17)
SET(CMAKE_CXX_STANDARD_REQUIRED ON)

# find Eigen
FIND_PATH(EIGEN_INCLUDE_DIRS "Eigen/Dense"
PATHS "${PROJECT_SOURCE_DIR}/lib/eigen" "/usr/include/eigen3")
MESSAGE(STATUS "EIGEN_INCLUDE_DIRS=" ${EIGEN_INCLUDE_DIRS})
IF(NOT EIGEN_INCLUDE_DIRS)
MESSAGE(FATAL_ERROR "Eigen include dir not found!")
ENDIF()
INCLUDE_DIRECTORIES(${EIGEN_INCLUDE_DIRS})



FILE(GLOB SRCS *.h *.cpp)

ADD_EXECUTABLE(louis ${SRCS})
2 changes: 1 addition & 1 deletion classes/sph0/louis++/ParticleManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class ParticleManager
{
public:
ParticleSort sorting; ///< sorting machine
FixedParticle *part; ///< array of pointers toward particles
FixedParticle *part; ///< array of pointers toward particles
int numFP; ///< number of fixed particles
int numMP; ///< number of mobile particles
int numPart; ///< number of particles (FP+MP)
Expand Down
8 changes: 8 additions & 0 deletions classes/sph0/louis++/sph.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#include "sph.h"


double eval_r(Eigen::Vector3d const &xyz, Eigen::Vector3d const &xyz2)
{
return (xyz-xyz2).norm();
}

23 changes: 23 additions & 0 deletions classes/sph0/louis++/sph.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,27 @@ class MobileParticle;
class ParticleManager;
class ParticleSort;

enum Kernel
{
K_CUBIC_SPLINE = 1,
K_QUADRATIC = 2,
K_QUINTIC_SPLINE = 3
};

enum KernelCorrection
{
KCORR_OFF = 0,
KCORR_ON = 1
};

enum Law
{
LAW_IDEAL_GAS = 1,
LAW_QINC_FLUID = 2
};

#include <Eigen/Dense>

double eval_r(Eigen::Vector3d const &xyz, Eigen::Vector3d const &xyz2);

#endif // SPH_H

0 comments on commit adf59f1

Please sign in to comment.