votca 2024.1-dev
Loading...
Searching...
No Matches
boundarycondition.h
Go to the documentation of this file.
1/*
2 * Copyright 2009-2019 The VOTCA Development Team (http://www.votca.org)
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 */
17#ifndef VOTCA_CSG_BOUNDARYCONDITION_H
18#define VOTCA_CSG_BOUNDARYCONDITION_H
19#pragma once
20
21// Standard includes
22#include <memory>
23
24// VOTCA includes
25#include <votca/tools/eigen.h>
26
27namespace votca {
28namespace csg {
29
42
43 public:
44 virtual ~BoundaryCondition() = default;
45
54 virtual std::unique_ptr<BoundaryCondition> Clone() const = 0;
55
60 void setBox(const Eigen::Matrix3d &box) noexcept { box_ = box; };
61
66 const Eigen::Matrix3d &getBox() const noexcept { return box_; };
67
74 double getShortestBoxDimension() const;
75
80 virtual double BoxVolume() const noexcept;
81
86 virtual Eigen::Vector3d BCShortestConnection(
87 const Eigen::Vector3d &r_i, const Eigen::Vector3d &r_j) const = 0;
88
90 virtual eBoxtype getBoxType() const noexcept = 0;
91
92 protected:
93 Eigen::Matrix3d box_;
94};
95
96} // namespace csg
97} // namespace votca
98
99#endif // VOTCA_CSG_BOUNDARYCONDITION_H
Class keeps track of how the boundaries of the system are handled.
virtual double BoxVolume() const noexcept
void setBox(const Eigen::Matrix3d &box) noexcept
virtual ~BoundaryCondition()=default
double getShortestBoxDimension() const
Self explanatory gets the shortest dimension of the boundary conditions.
virtual Eigen::Vector3d BCShortestConnection(const Eigen::Vector3d &r_i, const Eigen::Vector3d &r_j) const =0
const Eigen::Matrix3d & getBox() const noexcept
virtual std::unique_ptr< BoundaryCondition > Clone() const =0
Safe way to allow child classes to be copied.
virtual eBoxtype getBoxType() const noexcept=0
base class for all analysis tools
Definition basebead.h:33