|
gimme-alpha 0.1
|
#include <glib.h>#include <gio/gio.h>#include <libmodeling/bands.h>#include <libmodeling/wavefunction.h>#include <libmodeling/bands.h>#include <libmodeling/wavefunction.h>
Include dependency graph for read_nextnano_effectivemass_output.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Functions | |
| GList * | read_effectivemass_complex_wavefunctionfile (GInputStream *istream, GError **err, GList **titles) |
| void | print_effectivemass_wavefunction (GList *titles, GList *data) |
| struct mstar_wavefunction_1d * | read_effectivemass_complex_wavefunction2 (enum bands band, short unsigned int cluster_num, short unsigned int schroedinger_num, short unsigned int subsolution_num, enum boundary_types boundary, short unsigned int Kz_num, short unsigned int soln_num, GFile *base, GHashTable *input, GError **error) |
| void print_effectivemass_wavefunction | ( | GList * | titles, |
| GList * | data | ||
| ) |
Definition at line 146 of file read_nextnano_effectivemass_output.c.
References print_wavefunction_row(), and print_wavefunction_rowitem_by_title().
{
g_list_foreach(titles, print_wavefunction_rowitem_by_title, NULL);
printf("\n");
g_list_foreach(rows, print_wavefunction_row, titles);
}
Here is the call graph for this function:| struct mstar_wavefunction_1d* read_effectivemass_complex_wavefunction2 | ( | enum bands | band, |
| short unsigned int | cluster_num, | ||
| short unsigned int | schroedinger_num, | ||
| short unsigned int | subsolution_num, | ||
| enum boundary_types | boundary, | ||
| short unsigned int | Kz_num, | ||
| short unsigned int | soln_num, | ||
| GFile * | base, | ||
| GHashTable * | input, | ||
| GError ** | error | ||
| ) | [read] |
Definition at line 101 of file read_nextnano_effectivemass_output.c.
References convert_nextnano_mstar_wavefunction_to_general_1d(), destroy_hash(), DOUBLE_TYPE, get_wavefunction_filename(), read_nextnano_extract_item(), and read_titled_whitespaced_data().
Referenced by main().
{
int err;
*error = NULL;
GList *titles = NULL;
/*TODO: Provide sanity checks to make sure that the cluster,
schroedinger, subsoln, and kz numbs requested should actually exist!*/
char *wf_dir_str = read_nextnano_extract_item(input, "output-1-band-schroedinger", 0, "destination-directory", &err);
if(err != 0) {
fprintf(stderr, "Error extracting output-densities destination-directory from nextnano input.\n");
return NULL;
}
GString *wf_filename = get_wavefunction_filename(band, cluster_num, schroedinger_num, subsolution_num, boundary, Kz_num);
GFile *wf_dir = g_file_get_child(base, wf_dir_str);
GFile *wf_file = g_file_get_child(wf_dir, wf_filename->str);
GFileInputStream *wf_stream = g_file_read(wf_file, NULL, error);
if(*error != NULL) {
fprintf(stderr, "Error opening the wavefunction file (%s) for reading (error %s)\n", wf_filename->str, (*error)->message);
return NULL;
}
GList *wf_list = read_titled_whitespaced_data(G_INPUT_STREAM(wf_stream), error, &titles, '!', DOUBLE_TYPE);
struct mstar_wavefunction_1d *wf = convert_nextnano_mstar_wavefunction_to_general_1d(wf_list, "x-pos:", "ef_re(", "ef_im(", "):", soln_num);
g_list_free(titles);
g_list_foreach(wf_list, destroy_hash, NULL);
g_list_free(wf_list);
return wf;
}
Here is the call graph for this function:
Here is the caller graph for this function:| GList* read_effectivemass_complex_wavefunctionfile | ( | GInputStream * | istream, |
| GError ** | err, | ||
| GList ** | titles | ||
| ) |
Definition at line 130 of file read_nextnano_effectivemass_output.c.
References DOUBLE_TYPE, and read_titled_whitespaced_data().
{
/*String version of the data*/
*titles = NULL;
return read_titled_whitespaced_data(istream, err, titles, '!', DOUBLE_TYPE);
}
Here is the call graph for this function: