00001 /* Ergo, version 3.7, a program for linear scaling electronic structure 00002 * calculations. 00003 * Copyright (C) 2018 Elias Rudberg, Emanuel H. Rubensson, Pawel Salek, 00004 * and Anastasia Kruchinina. 00005 * 00006 * This program is free software: you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation, either version 3 of the License, or 00009 * (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00018 * 00019 * Primary academic reference: 00020 * Ergo: An open-source program for linear-scaling electronic structure 00021 * calculations, 00022 * Elias Rudberg, Emanuel H. Rubensson, Pawel Salek, and Anastasia 00023 * Kruchinina, 00024 * SoftwareX 7, 107 (2018), 00025 * <http://dx.doi.org/10.1016/j.softx.2018.03.005> 00026 * 00027 * For further information about Ergo, see <http://www.ergoscf.org>. 00028 */ 00029 00039 #ifndef MONOMIAL_INFO_HEADER 00040 #define MONOMIAL_INFO_HEADER 00041 00042 #include <cstring> 00043 #include "polydegree.h" 00044 00045 /* We need a monomial degree that is 4 times the highest 00046 basisfunction polynomial degree, to handle two-electron integrals. 00047 */ 00048 const int MONOMIAL_N_MAX = BASIS_FUNC_POLY_MAX_DEGREE*4; 00049 00050 typedef struct 00051 { 00052 int ix; 00053 int iy; 00054 int iz; 00055 } monomial_struct; 00056 00057 struct monomial_info_struct 00058 { 00059 int noOfMonomialsTot; 00060 monomial_struct* monomial_list; 00061 int no_of_monomials_list[MONOMIAL_N_MAX+1]; 00062 int monomial_index_list[MONOMIAL_N_MAX+1][MONOMIAL_N_MAX+1][MONOMIAL_N_MAX+1]; 00063 void init(); 00064 monomial_info_struct(); 00065 ~monomial_info_struct(); 00066 // Stuff needed for Chunks&Tasks usage 00067 monomial_info_struct(const monomial_info_struct & other); 00068 void write_to_buffer ( char * dataBuffer, size_t const bufferSize ) const; 00069 size_t get_size() const; 00070 void assign_from_buffer ( char const * dataBuffer, size_t const bufferSize); 00071 }; 00072 00073 #endif