Merge lp:~nickpapior/siesta/4.1-md-supercell into lp:siesta/4.1

Proposed by Nick Papior
Status: Merged
Approved by: Alberto Garcia
Approved revision: 985
Merged at revision: 985
Proposed branch: lp:~nickpapior/siesta/4.1-md-supercell
Merge into: lp:siesta/4.1
Diff against target: 6723 lines (+4458/-701) (has conflicts)
50 files modified
Docs/developer/doxygen-siesta (+2484/-0)
Docs/developer/ford-pages/datastructures/1-buds.md (+59/-0)
Docs/developer/ford-pages/datastructures/2-sparse.md (+74/-0)
Docs/developer/ford-pages/datastructures/index.md (+8/-0)
Docs/developer/ford-pages/implementation/1-auxiliary-supercell.md (+133/-0)
Docs/developer/ford-pages/implementation/index.md (+6/-0)
Docs/developer/ford-pages/index.md (+11/-0)
Docs/developer/ford-siesta.md (+66/-0)
Docs/siesta.tex (+21/-29)
Src/Fstack.T90 (+1/-0)
Src/Makefile (+13/-11)
Src/Pair.T90 (+2/-0)
Src/basic_type.inc (+2/-1)
Src/class_SpData1D.T90 (+3/-0)
Src/class_SpData2D.T90 (+3/-0)
Src/class_Sparsity.F90 (+6/-1)
Src/extrae_eventllist.F90 (+1/-1)
Src/extrapolateSpData2D.F90 (+3/-3)
Src/m_handle_sparse.F90 (+815/-9)
Src/m_iodm.F90 (+26/-11)
Src/m_new_dm.F90 (+154/-71)
Src/m_sparse.F90 (+11/-0)
Src/m_supercell.F90 (+0/-166)
Src/m_test_io.F90 (+3/-2)
Src/m_ts_electype.F90 (+5/-3)
Src/m_ts_iodm.F90 (+32/-11)
Src/md_utils.f90 (+0/-40)
Src/post_scf_work.F (+2/-2)
Src/read_options.F90 (+4/-8)
Src/restructSpData2D.F90 (+67/-53)
Src/save_density_matrix.F (+5/-4)
Src/siesta_end.F (+1/-1)
Src/siesta_geom.F90 (+7/-5)
Src/siesta_init.F (+6/-17)
Src/siesta_options.F90 (+1/-3)
Src/sparse_matrices.F90 (+192/-82)
Src/spinorbit.f (+1/-1)
Src/state_init.F (+83/-56)
Util/COOP/Makefile (+13/-10)
Util/Denchar/Src/Makefile (+13/-10)
Util/Gen-basis/Makefile (+13/-10)
Util/Grimme/Makefile (+13/-10)
Util/Helpers/Makefile (+13/-10)
Util/STM/ol-stm/Src/Makefile (+13/-10)
Util/SpPivot/Makefile (+13/-10)
Util/TS/TBtrans/Makefile (+13/-10)
Util/TS/ts2ts/Makefile (+13/-10)
Util/TS/tshs2tshs/Makefile (+13/-10)
Util/VCA/Makefile (+13/-10)
version.info (+4/-0)
Text conflict in version.info
To merge this branch: bzr merge lp:~nickpapior/siesta/4.1-md-supercell
Reviewer Review Type Date Requested Status
Alberto Garcia Approve
Review via email: mp+354028@code.launchpad.net

Commit message

Fixing MD/supercell changes to the sparsity pattern, add initial developer documentation template

This fixes the remaining issue of changing the sparsity pattern while using DM extrapolation.
I.e. now the DM_history sparse matrices are aligned with the current MD-steps sparse pattern.
Additionally this change also allows reading *any* DM file which is then converted to the intrinsic
sparse pattern used by siesta. This brings forth a nice platform for creating better initial guesses
based on simpler models (e.g. use sisl to create a better guess).

Secondly, Alberto created an initial template for doing developer documentation in Siesta.
Now FORD (doxygen for testing purposes) may be used to generate documentation of the full
Siesta code!
Indeed this is extremely valuable to point new-comers to internal details in Siesta.

To post a comment you must log in.
Revision history for this message
Alberto Garcia (albertog) wrote :

For now, just a heads-up on a misbehavior of "correct_supercell" when nsc_read=(1,1,1), and a request for clarification of what the code is doing in the routine.

Revision history for this message
Alberto Garcia (albertog) wrote :

A followup to the folding corrrection. Perhaps it is useful to save also S in the DM file (it is just another "data string" which can go at the end of the file.

982. By Nick Papior

Updated description in the code for the correction of the supercell

Revision history for this message
Nick Papior (nickpapior) wrote :

1) Is it a calculation with folding that you want to initialize from? I.e. the nsc_read = (1,1,1) in this case?

2) I agree, this would be the best, to handle the overlap matrix, however, in cases where one wan't to create an initial DM from previously (separate) calculated DM it becomes too elaborate. In the end I think this is mainly a good idea from a perspective of doing manual interpolation and/or manual initialization.

As for the nsc_read == 1, I can successfully run the script I send (privately) with nsc_read == 1, without problems?
Secondly, where do you want the extra clarification to be put, in the dev-docs, or the source?
Could you check out the new commit?

Revision history for this message
Alberto Garcia (albertog) wrote :
Download full text (4.3 KiB)

> On 3 Sep 2018, at 10:21, Nick Papior <email address hidden> wrote:
>
> 1) Is it a calculation with folding that you want to initialize from? I.e. the nsc_read = (1,1,1) in this case?

Yes. Assume a user has run a calculation without k-points (and without an auxcell), and then wants to use the DM to initialize a
k-point calculation. This is what happens in the si64 example:

—————————————
Initializing Density Matrix...

Attempting to read DM from file... Succeeded...
DM from file:
<dSpData2D:IO-DM: si64.DM
  <sparsity:IO-DM: si64.DM
    nrows_g=256 nrows=136 sparsity=.4275 nnzs=28016, refcount: 1>
  <dData2D:(new from dSpData2D) n=28016 m=1, refcount: 1>
refcount: 1>
Note: For starting DM, Qtot, Tr[D*S] = 256.00000000 229.72632220
—————————————

This is a calculation with “normal” folding, i.e. only edge image interactions, but no direct diagonal images, so that S(i,i) = 1.0.

The missing norm is coming (or not coming…) from the zeros in the supercell DM.

Later on:

———————————
        iscf Eharris(eV) E_KS(eV) FreeEng(eV) dDmax Ef(eV) dHmax(eV)
   scf: 1 10293.156932 -1324.422347 -1324.455994 3.337586 -3.198437142.619752
timer: Routine,Calls,Time,% = IterSCF 1 4.132 80.76
   scf: 2 35111.572145 3756.559710 3756.553850 4.416191 -2.224851288.324694
   scf: 3 -1549.974918 444.670819 444.641579 3.270160 -2.128185164.985102
   scf: 4 -5371.294656 -2706.434665 -2706.485243 1.485187 -2.565191125.811367
   scf: 5 18837.075132 -728.224618 -728.241614 4.270983 -3.174556153.635637
   scf: 6 -8033.559239 -5034.599795 -5034.645848 2.447968 -2.942511 88.795877
   scf: 7 -7165.186747 -6839.938924 -6839.938924 2.852955 -2.675640 4.831900
   scf: 8 -6836.790121 -6839.363374 -6839.363374 0.078137 -2.668903 4.867
…..
————————

Note that, for k=0, even in extreme folding cases, the DM has a very simple structure, and is NOT folded. Only H and S are actually folded. ALL the image elements of the DM are the same as those in the unit-cell square matrix. This is the code in diagg:

                do j = 1,numd(io)
                  ind = listdptr(io) + j
                  jo = listd(ind)
                  jo = MODP(jo,nuotot) ! To allow auxiliary supercells
                  Dnew(ind,ispin) = Dnew(ind,ispin) + qei*paux(jo)
                  Enew(ind,ispin) = Enew(ind,ispin) + eei*paux(jo)
                enddo

So all the entries (arbitrary “ind”) have the same value as those in the “fold-to” corner of the rectangular DM.

To get back the missing norm approximately in the nsc_read= (1,1,1) case, one then could do:

  foreach non-zero extended S entry “ind_new” in the new, full-nsc supercell:
       find the io,jo entry in the read DM, and copy the entry to the new DM.

It might be easier to reverse the logic and just “un-fold” the read DM, with a loop very similar to the above.

Of course, it is simpler to run the k=0 calculation with “force-auxcell”, but this change looks simple, and will add functionality.

The handling of intermediate cases, when nsc_read is a “s...

Read more...

Revision history for this message
Nick Papior (nickpapior) wrote :

I am not sure everything is as easy as it seems.

1) For the si64 case you say that the connections are all "singly counted", i.e. there are no connections that are summed twice. In this case the missing charges are most likely coming from the periodic charge distribution. However, what if the user changes the basis range which then adds more interactions? I.e. how does Siesta knows if the generated sparse pattern is not generated as the primary unit-cell charge *only*? For now I have added a flag called DM.Init.Unfold which is default to true. If one knows the DM stems from a different initialization field one can set this to false.

2) As for MD simulations, yes, this is another problem...

983. By Nick Papior

Implemented a Gamma-only sparse pattern extrapolator

When starting from a DM originating from a Gamma-only calculation the only elements that
exists are elements that "looks" like they exist in the primary unit cell. However,
they in fact correspond to supercell connections. Now the code will try and unfold
the Gamma-only calculation DM elements to the supercell format by copying the elements
multiple times (this comes from the fact that the DM is a Gamma-only with auxiliary cell
has the same DM elements for all orbital connections).

There are cases where this does not hold, e.g. when users create their own initial DM, in those
cases one can use the flag: DM.Init.Unfold false to disable the unfolding.

Revision history for this message
Nick Papior (nickpapior) wrote :

I have added the fix for 1). Now si64 runs very nice when changing from no-auxcell to force-auxcell.

984. By Nick Papior

Implemented auxiliary cell to Gamma-only sparse pattern folding mechanism

When starting from a DM originating from a supercell calculation, and
performing a Gamma-only calculation, then connections may be doubled when
io,jo == io,io where jo is the supercell orbital.
This should equate to summing the DM contributions for all equal orbitals.

This is now implemented and tested for the si64 system
1. no auxiliary cell
2. auxiliary, init with DM from 1.
3. no auxiliary, init with DM from 2.

985. By Nick Papior

Merged Alberto's documentation updates (clarifications)

Revision history for this message
Nick Papior (nickpapior) wrote :

Bump thread :)

Revision history for this message
Nick Papior (nickpapior) wrote :

Marked lp:~albertog/siesta/4.1-supercell-docs as merged! Revert mark if dev is continued there. :)

Revision history for this message
Alberto Garcia (albertog) wrote :

We have clarified offline the issue of "folding" to a 111 supercell. What we need is actually 'copying'. A patch is going to be applied, and the merge request is approved.

review: Approve
986. By Nick Papior

Merged Alberto's fixes for DM folding

987. By Nick Papior

Applied patch for fixing folding into 000 supercells

This change has surfaced from discussion with Alberto (his fix).
This change stores the 000 element in the supercell DM, and if
this element does not exist it will store a "random" supercell DM
element. This has some problems for very small unit-cells, however,
we expect this problem to be insignificant compared to the problems it
solves.

988. By Nick Papior

Re-added the copy-supercell routines which may be useful in some utilities

For now they are removed from the actual code via pre-processor statements.

989. By Nick Papior

