mirror of
https://github.com/triqs/dft_tools
synced 2024-09-12 05:38:31 +02:00
Fix in dos_tetra_weights_3d: return array<..> instead of array_view<..>
-In triqs version 2.2 array_views no longer own the memory they point to This means that array variables that are local to a function should always be returned as arrray and never as an array_view
This commit is contained in:
parent
fae8887f4f
commit
815e9adee8
@ -71,7 +71,7 @@ static const double small = 2.5e-2, tol = 1e-8;
|
|||||||
Returns corner contributions to the DOS of a band
|
Returns corner contributions to the DOS of a band
|
||||||
*/
|
*/
|
||||||
#ifdef __TETRA_ARRAY_VIEW
|
#ifdef __TETRA_ARRAY_VIEW
|
||||||
array_view<double, 2> dos_tetra_weights_3d(array_view<double, 1> eigk, double en, array_view<long, 2> itt)
|
array<double, 2> dos_tetra_weights_3d(array_view<double, 1> eigk, double en, array_view<long, 2> itt)
|
||||||
#else
|
#else
|
||||||
array<double, 2> dos_tetra_weights_3d(array<double, 1> eigk, double en, array<long, 2> itt)
|
array<double, 2> dos_tetra_weights_3d(array<double, 1> eigk, double en, array<long, 2> itt)
|
||||||
#endif
|
#endif
|
||||||
|
@ -28,7 +28,7 @@ using triqs::arrays::array_view;
|
|||||||
/// DOS of a band by analytical tetrahedron method
|
/// DOS of a band by analytical tetrahedron method
|
||||||
///
|
///
|
||||||
/// Returns corner weights for all tetrahedra for a given band and real energy.
|
/// Returns corner weights for all tetrahedra for a given band and real energy.
|
||||||
array_view<double, 2>
|
array<double, 2>
|
||||||
dos_tetra_weights_3d(array_view<double, 1> eigk, /// Band energies for each k-point
|
dos_tetra_weights_3d(array_view<double, 1> eigk, /// Band energies for each k-point
|
||||||
double en, /// Energy at which DOS weights are to be calculated
|
double en, /// Energy at which DOS weights are to be calculated
|
||||||
array_view<long, 2> itt /// Tetrahedra defined by k-point indices
|
array_view<long, 2> itt /// Tetrahedra defined by k-point indices
|
||||||
|
@ -15,6 +15,6 @@ module.add_preamble("""
|
|||||||
#include <triqs/cpp2py_converters/arrays.hpp>
|
#include <triqs/cpp2py_converters/arrays.hpp>
|
||||||
""")
|
""")
|
||||||
|
|
||||||
module.add_function ("array_view<double,2> dos_tetra_weights_3d (array_view<double,1> eigk, double en, array_view<long,2> itt)", doc = """DOS of a band by analytical tetrahedron method\n\n Returns corner weights for all tetrahedra for a given band and real energy.""")
|
module.add_function ("array<double,2> dos_tetra_weights_3d (array_view<double,1> eigk, double en, array_view<long,2> itt)", doc = """DOS of a band by analytical tetrahedron method\n\n Returns corner weights for all tetrahedra for a given band and real energy.""")
|
||||||
|
|
||||||
module.generate_code()
|
module.generate_code()
|
||||||
|
Loading…
Reference in New Issue
Block a user