Skip to content
Open
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
11 changes: 9 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
cmake_minimum_required(VERSION 3.10)
project(MCSM)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD 14)

find_package(Boost 1.67.0 REQUIRED COMPONENTS system)
if(Boost_FOUND)
include_directories(${Boost_INCLUDE_DIRS})
endif()

find_library(MCSM libarmadillo)

add_executable(MCSM main.cpp Model/Model.hpp Model/Heisenberg.cpp Algorithm/MonteCarlo.cpp Lattice/Lattice.hpp Model/Heisenberg.hpp Algorithm/MonteCarlo.hpp Algorithm/Algorithm.hpp)
file(GLOB_RECURSE SOURCES "src/*.cpp" "src/*.hpp")

add_executable(MCSM ${SOURCES})

target_link_libraries(MCSM armadillo)
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
FROM ubuntu:18.10
RUN apt update && DEBIAN_FRONTEND=noninteractive apt install -y g++ git cmake nlohmann-json-dev libarmadillo-dev
RUN apt update && DEBIAN_FRONTEND=noninteractive apt install -y g++ git cmake nlohmann-json-dev libarmadillo-dev libssl-dev libboost1.67-all-dev nano

RUN mkdir /deps && cd /deps && git clone https://gitlab.com/eidheim/Simple-WebSocket-Server.git && cd Simple-WebSocket-Server && cmake . && make install

COPY . /usr/local

WORKDIR /usr/local/

RUN cmake . && make

CMD ./MCSM ## docker build -t mcsm . && docker run mcsm

CMD sleep infinity ### cmake . && make && ./MCSM ## docker build -t mcsm . && docker run mcsm
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 9 additions & 0 deletions src/WebSocket.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#include "WebSocket.hpp"

void WebSocket::RunServer() {

}

void SendFrame() {

}
11 changes: 11 additions & 0 deletions src/WebSocket.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#pragma once


#include <simple-websocket-server/server_ws.hpp>

using WsServer = SimpleWeb::SocketServer<SimpleWeb::WS>;

class WebSocket {
void RunServer();
void SendFrame();
};
5 changes: 5 additions & 0 deletions main.cpp → src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
#include <iostream>
#include <memory>
#include <armadillo>
#include "Model/Heisenberg.hpp"
#include "Algorithm/MonteCarlo.hpp"
#include "WebSocket.hpp"


using namespace arma;

int main() {
auto ws = std::make_unique<WebSocket>();

std::cout << "Phys-sym v. 0.0" << std::endl;
std::cout << "Simulation software" << std::endl << std::endl;

Expand Down