Updated Makefiles

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added directory 'Docs/developer'
=== added file 'Docs/developer/doxygen-siesta'
--- Docs/developer/doxygen-siesta 1970-01-01 00:00:00 +0000
+++ Docs/developer/doxygen-siesta 2018-09-12 13:10:27 +0000
@@ -0,0 +1,2484 @@
1# Doxyfile 1.8.13
2
3# This file describes the settings to be used by the documentation system
4# doxygen (www.doxygen.org) for a project.
5#
6# All text after a double hash (##) is considered a comment and is placed in
7# front of the TAG it is preceding.
8#
9# All text after a single hash (#) is considered a comment and will be ignored.
10# The format is:
11# TAG = value [value, ...]
12# For lists, items can also be appended using:
13# TAG += value [value, ...]
14# Values that contain spaces should be placed between quotes (\" \").
15
16#---------------------------------------------------------------------------
17# Project related configuration options
18#---------------------------------------------------------------------------
19
20# This tag specifies the encoding used for all characters in the config file
21# that follow. The default is UTF-8 which is also the encoding used for all text
22# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
23# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
24# for the list of possible encodings.
25# The default value is: UTF-8.
26
27DOXYFILE_ENCODING = UTF-8
28
29# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
30# double-quotes, unless you are using Doxywizard) that should identify the
31# project for which the documentation is generated. This name is used in the
32# title of most generated pages and in a few other places.
33# The default value is: My Project.
34
35PROJECT_NAME = "SIESTA"
36
37# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
38# could be handy for archiving the generated documentation or if some version
39# control system is used.
40
41PROJECT_NUMBER =
42
43# Using the PROJECT_BRIEF tag one can provide an optional one line description
44# for a project that appears at the top of each page and should give viewer a
45# quick idea about the purpose of the project. Keep the description short.
46
47PROJECT_BRIEF = "A first principles materials simulation code using Density Functional Theory"
48
49# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
50# in the documentation. The maximum height of the logo should not exceed 55
51# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
52# the logo to the output directory.
53
54PROJECT_LOGO =
55
56# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
57# into which the generated documentation will be written. If a relative path is
58# entered, it will be relative to the location where doxygen was started. If
59# left blank the current directory will be used.
60
61OUTPUT_DIRECTORY = doc-doxygen-build
62
63# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
64# directories (in 2 levels) under the output directory of each output format and
65# will distribute the generated files over these directories. Enabling this
66# option can be useful when feeding doxygen a huge amount of source files, where
67# putting all generated files in the same directory would otherwise causes
68# performance problems for the file system.
69# The default value is: NO.
70
71CREATE_SUBDIRS = NO
72
73# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII
74# characters to appear in the names of generated files. If set to NO, non-ASCII
75# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode
76# U+3044.
77# The default value is: NO.
78
79ALLOW_UNICODE_NAMES = NO
80
81# The OUTPUT_LANGUAGE tag is used to specify the language in which all
82# documentation generated by doxygen is written. Doxygen will use this
83# information to generate all constant output in the proper language.
84# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese,
85# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States),
86# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian,
87# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages),
88# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian,
89# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian,
90# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish,
91# Ukrainian and Vietnamese.
92# The default value is: English.
93
94OUTPUT_LANGUAGE = English
95
96# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member
97# descriptions after the members that are listed in the file and class
98# documentation (similar to Javadoc). Set to NO to disable this.
99# The default value is: YES.
100
101BRIEF_MEMBER_DESC = YES
102
103# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief
104# description of a member or function before the detailed description
105#
106# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
107# brief descriptions will be completely suppressed.
108# The default value is: YES.
109
110REPEAT_BRIEF = YES
111
112# This tag implements a quasi-intelligent brief description abbreviator that is
113# used to form the text in various listings. Each string in this list, if found
114# as the leading text of the brief description, will be stripped from the text
115# and the result, after processing the whole list, is used as the annotated
116# text. Otherwise, the brief description is used as-is. If left blank, the
117# following values are used ($name is automatically replaced with the name of
118# the entity):The $name class, The $name widget, The $name file, is, provides,
119# specifies, contains, represents, a, an and the.
120
121ABBREVIATE_BRIEF = "The $name class" \
122 "The $name widget" \
123 "The $name file" \
124 is \
125 provides \
126 specifies \
127 contains \
128 represents \
129 a \
130 an \
131 the
132
133# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
134# doxygen will generate a detailed section even if there is only a brief
135# description.
136# The default value is: NO.
137
138ALWAYS_DETAILED_SEC = NO
139
140# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
141# inherited members of a class in the documentation of that class as if those
142# members were ordinary class members. Constructors, destructors and assignment
143# operators of the base classes will not be shown.
144# The default value is: NO.
145
146INLINE_INHERITED_MEMB = NO
147
148# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path
149# before files name in the file list and in the header files. If set to NO the
150# shortest path that makes the file name unique will be used
151# The default value is: YES.
152
153FULL_PATH_NAMES = YES
154
155# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
156# Stripping is only done if one of the specified strings matches the left-hand
157# part of the path. The tag can be used to show relative paths in the file list.
158# If left blank the directory from which doxygen is run is used as the path to
159# strip.
160#
161# Note that you can specify absolute paths here, but also relative paths, which
162# will be relative from the directory where doxygen is started.
163# This tag requires that the tag FULL_PATH_NAMES is set to YES.
164
165STRIP_FROM_PATH =
166
167# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
168# path mentioned in the documentation of a class, which tells the reader which
169# header file to include in order to use a class. If left blank only the name of
170# the header file containing the class definition is used. Otherwise one should
171# specify the list of include paths that are normally passed to the compiler
172# using the -I flag.
173
174STRIP_FROM_INC_PATH =
175
176# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
177# less readable) file names. This can be useful is your file systems doesn't
178# support long names like on DOS, Mac, or CD-ROM.
179# The default value is: NO.
180
181SHORT_NAMES = NO
182
183# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
184# first line (until the first dot) of a Javadoc-style comment as the brief
185# description. If set to NO, the Javadoc-style will behave just like regular Qt-
186# style comments (thus requiring an explicit @brief command for a brief
187# description.)
188# The default value is: NO.
189
190JAVADOC_AUTOBRIEF = NO
191
192# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
193# line (until the first dot) of a Qt-style comment as the brief description. If
194# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
195# requiring an explicit \brief command for a brief description.)
196# The default value is: NO.
197
198QT_AUTOBRIEF = NO
199
200# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
201# multi-line C++ special comment block (i.e. a block of //! or /// comments) as
202# a brief description. This used to be the default behavior. The new default is
203# to treat a multi-line C++ comment block as a detailed description. Set this
204# tag to YES if you prefer the old behavior instead.
205#
206# Note that setting this tag to YES also means that rational rose comments are
207# not recognized any more.
208# The default value is: NO.
209
210MULTILINE_CPP_IS_BRIEF = NO
211
212# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
213# documentation from any documented member that it re-implements.
214# The default value is: YES.
215
216INHERIT_DOCS = YES
217
218# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new
219# page for each member. If set to NO, the documentation of a member will be part
220# of the file/class/namespace that contains it.
221# The default value is: NO.
222
223SEPARATE_MEMBER_PAGES = NO
224
225# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
226# uses this value to replace tabs by spaces in code fragments.
227# Minimum value: 1, maximum value: 16, default value: 4.
228
229TAB_SIZE = 4
230
231# This tag can be used to specify a number of aliases that act as commands in
232# the documentation. An alias has the form:
233# name=value
234# For example adding
235# "sideeffect=@par Side Effects:\n"
236# will allow you to put the command \sideeffect (or @sideeffect) in the
237# documentation, which will result in a user-defined paragraph with heading
238# "Side Effects:". You can put \n's in the value part of an alias to insert
239# newlines.
240
241ALIASES =
242
243# This tag can be used to specify a number of word-keyword mappings (TCL only).
244# A mapping has the form "name=value". For example adding "class=itcl::class"
245# will allow you to use the command class in the itcl::class meaning.
246
247TCL_SUBST =
248
249# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
250# only. Doxygen will then generate output that is more tailored for C. For
251# instance, some of the names that are used will be different. The list of all
252# members will be omitted, etc.
253# The default value is: NO.
254
255OPTIMIZE_OUTPUT_FOR_C = NO
256
257# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
258# Python sources only. Doxygen will then generate output that is more tailored
259# for that language. For instance, namespaces will be presented as packages,
260# qualified scopes will look different, etc.
261# The default value is: NO.
262
263OPTIMIZE_OUTPUT_JAVA = NO
264
265# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
266# sources. Doxygen will then generate output that is tailored for Fortran.
267# The default value is: NO.
268
269OPTIMIZE_FOR_FORTRAN = YES
270
271# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
272# sources. Doxygen will then generate output that is tailored for VHDL.
273# The default value is: NO.
274
275OPTIMIZE_OUTPUT_VHDL = NO
276
277# Doxygen selects the parser to use depending on the extension of the files it
278# parses. With this tag you can assign which parser to use for a given
279# extension. Doxygen has a built-in mapping, but you can override or extend it
280# using this tag. The format is ext=language, where ext is a file extension, and
281# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
282# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran:
283# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran:
284# Fortran. In the later case the parser tries to guess whether the code is fixed
285# or free formatted code, this is the default for Fortran type files), VHDL. For
286# instance to make doxygen treat .inc files as Fortran files (default is PHP),
287# and .f files as C (default is Fortran), use: inc=Fortran f=C.
288#
289# Note: For files without extension you can use no_extension as a placeholder.
290#
291# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
292# the files are not read by doxygen.
293
294EXTENSION_MAPPING =
295
296# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
297# according to the Markdown format, which allows for more readable
298# documentation. See http://daringfireball.net/projects/markdown/ for details.
299# The output of markdown processing is further processed by doxygen, so you can
300# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
301# case of backward compatibilities issues.
302# The default value is: YES.
303
304MARKDOWN_SUPPORT = YES
305
306# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up
307# to that level are automatically included in the table of contents, even if
308# they do not have an id attribute.
309# Note: This feature currently applies only to Markdown headings.
310# Minimum value: 0, maximum value: 99, default value: 0.
311# This tag requires that the tag MARKDOWN_SUPPORT is set to YES.
312
313TOC_INCLUDE_HEADINGS = 0
314
315# When enabled doxygen tries to link words that correspond to documented
316# classes, or namespaces to their corresponding documentation. Such a link can
317# be prevented in individual cases by putting a % sign in front of the word or
318# globally by setting AUTOLINK_SUPPORT to NO.
319# The default value is: YES.
320
321AUTOLINK_SUPPORT = YES
322
323# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
324# to include (a tag file for) the STL sources as input, then you should set this
325# tag to YES in order to let doxygen match functions declarations and
326# definitions whose arguments contain STL classes (e.g. func(std::string);
327# versus func(std::string) {}). This also make the inheritance and collaboration
328# diagrams that involve STL classes more complete and accurate.
329# The default value is: NO.
330
331BUILTIN_STL_SUPPORT = NO
332
333# If you use Microsoft's C++/CLI language, you should set this option to YES to
334# enable parsing support.
335# The default value is: NO.
336
337CPP_CLI_SUPPORT = NO
338
339# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
340# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
341# will parse them like normal C++ but will assume all classes use public instead
342# of private inheritance when no explicit protection keyword is present.
343# The default value is: NO.
344
345SIP_SUPPORT = NO
346
347# For Microsoft's IDL there are propget and propput attributes to indicate
348# getter and setter methods for a property. Setting this option to YES will make
349# doxygen to replace the get and set methods by a property in the documentation.
350# This will only work if the methods are indeed getting or setting a simple
351# type. If this is not the case, or you want to show the methods anyway, you
352# should set this option to NO.
353# The default value is: YES.
354
355IDL_PROPERTY_SUPPORT = YES
356
357# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
358# tag is set to YES then doxygen will reuse the documentation of the first
359# member in the group (if any) for the other members of the group. By default
360# all members of a group must be documented explicitly.
361# The default value is: NO.
362
363DISTRIBUTE_GROUP_DOC = NO
364
365# If one adds a struct or class to a group and this option is enabled, then also
366# any nested class or struct is added to the same group. By default this option
367# is disabled and one has to add nested compounds explicitly via \ingroup.
368# The default value is: NO.
369
370GROUP_NESTED_COMPOUNDS = NO
371
372# Set the SUBGROUPING tag to YES to allow class member groups of the same type
373# (for instance a group of public functions) to be put as a subgroup of that
374# type (e.g. under the Public Functions section). Set it to NO to prevent
375# subgrouping. Alternatively, this can be done per class using the
376# \nosubgrouping command.
377# The default value is: YES.
378
379SUBGROUPING = YES
380
381# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
382# are shown inside the group in which they are included (e.g. using \ingroup)
383# instead of on a separate page (for HTML and Man pages) or section (for LaTeX
384# and RTF).
385#
386# Note that this feature does not work in combination with
387# SEPARATE_MEMBER_PAGES.
388# The default value is: NO.
389
390INLINE_GROUPED_CLASSES = NO
391
392# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
393# with only public data fields or simple typedef fields will be shown inline in
394# the documentation of the scope in which they are defined (i.e. file,
395# namespace, or group documentation), provided this scope is documented. If set
396# to NO, structs, classes, and unions are shown on a separate page (for HTML and
397# Man pages) or section (for LaTeX and RTF).
398# The default value is: NO.
399
400INLINE_SIMPLE_STRUCTS = NO
401
402# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
403# enum is documented as struct, union, or enum with the name of the typedef. So
404# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
405# with name TypeT. When disabled the typedef will appear as a member of a file,
406# namespace, or class. And the struct will be named TypeS. This can typically be
407# useful for C code in case the coding convention dictates that all compound
408# types are typedef'ed and only the typedef is referenced, never the tag name.
409# The default value is: NO.
410
411TYPEDEF_HIDES_STRUCT = NO
412
413# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
414# cache is used to resolve symbols given their name and scope. Since this can be
415# an expensive process and often the same symbol appears multiple times in the
416# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
417# doxygen will become slower. If the cache is too large, memory is wasted. The
418# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
419# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
420# symbols. At the end of a run doxygen will report the cache usage and suggest
421# the optimal cache size from a speed point of view.
422# Minimum value: 0, maximum value: 9, default value: 0.
423
424LOOKUP_CACHE_SIZE = 0
425
426#---------------------------------------------------------------------------
427# Build related configuration options
428#---------------------------------------------------------------------------
429
430# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in
431# documentation are documented, even if no documentation was available. Private
432# class members and static file members will be hidden unless the
433# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
434# Note: This will also disable the warnings about undocumented members that are
435# normally produced when WARNINGS is set to YES.
436# The default value is: NO.
437
438EXTRACT_ALL = NO
439
440# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
441# be included in the documentation.
442# The default value is: NO.
443
444EXTRACT_PRIVATE = NO
445
446# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
447# scope will be included in the documentation.
448# The default value is: NO.
449
450EXTRACT_PACKAGE = NO
451
452# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be
453# included in the documentation.
454# The default value is: NO.
455
456EXTRACT_STATIC = NO
457
458# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined
459# locally in source files will be included in the documentation. If set to NO,
460# only classes defined in header files are included. Does not have any effect
461# for Java sources.
462# The default value is: YES.
463
464EXTRACT_LOCAL_CLASSES = YES
465
466# This flag is only useful for Objective-C code. If set to YES, local methods,
467# which are defined in the implementation section but not in the interface are
468# included in the documentation. If set to NO, only methods in the interface are
469# included.
470# The default value is: NO.
471
472EXTRACT_LOCAL_METHODS = NO
473
474# If this flag is set to YES, the members of anonymous namespaces will be
475# extracted and appear in the documentation as a namespace called
476# 'anonymous_namespace{file}', where file will be replaced with the base name of
477# the file that contains the anonymous namespace. By default anonymous namespace
478# are hidden.
479# The default value is: NO.
480
481EXTRACT_ANON_NSPACES = NO
482
483# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
484# undocumented members inside documented classes or files. If set to NO these
485# members will be included in the various overviews, but no documentation
486# section is generated. This option has no effect if EXTRACT_ALL is enabled.
487# The default value is: NO.
488
489HIDE_UNDOC_MEMBERS = NO
490
491# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
492# undocumented classes that are normally visible in the class hierarchy. If set
493# to NO, these classes will be included in the various overviews. This option
494# has no effect if EXTRACT_ALL is enabled.
495# The default value is: NO.
496
497HIDE_UNDOC_CLASSES = NO
498
499# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
500# (class|struct|union) declarations. If set to NO, these declarations will be
501# included in the documentation.
502# The default value is: NO.
503
504HIDE_FRIEND_COMPOUNDS = NO
505
506# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
507# documentation blocks found inside the body of a function. If set to NO, these
508# blocks will be appended to the function's detailed documentation block.
509# The default value is: NO.
510
511HIDE_IN_BODY_DOCS = NO
512
513# The INTERNAL_DOCS tag determines if documentation that is typed after a
514# \internal command is included. If the tag is set to NO then the documentation
515# will be excluded. Set it to YES to include the internal documentation.
516# The default value is: NO.
517
518INTERNAL_DOCS = NO
519
520# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
521# names in lower-case letters. If set to YES, upper-case letters are also
522# allowed. This is useful if you have classes or files whose names only differ
523# in case and if your file system supports case sensitive file names. Windows
524# and Mac users are advised to set this option to NO.
525# The default value is: system dependent.
526
527CASE_SENSE_NAMES = YES
528
529# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
530# their full class and namespace scopes in the documentation. If set to YES, the
531# scope will be hidden.
532# The default value is: NO.
533
534HIDE_SCOPE_NAMES = NO
535
536# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will
537# append additional text to a page's title, such as Class Reference. If set to
538# YES the compound reference will be hidden.
539# The default value is: NO.
540
541HIDE_COMPOUND_REFERENCE= NO
542
543# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
544# the files that are included by a file in the documentation of that file.
545# The default value is: YES.
546
547SHOW_INCLUDE_FILES = YES
548
549# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each
550# grouped member an include statement to the documentation, telling the reader
551# which file to include in order to use the member.
552# The default value is: NO.
553
554SHOW_GROUPED_MEMB_INC = NO
555
556# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
557# files with double quotes in the documentation rather than with sharp brackets.
558# The default value is: NO.
559
560FORCE_LOCAL_INCLUDES = NO
561
562# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
563# documentation for inline members.
564# The default value is: YES.
565
566INLINE_INFO = YES
567
568# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
569# (detailed) documentation of file and class members alphabetically by member
570# name. If set to NO, the members will appear in declaration order.
571# The default value is: YES.
572
573SORT_MEMBER_DOCS = YES
574
575# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
576# descriptions of file, namespace and class members alphabetically by member
577# name. If set to NO, the members will appear in declaration order. Note that
578# this will also influence the order of the classes in the class list.
579# The default value is: NO.
580
581SORT_BRIEF_DOCS = NO
582
583# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
584# (brief and detailed) documentation of class members so that constructors and
585# destructors are listed first. If set to NO the constructors will appear in the
586# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
587# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
588# member documentation.
589# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
590# detailed member documentation.
591# The default value is: NO.
592
593SORT_MEMBERS_CTORS_1ST = NO
594
595# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
596# of group names into alphabetical order. If set to NO the group names will
597# appear in their defined order.
598# The default value is: NO.
599
600SORT_GROUP_NAMES = NO
601
602# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
603# fully-qualified names, including namespaces. If set to NO, the class list will
604# be sorted only by class name, not including the namespace part.
605# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
606# Note: This option applies only to the class list, not to the alphabetical
607# list.
608# The default value is: NO.
609
610SORT_BY_SCOPE_NAME = NO
611
612# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
613# type resolution of all parameters of a function it will reject a match between
614# the prototype and the implementation of a member function even if there is
615# only one candidate or it is obvious which candidate to choose by doing a
616# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
617# accept a match between prototype and implementation in such cases.
618# The default value is: NO.
619
620STRICT_PROTO_MATCHING = NO
621
622# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo
623# list. This list is created by putting \todo commands in the documentation.
624# The default value is: YES.
625
626GENERATE_TODOLIST = YES
627
628# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test
629# list. This list is created by putting \test commands in the documentation.
630# The default value is: YES.
631
632GENERATE_TESTLIST = YES
633
634# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug
635# list. This list is created by putting \bug commands in the documentation.
636# The default value is: YES.
637
638GENERATE_BUGLIST = YES
639
640# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO)
641# the deprecated list. This list is created by putting \deprecated commands in
642# the documentation.
643# The default value is: YES.
644
645GENERATE_DEPRECATEDLIST= YES
646
647# The ENABLED_SECTIONS tag can be used to enable conditional documentation
648# sections, marked by \if <section_label> ... \endif and \cond <section_label>
649# ... \endcond blocks.
650
651ENABLED_SECTIONS =
652
653# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
654# initial value of a variable or macro / define can have for it to appear in the
655# documentation. If the initializer consists of more lines than specified here
656# it will be hidden. Use a value of 0 to hide initializers completely. The
657# appearance of the value of individual variables and macros / defines can be
658# controlled using \showinitializer or \hideinitializer command in the
659# documentation regardless of this setting.
660# Minimum value: 0, maximum value: 10000, default value: 30.
661
662MAX_INITIALIZER_LINES = 30
663
664# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
665# the bottom of the documentation of classes and structs. If set to YES, the
666# list will mention the files that were used to generate the documentation.
667# The default value is: YES.
668
669SHOW_USED_FILES = YES
670
671# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
672# will remove the Files entry from the Quick Index and from the Folder Tree View
673# (if specified).
674# The default value is: YES.
675
676SHOW_FILES = YES
677
678# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
679# page. This will remove the Namespaces entry from the Quick Index and from the
680# Folder Tree View (if specified).
681# The default value is: YES.
682
683SHOW_NAMESPACES = YES
684
685# The FILE_VERSION_FILTER tag can be used to specify a program or script that
686# doxygen should invoke to get the current version for each file (typically from
687# the version control system). Doxygen will invoke the program by executing (via
688# popen()) the command command input-file, where command is the value of the
689# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
690# by doxygen. Whatever the program writes to standard output is used as the file
691# version. For an example see the documentation.
692
693FILE_VERSION_FILTER =
694
695# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
696# by doxygen. The layout file controls the global structure of the generated
697# output files in an output format independent way. To create the layout file
698# that represents doxygen's defaults, run doxygen with the -l option. You can
699# optionally specify a file name after the option, if omitted DoxygenLayout.xml
700# will be used as the name of the layout file.
701#
702# Note that if you run doxygen from a directory containing a file called
703# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
704# tag is left empty.
705
706LAYOUT_FILE =
707
708# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
709# the reference definitions. This must be a list of .bib files. The .bib
710# extension is automatically appended if omitted. This requires the bibtex tool
711# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
712# For LaTeX the style of the bibliography can be controlled using
713# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
714# search path. See also \cite for info how to create references.
715
716CITE_BIB_FILES =
717
718#---------------------------------------------------------------------------
719# Configuration options related to warning and progress messages
720#---------------------------------------------------------------------------
721
722# The QUIET tag can be used to turn on/off the messages that are generated to
723# standard output by doxygen. If QUIET is set to YES this implies that the
724# messages are off.
725# The default value is: NO.
726
727QUIET = NO
728
729# The WARNINGS tag can be used to turn on/off the warning messages that are
730# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES
731# this implies that the warnings are on.
732#
733# Tip: Turn warnings on while writing the documentation.
734# The default value is: YES.
735
736WARNINGS = YES
737
738# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate
739# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
740# will automatically be disabled.
741# The default value is: YES.
742
743WARN_IF_UNDOCUMENTED = YES
744
745# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
746# potential errors in the documentation, such as not documenting some parameters
747# in a documented function, or documenting parameters that don't exist or using
748# markup commands wrongly.
749# The default value is: YES.
750
751WARN_IF_DOC_ERROR = YES
752
753# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
754# are documented, but have no documentation for their parameters or return
755# value. If set to NO, doxygen will only warn about wrong or incomplete
756# parameter documentation, but not about the absence of documentation.
757# The default value is: NO.
758
759WARN_NO_PARAMDOC = NO
760
761# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when
762# a warning is encountered.
763# The default value is: NO.
764
765WARN_AS_ERROR = NO
766
767# The WARN_FORMAT tag determines the format of the warning messages that doxygen
768# can produce. The string should contain the $file, $line, and $text tags, which
769# will be replaced by the file and line number from which the warning originated
770# and the warning text. Optionally the format may contain $version, which will
771# be replaced by the version of the file (if it could be obtained via
772# FILE_VERSION_FILTER)
773# The default value is: $file:$line: $text.
774
775WARN_FORMAT = "$file:$line: $text"
776
777# The WARN_LOGFILE tag can be used to specify a file to which warning and error
778# messages should be written. If left blank the output is written to standard
779# error (stderr).
780
781WARN_LOGFILE =
782
783#---------------------------------------------------------------------------
784# Configuration options related to the input files
785#---------------------------------------------------------------------------
786
787# The INPUT tag is used to specify the files and/or directories that contain
788# documented source files. You may enter file names like myfile.cpp or
789# directories like /usr/src/myproject. Separate the files or directories with
790# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
791# Note: If this tag is empty the current directory is searched.
792
793INPUT = ../../Src \
794 ford-pages
795
796# This tag can be used to specify the character encoding of the source files
797# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
798# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
799# documentation (see: http://www.gnu.org/software/libiconv) for the list of
800# possible encodings.
801# The default value is: UTF-8.
802
803INPUT_ENCODING = UTF-8
804
805# If the value of the INPUT tag contains directories, you can use the
806# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
807# *.h) to filter out the source-files in the directories.
808#
809# Note that for custom extensions or not directly supported extensions you also
810# need to set EXTENSION_MAPPING for the extension otherwise the files are not
811# read by doxygen.
812#
813# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp,
814# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h,
815# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc,
816# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08,
817# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf and *.qsf.
818
819FILE_PATTERNS = *.c \
820 *.cc \
821 *.cxx \
822 *.cpp \
823 *.c++ \
824 *.java \
825 *.ii \
826 *.ixx \
827 *.ipp \
828 *.i++ \
829 *.inl \
830 *.idl \
831 *.ddl \
832 *.odl \
833 *.h \
834 *.hh \
835 *.hxx \
836 *.hpp \
837 *.h++ \
838 *.cs \
839 *.d \
840 *.php \
841 *.php4 \
842 *.php5 \
843 *.phtml \
844 *.inc \
845 *.m \
846 *.markdown \
847 *.md \
848 *.mm \
849 *.dox \
850 *.py \
851 *.pyw \
852 *.F90 \
853 *.f90 \
854 *.f95 \
855 *.f03 \
856 *.f08 \
857 *.f \
858 *.F \
859 *.for \
860 *.tcl \
861 *.vhd \
862 *.vhdl \
863 *.ucf \
864 *.qsf
865
866# The RECURSIVE tag can be used to specify whether or not subdirectories should
867# be searched for input files as well.
868# The default value is: NO.
869
870RECURSIVE = YES
871
872# The EXCLUDE tag can be used to specify files and/or directories that should be
873# excluded from the INPUT source files. This way you can easily exclude a
874# subdirectory from a directory tree whose root is specified with the INPUT tag.
875#
876# Note that relative paths are relative to the directory from which doxygen is
877# run.
878
879EXCLUDE = ../../Src/MPI \
880 ../../Src/fdf \
881 ../../Src/fdict \
882 ../../Src/ncdf \
883 ../../Src/Libs \
884 ../../Src/Orphans \
885 ../../Src/SiestaXC \
886 ../../Src/wxml \
887 ../../Src/xmlparser
888
889# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
890# directories that are symbolic links (a Unix file system feature) are excluded
891# from the input.
892# The default value is: NO.
893
894EXCLUDE_SYMLINKS = NO
895
896# If the value of the INPUT tag contains directories, you can use the
897# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
898# certain files from those directories.
899#
900# Note that the wildcards are matched against the file with absolute path, so to
901# exclude all test directories for example use the pattern */test/*
902
903EXCLUDE_PATTERNS =
904
905# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
906# (namespaces, classes, functions, etc.) that should be excluded from the
907# output. The symbol name can be a fully qualified name, a word, or if the
908# wildcard * is used, a substring. Examples: ANamespace, AClass,
909# AClass::ANamespace, ANamespace::*Test
910#
911# Note that the wildcards are matched against the file with absolute path, so to
912# exclude all test directories use the pattern */test/*
913
914EXCLUDE_SYMBOLS =
915
916# The EXAMPLE_PATH tag can be used to specify one or more files or directories
917# that contain example code fragments that are included (see the \include
918# command).
919
920EXAMPLE_PATH =
921
922# If the value of the EXAMPLE_PATH tag contains directories, you can use the
923# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
924# *.h) to filter out the source-files in the directories. If left blank all
925# files are included.
926
927EXAMPLE_PATTERNS = *
928
929# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
930# searched for input files to be used with the \include or \dontinclude commands
931# irrespective of the value of the RECURSIVE tag.
932# The default value is: NO.
933
934EXAMPLE_RECURSIVE = NO
935
936# The IMAGE_PATH tag can be used to specify one or more files or directories
937# that contain images that are to be included in the documentation (see the
938# \image command).
939
940IMAGE_PATH = ford-media
941
942# The INPUT_FILTER tag can be used to specify a program that doxygen should
943# invoke to filter for each input file. Doxygen will invoke the filter program
944# by executing (via popen()) the command:
945#
946# <filter> <input-file>
947#
948# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the
949# name of an input file. Doxygen will then use the output that the filter
950# program writes to standard output. If FILTER_PATTERNS is specified, this tag
951# will be ignored.
952#
953# Note that the filter must not add or remove lines; it is applied before the
954# code is scanned, but not when the output code is generated. If lines are added
955# or removed, the anchors will not be placed correctly.
956#
957# Note that for custom extensions or not directly supported extensions you also
958# need to set EXTENSION_MAPPING for the extension otherwise the files are not
959# properly processed by doxygen.
960
961INPUT_FILTER =
962
963# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
964# basis. Doxygen will compare the file name with each pattern and apply the
965# filter if there is a match. The filters are a list of the form: pattern=filter
966# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
967# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
968# patterns match the file name, INPUT_FILTER is applied.
969#
970# Note that for custom extensions or not directly supported extensions you also
971# need to set EXTENSION_MAPPING for the extension otherwise the files are not
972# properly processed by doxygen.
973
974FILTER_PATTERNS =
975
976# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
977# INPUT_FILTER) will also be used to filter the input files that are used for
978# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
979# The default value is: NO.
980
981FILTER_SOURCE_FILES = NO
982
983# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
984# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
985# it is also possible to disable source filtering for a specific pattern using
986# *.ext= (so without naming a filter).
987# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
988
989FILTER_SOURCE_PATTERNS =
990
991# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
992# is part of the input, its contents will be placed on the main page
993# (index.html). This can be useful if you have a project on for instance GitHub
994# and want to reuse the introduction page also for the doxygen output.
995
996USE_MDFILE_AS_MAINPAGE = ford-pages/index.md
997
998#---------------------------------------------------------------------------
999# Configuration options related to source browsing
1000#---------------------------------------------------------------------------
1001
1002# If the SOURCE_BROWSER tag is set to YES then a list of source files will be
1003# generated. Documented entities will be cross-referenced with these sources.
1004#
1005# Note: To get rid of all source code in the generated output, make sure that
1006# also VERBATIM_HEADERS is set to NO.
1007# The default value is: NO.
1008
1009SOURCE_BROWSER = NO
1010
1011# Setting the INLINE_SOURCES tag to YES will include the body of functions,
1012# classes and enums directly into the documentation.
1013# The default value is: NO.
1014
1015INLINE_SOURCES = NO
1016
1017# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
1018# special comment blocks from generated source code fragments. Normal C, C++ and
1019# Fortran comments will always remain visible.
1020# The default value is: YES.
1021
1022STRIP_CODE_COMMENTS = YES
1023
1024# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
1025# function all documented functions referencing it will be listed.
1026# The default value is: NO.
1027
1028REFERENCED_BY_RELATION = NO
1029
1030# If the REFERENCES_RELATION tag is set to YES then for each documented function
1031# all documented entities called/used by that function will be listed.
1032# The default value is: NO.
1033
1034REFERENCES_RELATION = NO
1035
1036# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
1037# to YES then the hyperlinks from functions in REFERENCES_RELATION and
1038# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
1039# link to the documentation.
1040# The default value is: YES.
1041
1042REFERENCES_LINK_SOURCE = YES
1043
1044# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
1045# source code will show a tooltip with additional information such as prototype,
1046# brief description and links to the definition and documentation. Since this
1047# will make the HTML file larger and loading of large files a bit slower, you
1048# can opt to disable this feature.
1049# The default value is: YES.
1050# This tag requires that the tag SOURCE_BROWSER is set to YES.
1051
1052SOURCE_TOOLTIPS = YES
1053
1054# If the USE_HTAGS tag is set to YES then the references to source code will
1055# point to the HTML generated by the htags(1) tool instead of doxygen built-in
1056# source browser. The htags tool is part of GNU's global source tagging system
1057# (see http://www.gnu.org/software/global/global.html). You will need version
1058# 4.8.6 or higher.
1059#
1060# To use it do the following:
1061# - Install the latest version of global
1062# - Enable SOURCE_BROWSER and USE_HTAGS in the config file
1063# - Make sure the INPUT points to the root of the source tree
1064# - Run doxygen as normal
1065#
1066# Doxygen will invoke htags (and that will in turn invoke gtags), so these
1067# tools must be available from the command line (i.e. in the search path).
1068#
1069# The result: instead of the source browser generated by doxygen, the links to
1070# source code will now point to the output of htags.
1071# The default value is: NO.
1072# This tag requires that the tag SOURCE_BROWSER is set to YES.
1073
1074USE_HTAGS = NO
1075
1076# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
1077# verbatim copy of the header file for each class for which an include is
1078# specified. Set to NO to disable this.
1079# See also: Section \class.
1080# The default value is: YES.
1081
1082VERBATIM_HEADERS = YES
1083
1084#---------------------------------------------------------------------------
1085# Configuration options related to the alphabetical class index
1086#---------------------------------------------------------------------------
1087
1088# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
1089# compounds will be generated. Enable this if the project contains a lot of
1090# classes, structs, unions or interfaces.
1091# The default value is: YES.
1092
1093ALPHABETICAL_INDEX = YES
1094
1095# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
1096# which the alphabetical index list will be split.
1097# Minimum value: 1, maximum value: 20, default value: 5.
1098# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
1099
1100COLS_IN_ALPHA_INDEX = 5
1101
1102# In case all classes in a project start with a common prefix, all classes will
1103# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
1104# can be used to specify a prefix (or a list of prefixes) that should be ignored
1105# while generating the index headers.
1106# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
1107
1108IGNORE_PREFIX =
1109
1110#---------------------------------------------------------------------------
1111# Configuration options related to the HTML output
1112#---------------------------------------------------------------------------
1113
1114# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output
1115# The default value is: YES.
1116
1117GENERATE_HTML = YES
1118
1119# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
1120# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
1121# it.
1122# The default directory is: html.
1123# This tag requires that the tag GENERATE_HTML is set to YES.
1124
1125HTML_OUTPUT = html
1126
1127# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
1128# generated HTML page (for example: .htm, .php, .asp).
1129# The default value is: .html.
1130# This tag requires that the tag GENERATE_HTML is set to YES.
1131
1132HTML_FILE_EXTENSION = .html
1133
1134# The HTML_HEADER tag can be used to specify a user-defined HTML header file for
1135# each generated HTML page. If the tag is left blank doxygen will generate a
1136# standard header.
1137#
1138# To get valid HTML the header file that includes any scripts and style sheets
1139# that doxygen needs, which is dependent on the configuration options used (e.g.
1140# the setting GENERATE_TREEVIEW). It is highly recommended to start with a
1141# default header using
1142# doxygen -w html new_header.html new_footer.html new_stylesheet.css
1143# YourConfigFile
1144# and then modify the file new_header.html. See also section "Doxygen usage"
1145# for information on how to generate the default header that doxygen normally
1146# uses.
1147# Note: The header is subject to change so you typically have to regenerate the
1148# default header when upgrading to a newer version of doxygen. For a description
1149# of the possible markers and block names see the documentation.
1150# This tag requires that the tag GENERATE_HTML is set to YES.
1151
1152HTML_HEADER =
1153
1154# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
1155# generated HTML page. If the tag is left blank doxygen will generate a standard
1156# footer. See HTML_HEADER for more information on how to generate a default
1157# footer and what special commands can be used inside the footer. See also
1158# section "Doxygen usage" for information on how to generate the default footer
1159# that doxygen normally uses.
1160# This tag requires that the tag GENERATE_HTML is set to YES.
1161
1162HTML_FOOTER =
1163
1164# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
1165# sheet that is used by each HTML page. It can be used to fine-tune the look of
1166# the HTML output. If left blank doxygen will generate a default style sheet.
1167# See also section "Doxygen usage" for information on how to generate the style
1168# sheet that doxygen normally uses.
1169# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
1170# it is more robust and this tag (HTML_STYLESHEET) will in the future become
1171# obsolete.
1172# This tag requires that the tag GENERATE_HTML is set to YES.
1173
1174HTML_STYLESHEET =
1175
1176# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined
1177# cascading style sheets that are included after the standard style sheets
1178# created by doxygen. Using this option one can overrule certain style aspects.
1179# This is preferred over using HTML_STYLESHEET since it does not replace the
1180# standard style sheet and is therefore more robust against future updates.
1181# Doxygen will copy the style sheet files to the output directory.
1182# Note: The order of the extra style sheet files is of importance (e.g. the last
1183# style sheet in the list overrules the setting of the previous ones in the
1184# list). For an example see the documentation.
1185# This tag requires that the tag GENERATE_HTML is set to YES.
1186
1187HTML_EXTRA_STYLESHEET =
1188
1189# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
1190# other source files which should be copied to the HTML output directory. Note
1191# that these files will be copied to the base HTML output directory. Use the
1192# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
1193# files. In the HTML_STYLESHEET file, use the file name only. Also note that the
1194# files will be copied as-is; there are no commands or markers available.
1195# This tag requires that the tag GENERATE_HTML is set to YES.
1196
1197HTML_EXTRA_FILES =
1198
1199# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
1200# will adjust the colors in the style sheet and background images according to
1201# this color. Hue is specified as an angle on a colorwheel, see
1202# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
1203# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
1204# purple, and 360 is red again.
1205# Minimum value: 0, maximum value: 359, default value: 220.
1206# This tag requires that the tag GENERATE_HTML is set to YES.
1207
1208HTML_COLORSTYLE_HUE = 220
1209
1210# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
1211# in the HTML output. For a value of 0 the output will use grayscales only. A
1212# value of 255 will produce the most vivid colors.
1213# Minimum value: 0, maximum value: 255, default value: 100.
1214# This tag requires that the tag GENERATE_HTML is set to YES.
1215
1216HTML_COLORSTYLE_SAT = 100
1217
1218# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
1219# luminance component of the colors in the HTML output. Values below 100
1220# gradually make the output lighter, whereas values above 100 make the output
1221# darker. The value divided by 100 is the actual gamma applied, so 80 represents
1222# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
1223# change the gamma.
1224# Minimum value: 40, maximum value: 240, default value: 80.
1225# This tag requires that the tag GENERATE_HTML is set to YES.
1226
1227HTML_COLORSTYLE_GAMMA = 80
1228
1229# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
1230# page will contain the date and time when the page was generated. Setting this
1231# to YES can help to show when doxygen was last run and thus if the
1232# documentation is up to date.
1233# The default value is: NO.
1234# This tag requires that the tag GENERATE_HTML is set to YES.
1235
1236HTML_TIMESTAMP = NO
1237
1238# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
1239# documentation will contain sections that can be hidden and shown after the
1240# page has loaded.
1241# The default value is: NO.
1242# This tag requires that the tag GENERATE_HTML is set to YES.
1243
1244HTML_DYNAMIC_SECTIONS = NO
1245
1246# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
1247# shown in the various tree structured indices initially; the user can expand
1248# and collapse entries dynamically later on. Doxygen will expand the tree to
1249# such a level that at most the specified number of entries are visible (unless
1250# a fully collapsed tree already exceeds this amount). So setting the number of
1251# entries 1 will produce a full collapsed tree by default. 0 is a special value
1252# representing an infinite number of entries and will result in a full expanded
1253# tree by default.
1254# Minimum value: 0, maximum value: 9999, default value: 100.
1255# This tag requires that the tag GENERATE_HTML is set to YES.
1256
1257HTML_INDEX_NUM_ENTRIES = 100
1258
1259# If the GENERATE_DOCSET tag is set to YES, additional index files will be
1260# generated that can be used as input for Apple's Xcode 3 integrated development
1261# environment (see: http://developer.apple.com/tools/xcode/), introduced with
1262# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
1263# Makefile in the HTML output directory. Running make will produce the docset in
1264# that directory and running make install will install the docset in
1265# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
1266# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
1267# for more information.
1268# The default value is: NO.
1269# This tag requires that the tag GENERATE_HTML is set to YES.
1270
1271GENERATE_DOCSET = NO
1272
1273# This tag determines the name of the docset feed. A documentation feed provides
1274# an umbrella under which multiple documentation sets from a single provider
1275# (such as a company or product suite) can be grouped.
1276# The default value is: Doxygen generated docs.
1277# This tag requires that the tag GENERATE_DOCSET is set to YES.
1278
1279DOCSET_FEEDNAME = "Doxygen generated docs"
1280
1281# This tag specifies a string that should uniquely identify the documentation
1282# set bundle. This should be a reverse domain-name style string, e.g.
1283# com.mycompany.MyDocSet. Doxygen will append .docset to the name.
1284# The default value is: org.doxygen.Project.
1285# This tag requires that the tag GENERATE_DOCSET is set to YES.
1286
1287DOCSET_BUNDLE_ID = org.doxygen.Project
1288
1289# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
1290# the documentation publisher. This should be a reverse domain-name style
1291# string, e.g. com.mycompany.MyDocSet.documentation.
1292# The default value is: org.doxygen.Publisher.
1293# This tag requires that the tag GENERATE_DOCSET is set to YES.
1294
1295DOCSET_PUBLISHER_ID = org.doxygen.Publisher
1296
1297# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
1298# The default value is: Publisher.
1299# This tag requires that the tag GENERATE_DOCSET is set to YES.
1300
1301DOCSET_PUBLISHER_NAME = Publisher
1302
1303# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
1304# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
1305# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
1306# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
1307# Windows.
1308#
1309# The HTML Help Workshop contains a compiler that can convert all HTML output
1310# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
1311# files are now used as the Windows 98 help format, and will replace the old
1312# Windows help format (.hlp) on all Windows platforms in the future. Compressed
1313# HTML files also contain an index, a table of contents, and you can search for
1314# words in the documentation. The HTML workshop also contains a viewer for
1315# compressed HTML files.
1316# The default value is: NO.
1317# This tag requires that the tag GENERATE_HTML is set to YES.
1318
1319GENERATE_HTMLHELP = NO
1320
1321# The CHM_FILE tag can be used to specify the file name of the resulting .chm
1322# file. You can add a path in front of the file if the result should not be
1323# written to the html output directory.
1324# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
1325
1326CHM_FILE =
1327
1328# The HHC_LOCATION tag can be used to specify the location (absolute path
1329# including file name) of the HTML help compiler (hhc.exe). If non-empty,
1330# doxygen will try to run the HTML help compiler on the generated index.hhp.
1331# The file has to be specified with full path.
1332# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
1333
1334HHC_LOCATION =
1335
1336# The GENERATE_CHI flag controls if a separate .chi index file is generated
1337# (YES) or that it should be included in the master .chm file (NO).
1338# The default value is: NO.
1339# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
1340
1341GENERATE_CHI = NO
1342
1343# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc)
1344# and project file content.
1345# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
1346
1347CHM_INDEX_ENCODING =
1348
1349# The BINARY_TOC flag controls whether a binary table of contents is generated
1350# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it
1351# enables the Previous and Next buttons.
1352# The default value is: NO.
1353# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
1354
1355BINARY_TOC = NO
1356
1357# The TOC_EXPAND flag can be set to YES to add extra items for group members to
1358# the table of contents of the HTML help documentation and to the tree view.
1359# The default value is: NO.
1360# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
1361
1362TOC_EXPAND = NO
1363
1364# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
1365# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
1366# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
1367# (.qch) of the generated HTML documentation.
1368# The default value is: NO.
1369# This tag requires that the tag GENERATE_HTML is set to YES.
1370
1371GENERATE_QHP = NO
1372
1373# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
1374# the file name of the resulting .qch file. The path specified is relative to
1375# the HTML output folder.
1376# This tag requires that the tag GENERATE_QHP is set to YES.
1377
1378QCH_FILE =
1379
1380# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
1381# Project output. For more information please see Qt Help Project / Namespace
1382# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
1383# The default value is: org.doxygen.Project.
1384# This tag requires that the tag GENERATE_QHP is set to YES.
1385
1386QHP_NAMESPACE = org.doxygen.Project
1387
1388# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
1389# Help Project output. For more information please see Qt Help Project / Virtual
1390# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
1391# folders).
1392# The default value is: doc.
1393# This tag requires that the tag GENERATE_QHP is set to YES.
1394
1395QHP_VIRTUAL_FOLDER = doc
1396
1397# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
1398# filter to add. For more information please see Qt Help Project / Custom
1399# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
1400# filters).
1401# This tag requires that the tag GENERATE_QHP is set to YES.
1402
1403QHP_CUST_FILTER_NAME =
1404
1405# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
1406# custom filter to add. For more information please see Qt Help Project / Custom
1407# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
1408# filters).
1409# This tag requires that the tag GENERATE_QHP is set to YES.
1410
1411QHP_CUST_FILTER_ATTRS =
1412
1413# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
1414# project's filter section matches. Qt Help Project / Filter Attributes (see:
1415# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
1416# This tag requires that the tag GENERATE_QHP is set to YES.
1417
1418QHP_SECT_FILTER_ATTRS =
1419
1420# The QHG_LOCATION tag can be used to specify the location of Qt's
1421# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
1422# generated .qhp file.
1423# This tag requires that the tag GENERATE_QHP is set to YES.
1424
1425QHG_LOCATION =
1426
1427# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
1428# generated, together with the HTML files, they form an Eclipse help plugin. To
1429# install this plugin and make it available under the help contents menu in
1430# Eclipse, the contents of the directory containing the HTML and XML files needs
1431# to be copied into the plugins directory of eclipse. The name of the directory
1432# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
1433# After copying Eclipse needs to be restarted before the help appears.
1434# The default value is: NO.
1435# This tag requires that the tag GENERATE_HTML is set to YES.
1436
1437GENERATE_ECLIPSEHELP = NO
1438
1439# A unique identifier for the Eclipse help plugin. When installing the plugin
1440# the directory name containing the HTML and XML files should also have this
1441# name. Each documentation set should have its own identifier.
1442# The default value is: org.doxygen.Project.
1443# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
1444
1445ECLIPSE_DOC_ID = org.doxygen.Project
1446
1447# If you want full control over the layout of the generated HTML pages it might
1448# be necessary to disable the index and replace it with your own. The
1449# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top
1450# of each HTML page. A value of NO enables the index and the value YES disables
1451# it. Since the tabs in the index contain the same information as the navigation
1452# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.
1453# The default value is: NO.
1454# This tag requires that the tag GENERATE_HTML is set to YES.
1455
1456DISABLE_INDEX = NO
1457
1458# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
1459# structure should be generated to display hierarchical information. If the tag
1460# value is set to YES, a side panel will be generated containing a tree-like
1461# index structure (just like the one that is generated for HTML Help). For this
1462# to work a browser that supports JavaScript, DHTML, CSS and frames is required
1463# (i.e. any modern browser). Windows users are probably better off using the
1464# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can
1465# further fine-tune the look of the index. As an example, the default style
1466# sheet generated by doxygen has an example that shows how to put an image at
1467# the root of the tree instead of the PROJECT_NAME. Since the tree basically has
1468# the same information as the tab index, you could consider setting
1469# DISABLE_INDEX to YES when enabling this option.
1470# The default value is: NO.
1471# This tag requires that the tag GENERATE_HTML is set to YES.
1472
1473GENERATE_TREEVIEW = NO
1474
1475# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
1476# doxygen will group on one line in the generated HTML documentation.
1477#
1478# Note that a value of 0 will completely suppress the enum values from appearing
1479# in the overview section.
1480# Minimum value: 0, maximum value: 20, default value: 4.
1481# This tag requires that the tag GENERATE_HTML is set to YES.
1482
1483ENUM_VALUES_PER_LINE = 4
1484
1485# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
1486# to set the initial width (in pixels) of the frame in which the tree is shown.
1487# Minimum value: 0, maximum value: 1500, default value: 250.
1488# This tag requires that the tag GENERATE_HTML is set to YES.
1489
1490TREEVIEW_WIDTH = 250
1491
1492# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to
1493# external symbols imported via tag files in a separate window.
1494# The default value is: NO.
1495# This tag requires that the tag GENERATE_HTML is set to YES.
1496
1497EXT_LINKS_IN_WINDOW = NO
1498
1499# Use this tag to change the font size of LaTeX formulas included as images in
1500# the HTML documentation. When you change the font size after a successful
1501# doxygen run you need to manually remove any form_*.png images from the HTML
1502# output directory to force them to be regenerated.
1503# Minimum value: 8, maximum value: 50, default value: 10.
1504# This tag requires that the tag GENERATE_HTML is set to YES.
1505
1506FORMULA_FONTSIZE = 10
1507
1508# Use the FORMULA_TRANPARENT tag to determine whether or not the images
1509# generated for formulas are transparent PNGs. Transparent PNGs are not
1510# supported properly for IE 6.0, but are supported on all modern browsers.
1511#
1512# Note that when changing this option you need to delete any form_*.png files in
1513# the HTML output directory before the changes have effect.
1514# The default value is: YES.
1515# This tag requires that the tag GENERATE_HTML is set to YES.
1516
1517FORMULA_TRANSPARENT = YES
1518
1519# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
1520# http://www.mathjax.org) which uses client side Javascript for the rendering
1521# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
1522# installed or if you want to formulas look prettier in the HTML output. When
1523# enabled you may also need to install MathJax separately and configure the path
1524# to it using the MATHJAX_RELPATH option.
1525# The default value is: NO.
1526# This tag requires that the tag GENERATE_HTML is set to YES.
1527
1528USE_MATHJAX = NO
1529
1530# When MathJax is enabled you can set the default output format to be used for
1531# the MathJax output. See the MathJax site (see:
1532# http://docs.mathjax.org/en/latest/output.html) for more details.
1533# Possible values are: HTML-CSS (which is slower, but has the best
1534# compatibility), NativeMML (i.e. MathML) and SVG.
1535# The default value is: HTML-CSS.
1536# This tag requires that the tag USE_MATHJAX is set to YES.
1537
1538MATHJAX_FORMAT = HTML-CSS
1539
1540# When MathJax is enabled you need to specify the location relative to the HTML
1541# output directory using the MATHJAX_RELPATH option. The destination directory
1542# should contain the MathJax.js script. For instance, if the mathjax directory
1543# is located at the same level as the HTML output directory, then
1544# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
1545# Content Delivery Network so you can quickly see the result without installing
1546# MathJax. However, it is strongly recommended to install a local copy of
1547# MathJax from http://www.mathjax.org before deployment.
1548# The default value is: http://cdn.mathjax.org/mathjax/latest.
1549# This tag requires that the tag USE_MATHJAX is set to YES.
1550
1551MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
1552
1553# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
1554# extension names that should be enabled during MathJax rendering. For example
1555# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
1556# This tag requires that the tag USE_MATHJAX is set to YES.
1557
1558MATHJAX_EXTENSIONS =
1559
1560# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
1561# of code that will be used on startup of the MathJax code. See the MathJax site
1562# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
1563# example see the documentation.
1564# This tag requires that the tag USE_MATHJAX is set to YES.
1565
1566MATHJAX_CODEFILE =
1567
1568# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
1569# the HTML output. The underlying search engine uses javascript and DHTML and
1570# should work on any modern browser. Note that when using HTML help
1571# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
1572# there is already a search function so this one should typically be disabled.
1573# For large projects the javascript based search engine can be slow, then
1574# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
1575# search using the keyboard; to jump to the search box use <access key> + S
1576# (what the <access key> is depends on the OS and browser, but it is typically
1577# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down
1578# key> to jump into the search results window, the results can be navigated
1579# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel
1580# the search. The filter options can be selected when the cursor is inside the
1581# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>
1582# to select a filter and <Enter> or <escape> to activate or cancel the filter
1583# option.
1584# The default value is: YES.
1585# This tag requires that the tag GENERATE_HTML is set to YES.
1586
1587SEARCHENGINE = YES
1588
1589# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
1590# implemented using a web server instead of a web client using Javascript. There
1591# are two flavors of web server based searching depending on the EXTERNAL_SEARCH
1592# setting. When disabled, doxygen will generate a PHP script for searching and
1593# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing
1594# and searching needs to be provided by external tools. See the section
1595# "External Indexing and Searching" for details.
1596# The default value is: NO.
1597# This tag requires that the tag SEARCHENGINE is set to YES.
1598
1599SERVER_BASED_SEARCH = NO
1600
1601# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
1602# script for searching. Instead the search results are written to an XML file
1603# which needs to be processed by an external indexer. Doxygen will invoke an
1604# external search engine pointed to by the SEARCHENGINE_URL option to obtain the
1605# search results.
1606#
1607# Doxygen ships with an example indexer (doxyindexer) and search engine
1608# (doxysearch.cgi) which are based on the open source search engine library
1609# Xapian (see: http://xapian.org/).
1610#
1611# See the section "External Indexing and Searching" for details.
1612# The default value is: NO.
1613# This tag requires that the tag SEARCHENGINE is set to YES.
1614
1615EXTERNAL_SEARCH = NO
1616
1617# The SEARCHENGINE_URL should point to a search engine hosted by a web server
1618# which will return the search results when EXTERNAL_SEARCH is enabled.
1619#
1620# Doxygen ships with an example indexer (doxyindexer) and search engine
1621# (doxysearch.cgi) which are based on the open source search engine library
1622# Xapian (see: http://xapian.org/). See the section "External Indexing and
1623# Searching" for details.
1624# This tag requires that the tag SEARCHENGINE is set to YES.
1625
1626SEARCHENGINE_URL =
1627
1628# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
1629# search data is written to a file for indexing by an external tool. With the
1630# SEARCHDATA_FILE tag the name of this file can be specified.
1631# The default file is: searchdata.xml.
1632# This tag requires that the tag SEARCHENGINE is set to YES.
1633
1634SEARCHDATA_FILE = searchdata.xml
1635
1636# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the
1637# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
1638# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
1639# projects and redirect the results back to the right project.
1640# This tag requires that the tag SEARCHENGINE is set to YES.
1641
1642EXTERNAL_SEARCH_ID =
1643
1644# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
1645# projects other than the one defined by this configuration file, but that are
1646# all added to the same external search index. Each project needs to have a
1647# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of
1648# to a relative location where the documentation can be found. The format is:
1649# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
1650# This tag requires that the tag SEARCHENGINE is set to YES.
1651
1652EXTRA_SEARCH_MAPPINGS =
1653
1654#---------------------------------------------------------------------------
1655# Configuration options related to the LaTeX output
1656#---------------------------------------------------------------------------
1657
1658# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.
1659# The default value is: YES.
1660
1661GENERATE_LATEX = NO
1662
1663# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
1664# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
1665# it.
1666# The default directory is: latex.
1667# This tag requires that the tag GENERATE_LATEX is set to YES.
1668
1669LATEX_OUTPUT = latex
1670
1671# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
1672# invoked.
1673#
1674# Note that when enabling USE_PDFLATEX this option is only used for generating
1675# bitmaps for formulas in the HTML output, but not in the Makefile that is
1676# written to the output directory.
1677# The default file is: latex.
1678# This tag requires that the tag GENERATE_LATEX is set to YES.
1679
1680LATEX_CMD_NAME = latex
1681
1682# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
1683# index for LaTeX.
1684# The default file is: makeindex.
1685# This tag requires that the tag GENERATE_LATEX is set to YES.
1686
1687MAKEINDEX_CMD_NAME = makeindex
1688
1689# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX
1690# documents. This may be useful for small projects and may help to save some
1691# trees in general.
1692# The default value is: NO.
1693# This tag requires that the tag GENERATE_LATEX is set to YES.
1694
1695COMPACT_LATEX = NO
1696
1697# The PAPER_TYPE tag can be used to set the paper type that is used by the
1698# printer.
1699# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x
1700# 14 inches) and executive (7.25 x 10.5 inches).
1701# The default value is: a4.
1702# This tag requires that the tag GENERATE_LATEX is set to YES.
1703
1704PAPER_TYPE = a4
1705
1706# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
1707# that should be included in the LaTeX output. The package can be specified just
1708# by its name or with the correct syntax as to be used with the LaTeX
1709# \usepackage command. To get the times font for instance you can specify :
1710# EXTRA_PACKAGES=times or EXTRA_PACKAGES={times}
1711# To use the option intlimits with the amsmath package you can specify:
1712# EXTRA_PACKAGES=[intlimits]{amsmath}
1713# If left blank no extra packages will be included.
1714# This tag requires that the tag GENERATE_LATEX is set to YES.
1715
1716EXTRA_PACKAGES =
1717
1718# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the
1719# generated LaTeX document. The header should contain everything until the first
1720# chapter. If it is left blank doxygen will generate a standard header. See
1721# section "Doxygen usage" for information on how to let doxygen write the
1722# default header to a separate file.
1723#
1724# Note: Only use a user-defined header if you know what you are doing! The
1725# following commands have a special meaning inside the header: $title,
1726# $datetime, $date, $doxygenversion, $projectname, $projectnumber,
1727# $projectbrief, $projectlogo. Doxygen will replace $title with the empty
1728# string, for the replacement values of the other commands the user is referred
1729# to HTML_HEADER.
1730# This tag requires that the tag GENERATE_LATEX is set to YES.
1731
1732LATEX_HEADER =
1733
1734# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the
1735# generated LaTeX document. The footer should contain everything after the last
1736# chapter. If it is left blank doxygen will generate a standard footer. See
1737# LATEX_HEADER for more information on how to generate a default footer and what
1738# special commands can be used inside the footer.
1739#
1740# Note: Only use a user-defined footer if you know what you are doing!
1741# This tag requires that the tag GENERATE_LATEX is set to YES.
1742
1743LATEX_FOOTER =
1744
1745# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined
1746# LaTeX style sheets that are included after the standard style sheets created
1747# by doxygen. Using this option one can overrule certain style aspects. Doxygen
1748# will copy the style sheet files to the output directory.
1749# Note: The order of the extra style sheet files is of importance (e.g. the last
1750# style sheet in the list overrules the setting of the previous ones in the
1751# list).
1752# This tag requires that the tag GENERATE_LATEX is set to YES.
1753
1754LATEX_EXTRA_STYLESHEET =
1755
1756# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
1757# other source files which should be copied to the LATEX_OUTPUT output
1758# directory. Note that the files will be copied as-is; there are no commands or
1759# markers available.
1760# This tag requires that the tag GENERATE_LATEX is set to YES.
1761
1762LATEX_EXTRA_FILES =
1763
1764# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
1765# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
1766# contain links (just like the HTML output) instead of page references. This
1767# makes the output suitable for online browsing using a PDF viewer.
1768# The default value is: YES.
1769# This tag requires that the tag GENERATE_LATEX is set to YES.
1770
1771PDF_HYPERLINKS = YES
1772
1773# If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
1774# the PDF file directly from the LaTeX files. Set this option to YES, to get a
1775# higher quality PDF documentation.
1776# The default value is: YES.
1777# This tag requires that the tag GENERATE_LATEX is set to YES.
1778
1779USE_PDFLATEX = YES
1780
1781# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode
1782# command to the generated LaTeX files. This will instruct LaTeX to keep running
1783# if errors occur, instead of asking the user for help. This option is also used
1784# when generating formulas in HTML.
1785# The default value is: NO.
1786# This tag requires that the tag GENERATE_LATEX is set to YES.
1787
1788LATEX_BATCHMODE = NO
1789
1790# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the
1791# index chapters (such as File Index, Compound Index, etc.) in the output.
1792# The default value is: NO.
1793# This tag requires that the tag GENERATE_LATEX is set to YES.
1794
1795LATEX_HIDE_INDICES = NO
1796
1797# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source
1798# code with syntax highlighting in the LaTeX output.
1799#
1800# Note that which sources are shown also depends on other settings such as
1801# SOURCE_BROWSER.
1802# The default value is: NO.
1803# This tag requires that the tag GENERATE_LATEX is set to YES.
1804
1805LATEX_SOURCE_CODE = NO
1806
1807# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
1808# bibliography, e.g. plainnat, or ieeetr. See
1809# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
1810# The default value is: plain.
1811# This tag requires that the tag GENERATE_LATEX is set to YES.
1812
1813LATEX_BIB_STYLE = plain
1814
1815# If the LATEX_TIMESTAMP tag is set to YES then the footer of each generated
1816# page will contain the date and time when the page was generated. Setting this
1817# to NO can help when comparing the output of multiple runs.
1818# The default value is: NO.
1819# This tag requires that the tag GENERATE_LATEX is set to YES.
1820
1821LATEX_TIMESTAMP = NO
1822
1823#---------------------------------------------------------------------------
1824# Configuration options related to the RTF output
1825#---------------------------------------------------------------------------
1826
1827# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The
1828# RTF output is optimized for Word 97 and may not look too pretty with other RTF
1829# readers/editors.
1830# The default value is: NO.
1831
1832GENERATE_RTF = NO
1833
1834# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a
1835# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
1836# it.
1837# The default directory is: rtf.
1838# This tag requires that the tag GENERATE_RTF is set to YES.
1839
1840RTF_OUTPUT = rtf
1841
1842# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF
1843# documents. This may be useful for small projects and may help to save some
1844# trees in general.
1845# The default value is: NO.
1846# This tag requires that the tag GENERATE_RTF is set to YES.
1847
1848COMPACT_RTF = NO
1849
1850# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will
1851# contain hyperlink fields. The RTF file will contain links (just like the HTML
1852# output) instead of page references. This makes the output suitable for online
1853# browsing using Word or some other Word compatible readers that support those
1854# fields.
1855#
1856# Note: WordPad (write) and others do not support links.
1857# The default value is: NO.
1858# This tag requires that the tag GENERATE_RTF is set to YES.
1859
1860RTF_HYPERLINKS = NO
1861
1862# Load stylesheet definitions from file. Syntax is similar to doxygen's config
1863# file, i.e. a series of assignments. You only have to provide replacements,
1864# missing definitions are set to their default value.
1865#
1866# See also section "Doxygen usage" for information on how to generate the
1867# default style sheet that doxygen normally uses.
1868# This tag requires that the tag GENERATE_RTF is set to YES.
1869
1870RTF_STYLESHEET_FILE =
1871
1872# Set optional variables used in the generation of an RTF document. Syntax is
1873# similar to doxygen's config file. A template extensions file can be generated
1874# using doxygen -e rtf extensionFile.
1875# This tag requires that the tag GENERATE_RTF is set to YES.
1876
1877RTF_EXTENSIONS_FILE =
1878
1879# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code
1880# with syntax highlighting in the RTF output.
1881#
1882# Note that which sources are shown also depends on other settings such as
1883# SOURCE_BROWSER.
1884# The default value is: NO.
1885# This tag requires that the tag GENERATE_RTF is set to YES.
1886
1887RTF_SOURCE_CODE = NO
1888
1889#---------------------------------------------------------------------------
1890# Configuration options related to the man page output
1891#---------------------------------------------------------------------------
1892
1893# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for
1894# classes and files.
1895# The default value is: NO.
1896
1897GENERATE_MAN = NO
1898
1899# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
1900# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
1901# it. A directory man3 will be created inside the directory specified by
1902# MAN_OUTPUT.
1903# The default directory is: man.
1904# This tag requires that the tag GENERATE_MAN is set to YES.
1905
1906MAN_OUTPUT = man
1907
1908# The MAN_EXTENSION tag determines the extension that is added to the generated
1909# man pages. In case the manual section does not start with a number, the number
1910# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is
1911# optional.
1912# The default value is: .3.
1913# This tag requires that the tag GENERATE_MAN is set to YES.
1914
1915MAN_EXTENSION = .3
1916
1917# The MAN_SUBDIR tag determines the name of the directory created within
1918# MAN_OUTPUT in which the man pages are placed. If defaults to man followed by
1919# MAN_EXTENSION with the initial . removed.
1920# This tag requires that the tag GENERATE_MAN is set to YES.
1921
1922MAN_SUBDIR =
1923
1924# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
1925# will generate one additional man file for each entity documented in the real
1926# man page(s). These additional files only source the real man page, but without
1927# them the man command would be unable to find the correct page.
1928# The default value is: NO.
1929# This tag requires that the tag GENERATE_MAN is set to YES.
1930
1931MAN_LINKS = NO
1932
1933#---------------------------------------------------------------------------
1934# Configuration options related to the XML output
1935#---------------------------------------------------------------------------
1936
1937# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that
1938# captures the structure of the code including all documentation.
1939# The default value is: NO.
1940
1941GENERATE_XML = NO
1942
1943# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
1944# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
1945# it.
1946# The default directory is: xml.
1947# This tag requires that the tag GENERATE_XML is set to YES.
1948
1949XML_OUTPUT = xml
1950
1951# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program
1952# listings (including syntax highlighting and cross-referencing information) to
1953# the XML output. Note that enabling this will significantly increase the size
1954# of the XML output.
1955# The default value is: YES.
1956# This tag requires that the tag GENERATE_XML is set to YES.
1957
1958XML_PROGRAMLISTING = YES
1959
1960#---------------------------------------------------------------------------
1961# Configuration options related to the DOCBOOK output
1962#---------------------------------------------------------------------------
1963
1964# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files
1965# that can be used to generate PDF.
1966# The default value is: NO.
1967
1968GENERATE_DOCBOOK = NO
1969
1970# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.
1971# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in
1972# front of it.
1973# The default directory is: docbook.
1974# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
1975
1976DOCBOOK_OUTPUT = docbook
1977
1978# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the
1979# program listings (including syntax highlighting and cross-referencing
1980# information) to the DOCBOOK output. Note that enabling this will significantly
1981# increase the size of the DOCBOOK output.
1982# The default value is: NO.
1983# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
1984
1985DOCBOOK_PROGRAMLISTING = NO
1986
1987#---------------------------------------------------------------------------
1988# Configuration options for the AutoGen Definitions output
1989#---------------------------------------------------------------------------
1990
1991# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an
1992# AutoGen Definitions (see http://autogen.sf.net) file that captures the
1993# structure of the code including all documentation. Note that this feature is
1994# still experimental and incomplete at the moment.
1995# The default value is: NO.
1996
1997GENERATE_AUTOGEN_DEF = NO
1998
1999#---------------------------------------------------------------------------
2000# Configuration options related to the Perl module output
2001#---------------------------------------------------------------------------
2002
2003# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module
2004# file that captures the structure of the code including all documentation.
2005#
2006# Note that this feature is still experimental and incomplete at the moment.
2007# The default value is: NO.
2008
2009GENERATE_PERLMOD = NO
2010
2011# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary
2012# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
2013# output from the Perl module output.
2014# The default value is: NO.
2015# This tag requires that the tag GENERATE_PERLMOD is set to YES.
2016
2017PERLMOD_LATEX = NO
2018
2019# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely
2020# formatted so it can be parsed by a human reader. This is useful if you want to
2021# understand what is going on. On the other hand, if this tag is set to NO, the
2022# size of the Perl module output will be much smaller and Perl will parse it
2023# just the same.
2024# The default value is: YES.
2025# This tag requires that the tag GENERATE_PERLMOD is set to YES.
2026
2027PERLMOD_PRETTY = YES
2028
2029# The names of the make variables in the generated doxyrules.make file are
2030# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful
2031# so different doxyrules.make files included by the same Makefile don't
2032# overwrite each other's variables.
2033# This tag requires that the tag GENERATE_PERLMOD is set to YES.
2034
2035PERLMOD_MAKEVAR_PREFIX =
2036
2037#---------------------------------------------------------------------------
2038# Configuration options related to the preprocessor
2039#---------------------------------------------------------------------------
2040
2041# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all
2042# C-preprocessor directives found in the sources and include files.
2043# The default value is: YES.
2044
2045ENABLE_PREPROCESSING = YES
2046
2047# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names
2048# in the source code. If set to NO, only conditional compilation will be
2049# performed. Macro expansion can be done in a controlled way by setting
2050# EXPAND_ONLY_PREDEF to YES.
2051# The default value is: NO.
2052# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
2053
2054MACRO_EXPANSION = NO
2055
2056# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
2057# the macro expansion is limited to the macros specified with the PREDEFINED and
2058# EXPAND_AS_DEFINED tags.
2059# The default value is: NO.
2060# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
2061
2062EXPAND_ONLY_PREDEF = NO
2063
2064# If the SEARCH_INCLUDES tag is set to YES, the include files in the
2065# INCLUDE_PATH will be searched if a #include is found.
2066# The default value is: YES.
2067# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
2068
2069SEARCH_INCLUDES = YES
2070
2071# The INCLUDE_PATH tag can be used to specify one or more directories that
2072# contain include files that are not input files but should be processed by the
2073# preprocessor.
2074# This tag requires that the tag SEARCH_INCLUDES is set to YES.
2075
2076INCLUDE_PATH =
2077
2078# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
2079# patterns (like *.h and *.hpp) to filter out the header-files in the
2080# directories. If left blank, the patterns specified with FILE_PATTERNS will be
2081# used.
2082# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
2083
2084INCLUDE_FILE_PATTERNS =
2085
2086# The PREDEFINED tag can be used to specify one or more macro names that are
2087# defined before the preprocessor is started (similar to the -D option of e.g.
2088# gcc). The argument of the tag is a list of macros of the form: name or
2089# name=definition (no spaces). If the definition and the "=" are omitted, "=1"
2090# is assumed. To prevent a macro definition from being undefined via #undef or
2091# recursively expanded use the := operator instead of the = operator.
2092# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
2093
2094PREDEFINED =
2095
2096# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
2097# tag can be used to specify a list of macro names that should be expanded. The
2098# macro definition that is found in the sources will be used. Use the PREDEFINED
2099# tag if you want to use a different macro definition that overrules the
2100# definition found in the source code.
2101# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
2102
2103EXPAND_AS_DEFINED =
2104
2105# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
2106# remove all references to function-like macros that are alone on a line, have
2107# an all uppercase name, and do not end with a semicolon. Such function macros
2108# are typically used for boiler-plate code, and will confuse the parser if not
2109# removed.
2110# The default value is: YES.
2111# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
2112
2113SKIP_FUNCTION_MACROS = YES
2114
2115#---------------------------------------------------------------------------
2116# Configuration options related to external references
2117#---------------------------------------------------------------------------
2118
2119# The TAGFILES tag can be used to specify one or more tag files. For each tag
2120# file the location of the external documentation should be added. The format of
2121# a tag file without this location is as follows:
2122# TAGFILES = file1 file2 ...
2123# Adding location for the tag files is done as follows:
2124# TAGFILES = file1=loc1 "file2 = loc2" ...
2125# where loc1 and loc2 can be relative or absolute paths or URLs. See the
2126# section "Linking to external documentation" for more information about the use
2127# of tag files.
2128# Note: Each tag file must have a unique name (where the name does NOT include
2129# the path). If a tag file is not located in the directory in which doxygen is
2130# run, you must also specify the path to the tagfile here.
2131
2132TAGFILES =
2133
2134# When a file name is specified after GENERATE_TAGFILE, doxygen will create a
2135# tag file that is based on the input files it reads. See section "Linking to
2136# external documentation" for more information about the usage of tag files.
2137
2138GENERATE_TAGFILE =
2139
2140# If the ALLEXTERNALS tag is set to YES, all external class will be listed in
2141# the class index. If set to NO, only the inherited external classes will be
2142# listed.
2143# The default value is: NO.
2144
2145ALLEXTERNALS = NO
2146
2147# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed
2148# in the modules index. If set to NO, only the current project's groups will be
2149# listed.
2150# The default value is: YES.
2151
2152EXTERNAL_GROUPS = YES
2153
2154# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in
2155# the related pages index. If set to NO, only the current project's pages will
2156# be listed.
2157# The default value is: YES.
2158
2159EXTERNAL_PAGES = YES
2160
2161# The PERL_PATH should be the absolute path and name of the perl script
2162# interpreter (i.e. the result of 'which perl').
2163# The default file (with absolute path) is: /usr/bin/perl.
2164
2165PERL_PATH = /usr/bin/perl
2166
2167#---------------------------------------------------------------------------
2168# Configuration options related to the dot tool
2169#---------------------------------------------------------------------------
2170
2171# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram
2172# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
2173# NO turns the diagrams off. Note that this option also works with HAVE_DOT
2174# disabled, but it is recommended to install and use dot, since it yields more
2175# powerful graphs.
2176# The default value is: YES.
2177
2178CLASS_DIAGRAMS = YES
2179
2180# You can define message sequence charts within doxygen comments using the \msc
2181# command. Doxygen will then run the mscgen tool (see:
2182# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
2183# documentation. The MSCGEN_PATH tag allows you to specify the directory where
2184# the mscgen tool resides. If left empty the tool is assumed to be found in the
2185# default search path.
2186
2187MSCGEN_PATH =
2188
2189# You can include diagrams made with dia in doxygen documentation. Doxygen will
2190# then run dia to produce the diagram and insert it in the documentation. The
2191# DIA_PATH tag allows you to specify the directory where the dia binary resides.
2192# If left empty dia is assumed to be found in the default search path.
2193
2194DIA_PATH =
2195
2196# If set to YES the inheritance and collaboration graphs will hide inheritance
2197# and usage relations if the target is undocumented or is not a class.
2198# The default value is: YES.
2199
2200HIDE_UNDOC_RELATIONS = YES
2201
2202# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
2203# available from the path. This tool is part of Graphviz (see:
2204# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
2205# Bell Labs. The other options in this section have no effect if this option is
2206# set to NO
2207# The default value is: NO.
2208
2209HAVE_DOT = NO
2210
2211# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
2212# to run in parallel. When set to 0 doxygen will base this on the number of
2213# processors available in the system. You can set it explicitly to a value
2214# larger than 0 to get control over the balance between CPU load and processing
2215# speed.
2216# Minimum value: 0, maximum value: 32, default value: 0.
2217# This tag requires that the tag HAVE_DOT is set to YES.
2218
2219DOT_NUM_THREADS = 0
2220
2221# When you want a differently looking font in the dot files that doxygen
2222# generates you can specify the font name using DOT_FONTNAME. You need to make
2223# sure dot is able to find the font, which can be done by putting it in a
2224# standard location or by setting the DOTFONTPATH environment variable or by
2225# setting DOT_FONTPATH to the directory containing the font.
2226# The default value is: Helvetica.
2227# This tag requires that the tag HAVE_DOT is set to YES.
2228
2229DOT_FONTNAME = Helvetica
2230
2231# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of
2232# dot graphs.
2233# Minimum value: 4, maximum value: 24, default value: 10.
2234# This tag requires that the tag HAVE_DOT is set to YES.
2235
2236DOT_FONTSIZE = 10
2237
2238# By default doxygen will tell dot to use the default font as specified with
2239# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set
2240# the path where dot can find it using this tag.
2241# This tag requires that the tag HAVE_DOT is set to YES.
2242
2243DOT_FONTPATH =
2244
2245# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for
2246# each documented class showing the direct and indirect inheritance relations.
2247# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO.
2248# The default value is: YES.
2249# This tag requires that the tag HAVE_DOT is set to YES.
2250
2251CLASS_GRAPH = YES
2252
2253# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a
2254# graph for each documented class showing the direct and indirect implementation
2255# dependencies (inheritance, containment, and class references variables) of the
2256# class with other documented classes.
2257# The default value is: YES.
2258# This tag requires that the tag HAVE_DOT is set to YES.
2259
2260COLLABORATION_GRAPH = YES
2261
2262# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for
2263# groups, showing the direct groups dependencies.
2264# The default value is: YES.
2265# This tag requires that the tag HAVE_DOT is set to YES.
2266
2267GROUP_GRAPHS = YES
2268
2269# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and
2270# collaboration diagrams in a style similar to the OMG's Unified Modeling
2271# Language.
2272# The default value is: NO.
2273# This tag requires that the tag HAVE_DOT is set to YES.
2274
2275UML_LOOK = NO
2276
2277# If the UML_LOOK tag is enabled, the fields and methods are shown inside the
2278# class node. If there are many fields or methods and many nodes the graph may
2279# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the
2280# number of items for each type to make the size more manageable. Set this to 0
2281# for no limit. Note that the threshold may be exceeded by 50% before the limit
2282# is enforced. So when you set the threshold to 10, up to 15 fields may appear,
2283# but if the number exceeds 15, the total amount of fields shown is limited to
2284# 10.
2285# Minimum value: 0, maximum value: 100, default value: 10.
2286# This tag requires that the tag HAVE_DOT is set to YES.
2287
2288UML_LIMIT_NUM_FIELDS = 10
2289
2290# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
2291# collaboration graphs will show the relations between templates and their
2292# instances.
2293# The default value is: NO.
2294# This tag requires that the tag HAVE_DOT is set to YES.
2295
2296TEMPLATE_RELATIONS = NO
2297
2298# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
2299# YES then doxygen will generate a graph for each documented file showing the
2300# direct and indirect include dependencies of the file with other documented
2301# files.
2302# The default value is: YES.
2303# This tag requires that the tag HAVE_DOT is set to YES.
2304
2305INCLUDE_GRAPH = YES
2306
2307# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
2308# set to YES then doxygen will generate a graph for each documented file showing
2309# the direct and indirect include dependencies of the file with other documented
2310# files.
2311# The default value is: YES.
2312# This tag requires that the tag HAVE_DOT is set to YES.
2313
2314INCLUDED_BY_GRAPH = YES
2315
2316# If the CALL_GRAPH tag is set to YES then doxygen will generate a call
2317# dependency graph for every global function or class method.
2318#
2319# Note that enabling this option will significantly increase the time of a run.
2320# So in most cases it will be better to enable call graphs for selected
2321# functions only using the \callgraph command. Disabling a call graph can be
2322# accomplished by means of the command \hidecallgraph.
2323# The default value is: NO.
2324# This tag requires that the tag HAVE_DOT is set to YES.
2325
2326CALL_GRAPH = NO
2327
2328# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller
2329# dependency graph for every global function or class method.
2330#
2331# Note that enabling this option will significantly increase the time of a run.
2332# So in most cases it will be better to enable caller graphs for selected
2333# functions only using the \callergraph command. Disabling a caller graph can be
2334# accomplished by means of the command \hidecallergraph.
2335# The default value is: NO.
2336# This tag requires that the tag HAVE_DOT is set to YES.
2337
2338CALLER_GRAPH = NO
2339
2340# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
2341# hierarchy of all classes instead of a textual one.
2342# The default value is: YES.
2343# This tag requires that the tag HAVE_DOT is set to YES.
2344
2345GRAPHICAL_HIERARCHY = YES
2346
2347# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the
2348# dependencies a directory has on other directories in a graphical way. The
2349# dependency relations are determined by the #include relations between the
2350# files in the directories.
2351# The default value is: YES.
2352# This tag requires that the tag HAVE_DOT is set to YES.
2353
2354DIRECTORY_GRAPH = YES
2355
2356# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
2357# generated by dot. For an explanation of the image formats see the section
2358# output formats in the documentation of the dot tool (Graphviz (see:
2359# http://www.graphviz.org/)).
2360# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
2361# to make the SVG files visible in IE 9+ (other browsers do not have this
2362# requirement).
2363# Possible values are: png, jpg, gif, svg, png:gd, png:gd:gd, png:cairo,
2364# png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and
2365# png:gdiplus:gdiplus.
2366# The default value is: png.
2367# This tag requires that the tag HAVE_DOT is set to YES.
2368
2369DOT_IMAGE_FORMAT = png
2370
2371# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
2372# enable generation of interactive SVG images that allow zooming and panning.
2373#
2374# Note that this requires a modern browser other than Internet Explorer. Tested
2375# and working are Firefox, Chrome, Safari, and Opera.
2376# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make
2377# the SVG files visible. Older versions of IE do not have SVG support.
2378# The default value is: NO.
2379# This tag requires that the tag HAVE_DOT is set to YES.
2380
2381INTERACTIVE_SVG = NO
2382
2383# The DOT_PATH tag can be used to specify the path where the dot tool can be
2384# found. If left blank, it is assumed the dot tool can be found in the path.
2385# This tag requires that the tag HAVE_DOT is set to YES.
2386
2387DOT_PATH =
2388
2389# The DOTFILE_DIRS tag can be used to specify one or more directories that
2390# contain dot files that are included in the documentation (see the \dotfile
2391# command).
2392# This tag requires that the tag HAVE_DOT is set to YES.
2393
2394DOTFILE_DIRS =
2395
2396# The MSCFILE_DIRS tag can be used to specify one or more directories that
2397# contain msc files that are included in the documentation (see the \mscfile
2398# command).
2399
2400MSCFILE_DIRS =
2401
2402# The DIAFILE_DIRS tag can be used to specify one or more directories that
2403# contain dia files that are included in the documentation (see the \diafile
2404# command).
2405
2406DIAFILE_DIRS =
2407
2408# When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the
2409# path where java can find the plantuml.jar file. If left blank, it is assumed
2410# PlantUML is not used or called during a preprocessing step. Doxygen will
2411# generate a warning when it encounters a \startuml command in this case and
2412# will not generate output for the diagram.
2413
2414PLANTUML_JAR_PATH =
2415
2416# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
2417# configuration file for plantuml.
2418
2419PLANTUML_CFG_FILE =
2420
2421# When using plantuml, the specified paths are searched for files specified by
2422# the !include statement in a plantuml block.
2423
2424PLANTUML_INCLUDE_PATH =
2425
2426# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
2427# that will be shown in the graph. If the number of nodes in a graph becomes
2428# larger than this value, doxygen will truncate the graph, which is visualized
2429# by representing a node as a red box. Note that doxygen if the number of direct
2430# children of the root node in a graph is already larger than
2431# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that
2432# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
2433# Minimum value: 0, maximum value: 10000, default value: 50.
2434# This tag requires that the tag HAVE_DOT is set to YES.
2435
2436DOT_GRAPH_MAX_NODES = 50
2437
2438# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
2439# generated by dot. A depth value of 3 means that only nodes reachable from the
2440# root by following a path via at most 3 edges will be shown. Nodes that lay
2441# further from the root node will be omitted. Note that setting this option to 1
2442# or 2 may greatly reduce the computation time needed for large code bases. Also
2443# note that the size of a graph can be further restricted by
2444# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
2445# Minimum value: 0, maximum value: 1000, default value: 0.
2446# This tag requires that the tag HAVE_DOT is set to YES.
2447
2448MAX_DOT_GRAPH_DEPTH = 0
2449
2450# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
2451# background. This is disabled by default, because dot on Windows does not seem
2452# to support this out of the box.
2453#
2454# Warning: Depending on the platform used, enabling this option may lead to
2455# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
2456# read).
2457# The default value is: NO.
2458# This tag requires that the tag HAVE_DOT is set to YES.
2459
2460DOT_TRANSPARENT = NO
2461
2462# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output
2463# files in one run (i.e. multiple -o and -T options on the command line). This
2464# makes dot run faster, but since only newer versions of dot (>1.8.10) support
2465# this, this feature is disabled by default.
2466# The default value is: NO.
2467# This tag requires that the tag HAVE_DOT is set to YES.
2468
2469DOT_MULTI_TARGETS = NO
2470
2471# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page
2472# explaining the meaning of the various boxes and arrows in the dot generated
2473# graphs.
2474# The default value is: YES.
2475# This tag requires that the tag HAVE_DOT is set to YES.
2476
2477GENERATE_LEGEND = YES
2478
2479# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot
2480# files that are used to generate the various graphs.
2481# The default value is: YES.
2482# This tag requires that the tag HAVE_DOT is set to YES.
2483
2484DOT_CLEANUP = YES
02485
=== added directory 'Docs/developer/ford-media'
=== added file 'Docs/developer/ford-media/Interactions.png'
1Binary files Docs/developer/ford-media/Interactions.png 1970-01-01 00:00:00 +0000 and Docs/developer/ford-media/Interactions.png 2018-09-12 13:10:27 +0000 differ2486Binary files Docs/developer/ford-media/Interactions.png 1970-01-01 00:00:00 +0000 and Docs/developer/ford-media/Interactions.png 2018-09-12 13:10:27 +0000 differ
=== added file 'Docs/developer/ford-media/RectangularMatrix.png'
2Binary files Docs/developer/ford-media/RectangularMatrix.png 1970-01-01 00:00:00 +0000 and Docs/developer/ford-media/RectangularMatrix.png 2018-09-12 13:10:27 +0000 differ2487Binary files Docs/developer/ford-media/RectangularMatrix.png 1970-01-01 00:00:00 +0000 and Docs/developer/ford-media/RectangularMatrix.png 2018-09-12 13:10:27 +0000 differ
=== added directory 'Docs/developer/ford-pages'
=== added directory 'Docs/developer/ford-pages/datastructures'
=== added file 'Docs/developer/ford-pages/datastructures/1-buds.md'
--- Docs/developer/ford-pages/datastructures/1-buds.md 1970-01-01 00:00:00 +0000
+++ Docs/developer/ford-pages/datastructures/1-buds.md 2018-09-12 13:10:27 +0000
@@ -0,0 +1,59 @@
1title: Reference-counted derived types
2
3(Work in progress)
4
5Derived types are a very useful addition to a programming
6language. They allow to keep together in the same place a number or
7related variables.
8
9Sometimes, the same basic data in a derived-type variable needs to be
10associated to larger data structures. The sparsity pattern of SIESTA
11matrices is an example: every matrix in the program (for a given
12geometry) uses the same sparse indexing arrays. Traditionally, there
13was a set of global arrays (numh, listh, etc) that would take care of
14the indexing throughout. With derived types, those arrays could be put in
15a "sparsity_info" variable for easier handling.
16
17Now consider what would happen if one wants to implement an
18extrapolation scheme for density matrices in molecular-dynamics
19runs. We must keep some past history of "geometry/density matrix"
20pairs. Since different geometries need potentially different indexing
21arrays, the old "array set" scheme would break down very soon (a
22primitive extrapolation was implemented at some point, with only one
23previous geometry: it used numh_old, listh_old, etc arrays...), and
24the bookeeping was already a nightmare.
25
26With the derived-type approach, one could keep an array of
27sparsity_info elements, and associate them somehow to the relevant
28density-matrix and geometry history (maybe implemented also as
29arrays). This is do-able but also complicated.
30
31Now imagine that the density matrix "object" contains within itself a
32pointer to the relevant "sparsity_info" object, and that a
33finite-stack of geometry/density-matrix objects is implemented. The
34extrapolation algorithm can transparently use the stack metaphor
35(which is the appropriate one for a finite-length re-cyclable
36history), and forget about the array bookeeping. When the information
37for a geometry step is no longer needed, the objects can be destroyed,
38taking care that no other object in the program is using references to
39the internal data. This can be easily achieved by implementing
40[reference counting](https://en.wikipedia.org/wiki/Reference_counting).
41
42In SIESTA, reference-counted derived types (and containers) are
43implemented in modules whose name begins with `class` (this is an
44unfortunate, probably temporary, choice), and use
45[templates](https://en.wikipedia.org/wiki/Template_metaprogramming) to
46support containers of various types.
47
48For example, the sparsity pattern "bud" is defined in [[class_sparsity]], and
49the containers involved in density-matrix extrapolation are
50
51* A "sparse-2D matrix" bud, defined in
52* A pair container, defined in "class_Pair..."
53* A finite-stack container, defined in " ...."
54
55Template files have `.T90` extensions.
56
57The basic implementation of reference counting and the associated
58functionality is in the [[basic_type.inc]] file.
59
060
=== added file 'Docs/developer/ford-pages/datastructures/2-sparse.md'
--- Docs/developer/ford-pages/datastructures/2-sparse.md 1970-01-01 00:00:00 +0000
+++ Docs/developer/ford-pages/datastructures/2-sparse.md 2018-09-12 13:10:27 +0000
@@ -0,0 +1,74 @@
1title: Sparse Matrices in SIESTA
2
3Sparse matrices are widespread in Siesta due to the use of a basis set
4of finite-range atomic orbitals. Matrix elements between orbitals
5which are "too far" from each other are zero, leading to sparse
6matrices for all but the smallest systems.
7
8The following discussion is focused on the global data found in [[sparse_matrices]].
9
10Take the Hamiltonian. If `no_u` is the number of orbitals, its matrix
11elements \(H_{\mu\nu}\) can be simply arranged in a square matrix with
12`no_u` rows and columns.
13
14In the presence of a sizable number of zeros, it pays to represent
15this matrix in a more compact form.
16
17The sparse matrix is in CSR/CSC matrix format with some slight
18differences from the elsewhere found CSR format. Because Siesta
19(primarily) deals with Hermitian matrices, CSR and CSC are equivalent.
20In Siesta the CSR format is composed of the following (integer) components.
21
22* `maxnh`:
23 number of total non-zero elements (sum of numh array)
24* `numh(no_u)`:
25 number of non-zero elements each orbital connects too
26 @note
27 This is a specific to Siesta, since many
28 sparse implementations of CSR matrices in Fortran use
29 only the `listhptr` array with one more element.
30 @endnote
31* `listhptr(no_u)`
32 index pointer to listh such that `listh(listhptr(1) + 1)`
33 is the first non-zero element of orbital 1.
34 `listh(listhptr(io) + 1)` is thus the first non-zero element
35 of orbital 'io' while `listh(listhptr(io) + numh(io))` is the
36 last non-zero element of orbital 'io'.
37 @note
38 `listhptr` is 0-based (`listhptr(1) == 0`, ALWAYS)
39 while many implementations in Fortran would have used listhptr(1) == 1
40 this is not so in Siesta. Secondly, in other typical CSR implementations
41 this array would be of size `no_u + 1` with `listhptr(no_u+1) == maxnh + 1`.
42 @endnote
43* `listh(maxnh)`:
44 the column indices for the non-zero elements.
45 `listh(listhptr(io)+1)`
46 would correspond to the element `M(io, listh(listhptr(io)+1))`
47
48Note that these matrices are 1D block cyclic distributed and the
49routines found in [[class_OrbitalDistribution]] or module [[parallelsubs]]
50are required to translate local rows to global rows (columns
51are not distributed).
52
53The discussion above assumes that only a single MPI node is used
54such that `no_l == no_u`, where the former is the number of distributed
55rows on the MPI node.
56
57See the discussion of the [auxiliary supercell](|page|/implementation/1-auxiliary-supercell.html) for the modifications
58introduced by the support for periodic systems with k-point sampling.
59
60The sparse pattern information is handled by the program in two forms:
61
62* Through a set of arrays, as mentioned above.
63* Through a [reference-counted](|page|/datastructures/1-buds.html) derived type [[class_Sparsity:sparsity]] and its instantiation in ([[sparse_matrices:sparse_pattern]]).
64 The old arrays are *actually* pointing to the arrays in the variable `sparse_pattern`.
65
66
67@note
68 The suffix 'h' (`numh`, `maxh`, ...) is a legacy name and should be avoided
69 in subsequent usages (i.e. when new routines are being passed the above arrays
70 or the sparse_pattern.
71 Currently Siesta does not distinguish between H/DM/S/EDM/... sparsity patterns
72 and thus the sparse pattern is not specific to any physical array, it is a global
73 definition of all sparse matrices used in Siesta.
74@endnote
075
=== added file 'Docs/developer/ford-pages/datastructures/index.md'
--- Docs/developer/ford-pages/datastructures/index.md 1970-01-01 00:00:00 +0000
+++ Docs/developer/ford-pages/datastructures/index.md 2018-09-12 13:10:27 +0000
@@ -0,0 +1,8 @@
1title: Data structures
2
3In this section we describe the data structures used throughout Siesta.
4
5All data-structures are considered generic, in the sense that they may be
6exported to other projects if so desired.
7There will, however, be links to specific files where the datastructures are used.
8
09
=== added directory 'Docs/developer/ford-pages/implementation'
=== added file 'Docs/developer/ford-pages/implementation/1-auxiliary-supercell.md'
--- Docs/developer/ford-pages/implementation/1-auxiliary-supercell.md 1970-01-01 00:00:00 +0000
+++ Docs/developer/ford-pages/implementation/1-auxiliary-supercell.md 2018-09-12 13:10:27 +0000
@@ -0,0 +1,133 @@
1title: Auxiliary Supercell
2
3For periodic systems SIESTA uses an auxiliary supercell as an indexing
4tool to represent all the orbital interactions present in the
5Hamiltonian (and other matrices). These interactions can extend to
6orbitals beyond the unit cell, so extra bookeeping is needed
7beyond the simple \(H_{\mu\nu}\) notation used previously.
8
9Consider the simplified system depicted in the figure below. The unit
10cell contains two atoms (open and black circles) with a single orbital
11each (orbitals are not marked to avoid clutter). The orbitals of the
12atoms in the unit cell at the center of the figure overlap with those
13of other atoms in the crystal whenever the distance between atoms is
14less than the sum of the orbital ranges. In the figure these
15interactions extend to the first-neighboring cells only. In this
16two-dimensional example, the atoms in the unit cell interact with
17those in nine cells, and this geometrical construct is fit to
18represent the complete set of non-zero Hamiltonian matrix elements
19\(H_{\mu\nu}({\mathbf R}) \), where \(\mu\) and \(\nu\) are orbital
20indexes (ranging over the unit cell only) and \({\mathbf R}\) is a
21relative vector from the unit cell. This vector could just be a cell
22lattice vector, but in practice SIESTA uses the relative vector
23between the atoms involved.
24
25![Orbital Interactions](|media|/Interactions.png "Orbital interactions")
26{: style="text-align: center" ; width="50%" }
27
28There are multiple image interactions for the same pair, each
29associated with a different \({\mathbf R}\). The set of nine cells is the
30auxiliary supercell. In this case it is a 3x3 repetition of the unit
31cell, and the "3" can be seen as "2x1+1": the central cell plus one
32neighboring cell in either side. We can also represent the
33interactions with a rectangular matrix:
34
35![RectangularMatrix](|media|/RectangularMatrix.png "Interaction
36Matrix")
37
38
39which has a row for each unit-cell orbital, and as many columns as
40orbitals in the nine cells involved in the interactions. Any matrix
41element $$H_{\mu\nu}({\mathbf R}) = \langle\phi_\mu({\mathbf R=0})|H|\phi_\nu({\mathbf
42R})\rangle$$ can be stored by itself in the appropriate slot.
43
44When it it time to build the Hamiltonian matrix for a given k-point \({\mathbf k}\):
45
46$$ H_{\mu\nu}({\mathbf k}) =
47\sum_{\mathbf R} { H_{\mu\nu}({\mathbf R}) e^{i{\mathbf k}\cdot{\mathbf R}}} $$
48
49every slot's contribution, with the appropriate phase, is folded back
50and reduced into the left-most square matrix, as the arrows in the
51figure indicate.
52
53For periodic systems with large unit cells, k-point sampling is not
54really necessary, and the phases involved are all 1 (formally only the
55\(\Gamma\) point \({\mathbf k=0}\) is used). In this case the auxiliary supercell
56is not strictly necessary: the matrix elements can be reduced on the
57fly to the unit-cell square interaction matrix, and other operations
58can be similarly folded automatically throughout. It is possible,
59however, to request that an auxiliary supercell be used, since the
60extra level of bookeeping can be useful for other purposes (e.g. for
61COHP analysis of the orbital-pairs contributions to the energy).
62
63In the program, the auxiliary supercell is handled in several key routines:
64
65* The need for a supercell is assessed in [[siesta_init]], by checking whether k-points are
66 going to be used anywhere in the program.
67* The size of the supercell needed is stored in the [[siesta_geom:nsc(variable)]] array
68* The supercell offsets for each supercell index are stored in the [[siesta_geom:isc_off(variable)]]
69 array.
70* Indexing arrays live in [[sparse_matrices]] and are initialized in [[state_init]]
71
72When an auxiliary supercell is used, the "column" stored in the
73`listh` array defined in the [sparsity](|page|/datastructures/2-sparse.html) page ranges
74over the long dimension of the rectangular interaction matrix. The
75"unit-cell" column to which the folding is done is recorded in the
76array `indxuo`. Its contents, however, can be really computed on the
77fly, since the column indexes in the rectangular matrix are just
78juxtapositions of blocks of size `no_u`.
79
80The following idiom can be used to go through the arrays:
81```fortran
82do io = 1, no_u
83 do ind = listhptr(io) + 1, lishptr(io) + numh(io)
84 is = (listh(ind) - 1) / no_u + 1
85 col = mod(listh(ind) - 1, no_u) + 1
86 ! or equivalently (found in some parts of the code):
87 ! col = indxuo(listh(ind))
88 H(io, col) = H(io, col) + H_sparse(ind) * exp(-1j * sum(xijo(:, ind) * k(:)))
89 end do
90end do
91```
92
93## MD or geometry optimizations
94
95The auxiliary supercell is a fixed size for any given atomic configuration due to the
96constant distances between atoms and neighbouring cell atoms.
97In MD or geometry optimization simulations where atoms are being displaced the auxiliary cell
98may change. In the following MD refers to _any_ kind of geometry movement, be it actual MD or
99geometry relaxations.
100
101<!---
102Consider two atoms currently at a distance \(R>R_\mathrm{max}\)
103with \(R_\mathrm{max}\) being the sum of orbital range belonging to the atoms. In a following geometry
104iteration the atoms are brought closer to each other such that \(R<R_\mathrm{max}\). This will lead
105to an increase in the number of non-zero elements in the sparse matrix.
106Concintly for the reverse action where the atoms are moved farther apart one finds a reduction in the
107number of non-zero elements.
108 --->
109
110In the following we will use `nsc` to refer to the variable [[siesta_geom:nsc(variable)]].
111
112Generically one may find that the following list of actions are carried out:
113
1141. [[siesta_init]]: figure out initial number of supercells and call [[atomlist:superc]]
1152. Begin MD iterations
116
117 1. [[state_init]]: figure out number of supercells for this geometry configuration
118 2. If any of the supercells has changed we need to copy the old information to the
119 new supercell information
120 3. Perform SCF, move atoms and go to 2.1.
121
1223. End Siesta and analyse
123
124The step 2.1 and 2.2 requries some further explanation. Siesta keeps a history of SCF converged
125density matrices from previous MD steps. When 2.1 is initiated the new initial density matrix is
126an extrapolation of these previous density matrices. Since all density matrices are stored using
127the [sparsity matrix](|page|/datastructures/2-sparse.html) definitions we need to make a conversion
128between different auxiliary supercells. The conversion (in-place) between two different auxiliary
129supercells may be found in [[m_handle_sparse:correct_supercell_SpD]].
130Additionally, since the number of non-zero elements may also change during the MD cycle one also
131needs to remove/add new non-zero elements in the sparse matrix. This is done
132in [[m_restruct_SpData2D:restruct_dSpData2D]].
133
0134
=== added file 'Docs/developer/ford-pages/implementation/index.md'
--- Docs/developer/ford-pages/implementation/index.md 1970-01-01 00:00:00 +0000
+++ Docs/developer/ford-pages/implementation/index.md 2018-09-12 13:10:27 +0000
@@ -0,0 +1,6 @@
1title: Specific implementation details
2
3The details of the implementation that are specific to Siesta may be found here.
4
5Contrary to the [data structures](|page|/datastructures/index.html), the documentation found
6here is not easily transferable to other codes.
07
=== added file 'Docs/developer/ford-pages/index.md'
--- Docs/developer/ford-pages/index.md 1970-01-01 00:00:00 +0000
+++ Docs/developer/ford-pages/index.md 2018-09-12 13:10:27 +0000
@@ -0,0 +1,11 @@
1title: Program Overview
2
3These pages provide some documentation on the internals of the SIESTA program. At present just a few
4pages are present, and their integration with the in-code documentation is not yet very complete.
5
6You can get more information from:
7
8* [Project webpage](http://www.icmab.es/siesta)
9* [Development platform](http://launchpad.net/siesta)
10
11
012
=== added file 'Docs/developer/ford-siesta.md'
--- Docs/developer/ford-siesta.md 1970-01-01 00:00:00 +0000
+++ Docs/developer/ford-siesta.md 2018-09-12 13:10:27 +0000
@@ -0,0 +1,66 @@
1project: SIESTA
2version: {!../../version.info!}
3author: SIESTA Group
4src_dir: ../../Src
5output_dir: ./doc-ford-build
6page_dir: ./ford-pages
7media_dir: ./ford-media
8display: public
9 private
10source: true
11search: false
12graph: false
13exclude_dir: ../../Src/MPI
14 ../../Src/fdf
15 ../../Src/fdict
16 ../../Src/ncdf
17 ../../Src/Libs
18 ../../Src/Orphans
19 ../../Src/SiestaXC
20 ../../Src/wxml
21 ../../Src/xmlparser
22exclude: m_gauss_fermi_17.f90
23 m_gauss_fermi_18.f90
24 m_gauss_fermi_19.f90
25 m_gauss_fermi_20.f90
26 m_gauss_fermi_22.f90
27 m_gauss_fermi_24.f90
28 m_gauss_fermi_26.f90
29 m_gauss_fermi_28.f90
30 m_gauss_fermi_30.f90
31 m_gauss_fermi_inf.f90
32 spinorbit.f
33project_website: https://www.icmab.es/siesta
34summary: ![SIESTA](logo) <br/>
35 A first-principles materials simulation code
36 using Density Functional Theory.
37 {: style="text-align: center" }
38preprocess: true
39preprocessor: gfortran -E -P
40docmark_alt: *
41predocmark: >
42fpp_extensions: F90
43 F
44license: gfdl
45extra_filetypes: sh #
46 inc !
47md_extensions: markdown.extensions.toc
48
49@note
50This is an early stage work-in-progress build of developers documentation for SIESTA.
51@endnote
52
53## Project Dashboard
54
55@todo
56Add more topics
57@endtodo
58
59
60<!-- useful options -->
61<!-------------------->
62<!-- graph_maxdepth: 100 -->
63<!-- graph_maxnodes: 100 -->
64
65
66<!-- predocmark: > -->
067
=== modified file 'Docs/siesta.tex'
--- Docs/siesta.tex 2018-09-04 13:37:24 +0000
+++ Docs/siesta.tex 2018-09-12 13:10:27 +0000
@@ -4984,6 +4984,27 @@
49844984
4985\end{fdflogicalF}4985\end{fdflogicalF}
49864986
4987\begin{fdflogicalT}{DM!Init.Unfold}
4988 \fdfdepend{DM!UseSaveDM}
4989 \index{reading saved data!density matrix}
4990
4991 When reading the DM from a previous calculation there may be
4992 inconsistencies in the auxiliary supercell. E.g. if the previous
4993 calculation did not use an auxiliary supercell and the current
4994 calculation does (adding $k$-point sampling). \siesta\ will
4995 automatically \emph{unfold} the $\Gamma$-only DM to the auxiliary
4996 supercell elements (if \fdftrue).
4997
4998 For \fdffalse\ the DM elements are assumed to originate from an
4999 auxiliary supercell calculation and the sparse elements are not
5000 unfolded but directly copied.
5001
5002 \note Generally this shouldn't not be touched, however, if the
5003 initial DM is generated using \sisl\cite{sisl} and only on-site DM
5004 elements are set, this should be set to \fdffalse.
5005
5006\end{fdflogicalT}
5007
4987\begin{fdflogicalF}{DM!FormattedFiles}5008\begin{fdflogicalF}{DM!FormattedFiles}
4988 \index{reading saved data!density matrix}5009 \index{reading saved data!density matrix}
49895010
@@ -5784,35 +5805,6 @@
57845805
5785\end{fdflogicalF}5806\end{fdflogicalF}
57865807
5787\begin{fdfentry}{NaiveAuxiliaryCell}[logical]<\fdfvalue{MD.TypeOfRun}>
5788
5789 The auxiliary supercell needed can be determined using the atomic positions,
5790 the orbital extent and the lattice parameters. For a fixed geometry
5791 configuration the tightest auxiliary supercell is uniquely defined. However,
5792 when performing MD simulations (or relaxations) the displacement of
5793 certain atoms may result in changes to the required auxiliary
5794 supercell, thus inhibiting re-use of DM information across geometry steps.
5795 When this is option is \fdftrue\ the auxiliary supercell will be computed
5796 with a simpler algorithm using only the orbital extent (fixed for \emph{any}
5797 calculation) and the lattice vectors. The resulting supercell might
5798 be larger than strictly needed, but it will remain mostly constant
5799 during the run (even when the \fdf{MD.VariableCell} option is used,
5800 if the lattice changes are moderate).
5801
5802 By default this will be \fdffalse\ when performing single-point calculations
5803 (\fdf{MD.TypeOfRun:CG} with \fdf{MD.Steps:1} or below). Otherwise
5804 this will default to \fdftrue.
5805
5806 \note one may try to set this to \fdffalse\ for better performance,
5807 at the risk of inhibiting the re-use of DM information.
5808
5809 \note this option may made obsolete in later versions when a
5810 supercell conversion routine is in place.
5811
5812 \note the name of the option reflects historical usage.
5813
5814\end{fdfentry}
5815
58165808
58175809
5818\subsection{Calculation of the electronic structure}5810\subsection{Calculation of the electronic structure}
58195811
=== modified file 'Src/Fstack.T90'
--- Src/Fstack.T90 2018-02-01 11:04:12 +0000
+++ Src/Fstack.T90 2018-09-12 13:10:27 +0000
@@ -22,6 +22,7 @@
22 character(len=36) :: id = "null_id"22 character(len=36) :: id = "null_id"
23 !-------------------------------------23 !-------------------------------------
24 character(len=256) :: name = "(null Fstack_)"24 character(len=256) :: name = "(null Fstack_)"
25 !> See [[_T_(type)]]
25 type(_T_), pointer :: val(:) => null()26 type(_T_), pointer :: val(:) => null()
26 integer :: size = 027 integer :: size = 0
27 integer :: nvals = 028 integer :: nvals = 0
2829
=== modified file 'Src/Makefile'
--- Src/Makefile 2018-09-04 11:56:15 +0000
+++ Src/Makefile 2018-09-12 13:10:27 +0000
@@ -831,7 +831,7 @@
831m_geom_plane.o: intrinsic_missing.o m_geom_aux.o831m_geom_plane.o: intrinsic_missing.o m_geom_aux.o
832m_geom_square.o: intrinsic_missing.o m_geom_aux.o m_geom_plane.o832m_geom_square.o: intrinsic_missing.o m_geom_aux.o m_geom_plane.o
833m_getopts.o: f2kcli.o833m_getopts.o: f2kcli.o
834m_handle_sparse.o: class_OrbitalDistribution.o class_SpData1D.o834m_handle_sparse.o: class_Data2D.o class_OrbitalDistribution.o class_SpData1D.o
835m_handle_sparse.o: class_SpData2D.o class_Sparsity.o geom_helper.o m_iodm.o835m_handle_sparse.o: class_SpData2D.o class_Sparsity.o geom_helper.o m_iodm.o
836m_handle_sparse.o: m_os.o m_region.o m_ts_io.o parallel.o precision.o units.o836m_handle_sparse.o: m_os.o m_region.o m_ts_io.o parallel.o precision.o units.o
837m_hartree_add.o: intrinsic_missing.o m_cite.o m_geom_objects.o m_mesh_node.o837m_hartree_add.o: intrinsic_missing.o m_cite.o m_geom_objects.o m_mesh_node.o
@@ -921,7 +921,7 @@
921m_spin.o: alloc.o parallel.o precision.o sys.o units.o921m_spin.o: alloc.o parallel.o precision.o sys.o units.o
922m_stress.o: precision.o922m_stress.o: precision.o
923m_supercell.o: atom_graph.o class_OrbitalDistribution.o class_SpData2D.o923m_supercell.o: atom_graph.o class_OrbitalDistribution.o class_SpData2D.o
924m_supercell.o: intrinsic_missing.o parallel.o parallelsubs.o precision.o924m_supercell.o: parallel.o parallelsubs.o precision.o
925m_svd.o: precision.o925m_svd.o: precision.o
926m_target_stress.o: parallel.o precision.o sys.o units.o926m_target_stress.o: parallel.o precision.o sys.o units.o
927m_test_io.o: class_SpData2D.o class_Sparsity.o m_iodm.o m_matio.o parallel.o927m_test_io.o: class_SpData2D.o class_Sparsity.o m_iodm.o m_matio.o parallel.o
@@ -1091,7 +1091,6 @@
1091madelung.o: parallel.o precision.o sys.o1091madelung.o: parallel.o precision.o sys.o
1092matel_registry.o: m_trialorbitalclass.o precision.o radial.o spher_harm.o sys.o1092matel_registry.o: m_trialorbitalclass.o precision.o radial.o spher_harm.o sys.o
1093md_out.o: files.o m_energies.o precision.o sys.o units.o1093md_out.o: files.o m_energies.o precision.o sys.o units.o
1094md_utils.o: precision.o
1095memory.o: alloc.o memoryinfo.o parallel.o precision.o1094memory.o: alloc.o memoryinfo.o parallel.o precision.o
1096memory_all.o: rusage.o1095memory_all.o: rusage.o
1097memory_snapshot.o: rusage.o1096memory_snapshot.o: rusage.o
@@ -1201,7 +1200,8 @@
1201save_density_matrix.o: atomlist.o files.o iodm_netcdf.o m_energies.o m_iodm.o1200save_density_matrix.o: atomlist.o files.o iodm_netcdf.o m_energies.o m_iodm.o
1202save_density_matrix.o: m_matio.o m_ncdf_siesta.o m_spin.o m_steps.o1201save_density_matrix.o: m_matio.o m_ncdf_siesta.o m_spin.o m_steps.o
1203save_density_matrix.o: m_ts_global_vars.o m_ts_iodm.o m_ts_options.o1202save_density_matrix.o: m_ts_global_vars.o m_ts_iodm.o m_ts_options.o
1204save_density_matrix.o: precision.o siesta_options.o sparse_matrices.o1203save_density_matrix.o: precision.o siesta_geom.o siesta_options.o
1204save_density_matrix.o: sparse_matrices.o
1205savepsi.o: alloc.o parallel.o parallelsubs.o precision.o1205savepsi.o: alloc.o parallel.o parallelsubs.o precision.o
1206scfconvergence_test.o: atomlist.o ldau.o ldau_specs.o m_convergence.o1206scfconvergence_test.o: atomlist.o ldau.o ldau_specs.o m_convergence.o
1207scfconvergence_test.o: m_energies.o m_spin.o m_wallclock.o parallel.o1207scfconvergence_test.o: m_energies.o m_spin.o m_wallclock.o parallel.o
@@ -1292,18 +1292,20 @@
1292state_analysis.o: m_wallclock.o parallel.o remove_intramol_pressure.o1292state_analysis.o: m_wallclock.o parallel.o remove_intramol_pressure.o
1293state_analysis.o: siesta_cml.o siesta_geom.o siesta_options.o sparse_matrices.o1293state_analysis.o: siesta_cml.o siesta_geom.o siesta_options.o sparse_matrices.o
1294state_analysis.o: units.o write_subs.o zmatrix.o1294state_analysis.o: units.o write_subs.o zmatrix.o
1295state_init.o: alloc.o atomlist.o class_Data2D.o class_SpData1D.o1295state_init.o: alloc.o atomlist.o class_Data2D.o
1296state_init.o: class_SpData2D.o class_Sparsity.o create_Sparsity_SC.o1296state_init.o: class_Fstack_Pair_Geometry_SpData2D.o
1297state_init.o: domain_decom.o files.o hsparse.o iodm_netcdf.o iodmhs_netcdf.o1297state_init.o: class_Pair_Geometry_SpData2D.o class_SpData1D.o class_SpData2D.o
1298state_init.o: ioxv.o kpoint_grid.o ldau_specs.o m_energies.o m_eo.o m_mixing.o1298state_init.o: class_Sparsity.o create_Sparsity_SC.o domain_decom.o files.o
1299state_init.o: hsparse.o iodm_netcdf.o iodmhs_netcdf.o ioxv.o kpoint_grid.o
1300state_init.o: ldau_specs.o m_energies.o m_eo.o m_handle_sparse.o m_mixing.o
1299state_init.o: m_mixing_scf.o m_mpi_utils.o m_ncdf_siesta.o m_new_dm.o m_os.o1301state_init.o: m_mixing_scf.o m_mpi_utils.o m_ncdf_siesta.o m_new_dm.o m_os.o
1300state_init.o: m_pivot_methods.o m_rmaxh.o m_sparse.o m_sparsity_handling.o1302state_init.o: m_pivot_methods.o m_rmaxh.o m_sparse.o m_sparsity_handling.o
1301state_init.o: m_spin.o m_steps.o m_supercell.o m_test_io.o m_ts_charge.o1303state_init.o: m_spin.o m_steps.o m_supercell.o m_test_io.o m_ts_charge.o
1302state_init.o: m_ts_electype.o m_ts_global_vars.o m_ts_io.o m_ts_kpoints.o1304state_init.o: m_ts_electype.o m_ts_global_vars.o m_ts_io.o m_ts_kpoints.o
1303state_init.o: m_ts_options.o m_ts_sparse.o m_ts_tri_init.o normalize_dm.o1305state_init.o: m_ts_options.o m_ts_sparse.o m_ts_tri_init.o normalize_dm.o
1304state_init.o: overlap.o parallel.o proximity_check.o siesta_cml.o1306state_init.o: overlap.o parallel.o proximity_check.o restructSpData2D.o
1305state_init.o: siesta_dicts.o siesta_geom.o siesta_options.o sparse_matrices.o1307state_init.o: siesta_cml.o siesta_dicts.o siesta_geom.o siesta_options.o
1306state_init.o: sys.o units.o write_subs.o zmatrix.o1308state_init.o: sparse_matrices.o sys.o units.o write_subs.o zmatrix.o
1307struct_init.o: alloc.o atmfuncs.o atomlist.o files.o ioxv.o m_exp_coord.o1309struct_init.o: alloc.o atmfuncs.o atomlist.o files.o ioxv.o m_exp_coord.o
1308struct_init.o: m_iostruct.o m_mpi_utils.o m_steps.o parallel.o periodic_table.o1310struct_init.o: m_iostruct.o m_mpi_utils.o m_steps.o parallel.o periodic_table.o
1309struct_init.o: siesta_cml.o siesta_geom.o siesta_master.o siesta_options.o1311struct_init.o: siesta_cml.o siesta_geom.o siesta_master.o siesta_options.o
13101312
=== modified file 'Src/Pair.T90'
--- Src/Pair.T90 2016-03-01 14:55:57 +0000
+++ Src/Pair.T90 2018-09-12 13:10:27 +0000
@@ -22,7 +22,9 @@
22 character(len=36) :: id = "null_id"22 character(len=36) :: id = "null_id"
23 !-------------------------------------23 !-------------------------------------
24 character(len=256) :: name = "(null Pair_)"24 character(len=256) :: name = "(null Pair_)"
25 !> First component: [[_T1_(type)]]
25 type(_T1_) :: first26 type(_T1_) :: first
27 !> Second component: [[_T2_(type)]]
26 type(_T2_) :: second28 type(_T2_) :: second
27end type Pair_29end type Pair_
2830
2931
=== modified file 'Src/basic_type.inc'
--- Src/basic_type.inc 2015-01-27 14:25:15 +0000
+++ Src/basic_type.inc 2018-09-12 13:10:27 +0000
@@ -1,6 +1,7 @@
1!--------------------------------------------------------------1!--------------------------------------------------------------
2!2!
3! Basic functionality for reference-counted data structures3!! Basic functionality for reference-counted data structures
4!! For some background, see [here](|url|/page/buds.html)
4!5!
5! This file has to be included after the global declarations6! This file has to be included after the global declarations
6! for extra functionality, just where a "contains" statement7! for extra functionality, just where a "contains" statement
78
=== modified file 'Src/class_SpData1D.T90'
--- Src/class_SpData1D.T90 2016-03-01 14:24:48 +0000
+++ Src/class_SpData1D.T90 2018-09-12 13:10:27 +0000
@@ -26,8 +26,11 @@
26 character(len=36) :: id = "null_id"26 character(len=36) :: id = "null_id"
27 !----------------------27 !----------------------
28 character(len=256) :: name = "null "//STR_TYPE_NAME28 character(len=256) :: name = "null "//STR_TYPE_NAME
29 !> See [[Sparsity(type)]]
29 type(Sparsity) :: sp30 type(Sparsity) :: sp
31 !> See [[VAR_TYPE(type)]]
30 type(VAR_TYPE) :: a32 type(VAR_TYPE) :: a
33 !> See [[OrbitalDistribution(type)]]
31 type(OrbitalDistribution) :: dist34 type(OrbitalDistribution) :: dist
32 end type TYPE_NAME_35 end type TYPE_NAME_
3336
3437
=== modified file 'Src/class_SpData2D.T90'
--- Src/class_SpData2D.T90 2017-01-24 18:43:31 +0000
+++ Src/class_SpData2D.T90 2018-09-12 13:10:27 +0000
@@ -26,8 +26,11 @@
26 character(len=36) :: id = "null_id"26 character(len=36) :: id = "null_id"
27 !----------------------27 !----------------------
28 character(len=256) :: name = "null "//STR_TYPE_NAME28 character(len=256) :: name = "null "//STR_TYPE_NAME
29 !> See [[Sparsity(type)]]
29 type(Sparsity) :: sp30 type(Sparsity) :: sp
31 !> See [[VAR_TYPE(type)]]
30 type(VAR_TYPE) :: a32 type(VAR_TYPE) :: a
33 !> See [[OrbitalDistribution(type)]]
31 type(OrbitalDistribution) :: dist34 type(OrbitalDistribution) :: dist
32 end type TYPE_NAME_35 end type TYPE_NAME_
3336
3437
=== modified file 'Src/class_Sparsity.F90'
--- Src/class_Sparsity.F90 2016-03-01 14:24:48 +0000
+++ Src/class_Sparsity.F90 2018-09-12 13:10:27 +0000
@@ -7,7 +7,12 @@
7! ---7! ---
88
9module class_Sparsity9module class_Sparsity
10 10 !! Implements a reference-counted derived type ([bud](|url|/page/buds.html))
11 !! to hold the [sparsity pattern](|url|/page/sparse.html) of the program's matrices
12 !! Objects of this type (notably [[sparse_matrices:sparse_pattern]] can be passed around
13 !! and put in container types.
14 !! The legacy indexing arrays can be linked to this bud's data [[class_Sparsity:attach]]
15 !! when necessary.
11 use alloc, only: re_alloc, de_alloc16 use alloc, only: re_alloc, de_alloc
12 17
13 implicit none18 implicit none
1419
=== modified file 'Src/extrae_eventllist.F90'
--- Src/extrae_eventllist.F90 2014-02-06 12:14:44 +0000
+++ Src/extrae_eventllist.F90 2018-09-12 13:10:27 +0000
@@ -124,4 +124,4 @@
124 end subroutine deleteList124 end subroutine deleteList
125125
126end module extrae_eventllist126end module extrae_eventllist
127#endif TRACING127#endif /* TRACING */
128128
=== modified file 'Src/extrapolateSpData2D.F90'
--- Src/extrapolateSpData2D.F90 2016-12-27 11:08:17 +0000
+++ Src/extrapolateSpData2D.F90 2018-09-12 13:10:27 +0000
@@ -5,7 +5,7 @@
5 use class_Sparsity5 use class_Sparsity
6 use class_OrbitalDistribution6 use class_OrbitalDistribution
77
8 use m_restruct_SpData2D, only: restructdSpData2D8 use m_restruct_SpData2D, only: restruct_dSpData2D
99
10 type(dSpData2D), intent(in) :: SpM1, SpM210 type(dSpData2D), intent(in) :: SpM1, SpM2
11 type(Sparsity), intent(in) :: sp_out11 type(Sparsity), intent(in) :: sp_out
@@ -20,8 +20,8 @@
20 integer :: dim220 integer :: dim2
21 real(dp), dimension(:,:), pointer :: a_1, a_2, a_out21 real(dp), dimension(:,:), pointer :: a_1, a_2, a_out
2222
23 call restructdSpData2D(SpM1,sp_out,SpM1_out)23 call restruct_dSpData2D(SpM1,sp_out,SpM1_out)
24 call restructdSpData2D(SpM2,sp_out,SpM2_out)24 call restruct_dSpData2D(SpM2,sp_out,SpM2_out)
2525
26 a_1 => val(SpM1_out)26 a_1 => val(SpM1_out)
27 a_2 => val(SpM2_out)27 a_2 => val(SpM2_out)
2828
=== modified file 'Src/m_handle_sparse.F90'
--- Src/m_handle_sparse.F90 2018-07-09 18:29:17 +0000
+++ Src/m_handle_sparse.F90 2018-09-12 13:10:27 +0000
@@ -7,11 +7,7 @@
77
8 use precision, only : dp8 use precision, only : dp
9 use parallel, only : Node, Nodes9 use parallel, only : Node, Nodes
10
11 use geom_helper, only : ucorb, iaorb10 use geom_helper, only : ucorb, iaorb
12 use class_OrbitalDistribution
13 use class_Sparsity
14 use class_dSpData2D
1511
16 implicit none12 implicit none
1713
@@ -19,13 +15,32 @@
1915
20 public :: bulk_expand16 public :: bulk_expand
21 public :: expand_spd2spd_2D17 public :: expand_spd2spd_2D
18 public :: fold_auxiliary_supercell_SpD
19 public :: unfold_noauxiliary_supercell_SpD
20 public :: correct_supercell_SpD
22 public :: reduce_spin_size21 public :: reduce_spin_size
2322
23 interface fold_auxiliary_supercell_SpD
24 module procedure fold_auxiliary_supercell_Sp2D
25 end interface fold_auxiliary_supercell_SpD
26
27 interface unfold_noauxiliary_supercell_SpD
28 module procedure unfold_noauxiliary_supercell_Sp2D
29 end interface unfold_noauxiliary_supercell_SpD
30
31 interface correct_supercell_SpD
32 module procedure correct_supercell_Sp1D
33 module procedure correct_supercell_Sp2D
34 end interface correct_supercell_SpD
35
24contains36contains
2537
26 subroutine bulk_expand(na_u,xa,lasto,cell,nsc,isc_off,DM_2D)38 subroutine bulk_expand(na_u,xa,lasto,cell,nsc,isc_off,DM_2D)
2739
28 use fdf40 use fdf
41 use class_OrbitalDistribution
42 use class_Sparsity
43 use class_dSpData2D
29 use class_dSpData1D44 use class_dSpData1D
30 use m_os, only: file_exist45 use m_os, only: file_exist
31 use units, only: Ang46 use units, only: Ang
@@ -47,14 +62,14 @@
47 type(dSpData2D) :: fDM_2D62 type(dSpData2D) :: fDM_2D
48 real(dp) :: fcell(3,3), fkdispl(3), fEf, fQtot, fTemp63 real(dp) :: fcell(3,3), fkdispl(3), fEf, fQtot, fTemp
49 real(dp), pointer :: fxa(:,:) => null()64 real(dp), pointer :: fxa(:,:) => null()
50 integer :: fnsc(3), fna_u, fno_u, fnspin, fkscell(3,3), at, fn_s65 integer :: fnsc(3), fna_u, fno_u, fnspin, fkcell(3,3), at, fn_s
51 integer :: Tile(3), Reps(3)66 integer :: Tile(3), Reps(3), fnsc_DM(3)
52 real(dp) :: def_xa_EPS, xa_EPS67 real(dp) :: def_xa_EPS, xa_EPS
5368
54 integer, pointer :: flasto(:) => null(), fisc_off(:,:) => null()69 integer, pointer :: flasto(:) => null(), fisc_off(:,:) => null()
5570
56 integer :: allowed(na_u), itmp, s_na, c_na71 integer :: allowed(na_u), itmp, s_na, c_na
57 character(len=400) :: HSfile, DMfile, ln72 character(len=256) :: HSfile, DMfile, ln
58 logical :: d_log1, d_log2, d_log373 logical :: d_log1, d_log2, d_log3
59 type(block_fdf) :: bfdf74 type(block_fdf) :: bfdf
60 type(parsed_line), pointer :: pline => null()75 type(parsed_line), pointer :: pline => null()
@@ -146,7 +161,7 @@
146 call ts_read_TSHS(HSfile, &161 call ts_read_TSHS(HSfile, &
147 d_log1, d_log2, d_log3, &162 d_log1, d_log2, d_log3, &
148 fcell, fnsc, fna_u, fno_u, fnspin, &163 fcell, fnsc, fna_u, fno_u, fnspin, &
149 fkscell, fkdispl, &164 fkcell, fkdispl, &
150 fxa, flasto, &165 fxa, flasto, &
151 fsp, fDM_2D, tmp_1D, fisc_off, &166 fsp, fDM_2D, tmp_1D, fisc_off, &
152 fEf, fQtot, fTemp, &167 fEf, fQtot, fTemp, &
@@ -174,7 +189,8 @@
174 ! exactly the same, except that TSDE has an extra EDM and Ef189 ! exactly the same, except that TSDE has an extra EDM and Ef
175 ! at the end, we do not care about that! :)190 ! at the end, we do not care about that! :)
176 ! read in DM file191 ! read in DM file
177 call read_DM( DMfile, fake_dit, fDM_2D, d_log1, Bcast=.true.)192 call read_DM( DMfile, fake_dit, fnsc_DM, fDM_2D, d_log1, Bcast=.true.)
193 if ( fnsc_DM(1) == 0 ) fnsc_DM = fnsc
178 if ( size(fDM_2D, 2) /= fnspin ) then194 if ( size(fDM_2D, 2) /= fnspin ) then
179 call die('bulk_expand: DM and TSHS does not have the same spin')195 call die('bulk_expand: DM and TSHS does not have the same spin')
180 end if196 end if
@@ -221,6 +237,9 @@
221 print, allowed_a)237 print, allowed_a)
222238
223 use units, only: Ang239 use units, only: Ang
240 use class_OrbitalDistribution
241 use class_Sparsity
242 use class_dSpData2D
224#ifdef MPI243#ifdef MPI
225 use mpi_siesta244 use mpi_siesta
226#endif245#endif
@@ -466,8 +485,795 @@
466485
467 end subroutine expand_spd2spd_2D486 end subroutine expand_spd2spd_2D
468487
488#ifdef SIESTA__NOT_USED
489
490 ! Copy one super-cell sparse pattern to another super-cell sparse
491 ! pattern. This will copy [in] to [out].
492 ! The data D2_in contains one sparsity pattern with nsc_in supercells.
493 ! See sparse_matrices.F90 for details regarding the sparsity pattern layout.
494 ! The data D2_out contains the "new" sparsity pattern we want to retain.
495 ! I.e. if the number of supercells change, we only retain the equivalent supercell
496 ! elements. And if the number of non-zero elements change we retain only the
497 ! new ones (discarding the older ones).
498 subroutine copy_supercell_Sp2D(d2_out, nsc_out, d2_in, nsc_in)
499
500 use class_Sparsity
501 use class_dSpData2D
502#ifdef MPI
503 use mpi_siesta
504#endif
505
506 ! output D2 sparse pattern
507 type(dSpData2D), intent(inout) :: d2_out
508 ! output D2 number of supercells
509 integer, intent(in) :: nsc_out(3)
510 ! input D2 sparse pattern
511 type(dSpData2D), intent(inout) :: d2_in
512 ! input D2 number of supercells
513 integer, intent(in) :: nsc_in(3)
514
515 ! We are ready to check and copy the sparsity pattern...
516 type(Sparsity), pointer :: sp_i, sp_o
517
518 ! Local variables
519 integer :: no_u, no_l
520 integer :: io, i, i_ind, o_ind, isc(3)
521 integer :: i_is, o_is, o_hsc(3)
522 integer :: discarded(2), dim_min
523
524 ! arrays for the sparsity patterns
525 integer, pointer :: o_ptr(:), o_ncol(:), o_col(:)
526 integer, pointer :: i_ptr(:), i_ncol(:), i_col(:)
527 real(dp), pointer :: a_o(:,:), a_i(:,:)
528 integer, allocatable :: o_isc(:,:,:), i_isc(:,:)
529 integer, allocatable :: out_index(:)
530
531 if ( all(nsc_out == nsc_in) ) return
532
533 sp_i => spar(d2_in)
534 a_i => val(d2_in)
535 sp_o => spar(d2_out)
536 a_o => val(d2_out)
537
538 call attach(sp_i,n_col=i_ncol, list_ptr=i_ptr, list_col=i_col, &
539 nrows=no_l, nrows_g=no_u)
540 call attach(sp_o,n_col=o_ncol, list_ptr=o_ptr, list_col=o_col, &
541 nrows=io, nrows_g=i)
542
543 dim_min = min(size(a_i,2), size(a_o,2))
544 if ( no_u /= i ) &
545 call die('copy_supercell_sp_d2: error in number of global orbitals.')
546 if ( no_l /= io ) &
547 call die('copy_supercell_sp_d2: error in number of local orbitals.')
548
549 ! Now create the conversion tables
550 call generate_isc(nsc_out, o_isc)
551 call generate_linear_isc(nsc_in, i_isc)
552
553 ! Allocate look-up table
554 allocate(out_index(product(nsc_out)*no_u))
555 ! Set all elements to zero
556 out_index(:) = 0
557
558 ! Count the number of discarded non-zero elements
559 ! (1) is the supercell discarded (for missing supercells)
560 ! (2) is because the orbital interaction does not exist
561 discarded = 0
562
563 ! We need to check whether in-put SC is too large
564 o_hsc = nsc_out / 2
565
566 ! Since we are going to copy, then we have to set it to zero...
567 a_o(:,:) = 0._dp
568
569 do io = 1, no_l
570
571 ! copy output lookup table to not search every element
572 do i = 1, o_ncol(io)
573 out_index(o_col(o_ptr(io)+i)) = o_ptr(io) + i
574 end do
575
576 ! Now we can do the copy...
577 inner_columns: do i = 1, i_ncol(io)
578 i_ind = i_ptr(io) + i
579 i_is = (i_col(i_ind)-1) / no_u
580
581 ! Get isc
582 isc = i_isc(:, i_is)
583
584 ! Check that the out supercell exists
585 if ( any(abs(isc) > o_hsc) ) then
586 discarded(1) = discarded(1) + 1
587 cycle inner_columns
588 end if
589
590 ! We know the supercell exists, lets see if the orbital connection
591 ! exists.
592 o_is = o_isc(isc(1),isc(2),isc(3))
593
594 ! Transfer the orbital index to the correct supercell
595 o_ind = out_index(o_is * no_u + ucorb(i_col(i_ind), no_u))
596
597 if ( o_ind == 0 ) then
598 ! The orbital interaction does not exist
599 discarded(2) = discarded(2) + 1
600 else
601 a_o(o_ind,1:dim_min) = a_i(i_ind,1:dim_min)
602 end if
603
604 end do inner_columns
605
606 ! restore lookup table
607 do i = 1, o_ncol(io)
608 out_index(o_col(o_ptr(io)+i)) = 0
609 end do
610
611 end do
612
613 deallocate(o_isc, i_isc, out_index)
614
615 end subroutine copy_supercell_Sp2D
616
617 subroutine copy_supercell_Sp1D(d1_out, nsc_out, d1_in, nsc_in)
618
619 use class_Sparsity
620 use class_dSpData1D
621#ifdef MPI
622 use mpi_siesta
623#endif
624
625 ! output D1 sparse pattern
626 type(dSpData1D), intent(inout) :: d1_out
627 ! output D1 number of supercells
628 integer, intent(in) :: nsc_out(3)
629 ! input D1 sparse pattern
630 type(dSpData1D), intent(inout) :: d1_in
631 ! input D1 number of supercells
632 integer, intent(in) :: nsc_in(3)
633
634 ! We are ready to check and copy the sparsity pattern...
635 type(Sparsity), pointer :: sp_i, sp_o
636
637 ! Local variables
638 integer :: no_u, no_l
639 integer :: io, i, i_ind, o_ind, isc(3)
640 integer :: i_is, o_is, o_hsc(3)
641 integer :: discarded(2)
642
643 ! arrays for the sparsity patterns
644 integer, pointer :: o_ptr(:), o_ncol(:), o_col(:)
645 integer, pointer :: i_ptr(:), i_ncol(:), i_col(:)
646 real(dp), pointer :: a_o(:), a_i(:)
647 integer, allocatable :: o_isc(:,:,:), i_isc(:,:)
648 integer, allocatable :: out_index(:)
649
650 if ( all(nsc_out == nsc_in) ) return
651
652 sp_i => spar(d1_in)
653 a_i => val(d1_in)
654 sp_o => spar(d1_out)
655 a_o => val(d1_out)
656
657 call attach(sp_i,n_col=i_ncol, list_ptr=i_ptr, list_col=i_col, &
658 nrows=no_l, nrows_g=no_u)
659 call attach(sp_o,n_col=o_ncol, list_ptr=o_ptr, list_col=o_col, &
660 nrows=io, nrows_g=i)
661
662 if ( no_u /= i ) &
663 call die('copy_supercell_sp_d2: error in number of global orbitals.')
664 if ( no_l /= io ) &
665 call die('copy_supercell_sp_d2: error in number of local orbitals.')
666
667 ! Now create the conversion tables
668 call generate_isc(nsc_out, o_isc)
669 call generate_linear_isc(nsc_in, i_isc)
670
671 ! Allocate look-up table
672 allocate(out_index(product(nsc_out)*no_u))
673 ! Set all elements to zero
674 out_index(:) = 0
675
676 ! Count the number of discarded non-zero elements
677 ! (1) is the supercell discarded (for missing supercells)
678 ! (2) is because the orbital interaction does not exist
679 discarded = 0
680
681 ! We need to check whether in-put SC is too large
682 o_hsc = nsc_out / 2
683
684 ! Since we are going to copy, then we have to set it to zero...
685 a_o(:) = 0._dp
686
687 do io = 1, no_l
688
689 ! copy output lookup table to not search every element
690 do i = 1, o_ncol(io)
691 out_index(o_col(o_ptr(io)+i)) = o_ptr(io) + i
692 end do
693
694 ! Now we can do the copy...
695 inner_columns: do i = 1, i_ncol(io)
696 i_ind = i_ptr(io) + i
697 i_is = (i_col(i_ind)-1) / no_u
698
699 ! Get isc
700 isc = i_isc(:, i_is)
701
702 ! Check that the out supercell exists
703 if ( any(abs(isc) > o_hsc) ) then
704 discarded(1) = discarded(1) + 1
705 cycle inner_columns
706 end if
707
708 ! We know the supercell exists, lets see if the orbital connection
709 ! exists.
710 o_is = o_isc(isc(1),isc(2),isc(3))
711
712 ! Transfer the orbital index to the correct supercell
713 o_ind = out_index(o_is * no_u + ucorb(i_col(i_ind), no_u))
714
715 if ( o_ind == 0 ) then
716 ! The orbital interaction does not exist
717 discarded(2) = discarded(2) + 1
718 else
719 a_o(o_ind) = a_i(i_ind)
720 end if
721
722 end do inner_columns
723
724 ! restore lookup table
725 do i = 1, o_ncol(io)
726 out_index(o_col(o_ptr(io)+i)) = 0
727 end do
728
729 end do
730
731 deallocate(o_isc, i_isc, out_index)
732
733 end subroutine copy_supercell_Sp1D
734
735#endif
736
737
738 !> Expand an nsc == 1 DM to an nsc_ == * supercell.
739 !>
740 !> In cases where the DM is constructed from all(nsc == 1) we know that
741 !> all elements in the supercell have the same value as in the folded DM.
742 !>
743 !> @note
744 !> This will actually work even in the presence of degenerate folding
745 !> (S(io,io)>1). This can only appear if a
746 !> supercell is not used, so k-points are not used, so no phases are
747 !> needed. The DM elements in the base cell are just the products of
748 !> appropriate wavefunction coefficients, and they can be replicated
749 !> to the rest of the supercell. Note that it is S (or H) that is folded,
750 !> not the DM.
751 !> @endnote
752 !>
753
754 subroutine unfold_noauxiliary_supercell_Sp2D(sp_sc, D2)
755
756 use class_Sparsity
757 use class_OrbitalDistribution
758 use class_dSpData2D
759 use class_dData2D
760#ifdef MPI
761 use mpi_siesta
762#endif
763
764 !> Input supercell sparsity pattern (this will contain periodic connections)
765 type(Sparsity), intent(inout) :: sp_sc
766 !> Input/Output 2D data with associated non-supercell sparse pattern. Upon exit
767 !> this contains as many non-zero elements as in sp_sc with expanded elements.
768 type(dSpData2D), intent(inout) :: D2
769
770 ! Local variables
771 type(OrbitalDistribution) :: dit
772 type(Sparsity), pointer :: sp
773 type(dData2D) :: A2D
774
775 real(dp), pointer :: A2(:,:), A2_sc(:,:)
776 integer :: no_u, no_l
777 integer :: io, jo, ind, scind
778
779 ! arrays for the sparsity patterns
780 integer, pointer :: ptr(:), ncol(:), col(:)
781 integer, pointer :: scptr(:), scncol(:), sccol(:)
782
783 ! This will silently assume same sizes in the sparse patterns
784
785 sp => spar(D2)
786 A2 => val(D2)
787 call attach(sp,n_col=ncol, list_ptr=ptr, list_col=col, &
788 nrows=no_l, nrows_g=no_u)
789
790 ! Supercell sparsity pattern
791 call attach(sp_sc, n_col=scncol, list_ptr=scptr, list_col=sccol, &
792 nnzs=io)
793
794 ! Create array that hosts the new data
795 ind = size(A2, dim=2)
796 call newdData2D(A2D, io, ind,"(unfolded DM vals)")
797 A2_sc => val(A2D)
798 A2_sc(:,:) = 0._dp
799
800 do io = 1, no_l
801
802 ! Loop supercell sparse pattern
803 do scind = scptr(io) + 1, scptr(io) + scncol(io)
804
805 jo = ucorb(sccol(scind), no_u)
806
807 do ind = ptr(io) + 1, ptr(io) + ncol(io)
808 if ( col(ind) == jo ) then
809 A2_sc(scind, :) = A2(ind, :)
810 exit
811 end if
812 end do
813
814 end do
815 end do
816
817 dit = dist(D2)
818 call newdSpData2D(sp_sc, A2D, dit, D2, name="Unfolded DM")
819
820 call delete(dit)
821 call delete(A2D)
822
823 end subroutine unfold_noauxiliary_supercell_Sp2D
824
825 !> Fold an nsc > 1 DM to an nsc_ == 1 supercell.
826 !>
827 !> In cases where the DM is constructed from any(nsc > 1), some orbital
828 !> connections are kept in image cells, and not in the unit cell that
829 !> is going to be retained, so we need to copy them. This is a special
830 !> sub-case of the "new supercell is smaller than the old one" case
831 !> treated more coarsely in routine [[correct_supercell_SpD]]
832 !> The name `fold` is not completely appropriate.
833
834 !> In more detail: the elements which in A2 are already in the
835 !> leftmost square of the rectangular interaction matrix should be
836 !> retained, even if for some reason they are not the first in the
837 !> series of elements of A2 with that ucorb jo.
838
839 !> In the absence of other information, the criterion 'closer is
840 !> more important' is likely the right one, rather than averages or
841 !> tests for size of the DM element. If the old calculation was
842 !> simply a Gamma-point-with-auxcell one, all this is irrelevant, as
843 !> *all* the DM entries in A2 for a given jo are identical, but if
844 !> it came from a real k-point calculation, phases might be at work
845 !> and we do not know how. So the copying code below gives preference to
846 !> col(ind) == jo elements, and, if not present, to other images.
847
848 subroutine fold_auxiliary_supercell_Sp2D(sp_uc, D2)
849
850 use class_Sparsity
851 use class_OrbitalDistribution
852 use class_dSpData2D
853 use class_dData2D
854#ifdef MPI
855 use mpi_siesta
856#endif
857
858 !> Input sparsity pattern (no auxiliary supercell)
859 type(Sparsity), intent(inout) :: sp_uc
860 !> Input/Output 2D data with associated supercell sparse pattern, upon exit
861 !> this contains as many non-zero elements as in sp_uc with expanded elements.
862 type(dSpData2D), intent(inout) :: D2
863
864 ! Local variables
865 type(OrbitalDistribution) :: dit
866 type(Sparsity), pointer :: sp
867 type(dData2D) :: A2D
868
869 real(dp), pointer :: A2(:,:), A2_uc(:,:)
870 integer :: no_u, no_l
871 integer :: io, jo, ind, ucind
872
873 ! arrays for the sparsity patterns
874 integer, pointer :: ptr(:), ncol(:), col(:)
875 integer, pointer :: ucptr(:), ucncol(:), uccol(:)
876
877 ! This will silently assume same sizes in the sparse patterns
878
879 sp => spar(D2)
880 A2 => val(D2)
881 call attach(sp,n_col=ncol, list_ptr=ptr, list_col=col, &
882 nrows=no_l, nrows_g=no_u)
883
884 ! Primary unit-cell sparsity pattern
885 call attach(sp_uc, n_col=ucncol, list_ptr=ucptr, list_col=uccol, &
886 nnzs=io)
887
888 ! Create array that hosts the new data
889 ind = size(A2, dim=2)
890 call newdData2D(A2D, io, ind,"(fold 2D)")
891 A2_uc => val(A2D)
892 A2_uc(:,:) = 0._dp
893
894 ! Copy relevant elements. Do not add. Remember that the DM
895 ! is not folded, only H and S are.
896
897 do io = 1, no_l
898
899 ! Loop unitcell sparse pattern
900 do ucind = ucptr(io) + 1, ucptr(io) + ucncol(io)
901
902 ! Strictly not needed, but retained for consistency!
903 jo = ucorb(uccol(ucind), no_u)
904
905 do ind = ptr(io) + 1, ptr(io) + ncol(io)
906
907 ! We look for A2 elements with ucorb(col) == jo, giving
908 ! preference to those coming from 000 interactions
909
910 if ( col(ind) == jo ) then
911
912 A2_uc(ucind, :) = A2(ind, :)
913 ! and we are done for this io,jo combination,
914 ! as this 000 element has preference
915 exit
916
917 else if ( ucorb(col(ind), no_u) == jo ) then
918
919 ! tentatively copy
920 A2_uc(ucind, :) = A2(ind, :)
921 ! but we keep looking for more elements for this io,jo combination, in
922 ! case one satisfying the first test appears.
923
924 cycle
925
926 ! Other possibilities such as storing averages of all
927 ! elements with the same ucorb jo, or the element with
928 ! maximum magnitude, are probably not worth it, lacking
929 ! more information. Perhaps some statistical analysis
930 ! might help, but it would be overkill.
931
932 end if
933 end do
934
935 end do
936 end do
937
938 dit = dist(D2)
939 call newdSpData2D(sp_uc, A2D, dit, D2, name="Folded Sp2D")
940
941 call delete(dit)
942 call delete(A2D)
943
944 end subroutine fold_auxiliary_supercell_Sp2D
945
946 !> Correct a sparse pattern (in-place) from an old NSC to a new NSC.
947 !>
948 !> Here we take a sparse data pattern and change all column indices
949 !> so that they are appropriate for the new supercell.
950 !> The supercell sparse matrix layout is described in sparse_matrices.F90
951 !> Recall that each column value also holds implicitly the image cell index,
952 !> using an offset `image_index*no_u`.
953 !>
954 !> If the original supercell is larger than the new one, the elements
955 !> associated to image cells that no longer exist will be set to zero,
956 !> and their column indexes set to something beyond the acceptable values.
957 !> The elements in the retained image cells have their column indexes recomputed,
958 !> as the image cell indexes depend on the size of the supercell.
959 !>
960 !> If nsc_old == nsc_new, nothing is done.
961 !>
962 !> @note
963 !> The sparse pattern and the nsc multipliers live independently. This could
964 !> lead to errors. A possible improvement is to have nsc as part of the sparse-pattern
965 !> information.
966 !> @endnote
967 !>
968 !> @note
969 !> After a call to this routine, we still need to purge from the sparse index arrays
970 !> those elements of D2 which are no longer needed.
971 !> @endnote
972 subroutine correct_supercell_Sp2D(nsc_old, D2, nsc_new)
973
974 use class_Sparsity
975 use class_dSpData2D
976#ifdef MPI
977 use mpi_siesta
978#endif
979
980 !> A sparse-matrix object, containing a sparse pattern
981 type(dSpData2D), intent(inout) :: D2
982 !> Auxiliary supercell multipliers for D2, typically read
983 !> from file at the same time as other D2 information
984 !> (see, for example, the new DM file format)
985 integer, intent(in) :: nsc_old(3)
986 !> New auxiliary supercell multipliers for D2
987 integer, intent(in) :: nsc_new(3)
988
989 ! Local variables
990 type(Sparsity), pointer :: sp
991 integer :: no_u, no_l
992 integer :: io, ind, isc(3)
993 integer :: old_n_s, new_outside
994 integer :: old_is, new_is, new_hsc(3)
995
996 ! arrays for the sparsity patterns
997 integer, pointer :: ptr(:), ncol(:), col(:)
998 integer, allocatable :: old_isc(:,:), new_isc(:,:,:)
999 real(dp), pointer :: a2(:,:)
1000
1001 if ( all(nsc_old == nsc_new) ) return
1002
1003 sp => spar(D2)
1004 call attach(sp,n_col=ncol, list_ptr=ptr, list_col=col, &
1005 nrows=no_l, nrows_g=no_u)
1006
1007 ! Required to set removed elements to 0
1008 A2 => val(D2)
1009
1010 !> Calls [[generate_linear_isc]] to create a table (naming confusing!).
1011 !> The linear isc is a list of index offsets (equivalent to isc_off)
1012 !> The order of indices may be found in [[atomlist:superx]] (or in the ORB_INDX output file)
1013 !>
1014 call generate_linear_isc(nsc_old, old_isc)
1015 !> Create the isc_off in supercell format such that:
1016 !> new_isc(1, 1, 1) yields the index for the [1, 1, 1] supercell.
1017 !>
1018 !> Calls [[generate_isc]] to create
1019 !> *another* table with the same naming convention
1020 call generate_isc(nsc_new, new_isc)
1021
1022 ! Calculate total number of image cells in old supercell
1023 old_n_s = product(nsc_old)
1024 ! Offset to mark un-needed elements
1025 new_outside = product(nsc_new) * no_u
1026
1027 ! Maximum cell image extents on either side.
1028 ! This assumes that nsc(:) are all odd. For example
1029 ! (5,3,5) ==> (2,1,2)
1030 new_hsc = nsc_new / 2
1031
1032 !> Calls [[intrinsic_missing:modp]] (renamed to `ucorb`)
1033 !> to map the column index to the unit cell
1034 do io = 1, no_l
1035
1036 inner_columns: do ind = ptr(io) + 1, ptr(io) + ncol(io)
1037 ! Calculate the old image cell index
1038 old_is = (col(ind)-1) / no_u
1039
1040 ! This is just sanity checking, in case the column indexes are obviously wrong
1041 if ( old_is >= old_n_s ) then ! it should be removed
1042
1043 ! It is better to stop the program
1044 call die("Mismatch in sparsity pattern and nsc values")
1045
1046 ! Set it to zero
1047 A2(ind, :) = 0._dp
1048 ! Also set the column index to a position outside the new sparse pattern
1049 col(ind) = ucorb(col(ind), no_u) + new_outside
1050 cycle inner_columns
1051 end if
1052
1053 ! The image cell coordinates
1054 isc(:) = old_isc(:, old_is)
1055
1056 ! Check that the new supercell has room for this cell image
1057 if ( any(abs(isc) > new_hsc) ) then
1058 ! Set it to zero
1059 A2(ind, :) = 0._dp
1060 ! Also set the column index to a position outside the new sparse pattern
1061 ! since it isn't defined in the old sparse pattern, it can't be defined in
1062 ! the new one.
1063 col(ind) = ucorb(col(ind), no_u) + new_outside
1064
1065 else
1066
1067 ! We know the image cell exists, so convert the column
1068 ! orbital index to the correct image cell using the new offset.
1069 new_is = new_isc(isc(1),isc(2),isc(3))
1070 col(ind) = ucorb(col(ind), no_u) + new_is * no_u
1071 endif
1072
1073 end do inner_columns
1074
1075 end do
1076
1077 deallocate(old_isc, new_isc)
1078
1079 end subroutine correct_supercell_Sp2D
1080
1081 subroutine correct_supercell_Sp1D(nsc_old, D1, nsc_new)
1082
1083 use class_Sparsity
1084 use class_dSpData1D
1085#ifdef MPI
1086 use mpi_siesta
1087#endif
1088
1089 type(dSpData1D), intent(inout) :: D1
1090 integer, intent(in) :: nsc_old(3)
1091 integer, intent(in) :: nsc_new(3)
1092
1093 ! Local variables
1094 type(Sparsity), pointer :: sp
1095 integer :: no_u, no_l
1096 integer :: io, ind, isc(3)
1097 integer :: old_n_s, new_outside
1098 integer :: old_is, new_is, new_hsc(3)
1099
1100 ! arrays for the sparsity patterns
1101 integer, pointer :: ptr(:), ncol(:), col(:)
1102 integer, allocatable :: old_isc(:,:), new_isc(:,:,:)
1103 real(dp), pointer :: A1(:)
1104
1105 if ( all(nsc_old == nsc_new) ) return
1106
1107 sp => spar(D1)
1108 call attach(sp,n_col=ncol, list_ptr=ptr, list_col=col, &
1109 nrows=no_l, nrows_g=no_u)
1110
1111 ! Required to set removed elements to 0
1112 A1 => val(D1)
1113
1114 ! Now create the conversion tables
1115 !> The linear isc is a list of index offsets (equivalent to isc_off)
1116 !> The order of indices may be found in [[atomlist:superx]] (or in the ORB_INDX output file)
1117 call generate_linear_isc(nsc_old, old_isc)
1118 !> Create the isc_off in supercell format such that:
1119 !> new_isc(1, 1, 1) yields the index for the [1, 1, 1] supercell.
1120 call generate_isc(nsc_new, new_isc)
1121
1122 ! Calculate total number of supercells
1123 old_n_s = product(nsc_old)
1124 new_outside = product(nsc_new) * no_u
1125
1126 ! We need to check whether in-put SC is too large
1127 new_hsc = nsc_new / 2
1128 do io = 1, no_l
1129
1130 ! Now we can do the copy...
1131 inner_columns: do ind = ptr(io) + 1, ptr(io) + ncol(io)
1132 !> Calculate the old supercell index (supercell offset is old_isc(:, old_is))
1133 old_is = (col(ind)-1) / no_u
1134 isc = old_isc(:, old_is)
1135
1136 ! Simple error handling in case a user has supplied a too large column index
1137 if ( old_is >= old_n_s ) then ! it should be removed
1138 ! Set it to zero
1139 A1(ind) = 0._dp
1140 ! Also set the column index to a position outside the new sparse pattern
1141 ! since it isn't defined in the old sparse pattern, it can't be defined in
1142 ! the new one.
1143 col(ind) = ucorb(col(ind), no_u) + new_outside
1144 cycle inner_columns
1145 end if
1146
1147 ! Check that the out supercell exists
1148 if ( any(abs(isc) > new_hsc) ) then
1149 ! Set it to zero
1150 A1(ind) = 0._dp
1151 ! Also set the column index to a position higher
1152 col(ind) = ucorb(col(ind), no_u) + new_outside
1153 cycle inner_columns
1154 end if
1155
1156 ! We know the supercell exists, so convert column
1157 new_is = new_isc(isc(1),isc(2),isc(3))
1158
1159 ! Transfer the orbital index to the correct supercell
1160 col(ind) = ucorb(col(ind), no_u) + new_is * no_u
1161
1162 end do inner_columns
1163
1164 end do
1165
1166 deallocate(old_isc, new_isc)
1167
1168 end subroutine correct_supercell_Sp1D
1169
1170 !> Generate image cell offsets in a supercell
1171 !>
1172 !> The given supercell offsets for a given supercell is:
1173 !>
1174 !>```fortran
1175 !> isc(:, is)
1176 !>```
1177 !>
1178 !> where `is` is the supercell index `(list_col(ind) - 1)/no_u`.
1179 !> and the first dimension is the cell direction (x,y,z)
1180 !> The order is equivalent to those generated in [[atomlist::superx]].
1181 !
1182 subroutine generate_linear_isc(nsc, isc)
1183 integer, intent(in) :: nsc(3)
1184 integer, allocatable :: isc(:,:)
1185
1186 integer :: x, y, z, i
1187 integer :: nx, ny, nz
1188
1189 allocate(isc(3,0:product(nsc)-1))
1190
1191 !> Calls [[linear2pm]] to set the correct ordering
1192 i = 0
1193 do z = 0, nsc(3) - 1
1194 nz = linear2pm(z, nsc(3))
1195 do y = 0, nsc(2) - 1
1196 ny = linear2pm(y, nsc(2))
1197 do x = 0, nsc(1) - 1
1198 nx = linear2pm(x, nsc(1))
1199 isc(1,i) = nx
1200 isc(2,i) = ny
1201 isc(3,i) = nz
1202 i = i + 1
1203 end do
1204 end do
1205 end do
1206
1207 end subroutine generate_linear_isc
1208
1209 !> Generate a supercell index array comprising of 3 dimensions of size `nx`, `ny` and `nz`
1210 !>
1211 !> To obtain the index of a given supercell simply do:
1212 !>
1213 !>```fortran
1214 !> isc(ix, iy, iz)
1215 !>```
1216 !>
1217 !> where `ix`, `iy` and `iz` are the supercells for the individiual
1218 !> lattice vector directions. The order of supercells is equivalent to
1219 !> those generated in [[atomlist:superx]].
1220 !
1221 subroutine generate_isc(nsc, isc)
1222 integer, intent(in) :: nsc(3)
1223 integer, allocatable :: isc(:,:,:)
1224
1225 integer :: x, y, z, i
1226 integer :: nx, ny, nz
1227 integer :: hsc(3)
1228
1229 ! nsc % 2 == 1, nsc / 2 % 2 == 0
1230 hsc = nsc / 2
1231
1232 allocate(isc(-hsc(1):hsc(1),-hsc(2):hsc(2),-hsc(3):hsc(3)))
1233
1234 !> Calls [[linear2pm]] to get the correct ordering
1235 i = 0
1236 do z = 0, nsc(3) - 1
1237 nz = linear2pm(z, nsc(3))
1238 do y = 0, nsc(2) - 1
1239 ny = linear2pm(y, nsc(2))
1240 do x = 0, nsc(1) - 1
1241 nx = linear2pm(x, nsc(1))
1242 isc(nx,ny,nz) = i
1243 i = i + 1
1244 end do
1245 end do
1246 end do
1247
1248 end subroutine generate_isc
1249
1250 !> Routine to reorder the [0,nsc-1] range of cell images
1251 !> so that it follows the [[atomlist:superx]] convention
1252 !> Example: nsc=5 (2*4+1)
1253 !> in: 0 1 2 3 4
1254 !> out: 0 1 2 -2 -1 \
1255 !> This corresponds to starting at the center cell, going to the right,
1256 !> and then moving to the far left and get back towards the center:
1257 !>
1258 !> 3 4 0 1 2
1259 !>
1260 pure function linear2pm(i,n) result(j)
1261 integer, intent(in) :: i, n
1262 integer :: j
1263 !> Note that n needs to be odd for left-right symmetry to
1264 !> be preserved
1265 if ( i > n / 2 ) then
1266 j = -n + i
1267 else
1268 j = i
1269 end if
1270 end function linear2pm
1271
469 subroutine reduce_spin_size(ispin,H_2D,S_1D,Ef)1272 subroutine reduce_spin_size(ispin,H_2D,S_1D,Ef)
1273 use class_OrbitalDistribution
1274 use class_Sparsity
470 use class_dSpData1D1275 use class_dSpData1D
1276 use class_dSpData2D
471 integer, intent(in) :: ispin1277 integer, intent(in) :: ispin
472 type(dSpData2D), intent(inout) :: H_2D1278 type(dSpData2D), intent(inout) :: H_2D
473 type(dSpData1D), intent(inout), optional :: S_1D1279 type(dSpData1D), intent(inout), optional :: S_1D
4741280
=== modified file 'Src/m_iodm.F90'
--- Src/m_iodm.F90 2016-12-09 10:26:17 +0000
+++ Src/m_iodm.F90 2018-09-12 13:10:27 +0000
@@ -26,7 +26,7 @@
2626
27contains27contains
28 28
29 subroutine read_dm( file, dit, DM, found, Bcast )29 subroutine read_dm( file, dit, nsc, DM, found, Bcast )
3030
31#ifdef MPI31#ifdef MPI
32 use mpi_siesta32 use mpi_siesta
@@ -39,6 +39,8 @@
39 ! The orbital distribution that should be attached to39 ! The orbital distribution that should be attached to
40 ! DM40 ! DM
41 type(OrbitalDistribution), intent(in) :: dit41 type(OrbitalDistribution), intent(in) :: dit
42 ! The supercell information (if present, otherwise return 0s)
43 integer, intent(inout) :: nsc(3)
42 ! The density matrix44 ! The density matrix
43 type(dSpData2D), intent(inout) :: DM45 type(dSpData2D), intent(inout) :: DM
44 logical, intent(out) :: found46 logical, intent(out) :: found
@@ -48,9 +50,9 @@
48! * LOCAL variables *50! * LOCAL variables *
49! ************************51! ************************
50 type(Sparsity) :: sp52 type(Sparsity) :: sp
51 character(len=500) :: fn53 character(len=256) :: fn
52 logical :: lBcast54 logical :: lBcast
53 integer :: iu, two(2), no_u, nspin55 integer :: iu, five(5), no_u, nspin, ierr
54 integer, allocatable, target :: gncol(:)56 integer, allocatable, target :: gncol(:)
55#ifdef MPI57#ifdef MPI
56 integer :: MPIerror58 integer :: MPIerror
@@ -80,15 +82,28 @@
80 call io_assign(iu)82 call io_assign(iu)
81 open( iu, file=file, form='unformatted', status='old' )83 open( iu, file=file, form='unformatted', status='old' )
82 rewind(iu)84 rewind(iu)
83 read(iu) two85 read(iu,iostat=ierr) five
86 if ( ierr /= 0 ) then
87 rewind(iu)
88 read(iu) five(1), five(2)
89 five(3:5) = 0
90 end if
84 end if91 end if
8592
86#ifdef MPI93#ifdef MPI
87 call MPI_Bcast(two,2,MPI_integer,0,MPI_Comm_World,MPIerror)94 if ( lBcast ) then
95 call MPI_Bcast(five,5,MPI_integer,0,MPI_Comm_World,MPIerror)
96 else
97 ierr = dist_comm(dit)
98 call MPI_Bcast(five,5,MPI_integer,0,ierr,MPIerror)
99 end if
88#endif100#endif
89101
90 no_u = two(1)102 no_u = five(1)
91 nspin = two(2)103 nspin = five(2)
104 nsc(1) = five(3)
105 nsc(2) = five(4)
106 nsc(3) = five(5)
92107
93 allocate(gncol(no_u))108 allocate(gncol(no_u))
94 gncol(1) = 1109 gncol(1) = 1
@@ -123,12 +138,13 @@
123138
124 end subroutine read_dm139 end subroutine read_dm
125 140
126 subroutine write_dm( file, DM )141 subroutine write_dm( file, nsc, DM )
127 142
128! **********************143! **********************
129! * INPUT variables *144! * INPUT variables *
130! **********************145! **********************
131 character(len=*), intent(in) :: file146 character(len=*), intent(in) :: file
147 integer, intent(in) :: nsc(3)
132 type(dSpData2D), intent(inout) :: DM148 type(dSpData2D), intent(inout) :: DM
133 149
134! ************************150! ************************
@@ -153,11 +169,10 @@
153169
154 ! Open file170 ! Open file
155 call io_assign( iu )171 call io_assign( iu )
156 open( iu, file=file, &172 open( iu, file=file, form='unformatted', status='unknown' )
157 form='unformatted', status='unknown' )
158 rewind(iu)173 rewind(iu)
159 174
160 write(iu) no_u, nspin175 write(iu) no_u, nspin, nsc
161176
162 end if177 end if
163178
164179
=== modified file 'Src/m_new_dm.F90'
--- Src/m_new_dm.F90 2018-06-28 13:53:17 +0000
+++ Src/m_new_dm.F90 2018-09-12 13:10:27 +0000
@@ -60,7 +60,9 @@
60 subroutine new_DM(SC_changed, DM_history, DM_2D, EDM_2D)60 subroutine new_DM(SC_changed, DM_history, DM_2D, EDM_2D)
6161
62 use siesta_options62 use siesta_options
63 use siesta_geom, only: ucell, xa, na_u, isc_off, nsc63 use siesta_geom, only: ucell, xa, na_u, isc_off
64 use siesta_geom, only: nsc, nsc_old
65
64 use sparse_matrices, only: sparse_pattern, block_dist66 use sparse_matrices, only: sparse_pattern, block_dist
65 use atomlist, only: Datm, iaorb, lasto, no_u67 use atomlist, only: Datm, iaorb, lasto, no_u
66 use m_steps, only: istp68 use m_steps, only: istp
@@ -82,7 +84,7 @@
82 use m_energies, only: Ef84 use m_energies, only: Ef
8385
84 logical, intent(in) :: SC_changed ! Has auxiliary supercell changed?86 logical, intent(in) :: SC_changed ! Has auxiliary supercell changed?
85 type(Fstack_Pair_Geometry_dSpData2D), intent(inout) :: DM_history87 type(Fstack_Pair_Geometry_dSpData2D), intent(inout) :: DM_history
86 type(dSpData2D), intent(inout) :: DM_2D, EDM_2D88 type(dSpData2D), intent(inout) :: DM_2D, EDM_2D
8789
88 ! Local variables90 ! Local variables
@@ -100,7 +102,7 @@
100102
101 if ( IONode ) then103 if ( IONode ) then
102 write(*,"(a,i5)") "new_DM -- step: ", istp104 write(*,"(a,i5)") "new_DM -- step: ", istp
103 endif105 end if
104106
105 ! In principle we allow the re-use of the DM (i.e, we do not initialize it)107 ! In principle we allow the re-use of the DM (i.e, we do not initialize it)
106 ! Initialization is either:108 ! Initialization is either:
@@ -147,8 +149,9 @@
147 DM_init = .true.149 DM_init = .true.
148 end if150 end if
149151
152#ifdef TO_BE_REMOVED
150 ! ... or if the auxiliary cell has changed153 ! ... or if the auxiliary cell has changed
151 ! (in this case we have to avoid reading back saved copy from file)154 ! (in this case we have to avoid reading back saved copy from file)
152 if ( SC_changed ) then155 if ( SC_changed ) then
153 156
154 if ( initDMaux ) then157 if ( initDMaux ) then
@@ -167,7 +170,8 @@
167 write(*,"(a)") "** Warning: since 'ReinitialiseDM' is set to .false."170 write(*,"(a)") "** Warning: since 'ReinitialiseDM' is set to .false."
168 end if171 end if
169 end if172 end if
170 end if173 end if
174#endif
171175
172 if ( DM_init ) then176 if ( DM_init ) then
173 177
@@ -175,7 +179,7 @@
175 write(*,"(a)") "Initializing Density Matrix..."179 write(*,"(a)") "Initializing Density Matrix..."
176 end if180 end if
177181
178 call init_DM(spin, na_u, no_u, lasto, iaorb, &182 call init_DM(spin, na_u, no_u, nsc, lasto, iaorb, &
179 Datm, &183 Datm, &
180 block_dist, sparse_pattern, &184 block_dist, sparse_pattern, &
181 DM_2D, EDM_2D, &185 DM_2D, EDM_2D, &
@@ -193,7 +197,7 @@
193 if ( IONode ) then197 if ( IONode ) then
194 write(*,'(a,i0)') "Number of DMs in history: ", DM_in_history198 write(*,'(a,i0)') "Number of DMs in history: ", DM_in_history
195 end if199 end if
196 call extrapolate_dm_with_coords(DM_history, na_u, xa(:,1:na_u), &200 call extrapolate_DM_with_coords(DM_history, na_u, xa(:,1:na_u), &
197 sparse_pattern, DM_2D)201 sparse_pattern, DM_2D)
198 if ( IONode ) then202 if ( IONode ) then
199 write(*,'(a)') "New DM after history re-use:"203 write(*,'(a)') "New DM after history re-use:"
@@ -356,7 +360,7 @@
356 ! 1) reading a DM/TSDE(transiesta) file360 ! 1) reading a DM/TSDE(transiesta) file
357 ! 2) fall-back to atomic initialization using361 ! 2) fall-back to atomic initialization using
358 ! a possibly user-defined spin-configuration.362 ! a possibly user-defined spin-configuration.
359 subroutine init_DM(spin, na_u, no_u, lasto, iaorb, &363 subroutine init_DM(spin, na_u, no_u, nsc, lasto, iaorb, &
360 DM_atom, &364 DM_atom, &
361 dit, sp, DM_2D, EDM_2D, &365 dit, sp, DM_2D, EDM_2D, &
362 read_DM, &366 read_DM, &
@@ -381,6 +385,7 @@
381 ! type(tSpin) spin : spin configuration for this system385 ! type(tSpin) spin : spin configuration for this system
382 ! integer na_u : number of atoms in unit-cell386 ! integer na_u : number of atoms in unit-cell
383 ! integer no_u : number of orbitals in unit-cell387 ! integer no_u : number of orbitals in unit-cell
388 ! integer nsc(3) : number of supercells along each direction
384 ! integer lasto(0:na_u) : last orbital of each atom389 ! integer lasto(0:na_u) : last orbital of each atom
385 ! integer iaorb(no_u) : the atomic index of the corresponding orbital390 ! integer iaorb(no_u) : the atomic index of the corresponding orbital
386 ! real(dp) DM_atom(no_u) : atomic density based on atomic configuration391 ! real(dp) DM_atom(no_u) : atomic density based on atomic configuration
@@ -401,6 +406,8 @@
401 integer, intent(in) :: na_u406 integer, intent(in) :: na_u
402 ! Number of orbitals in the unit-cell407 ! Number of orbitals in the unit-cell
403 integer, intent(in) :: no_u408 integer, intent(in) :: no_u
409 ! Number of supercells along each direction
410 integer, intent(in) :: nsc(3)
404 ! The last orbital on each atom411 ! The last orbital on each atom
405 integer, intent(in) :: lasto(0:na_u)412 integer, intent(in) :: lasto(0:na_u)
406 ! The atom containing orbital "io"413 ! The atom containing orbital "io"
@@ -434,7 +441,7 @@
434 if ( read_DM ) then441 if ( read_DM ) then
435 442
436 ! Try and read the DM from the files443 ! Try and read the DM from the files
437 call init_DM_file(spin, no_u, &444 call init_DM_file(spin, no_u, nsc, &
438 dit, sp, DM_2D, EDM_2D, &445 dit, sp, DM_2D, EDM_2D, &
439 init_method)446 init_method)
440447
@@ -488,15 +495,14 @@
488495
489 end subroutine init_DM496 end subroutine init_DM
490497
491498 !> Routine for reading the DM from a file.
492 subroutine init_DM_file(spin, no_u, &499 !> This is a simple read-inset routine which reads
500 !> a DM/TSDE file, and inserts the quantities
501 !> into the the resulting DM (and/or EDM).
502 subroutine init_DM_file(spin, no_u, nsc, &
493 dit, sp, DM_2D, EDM_2D, &503 dit, sp, DM_2D, EDM_2D, &
494 init_method)504 init_method)
495505
496 ! Routine for reading the DM from a file.
497 ! This is a simple read-inset routine which reads
498 ! a DM/TSDE file, and inserts the quantities
499 ! into the the resulting DM (and/or EDM).
500506
501 ! If the readed DM file has a different number of spin-components,507 ! If the readed DM file has a different number of spin-components,
502 ! this routine will easily extrapolate the quantities:508 ! this routine will easily extrapolate the quantities:
@@ -549,11 +555,14 @@
549 ! stored in the TSDE file.555 ! stored in the TSDE file.
550 use m_ts_global_vars,only: TSmode556 use m_ts_global_vars,only: TSmode
551557
552 use m_restruct_SpData2D, only: restructdSpData2D558 use m_handle_sparse, only: correct_supercell_SpD
559 use m_handle_sparse, only: unfold_noauxiliary_supercell_SpD
560 use m_handle_sparse, only: fold_auxiliary_supercell_SpD
553 561
554 ! ********* INPUT ***************************************************562 ! ********* INPUT ***************************************************
555 ! type(tSpin) spin : spin configuration for this system563 ! type(tSpin) spin : spin configuration for this system
556 ! integer no_u : number of orbitals in unit-cell564 ! integer no_u : number of orbitals in unit-cell
565 ! integer nsc(3) : number of supercells along each direction
557 ! type(OrbitalDistribution) dit : the distribution used for the orbitals566 ! type(OrbitalDistribution) dit : the distribution used for the orbitals
558 ! type(Sparsity) sp : sparsity pattern of DM567 ! type(Sparsity) sp : sparsity pattern of DM
559 ! type(dSpData2D) DM_2D : the density matrix 568 ! type(dSpData2D) DM_2D : the density matrix
@@ -565,29 +574,33 @@
565 ! 2 == .TSDE read574 ! 2 == .TSDE read
566 ! *******************************************************************575 ! *******************************************************************
567576
568 ! The spin-configuration that is used to determine the spin-order.577 !> The spin-configuration that is used to determine the spin-order.
569 type(tSpin), intent(in) :: spin578 type(tSpin), intent(in) :: spin
570 ! Number of orbitals in the unit-cell579 !> Number of orbitals in the unit-cell
571 integer, intent(in) :: no_u580 integer, intent(in) :: no_u
572 ! Parallel distribution of DM/EDM581 !> Number of supercells along each direction
582 integer, intent(in) :: nsc(3)
583 !> Parallel distribution of DM/EDM
573 type(OrbitalDistribution), intent(in) :: dit584 type(OrbitalDistribution), intent(in) :: dit
574 ! Sparse pattern for DM/EDM585 !> Sparse pattern for DM/EDM
575 type(Sparsity), intent(inout) :: sp586 type(Sparsity), intent(inout) :: sp
576 ! The DM and EDM, these will be initialiazed upon return587 !> The DM and EDM, these will be initialiazed upon return
577 ! if the routine could read the files588 !> if the routine could read the files
578 type(dSpData2D), intent(inout) :: DM_2D, EDM_2D589 type(dSpData2D), intent(inout) :: DM_2D, EDM_2D
579590
580 ! To signal the method by which we have read DM/EDM591 !> To signal the method by which we have read DM/EDM
581 integer, intent(out) :: init_method592 integer, intent(out) :: init_method
582593
583 594
584 ! *** Local variables:595 ! *** Local variables:
596 logical :: corrected_nsc
585 logical :: DM_found597 logical :: DM_found
586 logical :: TSDE_found598 logical :: TSDE_found
587 ! The file we should read599 ! The file we should read
588 character(len=256) :: fname600 character(len=256) :: fname
589 ! Number of spin-components read from the DM/TSDE file601 ! Number of spin-components read from the DM/TSDE file
590 integer :: nspin_read602 integer :: nspin_read
603 integer :: nsc_read(3)
591604
592 ! The currently read stuff605 ! The currently read stuff
593 type(dSpData2D) :: DM_read606 type(dSpData2D) :: DM_read
@@ -609,13 +622,14 @@
609 fname = fdf_get('File.TSDE.Init',trim(slabel)//'.TSDE')622 fname = fdf_get('File.TSDE.Init',trim(slabel)//'.TSDE')
610623
611 ! Try and read the file624 ! Try and read the file
612 call read_ts_dm(trim(fname), dit, DM_read, EDM_read, Ef, TSDE_found)625 call read_ts_dm(trim(fname), dit, nsc_read, DM_read, EDM_read, Ef, TSDE_found)
613626
614 if ( TSDE_found ) then627 if ( TSDE_found ) then
615 ! Signal we have read TSDE628 ! Signal we have read TSDE
616 init_method = 2629 init_method = 2
617630
618 DM_found = .true.631 DM_found = .true.
632
619 else if ( IONode ) then633 else if ( IONode ) then
620 write(*,'(a)') 'Failed...'634 write(*,'(a)') 'Failed...'
621 end if635 end if
@@ -629,11 +643,12 @@
629 ! Retrieve the name of the initialization file.643 ! Retrieve the name of the initialization file.
630 fname = fdf_get('File.DM.Init',trim(slabel)//'.DM')644 fname = fdf_get('File.DM.Init',trim(slabel)//'.DM')
631645
632 call read_DM(trim(fname), dit, DM_read, DM_found)646 call read_DM(trim(fname), dit, nsc_read, DM_read, DM_found)
633647
634 if ( DM_found ) then648 if ( DM_found ) then
635 ! Signal that the DM file has been found649 ! Signal that the DM file has been found
636 init_method = 1650 init_method = 1
651
637 end if652 end if
638 653
639 end if654 end if
@@ -652,6 +667,7 @@
652 end if667 end if
653 668
654 DM_found = .false.669 DM_found = .false.
670 TSDE_found = .false.
655 671
656 end if672 end if
657673
@@ -662,35 +678,81 @@
662 678
663 end if679 end if
664680
665 ! In case the sparsity pattern does not conform we update
666 ! the TSDE_found, note that DM_found is a logic containing
667 ! information regarding the sparsity pattern
668 if ( TSDE_found ) TSDE_found = DM_found
669681
670 ! Density matrix size checks682 ! Density matrix size checks
671 if ( DM_found ) then683 if ( DM_found ) then
672684
673 nspin_read = size(DM_read, 2)685 corrected_nsc = .false.
674686 if ( nsc_read(1) /= 0 .and. any(nsc /= nsc_read) ) then
675 if ( spin%DM == nspin_read .and. IONode ) then687
688 ! There are three cases:
689 if ( all(nsc_read == 1) .and. fdf_get('DM.Init.Unfold', .true.) ) then
690
691 ! 1. The read DM was created from a Gamma-only calculation and thus nsc == 1, always.
692 ! In this case we know that the DM elements in the Gamma calculation (io,jo)
693 ! are replicated in all image cells (io, jo + i_s * no_u) where i_s is the image cell
694 ! offfset, since there are no k-points and thus no phases to worry about.
695 !
696 ! In very special circumstances the user may avoid this behavior by
697 ! by setting 'DM.Init.Unfold false'
698
699 call unfold_noauxiliary_supercell_SpD(sp, DM_read)
700 if ( TSDE_found ) then
701 call unfold_noauxiliary_supercell_SpD(sp, EDM_read)
702 end if
703
704 else if ( all(nsc == 1) ) then
705
706 ! 2. The read DM was created from a calculation with a non-trivial auxiliary cell,
707 ! and the current calculation is Gamma-only. In this case it is necessary to fold back
708 ! all supercell DM entries.
709
710 call fold_auxiliary_supercell_SpD(sp, DM_read)
711 if ( TSDE_found ) then
712 call fold_auxiliary_supercell_SpD(sp, EDM_read)
713 end if
714
715 else
716
717 ! 3. The read DM has a different supercell size. In this case we only copy those
718 ! elements that we know exists in the call below.
719
720 ! Correct the supercell information
721 ! Even for EDM this will work because correct_supercell_SpD
722 ! changes the sparse pattern in-place and EDM and DM have
723 ! a shared sp
724 call correct_supercell_SpD(nsc_read, DM_read, nsc)
725 corrected_nsc = .true.
726
727 end if
728
729 end if
730
731 nspin_read = size(DM_read, 2)
732
733 if ( IONode ) then
734 if ( spin%DM == nspin_read ) then
676 write(*,'(a)') 'Succeeded...'735 write(*,'(a)') 'Succeeded...'
677 else if ( spin%DM /= nspin_read .and. IONode ) then736 else if ( spin%DM < nspin_read ) then
678 if ( spin%DM < nspin_read ) then737 write(*,'(a)') 'Succeeded by reducing the number of spin-components...'
679 write(*,'(a)') 'Succeeded by reducing spin-components...'738 else
680 else739 write(*,'(a)') 'Succeeded by increasing the number of spin-components...'
681 write(*,'(a)') 'Succeeded by increasing spin-components...'740 end if
682 end if741 end if
683 end if742
684743 if ( IONode ) then
685 if ( IONode ) then744 write(*,'(a)') "DM from file:"
686 write(*,'(a)') "DM from file:"745 call print_type(DM_read)
687 call print_type(DM_read)746 end if
688 end if747
689748 call restruct_Data(spin%DM, DM_read, DM_2D, .not. corrected_nsc)
690 call restruct_Data(spin%DM, DM_read, DM_2D)749 if ( IONode ) then
691 if ( TSDE_found ) then750 write(*,'(a)') "DM to be used:"
692 call restruct_Data(spin%EDM, EDM_read, EDM_2D)751 call print_type(DM_2D)
693 end if752 end if
753 if ( TSDE_found ) then
754 call restruct_Data(spin%EDM, EDM_read, EDM_2D, .false.)
755 end if
694756
695 end if757 end if
696758
@@ -702,43 +764,64 @@
702764
703 contains765 contains
704766
705 subroutine restruct_Data(nspin, in_2D, out_2D)767 !> Driver to fix both the spin dimension and the sparsity pattern
768 !> of a DM object, which typically has been read from file.
769 !>
770 !> Note that only the cases in which one of the spin dimensions is 1
771 !> are treated.
772
773 subroutine restruct_Data(nspin, in_2D, out_2D, show_warning)
774
775 use m_restruct_SpData2D, only: restruct_dSpData2D
776
777 !> Current spin dimension in the program
706 integer, intent(in) :: nspin778 integer, intent(in) :: nspin
707 type(dSpData2D), intent(inout) :: in_2D, out_2D779 !> Input (DM) bud, to be mined for info
780 type(dSpData2D), intent(inout) :: in_2D
781 !> Output (DM) bud, created
782 type(dSpData2D), intent(inout) :: out_2D
783 !> Whether to show sanity-check warnings
784 logical, intent(in) :: show_warning
708 785
709 integer :: nspin_read, i786 integer :: nspin_read, i
710 real(dp), pointer :: ar2(:,:)787 real(dp), pointer :: A2(:,:)
711788
712 nspin_read = size(in_2D, 2)789 nspin_read = size(in_2D, 2)
713 790
714 if ( nspin == 1 .and. nspin /= nspin_read ) then791 if ( nspin == 1 .and. nspin /= nspin_read ) then
715 ! This SCF has 1 spin-component.792 ! This SCF has 1 spin-component.
716 793
717 ! The readed DM has, at least 2!794 ! The read DM has at least 2!
718 ! Thus we sum the spinors to form the non-polarized795 ! Thus we sum the spinors to form the non-polarized version
719 ar2 => val(in_2D)796 A2 => val(in_2D)
720!$OMP parallel do default(shared), private(i)797!$OMP parallel do default(shared), private(i)
721 do i = 1 , size(ar2, 1)798 do i = 1 , size(A2, 1)
722 ar2(i,1) = ar2(i,1) + ar2(i,2)799 A2(i,1) = A2(i,1) + A2(i,2)
723 end do800 end do
724!$OMP end parallel do801!$OMP end parallel do
725802
726 end if803 end if
727804
728 ! Restructure the sparsity data to the output DM805 !> Calls [[restruct_dSpData2D]] to re-structure the sparsity
729 ! with maximum spin%DM number of spin-components806 !> data to match the output DM, with maximum spin%DM number of
730 call restructdSpData2D(in_2D, sp, out_2D, nspin)807 !> spin-components. It returns a new out_2D bud.
808 !> @note
809 !> The current sparsity pattern `sp` is known here by host association from
810 !> the parent routine, which is a bit confusing.
811 !> `out_2D` in the called routine. Here it is the `out` sparsity, corresponding
812 !> to the current target sparsity in the program.
813 !> @endnote
814 call restruct_dSpData2D(in_2D, sp, out_2D, nspin, show_warning=show_warning)
731815
732 if ( nspin_read == 1 .and. nspin /= nspin_read ) then816 if ( nspin_read == 1 .and. nspin /= nspin_read ) then
733 ! This SCF has more than 2 spin-components.817 ! This SCF has more than 2 spin-components.
734 ! The readed DM has 1.818 ! The read DM has 1.
735 ! Thus we divide the spinors to form the polarized819 ! Thus we divide the spinors to form the polarized case.
736 ! case.820 A2 => val(out_2D)
737 ar2 => val(out_2D)
738!$OMP parallel do default(shared), private(i)821!$OMP parallel do default(shared), private(i)
739 do i = 1 , size(ar2, 1)822 do i = 1 , size(A2, 1)
740 ar2(i,1) = ar2(i,1) * 0.5_dp823 A2(i,1) = A2(i,1) * 0.5_dp
741 ar2(i,2) = ar2(i,1)824 A2(i,2) = A2(i,1)
742 end do825 end do
743!$OMP end parallel do826!$OMP end parallel do
744 827
@@ -1244,7 +1327,7 @@
1244 use class_Pair_Geometry_dSpData2D1327 use class_Pair_Geometry_dSpData2D
1245 use class_Fstack_Pair_Geometry_dSpData2D1328 use class_Fstack_Pair_Geometry_dSpData2D
12461329
1247 use m_restruct_SpData2D, only: restructdSpData2D1330 use m_restruct_SpData2D, only: restruct_dSpData2D
1248 use fdf, only: fdf_get1331 use fdf, only: fdf_get
12491332
1250 type(Fstack_Pair_Geometry_dSpData2D), intent(in) :: DM_history1333 type(Fstack_Pair_Geometry_dSpData2D), intent(in) :: DM_history
@@ -1327,7 +1410,7 @@
1327 ! if (.not. associated(orb_dist,dist(dm))) then1410 ! if (.not. associated(orb_dist,dist(dm))) then
1328 ! call die("Different orbital distributions in DM history stack")1411 ! call die("Different orbital distributions in DM history stack")
1329 ! endif1412 ! endif
1330 call restructdSpData2D(dm,sparse_pattern,DMtmp)1413 call restruct_dSpData2D(dm,sparse_pattern,DMtmp)
1331 ai => val(DMtmp)1414 ai => val(DMtmp)
1332!$OMP parallel workshare default(shared)1415!$OMP parallel workshare default(shared)
1333 a = a + c(i) * ai1416 a = a + c(i) * ai
13341417
=== modified file 'Src/m_sparse.F90'
--- Src/m_sparse.F90 2016-03-01 14:24:48 +0000
+++ Src/m_sparse.F90 2018-09-12 13:10:27 +0000
@@ -294,6 +294,17 @@
294294
295 end subroutine list_col_correct_sp295 end subroutine list_col_correct_sp
296296
297 ! Routine used for calculation the supercell offsets using
298 ! the xij_2D array.
299 ! Basically this routine runs through all xijo elements
300 ! and calculates the cell distance:
301 ! R(col(ind) % no_u) = xij(ind) - (xa(j) - xa(i))
302 ! This should result in vectors R(...) which are integer
303 ! multiples of the lattice vectors:
304 ! cell X = R
305 ! returns X as integers.
306 ! This routine will quit/exit if two supercell indices
307 ! col(ind) % no_u does not yield the same R vector.
297 subroutine xij_offset_sp(cell,nsc,na_u,xa,lasto, &308 subroutine xij_offset_sp(cell,nsc,na_u,xa,lasto, &
298 xij_2D,isc_off,Bcast)309 xij_2D,isc_off,Bcast)
299 310
300311
=== modified file 'Src/m_supercell.F90'
--- Src/m_supercell.F90 2018-05-15 09:48:18 +0000
+++ Src/m_supercell.F90 2018-09-12 13:10:27 +0000
@@ -1,182 +1,16 @@
1module m_supercell1module m_supercell
22
3! Calculates the supercell factors by examining all atoms.3! Calculates the supercell factors by examining all atoms.
4! 1. We find the smallest vector that connects any atom ia1 to
5! the neighbouring cell atom ia2 [in direction xyz]
6! 2. Loop on supercell factors until it is not overlapping
7! 3. Save supercell factor
8
9! This will correctly capture no supercell factors in
10! slaps with only UC connections. This supercell size will typically
11! be one less than the usual 1+2*ceiling(rmaxh/vnorm(ucell(:,xyz)))
12
13 ! TODO : create a fully parallel version (each node can take na_u/Nodes
14 ! atoms)
15 4
16 use precision, only : dp5 use precision, only : dp
17 6
18 implicit none7 implicit none
19 8
20 !! public :: exact_sc_size ! not used anymore
21 public :: exact_sc_ag9 public :: exact_sc_ag
22 private10 private
23 11
24contains12contains
2513
26 subroutine exact_sc_size(rmaxh,ucell,na_u,xa,nsc)
27 use intrinsic_missing, only : VNORM
28 ! Calculates the exact size required to encompass all super-cells
29 ! This is a brute force calculation which is over the top, yet
30 ! it is effictive in reducing the super-cell to the minimum basis
31 real(dp), intent(in) :: rmaxh
32 real(dp), intent(in) :: ucell(3,3)
33 integer, intent(in) :: na_u
34 real(dp), intent(in) :: xa(3,na_u)
35 integer, intent(inout) :: nsc(3)
36
37 ! Local variables
38 integer :: xyz, ia, ja, tnsc(3), idiag
39 real(dp) :: recell(3,3), v1(3), v2(3), ucdiag(3)
40 logical :: on_boundary
41
42 call reclat(ucell,recell,0) ! do not add 2 Pi
43
44 ! Initialize new nsc
45 tnsc(:) = 1
46
47 ! We loop over all atoms and find the two atoms
48 ! that will be connected by the least
49 ! length across the first cell boundary
50 do ia = 1 , na_u
51 do ja = ia , na_u
52 on_boundary = (ia == ja)
53
54 ! Vector between atoms
55 v1(:) = xa(:,ja) - xa(:,ia)
56
57 do xyz = 1 , 3
58
59 ! from i -> J
60 v2(:) = v1(:) + ucell(:,xyz)
61 ! update the nsc quantity based on this vector
62 call update_nsc(rmaxh,ucell(:,xyz),v2,on_boundary,tnsc(xyz))
63
64 ! from j -> I
65 v2(:) = -v1(:) + ucell(:,xyz)
66 ! update the nsc quantity based on this vector
67 call update_nsc(rmaxh,ucell(:,xyz),v2,on_boundary,tnsc(xyz))
68
69 ! Possibly track the diagonal path when
70 ! having skewed unit-cells. Specifically if
71 ! |ucell(:,1)|,|ucell(:,2)| > |ucell(:,1) + ucell(:,2)|
72 ! Thus we should track the diagonal of each direction
73
74 if ( xyz == 3 ) cycle
75 do idiag = xyz + 1 , 3
76
77 ! get the diagonal unit-cell direction
78 ucdiag(:) = ucell(:,xyz) + ucell(:,idiag)
79
80 ! from i -> J
81 v2(:) = v1(:) + ucdiag(:)
82 ! update the nsc quantity based on this vector (note that
83 ! the diagonal now takes two into account
84 call update_nsc(rmaxh,ucdiag,v2,on_boundary,tnsc(xyz))
85 call update_nsc(rmaxh,ucdiag,v2,on_boundary,tnsc(idiag))
86
87 ! from j -> I
88 v2(:) = -v1(:) + ucdiag(:)
89 ! update the nsc quantity based on this vector (note that
90 ! the diagonal now takes two into account
91 call update_nsc(rmaxh,ucdiag,v2,on_boundary,tnsc(xyz))
92 call update_nsc(rmaxh,ucdiag,v2,on_boundary,tnsc(idiag))
93
94 end do
95
96 end do
97
98 ! Do the last diagonal unit-cell direction (a+b+c)
99 ucdiag(:) = ucell(:,1) + ucell(:,2) + ucell(:,3)
100
101 ! from i -> J
102 v2(:) = v1(:) + ucdiag(:)
103 ! update the nsc quantity based on this vector (note that
104 ! the diagonal now takes two into account
105 call update_nsc(rmaxh,ucdiag,v2,on_boundary,tnsc(1))
106 call update_nsc(rmaxh,ucdiag,v2,on_boundary,tnsc(2))
107 call update_nsc(rmaxh,ucdiag,v2,on_boundary,tnsc(3))
108
109 ! from j -> I
110 v2(:) = -v1(:) + ucdiag(:)
111 ! update the nsc quantity based on this vector (note that
112 ! the diagonal now takes two into account
113 call update_nsc(rmaxh,ucdiag,v2,on_boundary,tnsc(1))
114 call update_nsc(rmaxh,ucdiag,v2,on_boundary,tnsc(2))
115 call update_nsc(rmaxh,ucdiag,v2,on_boundary,tnsc(3))
116
117 end do
118 end do
119
120 ! Copy over calculated super-cell factors
121 nsc(:) = tnsc(:)
122
123 contains
124
125 subroutine update_nsc(rmaxh,vcell,v,on_boundary,nsc)
126 real(dp), intent(in) :: rmaxh
127 real(dp), intent(in) :: vcell(3)
128 real(dp), intent(inout) :: v(3)
129 logical, intent(in) :: on_boundary
130 integer, intent(inout) :: nsc
131 real(dp), parameter :: EPS = 1.e-8_dp
132 real(dp) :: vl
133 integer :: n
134
135 vl = VNORM(v)
136
137 ! we do not have any connections in the xyz direction
138 ! Hence we can entirely skip that direction
139 ! This will be the case for slap calculations
140 if ( vl > rmaxh + EPS ) return
141
142 n = 1
143 ! Loop and find the minimum supercell factor
144 do while ( vl <= rmaxh + EPS )
145 ! increment supercell atom
146 n = n + 1
147 v(:) = v(:) + vcell(:)
148 vl = vnorm(v)
149 end do
150
151 ! As vl now is larger than rmaxh we can subtract
152 ! one from the number of supercells, truncate
153 ! at 1 as we do have connects across the unit-cell
154 ! This will typically reduce nsc by one from the
155 ! naive auxillary cell as the naive calculation
156 ! must take into account the two atoms lying on the
157 ! boundary. But this is direct interaction! :)
158 if ( .not. on_boundary ) then
159 ! TODO, I think this should ALWAYS be n-1
160 ! Yet a case example of unit cell:
161 ! Unit cell vectors (Ang):
162 ! 1.414210 -2.449490 0.000000
163 ! 1.414210 2.449490 0.000000
164 ! 0.000000 0.000000 6.928200
165 ! yields the wrong supercell indices if using n-1
166 ! I think maybe the hsparse takes too many non-zero elements?
167 ! Or are there some additional corrections for the
168 ! orbital range I do not know of?
169 n = max(1,n - 1)
170 end if
171
172 ! UC + n cells on both sides
173 n = 1 + 2 * n
174 if ( n > nsc ) nsc = n
175
176 end subroutine update_nsc
177
178 end subroutine exact_sc_size
179
180 ! Calculate the exact super-cell size based on the14 ! Calculate the exact super-cell size based on the
181 ! atomic connection graph.15 ! atomic connection graph.
182 ! This routine calculates the exact overlap of the atoms,16 ! This routine calculates the exact overlap of the atoms,
18317
=== modified file 'Src/m_test_io.F90'
--- Src/m_test_io.F90 2016-12-08 11:45:49 +0000
+++ Src/m_test_io.F90 2018-09-12 13:10:27 +0000
@@ -6,7 +6,7 @@
66
7 ! Module to test various IO-routines7 ! Module to test various IO-routines
88
9 subroutine time_io(nspin,D_2D)9 subroutine time_io(nspin,nsc,D_2D)
1010
11 use precision, only : dp11 use precision, only : dp
12 use parallel, only : Node12 use parallel, only : Node
@@ -16,6 +16,7 @@
16 use m_iodm16 use m_iodm
1717
18 integer, intent(in) :: nspin18 integer, intent(in) :: nspin
19 integer, intent(in) :: nsc(3)
19 type(dSpData2D), intent(inout) :: D_2D20 type(dSpData2D), intent(inout) :: D_2D
2021
21 type(Sparsity), pointer :: sp22 type(Sparsity), pointer :: sp
@@ -58,7 +59,7 @@
5859
59 call timer('NICK-io',1)60 call timer('NICK-io',1)
60 do i = 1 , N_WRITES61 do i = 1 , N_WRITES
61 call write_dm('TESTIO.DM',D_2D)62 call write_dm('TESTIO.DM',nsc,D_2D)
62 end do63 end do
63 call timer('NICK-io',2)64 call timer('NICK-io',2)
6465
6566
=== modified file 'Src/m_ts_electype.F90'
--- Src/m_ts_electype.F90 2018-08-31 08:16:05 +0000
+++ Src/m_ts_electype.F90 2018-09-12 13:10:27 +0000
@@ -1944,7 +1944,7 @@
1944 type(dSpData2D) :: f_DM_2D, f_EDM_2D1944 type(dSpData2D) :: f_DM_2D, f_EDM_2D
1945 real(dp), pointer :: DM(:,:), EDM(:,:)1945 real(dp), pointer :: DM(:,:), EDM(:,:)
1946 real(dp) :: tmp, Ef1946 real(dp) :: tmp, Ef
1947 integer :: Tile(3), Reps(3)1947 integer :: Tile(3), Reps(3), fnsc(3)
1948 integer :: i1948 integer :: i
1949 logical :: found, alloc(3), is_TSDE1949 logical :: found, alloc(3), is_TSDE
19501950
@@ -1960,10 +1960,10 @@
1960 is_TSDE = ( this%DEfile(i-3:i) == 'TSDE' )1960 is_TSDE = ( this%DEfile(i-3:i) == 'TSDE' )
1961 if ( is_TSDE ) then1961 if ( is_TSDE ) then
1962 call read_ts_dm( this%DEfile, fake_dit, &1962 call read_ts_dm( this%DEfile, fake_dit, &
1963 f_DM_2D, f_EDM_2D, Ef, found, &1963 fnsc, f_DM_2D, f_EDM_2D, Ef, found, &
1964 Bcast = .true. )1964 Bcast = .true. )
1965 else1965 else
1966 call read_dm( this%DEfile, fake_dit, f_DM_2D, found, &1966 call read_dm( this%DEfile, fake_dit, fnsc, f_DM_2D, found, &
1967 Bcast = .true. )1967 Bcast = .true. )
1968 end if1968 end if
1969 if ( .not. found ) call die('Could not read file: '//trim(this%DEfile))1969 if ( .not. found ) call die('Could not read file: '//trim(this%DEfile))
@@ -1972,6 +1972,8 @@
1972 call die('Bulk electrode expansion, read in sparsity pattern, &1972 call die('Bulk electrode expansion, read in sparsity pattern, &
1973 &does not match the TSHS sparsity pattern.')1973 &does not match the TSHS sparsity pattern.')
1974 end if1974 end if
1975 ! Correct the number of supercells (currently not used)
1976 if ( fnsc(1) == 0 ) fnsc = this%nsc
19751977
1976 ! We must delete the additional arrays read in1978 ! We must delete the additional arrays read in
1977 call delete(this%H)1979 call delete(this%H)
19781980
=== modified file 'Src/m_ts_iodm.F90'
--- Src/m_ts_iodm.F90 2016-12-09 10:26:17 +0000
+++ Src/m_ts_iodm.F90 2018-09-12 13:10:27 +0000
@@ -27,7 +27,7 @@
2727
28contains28contains
29 29
30 subroutine read_ts_dm( file, dit, DM, EDM, Ef, found, Bcast)30 subroutine read_ts_dm( file, dit, nsc, DM, EDM, Ef, found, Bcast)
3131
32#ifdef MPI32#ifdef MPI
33 use mpi_siesta33 use mpi_siesta
@@ -38,6 +38,7 @@
38! **********************38! **********************
39 character(len=*), intent(in) :: file39 character(len=*), intent(in) :: file
40 type(OrbitalDistribution), intent(in) :: dit40 type(OrbitalDistribution), intent(in) :: dit
41 integer, intent(inout) :: nsc(3)
41 type(dSpData2D), intent(inout) :: DM, EDM42 type(dSpData2D), intent(inout) :: DM, EDM
42 real(dp), intent(inout) :: Ef43 real(dp), intent(inout) :: Ef
43 logical, intent(out) :: found44 logical, intent(out) :: found
@@ -47,9 +48,9 @@
47! * LOCAL variables *48! * LOCAL variables *
48! ************************49! ************************
49 type(Sparsity) :: sp50 type(Sparsity) :: sp
50 character(len=500) :: fn51 character(len=256) :: fn
51 logical :: lBcast52 logical :: lBcast
52 integer :: iu, two(2), no_u, nspin53 integer :: iu, five(5), no_u, nspin, ierr
53 integer, allocatable, target :: gncol(:)54 integer, allocatable, target :: gncol(:)
54#ifdef MPI55#ifdef MPI
55 integer :: MPIerror56 integer :: MPIerror
@@ -79,15 +80,28 @@
79 call io_assign(iu)80 call io_assign(iu)
80 open( iu, file=file, form='unformatted', status='old' )81 open( iu, file=file, form='unformatted', status='old' )
81 rewind(iu)82 rewind(iu)
82 read(iu) two83 read(iu,iostat=ierr) five
84 if ( ierr /= 0 ) then
85 rewind(iu)
86 read(iu) five(1), five(2)
87 five(3:5) = 0
88 end if
83 end if89 end if
84 90
85#ifdef MPI91#ifdef MPI
86 call MPI_Bcast(two,2,MPI_integer,0,MPI_Comm_World,MPIerror)92 if ( lBcast ) then
93 call MPI_Bcast(five,5,MPI_integer,0,MPI_Comm_World,MPIerror)
94 else
95 ierr = dist_comm(dit)
96 call MPI_Bcast(five,5,MPI_integer,0,ierr,MPIerror)
97 end if
87#endif98#endif
8899
89 no_u = two(1)100 no_u = five(1)
90 nspin = two(2)101 nspin = five(2)
102 nsc(1) = five(3)
103 nsc(2) = five(4)
104 nsc(3) = five(5)
91105
92 allocate(gncol(no_u))106 allocate(gncol(no_u))
93 gncol(1) = 1107 gncol(1) = 1
@@ -128,18 +142,25 @@
128 end if142 end if
129143
130#ifdef MPI144#ifdef MPI
131 call MPI_BCast(Ef,1,MPI_Double_Precision, &145 if ( lBcast ) then
132 0,MPI_Comm_World, MPIerror)146 call MPI_BCast(Ef,1,MPI_Double_Precision, &
147 0,MPI_Comm_World, MPIerror)
148 else
149 ierr = dist_comm(dit)
150 call MPI_Bcast(Ef,1,MPI_Double_Precision, &
151 0,ierr,MPIerror)
152 end if
133#endif153#endif
134154
135 end subroutine read_ts_dm155 end subroutine read_ts_dm
136156
137 subroutine write_ts_dm(file, DM, EDM, Ef )157 subroutine write_ts_dm(file, nsc, DM, EDM, Ef )
138 158
139! **********************159! **********************
140! * INPUT variables *160! * INPUT variables *
141! **********************161! **********************
142 character(len=*), intent(in) :: file162 character(len=*), intent(in) :: file
163 integer, intent(in) :: nsc(3)
143 type(dSpData2D), intent(inout) :: DM, EDM164 type(dSpData2D), intent(inout) :: DM, EDM
144 real(dp), intent(in) :: Ef165 real(dp), intent(in) :: Ef
145 166
@@ -168,7 +189,7 @@
168 open( iu, file=file, form='unformatted', status='unknown' )189 open( iu, file=file, form='unformatted', status='unknown' )
169 rewind(iu)190 rewind(iu)
170 191
171 write(iu) no_u, nspin192 write(iu) no_u, nspin, nsc
172193
173 end if194 end if
174195
175196
=== removed file 'Src/md_utils.f90'
--- Src/md_utils.f90 2016-01-25 16:00:16 +0000
+++ Src/md_utils.f90 1970-01-01 00:00:00 +0000
@@ -1,40 +0,0 @@
1!
2! Copyright (C) 1996-2016 The SIESTA group
3! This file is distributed under the terms of the
4! GNU General Public License: see COPYING in the top directory
5! or http://www.gnu.org/copyleft/gpl.txt.
6! See Docs/Contributors.txt for a list of contributors.
7!
8module md_utils
9
10 use precision, only: dp
11
12 integer, save, public :: md_io_unit = 99
13 logical, save, public :: restart_with_mdinfo = .false.
14 logical, save, :: file_opened = .false.
15
16 CONTAINS
17
18 subroutine add_to_md_file(natoms,xa,va,cell,vcell,nose,nosedot)
19
20 integer, intent(in) :: natoms
21 real(dp), dimension(3,natoms), intent(in) :: xa, va
22 real(dp), dimension(3,3), intent(in), optional :: cell, vcell
23 real(dp), intent(in), optional :: nose, nosedot
24
25! Here we can save x, xa, va for MD (experimental)
26!
27 write(99,*) natoms
28 do ia = 1,natoms
29 write(99,'(i4,3f14.8,3x,3f14.8)')
30 . iza(ia),(xa(i,ia),i=1,3),(va(i,ia),i=1,3)
31 enddo
32
33 have_nose = present(nose)
34 have_nosedot = present(nosedot)
35
36 if (have_nose) then
37 write(99,*) nose
38 endif
39
40 end subroutine add_to_md_file
410
=== modified file 'Src/post_scf_work.F'
--- Src/post_scf_work.F 2018-06-26 07:41:31 +0000
+++ Src/post_scf_work.F 2018-09-12 13:10:27 +0000
@@ -161,8 +161,8 @@
161 ! Save (geom,DM) pair to history stack161 ! Save (geom,DM) pair to history stack
162 write(msg,"(a,i0)") "step: ",istep162 write(msg,"(a,i0)") "step: ",istep
163 call newGeometry(geom,na_u,ucell,xa,isa,163 call newGeometry(geom,na_u,ucell,xa,isa,
164 $ name="Geometry for " // msg)
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches