Commit ed5ff185 authored by Martin Beseda's avatar Martin Beseda
Browse files

[CODE] [ENH] Minor code improvements.

parent aa00b162
......@@ -31,7 +31,7 @@ namespace lib4neuro {
LIB4NEURO_API void transform_input_to_acsf(std::unordered_map<ELEMENT_SYMBOL, Element*>& element_description);
[[nodiscard]] ELEMENT_SYMBOL get_element_symbol(std::string symbol);
[[nodiscard]] ELEMENT_SYMBOL get_element_symbol(const std::string& symbol);
public:
LIB4NEURO_API explicit XYZReader(const std::string& file_path, bool ignore_charge=false);
......
......@@ -2,8 +2,6 @@
// Created by martin on 20.08.19.
//
#define ARMA_ALLOW_FAKE_GCC
#include <4neuro.h>
#include <iostream>
#include <exception>
......
static char help[] = "";
#define ARMA_ALLOW_FAKE_GCC
#include <armadillo>
#include <mpi.h>
......
......@@ -11,7 +11,7 @@
#include <boost/functional/hash.hpp>
#include <mpi.h>
#include "../mpi_wrapper.h"
#include "MPIWrapper/mpi_wrapper.h"
#include "LearningMethods/LevenbergMarquardt.h"
#include "Reader/XYZReader.h"
......
......@@ -15,10 +15,10 @@
#define ERR_MSG(msg) std::string(boost::typeindex::type_id_with_cvr<decltype(*this)>().pretty_name()) + "::" + __func__ + "(): " + msg + ""
#endif // L4N_DEBUG
#define THROW_RUNTIME_ERROR(msg) std::throw_with_nested(std::runtime_error(ERR_MSG(msg))) // Errors, that can't be detected by looking at the code
#define THROW_LOGIC_ERROR(msg) std::throw_with_nested(std::logic_error(ERR_MSG(msg))) // Errors, that can be detected by looking at the code
#define THROW_INVALID_ARGUMENT_ERROR(msg) std::throw_with_nested(std::invalid_argument(ERR_MSG(msg)))
#define THROW_NOT_IMPLEMENTED_ERROR(msg) std::throw_with_nested(std::logic_error(ERR_MSG("This function is not implemented. " + msg)))
#define THROW_OUT_OF_RANGE_ERROR(msg) std::throw_with_nested(std::out_of_range(ERR_MSG(msg)))
#define THROW_RUNTIME_ERROR(msg) std::throw_with_nested(std::runtime_error(ERR_MSG(msg))); // Errors, that can't be detected by looking at the code
#define THROW_LOGIC_ERROR(msg) std::throw_with_nested(std::logic_error(ERR_MSG(msg))); // Errors, that can be detected by looking at the code
#define THROW_INVALID_ARGUMENT_ERROR(msg) std::throw_with_nested(std::invalid_argument(ERR_MSG(msg)));
#define THROW_NOT_IMPLEMENTED_ERROR(msg) std::throw_with_nested(std::logic_error(ERR_MSG("This function is not implemented. " + msg)));
#define THROW_OUT_OF_RANGE_ERROR(msg) std::throw_with_nested(std::out_of_range(ERR_MSG(msg)));
#endif //LIB4NEURO_EXCEPTIONS_H
......@@ -2,7 +2,7 @@
#ifndef PROJECT_MESSAGE_H
#define PROJECT_MESSAGE_H
#include "mpi_wrapper.h"
#include "MPIWrapper/mpi_wrapper.h"
#include <cassert>
#include <iomanip>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment