ergo
mm_limit_table.h
Go to the documentation of this file.
1 /* Ergo, version 3.8, a program for linear scaling electronic structure
2  * calculations.
3  * Copyright (C) 2019 Elias Rudberg, Emanuel H. Rubensson, Pawel Salek,
4  * and Anastasia Kruchinina.
5  *
6  * This program is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  *
19  * Primary academic reference:
20  * Ergo: An open-source program for linear-scaling electronic structure
21  * calculations,
22  * Elias Rudberg, Emanuel H. Rubensson, Pawel Salek, and Anastasia
23  * Kruchinina,
24  * SoftwareX 7, 107 (2018),
25  * <http://dx.doi.org/10.1016/j.softx.2018.03.005>
26  *
27  * For further information about Ergo, see <http://www.ergoscf.org>.
28  */
29 
38 #ifndef MM_LIMIT_TABLE_HEADER
39 #define MM_LIMIT_TABLE_HEADER
40 
41 #include "realtype.h"
42 #include "multipole_prep.h"
43 
44 
45 class MMLimitTable {
46  typedef struct {
49  static const int NO_OF_STEPS_PER_RANGE = 5;
50  static const int NO_OF_RANGES = 40;
51  typedef struct {
58  public:
59  MMLimitTable();
60  ~MMLimitTable();
61  void inittt(const MultipolePrepManager & multipolePrep);
63  const ergo_real* maxMomentVectorNormList1,
64  int degree2,
65  const ergo_real* maxMomentVectorNormList2,
66  ergo_real distance) const;
68  const multipole_struct_large* boxMultipole,
69  int maxDegreeForDistrs,
70  const ergo_real* maxMomentVectorNormForDistrsList,
71  ergo_real threshold) const;
74  // Stuff needed for Chunks&Tasks usage
75  void write_to_buffer ( char * dataBuffer, size_t const bufferSize ) const;
76  size_t get_size() const;
77  void assign_from_buffer ( char const * dataBuffer, size_t const bufferSize);
78 };
79 
80 
81 #endif
multipole_struct_large::degree
int degree
Definition: multipole_prep.h:54
template_blas_sqrt
Treal template_blas_sqrt(Treal x)
multipole.h
Code for computing multipole moments, and multipole interaction and translation matrices.
realtype.h
Definition of the main floating-point datatype used; the ergo_real type.
multipole_prep.h
This file contains preparatory stuff for computing multipole moments and related things.
MMLimitTable::rangeList
interaction_matrix_limit_range_struct rangeList[NO_OF_RANGES]
Definition: mm_limit_table.h:73
MMLimitTable::get_x_from_distance
const interaction_matrix_limit_struct & get_x_from_distance(ergo_real distance) const
Definition: mm_limit_table.cc:171
MAX_MULTIPOLE_DEGREE_BASIC
#define MAX_MULTIPOLE_DEGREE_BASIC
Definition: multipole_prep.h:48
RANGE_STEP_DIFF_FACTOR
const ergo_real RANGE_STEP_DIFF_FACTOR
Definition: mm_limit_table.cc:52
MMLimitTable::inittt
void inittt(const MultipolePrepManager &multipolePrep)
Definition: mm_limit_table.cc:65
ergo_real
double ergo_real
Definition: realtype.h:69
MMLimitTable::interaction_matrix_limit_struct::x
ergo_real x[MAX_MULTIPOLE_DEGREE+1][MAX_MULTIPOLE_DEGREE_BASIC+1]
Definition: mm_limit_table.h:47
MMLimitTable::interaction_matrix_limit_range_struct::step
ergo_real step
Definition: mm_limit_table.h:54
MMLimitTable::interaction_matrix_limit_range_struct::list
interaction_matrix_limit_struct list[NO_OF_STEPS_PER_RANGE]
Definition: mm_limit_table.h:55
MAX_ALLOWED_DISTANCE
const ergo_real MAX_ALLOWED_DISTANCE
Definition: mm_limit_table.cc:53
MMLimitTable::~MMLimitTable
~MMLimitTable()
Definition: mm_limit_table.cc:61
MMInteractor
Definition: multipole.h:69
template_blas_basicmath.h
MultipolePrepManager
Definition: multipole_prep.h:69
MMLimitTable::MMLimitTable
MMLimitTable()
Definition: mm_limit_table.cc:56
MAX_MULTIPOLE_DEGREE
#define MAX_MULTIPOLE_DEGREE
Definition: multipole_prep.h:45
MAX_NO_OF_MOMENTS_PER_MULTIPOLE_BASIC
#define MAX_NO_OF_MOMENTS_PER_MULTIPOLE_BASIC
Definition: multipole_prep.h:49
MMLimitTable::write_to_buffer
void write_to_buffer(char *dataBuffer, size_t const bufferSize) const
Definition: mm_limit_table.cc:248
MMLimitTable::NO_OF_RANGES
static const int NO_OF_RANGES
Definition: mm_limit_table.h:50
matrix_norm.h
Code for computing Euclidean norm of a dense matrix.
MMInteractor::getInteractionMatrix
int getInteractionMatrix(ergo_real dx, ergo_real dy, ergo_real dz, int l_1, int l_2, ergo_real *result_T)
Definition: multipole.cc:293
multipole_struct_large
Definition: multipole_prep.h:52
MMLimitTable::interaction_matrix_limit_range_struct::maxDistance
ergo_real maxDistance
Definition: mm_limit_table.h:53
MMLimitTable::noOfRangesUsed
int noOfRangesUsed
Definition: mm_limit_table.h:72
MMLimitTable::interaction_matrix_limit_struct
Definition: mm_limit_table.h:46
MMLimitTable::assign_from_buffer
void assign_from_buffer(char const *dataBuffer, size_t const bufferSize)
Definition: mm_limit_table.cc:259
MMLimitTable
Definition: mm_limit_table.h:45
MMLimitTable::get_size
size_t get_size() const
Definition: mm_limit_table.cc:255
MAX_NO_OF_MOMENTS_PER_MULTIPOLE
#define MAX_NO_OF_MOMENTS_PER_MULTIPOLE
Definition: multipole_prep.h:46
MMLimitTable::get_max_abs_mm_contrib
ergo_real get_max_abs_mm_contrib(int degree1, const ergo_real *maxMomentVectorNormList1, int degree2, const ergo_real *maxMomentVectorNormList2, ergo_real distance) const
Definition: mm_limit_table.cc:196
MMLimitTable::interaction_matrix_limit_range_struct::startDistance
ergo_real startDistance
Definition: mm_limit_table.h:52
HUGE_REAL_NUMBER
const ergo_real HUGE_REAL_NUMBER
Definition: mm_limit_table.cc:50
INITIAL_STEP
const ergo_real INITIAL_STEP
Definition: mm_limit_table.cc:51
get_euclidean_norm
ergo_real get_euclidean_norm(int m, int n, const ergo_real *A)
Definition: matrix_norm.cc:76
MMLimitTable::get_minimum_multipole_degree_needed
int get_minimum_multipole_degree_needed(ergo_real distance, const multipole_struct_large *boxMultipole, int maxDegreeForDistrs, const ergo_real *maxMomentVectorNormForDistrsList, ergo_real threshold) const
Definition: mm_limit_table.cc:220
MMLimitTable::NO_OF_STEPS_PER_RANGE
static const int NO_OF_STEPS_PER_RANGE
Definition: mm_limit_table.h:49
distance
static ergo_real distance(const ergo_real *a, const ergo_real *b)
Coomputes distance between two points, they do not need to be of the Vector3D type.
Definition: dft_common.cc:526
multipole_struct_large::euclideanNormList
ergo_real euclideanNormList[MAX_MULTIPOLE_DEGREE+1]
Definition: multipole_prep.h:58
mm_limit_table.h
MMLimitTable class used to predict the magnitude of contributions when using truncated multipole expa...
MMLimitTable::interaction_matrix_limit_range_struct
Definition: mm_limit_table.h:51