Skip to content

Integrals don't work on charge densities #159

@langbenjf

Description

@langbenjf

I am trying a calculation that requires an integral over a function of the charge density. I believe this is currently not possible.

By looking at the github code and the error messages I am getting I believe that the issue is that Charge Density fields generated either by "(get-charge-density band)" or "(get-efield band)(compute-field-divergence)" both result in the variable "curfield_type" being set to "C".

This value ("C") is not on the list of values that the integral function will accept. Specifically on lines 1384 and 1528 of the file "fields.c" the allowed cuffield_types seem are listed, and neither includes "C".

In my experiments it looks like just adding "C" to the lists on line 1384 and 1391 may have fixed the problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions