dev:printkey
Differences
This shows you the differences between two versions of the page.
Previous revision | |||
— | dev:printkey [2020/08/21 10:15] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Printkeys ====== | ||
+ | When writing output in cp2k, to the screen or a file, one should use a // | ||
+ | |||
+ | A printkey allows the user to control the output. He can e.g. turn if off, redirect it to a different file, or output after a certain number of iteration (see [[dev: | ||
+ | |||
+ | To each printkey belongs an input-section, | ||
+ | |||
+ | ====== Creating a Printkey Input-section ====== | ||
+ | |||
+ | <code Fortran> | ||
+ | USE cp_output_handling, | ||
+ | !... | ||
+ | CALL section_create(subsection, | ||
+ | description=" | ||
+ | n_keywords=0, | ||
+ | CALL cp_print_key_section_create(print_key," | ||
+ | description=" | ||
+ | print_level=low_print_level, | ||
+ | filename="", | ||
+ | CALL section_add_subsection(subsection, | ||
+ | CALL section_release(print_key, | ||
+ | !... | ||
+ | </ | ||
+ | |||
+ | ====== Using a Printkey for output ====== | ||
+ | |||
+ | <code Fortran> | ||
+ | USE cp_output_handling, | ||
+ | cp_print_key_unit_nr | ||
+ | !... | ||
+ | | ||
+ | | ||
+ | !... | ||
+ | | ||
+ | | ||
+ | IF (traj_unit > 0) THEN | ||
+ | | ||
+ | ENDIF | ||
+ | CALL cp_print_key_finished_output(traj_unit, | ||
+ | </ |