Skip to content
Snippets Groups Projects
Commit fd070442 authored by Jesse Huhtala's avatar Jesse Huhtala
Browse files

Merge branch 'gammagrid' into 'master'

Gammagrid

See merge request !3
parents 6d6ba714 8fbebe75
No related branches found
No related tags found
1 merge request!3Gammagrid
......@@ -8,9 +8,8 @@ FC = gfortran
# -Wsurprising -Waliasing -Wimplicit-interface -Wunused-parameter \
# -fwhole-file -fcheck=all -std=f2008 -pedantic -fbacktrace \
# -finit-real=nan -Wextra -Wconversion -pg
FFLAGS = -march=native -mtune=native -ffast-math -O3 -funroll-loops
#-O3 -funroll-loops
FFLAGS = -march=native -mtune=native -O2
#FFLAGS = -O0
LIBS = -lblas -llapack
......
......@@ -20,6 +20,7 @@ module data
real(dp) :: DOutward,DPredOutward,DCorrOutward
real(dp), allocatable :: aOutward(:),aPredOutward(:),aCorrOutward(:)
real(dp) :: DInward,DPredInward,DCorrInward
real(dp) :: mix
real(dp), allocatable :: aInward(:),aPredInward(:),aCorrInward(:)
real(dp), allocatable :: orbs(:,:),orbsNorms(:)
integer, allocatable :: lambdas(:),ls(:),leigens(:),DeltaBeta(:)
......
\relax
\catcode `"\active
\babel@aux{finnish}{}
This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018/Arch Linux) (preloaded format=pdflatex 2019.6.11) 20 JUN 2019 10:31
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**documentation.tex
(./documentation.tex
LaTeX2e <2018-12-01>
(/usr/share/texmf-dist/tex/latex/base/article.cls
Document Class: article 2018/09/03 v1.4i Standard LaTeX document class
(/usr/share/texmf-dist/tex/latex/base/size12.clo
File: size12.clo 2018/09/03 v1.4i Standard LaTeX file (size option)
)
\c@part=\count80
\c@section=\count81
\c@subsection=\count82
\c@subsubsection=\count83
\c@paragraph=\count84
\c@subparagraph=\count85
\c@figure=\count86
\c@table=\count87
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(/usr/share/texmf-dist/tex/latex/amsfonts/amssymb.sty
Package: amssymb 2013/01/14 v3.01 AMS font symbols
(/usr/share/texmf-dist/tex/latex/amsfonts/amsfonts.sty
Package: amsfonts 2013/01/14 v3.01 Basic AMSFonts support
\@emptytoks=\toks14
\symAMSa=\mathgroup4
\symAMSb=\mathgroup5
LaTeX Font Info: Overwriting math alphabet `\mathfrak' in version `bold'
(Font) U/euf/m/n --> U/euf/b/n on input line 106.
))
(/usr/share/texmf-dist/tex/latex/amscls/amsthm.sty
Package: amsthm 2017/10/31 v2.20.4
\thm@style=\toks15
\thm@bodyfont=\toks16
\thm@headfont=\toks17
\thm@notefont=\toks18
\thm@headpunct=\toks19
\thm@preskip=\skip43
\thm@postskip=\skip44
\thm@headsep=\skip45
\dth@everypar=\toks20
)
(/usr/share/texmf-dist/tex/latex/amsmath/amsmath.sty
Package: amsmath 2018/12/01 v2.17b AMS math features
\@mathmargin=\skip46
For additional information on amsmath, use the `?' option.
(/usr/share/texmf-dist/tex/latex/amsmath/amstext.sty
Package: amstext 2000/06/29 v2.01 AMS text
(/usr/share/texmf-dist/tex/latex/amsmath/amsgen.sty
File: amsgen.sty 1999/11/30 v2.0 generic functions
\@emptytoks=\toks21
\ex@=\dimen103
))
(/usr/share/texmf-dist/tex/latex/amsmath/amsbsy.sty
Package: amsbsy 1999/11/29 v1.2d Bold Symbols
\pmbraise@=\dimen104
)
(/usr/share/texmf-dist/tex/latex/amsmath/amsopn.sty
Package: amsopn 2016/03/08 v2.02 operator names
)
\inf@bad=\count88
LaTeX Info: Redefining \frac on input line 223.
\uproot@=\count89
\leftroot@=\count90
LaTeX Info: Redefining \overline on input line 385.
\classnum@=\count91
\DOTSCASE@=\count92
LaTeX Info: Redefining \ldots on input line 482.
LaTeX Info: Redefining \dots on input line 485.
LaTeX Info: Redefining \cdots on input line 606.
\Mathstrutbox@=\box27
\strutbox@=\box28
\big@size=\dimen105
LaTeX Font Info: Redeclaring font encoding OML on input line 729.
LaTeX Font Info: Redeclaring font encoding OMS on input line 730.
\macc@depth=\count93
\c@MaxMatrixCols=\count94
\dotsspace@=\muskip10
\c@parentequation=\count95
\dspbrk@lvl=\count96
\tag@help=\toks22
\row@=\count97
\column@=\count98
\maxfields@=\count99
\andhelp@=\toks23
\eqnshift@=\dimen106
\alignsep@=\dimen107
\tagshift@=\dimen108
\tagwidth@=\dimen109
\totwidth@=\dimen110
\lineht@=\dimen111
\@envbody=\toks24
\multlinegap=\skip47
\multlinetaggap=\skip48
\mathdisplay@stack=\toks25
LaTeX Info: Redefining \[ on input line 2844.
LaTeX Info: Redefining \] on input line 2845.
)
(/usr/share/texmf-dist/tex/latex/base/fontenc.sty
Package: fontenc 2018/08/11 v2.0j Standard LaTeX package
(/usr/share/texmf-dist/tex/latex/base/t1enc.def
File: t1enc.def 2018/08/11 v2.0j Standard LaTeX file
LaTeX Font Info: Redeclaring font encoding T1 on input line 48.
))
(/usr/share/texmf-dist/tex/latex/base/inputenc.sty
Package: inputenc 2018/08/11 v1.3c Input encoding file
\inpenc@prehook=\toks26
\inpenc@posthook=\toks27
)
(/usr/share/texmf-dist/tex/generic/babel/babel.sty
Package: babel 2018/11/13 3.27 The Babel package
(/usr/share/texmf-dist/tex/generic/babel/switch.def
File: switch.def 2018/11/13 3.27 Babel switching mechanism
)
(/usr/share/texmf-dist/tex/generic/babel-finnish/finnish.ldf
Language: finnish 2007/10/20 v1.3q Finnish support from the babel system
(/usr/share/texmf-dist/tex/generic/babel/babel.def
File: babel.def 2018/11/13 3.27 Babel common definitions
\babel@savecnt=\count100
\U@D=\dimen112
(/usr/share/texmf-dist/tex/generic/babel/txtbabel.def)
\bbl@dirlevel=\count101
)
Package babel Info: Making " an active character on input line 89.
))
(/usr/share/texmf-dist/tex/latex/geometry/geometry.sty
Package: geometry 2018/04/16 v5.8 Page Geometry
(/usr/share/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks28
)
(/usr/share/texmf-dist/tex/generic/oberdiek/ifpdf.sty
Package: ifpdf 2018/09/07 v3.3 Provides the ifpdf switch
)
(/usr/share/texmf-dist/tex/generic/oberdiek/ifvtex.sty
Package: ifvtex 2016/05/16 v1.6 Detect VTeX and its facilities (HO)
Package ifvtex Info: VTeX not detected.
)
(/usr/share/texmf-dist/tex/generic/ifxetex/ifxetex.sty
Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
)
\Gm@cnth=\count102
\Gm@cntv=\count103
\c@Gm@tempcnt=\count104
\Gm@bindingoffset=\dimen113
\Gm@wd@mp=\dimen114
\Gm@odd@mp=\dimen115
\Gm@even@mp=\dimen116
\Gm@layoutwidth=\dimen117
\Gm@layoutheight=\dimen118
\Gm@layouthoffset=\dimen119
\Gm@layoutvoffset=\dimen120
\Gm@dimlist=\toks29
)
(/usr/share/texmf-dist/tex/latex/graphics/graphicx.sty
Package: graphicx 2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR)
(/usr/share/texmf-dist/tex/latex/graphics/graphics.sty
Package: graphics 2017/06/25 v1.2c Standard LaTeX Graphics (DPC,SPQR)
(/usr/share/texmf-dist/tex/latex/graphics/trig.sty
Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
)
(/usr/share/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
)
Package graphics Info: Driver file: pdftex.def on input line 99.
(/usr/share/texmf-dist/tex/latex/graphics-def/pdftex.def
File: pdftex.def 2018/01/08 v1.0l Graphics/color driver for pdftex
))
\Gin@req@height=\dimen121
\Gin@req@width=\dimen122
)
(/usr/share/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty
Package: fancyhdr 2019/01/31 v3.10 Extensive control of page headers and footer
s
\f@nch@headwidth=\skip49
\f@nch@O@elh=\skip50
\f@nch@O@erh=\skip51
\f@nch@O@olh=\skip52
\f@nch@O@orh=\skip53
\f@nch@O@elf=\skip54
\f@nch@O@erf=\skip55
\f@nch@O@olf=\skip56
\f@nch@O@orf=\skip57
)
(/usr/share/texmf-dist/tex/latex/float/float.sty
Package: float 2001/11/08 v1.3d Float enhancements (AL)
\c@float@type=\count105
\float@exts=\toks30
\float@box=\box29
\@float@everytoks=\toks31
\@floatcapt=\box30
)
(/usr/share/texmf-dist/tex/latex/pgf/frontendlayer/tikz.sty
(/usr/share/texmf-dist/tex/latex/pgf/basiclayer/pgf.sty
(/usr/share/texmf-dist/tex/latex/pgf/utilities/pgfrcs.sty
(/usr/share/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.tex
\pgfutil@everybye=\toks32
\pgfutil@tempdima=\dimen123
\pgfutil@tempdimb=\dimen124
(/usr/share/texmf-dist/tex/generic/pgf/utilities/pgfutil-common-lists.tex))
(/usr/share/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def
\pgfutil@abb=\box31
(/usr/share/texmf-dist/tex/latex/ms/everyshi.sty
Package: everyshi 2001/05/15 v3.00 EveryShipout Package (MS)
))
(/usr/share/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex
(/usr/share/texmf-dist/tex/generic/pgf/pgf.revision.tex)
Package: pgfrcs 2019/02/02 v3.1.1 (3.1.1)
))
Package: pgf 2019/02/02 v3.1.1 (3.1.1)
(/usr/share/texmf-dist/tex/latex/pgf/basiclayer/pgfcore.sty
(/usr/share/texmf-dist/tex/latex/pgf/systemlayer/pgfsys.sty
(/usr/share/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex
Package: pgfsys 2019/02/02 v3.1.1 (3.1.1)
(/usr/share/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex
\pgfkeys@pathtoks=\toks33
\pgfkeys@temptoks=\toks34
(/usr/share/texmf-dist/tex/generic/pgf/utilities/pgfkeysfiltered.code.tex
\pgfkeys@tmptoks=\toks35
))
\pgf@x=\dimen125
\pgf@y=\dimen126
\pgf@xa=\dimen127
\pgf@ya=\dimen128
\pgf@xb=\dimen129
\pgf@yb=\dimen130
\pgf@xc=\dimen131
\pgf@yc=\dimen132
\w@pgf@writea=\write3
\r@pgf@reada=\read1
\c@pgf@counta=\count106
\c@pgf@countb=\count107
\c@pgf@countc=\count108
\c@pgf@countd=\count109
\t@pgf@toka=\toks36
\t@pgf@tokb=\toks37
\t@pgf@tokc=\toks38
\pgf@sys@id@count=\count110
(/usr/share/texmf-dist/tex/generic/pgf/systemlayer/pgf.cfg
File: pgf.cfg 2019/02/02 v3.1.1 (3.1.1)
)
Driver file for pgf: pgfsys-pdftex.def
(/usr/share/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-pdftex.def
File: pgfsys-pdftex.def 2019/02/02 v3.1.1 (3.1.1)
(/usr/share/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-pdf.def
File: pgfsys-common-pdf.def 2019/02/02 v3.1.1 (3.1.1)
)))
(/usr/share/texmf-dist/tex/generic/pgf/systemlayer/pgfsyssoftpath.code.tex
File: pgfsyssoftpath.code.tex 2019/02/02 v3.1.1 (3.1.1)
\pgfsyssoftpath@smallbuffer@items=\count111
\pgfsyssoftpath@bigbuffer@items=\count112
)
(/usr/share/texmf-dist/tex/generic/pgf/systemlayer/pgfsysprotocol.code.tex
File: pgfsysprotocol.code.tex 2019/02/02 v3.1.1 (3.1.1)
))
(/usr/share/texmf-dist/tex/latex/xcolor/xcolor.sty
Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK)
(/usr/share/texmf-dist/tex/latex/graphics-cfg/color.cfg
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package xcolor Info: Driver file: pdftex.def on input line 225.
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1348.
Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1352.
Package xcolor Info: Model `RGB' extended on input line 1364.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1366.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1367.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1368.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1369.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1370.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1371.
)
(/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcore.code.tex
Package: pgfcore 2019/02/02 v3.1.1 (3.1.1)
(/usr/share/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex
(/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathcalc.code.tex
(/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathutil.code.tex)
(/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex
\pgfmath@dimen=\dimen133
\pgfmath@count=\count113
\pgfmath@box=\box32
\pgfmath@toks=\toks39
\pgfmath@stack@operand=\toks40
\pgfmath@stack@operation=\toks41
)
(/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.code.tex
(/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.basic.code.tex)
(/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.trigonometric.code
.tex)
(/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.random.code.tex)
(/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.comparison.code.te
x) (/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.base.code.tex)
(/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.round.code.tex)
(/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.misc.code.tex)
(/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.integerarithmetics
.code.tex))) (/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathfloat.code.tex
\c@pgfmathroundto@lastzeros=\count114
)) (/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex
File: pgfcorepoints.code.tex 2019/02/02 v3.1.1 (3.1.1)
\pgf@picminx=\dimen134
\pgf@picmaxx=\dimen135
\pgf@picminy=\dimen136
\pgf@picmaxy=\dimen137
\pgf@pathminx=\dimen138
\pgf@pathmaxx=\dimen139
\pgf@pathminy=\dimen140
\pgf@pathmaxy=\dimen141
\pgf@xx=\dimen142
\pgf@xy=\dimen143
\pgf@yx=\dimen144
\pgf@yy=\dimen145
\pgf@zx=\dimen146
\pgf@zy=\dimen147
)
(/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconstruct.code.tex
File: pgfcorepathconstruct.code.tex 2019/02/02 v3.1.1 (3.1.1)
\pgf@path@lastx=\dimen148
\pgf@path@lasty=\dimen149
) (/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathusage.code.tex
File: pgfcorepathusage.code.tex 2019/02/02 v3.1.1 (3.1.1)
\pgf@shorten@end@additional=\dimen150
\pgf@shorten@start@additional=\dimen151
)
(/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex
File: pgfcorescopes.code.tex 2019/02/02 v3.1.1 (3.1.1)
\pgfpic=\box33
\pgf@hbox=\box34
\pgf@layerbox@main=\box35
\pgf@picture@serial@count=\count115
)
(/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcoregraphicstate.code.tex
File: pgfcoregraphicstate.code.tex 2019/02/02 v3.1.1 (3.1.1)
\pgflinewidth=\dimen152
)
(/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransformations.code.t
ex
File: pgfcoretransformations.code.tex 2019/02/02 v3.1.1 (3.1.1)
\pgf@pt@x=\dimen153
\pgf@pt@y=\dimen154
\pgf@pt@temp=\dimen155
) (/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcorequick.code.tex
File: pgfcorequick.code.tex 2019/02/02 v3.1.1 (3.1.1)
)
(/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreobjects.code.tex
File: pgfcoreobjects.code.tex 2019/02/02 v3.1.1 (3.1.1)
)
(/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathprocessing.code.te
x
File: pgfcorepathprocessing.code.tex 2019/02/02 v3.1.1 (3.1.1)
) (/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcorearrows.code.tex
File: pgfcorearrows.code.tex 2019/02/02 v3.1.1 (3.1.1)
\pgfarrowsep=\dimen156
)
(/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreshade.code.tex
File: pgfcoreshade.code.tex 2019/02/02 v3.1.1 (3.1.1)
\pgf@max=\dimen157
\pgf@sys@shading@range@num=\count116
)
(/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreimage.code.tex
File: pgfcoreimage.code.tex 2019/02/02 v3.1.1 (3.1.1)
(/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreexternal.code.tex
File: pgfcoreexternal.code.tex 2019/02/02 v3.1.1 (3.1.1)
\pgfexternal@startupbox=\box36
))
(/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcorelayers.code.tex
File: pgfcorelayers.code.tex 2019/02/02 v3.1.1 (3.1.1)
)
(/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransparency.code.tex
File: pgfcoretransparency.code.tex 2019/02/02 v3.1.1 (3.1.1)
) (/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepatterns.code.tex
File: pgfcorepatterns.code.tex 2019/02/02 v3.1.1 (3.1.1)
)
(/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcorerdf.code.tex
File: pgfcorerdf.code.tex 2019/02/02 v3.1.1 (3.1.1)
)))
(/usr/share/texmf-dist/tex/generic/pgf/modules/pgfmoduleshapes.code.tex
File: pgfmoduleshapes.code.tex 2019/02/02 v3.1.1 (3.1.1)
\pgfnodeparttextbox=\box37
)
(/usr/share/texmf-dist/tex/generic/pgf/modules/pgfmoduleplot.code.tex
File: pgfmoduleplot.code.tex 2019/02/02 v3.1.1 (3.1.1)
)
(/usr/share/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-0-65.sty
Package: pgfcomp-version-0-65 2019/02/02 v3.1.1 (3.1.1)
\pgf@nodesepstart=\dimen158
\pgf@nodesepend=\dimen159
)
(/usr/share/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-1-18.sty
Package: pgfcomp-version-1-18 2019/02/02 v3.1.1 (3.1.1)
))
(/usr/share/texmf-dist/tex/latex/pgf/utilities/pgffor.sty
(/usr/share/texmf-dist/tex/latex/pgf/utilities/pgfkeys.sty
(/usr/share/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex))
(/usr/share/texmf-dist/tex/latex/pgf/math/pgfmath.sty
(/usr/share/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex))
(/usr/share/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex
Package: pgffor 2019/02/02 v3.1.1 (3.1.1)
(/usr/share/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex)
\pgffor@iter=\dimen160
\pgffor@skip=\dimen161
\pgffor@stack=\toks42
\pgffor@toks=\toks43
))
(/usr/share/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex
Package: tikz 2019/02/02 v3.1.1 (3.1.1)
(/usr/share/texmf-dist/tex/generic/pgf/libraries/pgflibraryplothandlers.code.te
x
File: pgflibraryplothandlers.code.tex 2019/02/02 v3.1.1 (3.1.1)
\pgf@plot@mark@count=\count117
\pgfplotmarksize=\dimen162
)
\tikz@lastx=\dimen163
\tikz@lasty=\dimen164
\tikz@lastxsaved=\dimen165
\tikz@lastysaved=\dimen166
\tikzleveldistance=\dimen167
\tikzsiblingdistance=\dimen168
\tikz@figbox=\box38
\tikz@figbox@bg=\box39
\tikz@tempbox=\box40
\tikz@tempbox@bg=\box41
\tikztreelevel=\count118
\tikznumberofchildren=\count119
\tikznumberofcurrentchild=\count120
\tikz@fig@count=\count121
(/usr/share/texmf-dist/tex/generic/pgf/modules/pgfmodulematrix.code.tex
File: pgfmodulematrix.code.tex 2019/02/02 v3.1.1 (3.1.1)
\pgfmatrixcurrentrow=\count122
\pgfmatrixcurrentcolumn=\count123
\pgf@matrix@numberofcolumns=\count124
)
\tikz@expandcount=\count125
(/usr/share/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrary
topaths.code.tex
File: tikzlibrarytopaths.code.tex 2019/02/02 v3.1.1 (3.1.1)
))) (/usr/share/texmf-dist/tex/latex/siunitx/siunitx.sty
(/usr/share/texmf-dist/tex/latex/l3kernel/expl3.sty
Package: expl3 2019-02-15 L3 programming layer (loader)
(/usr/share/texmf-dist/tex/latex/l3kernel/expl3-code.tex
Package: expl3 2019-02-15 L3 programming layer (code)
\c_max_int=\count126
\l_tmpa_int=\count127
\l_tmpb_int=\count128
\g_tmpa_int=\count129
\g_tmpb_int=\count130
\g__kernel_prg_map_int=\count131
\c_log_iow=\count132
\l_iow_line_count_int=\count133
\l__iow_line_target_int=\count134
\l__iow_one_indent_int=\count135
\l__iow_indent_int=\count136
\c_zero_dim=\dimen169
\c_max_dim=\dimen170
\l_tmpa_dim=\dimen171
\l_tmpb_dim=\dimen172
\g_tmpa_dim=\dimen173
\g_tmpb_dim=\dimen174
\c_zero_skip=\skip58
\c_max_skip=\skip59
\l_tmpa_skip=\skip60
\l_tmpb_skip=\skip61
\g_tmpa_skip=\skip62
\g_tmpb_skip=\skip63
\c_zero_muskip=\muskip11
\c_max_muskip=\muskip12
\l_tmpa_muskip=\muskip13
\l_tmpb_muskip=\muskip14
\g_tmpa_muskip=\muskip15
\g_tmpb_muskip=\muskip16
\l_keys_choice_int=\count137
\l__intarray_loop_int=\count138
\c__intarray_sp_dim=\dimen175
\g__intarray_font_int=\count139
\c__fp_leading_shift_int=\count140
\c__fp_middle_shift_int=\count141
\c__fp_trailing_shift_int=\count142
\c__fp_big_leading_shift_int=\count143
\c__fp_big_middle_shift_int=\count144
\c__fp_big_trailing_shift_int=\count145
\c__fp_Bigg_leading_shift_int=\count146
\c__fp_Bigg_middle_shift_int=\count147
\c__fp_Bigg_trailing_shift_int=\count148
\c__kernel_randint_max_int=\count149
\g__fp_array_int=\count150
\l__fp_array_loop_int=\count151
\l__sort_length_int=\count152
\l__sort_min_int=\count153
\l__sort_top_int=\count154
\l__sort_max_int=\count155
\l__sort_true_max_int=\count156
\l__sort_block_int=\count157
\l__sort_begin_int=\count158
\l__sort_end_int=\count159
\l__sort_A_int=\count160
\l__sort_B_int=\count161
\l__sort_C_int=\count162
\l__tl_analysis_normal_int=\count163
\l__tl_analysis_index_int=\count164
\l__tl_analysis_nesting_int=\count165
\l__tl_analysis_type_int=\count166
\l__regex_internal_a_int=\count167
\l__regex_internal_b_int=\count168
\l__regex_internal_c_int=\count169
\l__regex_balance_int=\count170
\l__regex_group_level_int=\count171
\l__regex_mode_int=\count172
\c__regex_cs_in_class_mode_int=\count173
\c__regex_cs_mode_int=\count174
\l__regex_catcodes_int=\count175
\l__regex_default_catcodes_int=\count176
\c__regex_catcode_D_int=\count177
\c__regex_catcode_S_int=\count178
\c__regex_catcode_L_int=\count179
\c__regex_catcode_O_int=\count180
\c__regex_catcode_A_int=\count181
\c__regex_all_catcodes_int=\count182
\l__regex_show_lines_int=\count183
\l__regex_min_state_int=\count184
\l__regex_max_state_int=\count185
\l__regex_left_state_int=\count186
\l__regex_right_state_int=\count187
\l__regex_capturing_group_int=\count188
\l__regex_min_pos_int=\count189
\l__regex_max_pos_int=\count190
\l__regex_curr_pos_int=\count191
\l__regex_start_pos_int=\count192
\l__regex_success_pos_int=\count193
\l__regex_curr_char_int=\count194
\l__regex_curr_catcode_int=\count195
\l__regex_last_char_int=\count196
\l__regex_case_changed_char_int=\count197
\l__regex_curr_state_int=\count198
\l__regex_step_int=\count199
\l__regex_min_active_int=\count266
\l__regex_max_active_int=\count267
\l__regex_replacement_csnames_int=\count268
\l__regex_match_count_int=\count269
\l__regex_min_submatch_int=\count270
\l__regex_submatch_int=\count271
\l__regex_zeroth_submatch_int=\count272
\g__regex_trace_regex_int=\count273
\c_empty_box=\box42
\l_tmpa_box=\box43
\l_tmpb_box=\box44
\g_tmpa_box=\box45
\g_tmpb_box=\box46
\l__box_top_dim=\dimen176
\l__box_bottom_dim=\dimen177
\l__box_left_dim=\dimen178
\l__box_right_dim=\dimen179
\l__box_top_new_dim=\dimen180
\l__box_bottom_new_dim=\dimen181
\l__box_left_new_dim=\dimen182
\l__box_right_new_dim=\dimen183
\l__box_internal_box=\box47
\l__coffin_internal_box=\box48
\l__coffin_internal_dim=\dimen184
\l__coffin_offset_x_dim=\dimen185
\l__coffin_offset_y_dim=\dimen186
\l__coffin_x_dim=\dimen187
\l__coffin_y_dim=\dimen188
\l__coffin_x_prime_dim=\dimen189
\l__coffin_y_prime_dim=\dimen190
\c_empty_coffin=\box49
\l__coffin_aligned_coffin=\box50
\l__coffin_aligned_internal_coffin=\box51
\l_tmpa_coffin=\box52
\l_tmpb_coffin=\box53
\g_tmpa_coffin=\box54
\g_tmpb_coffin=\box55
\c__coffin_empty_coffin=\box56
\l__coffin_display_coffin=\box57
\l__coffin_display_coord_coffin=\box58
\l__coffin_display_pole_coffin=\box59
\l__coffin_display_offset_dim=\dimen191
\l__coffin_display_x_dim=\dimen192
\l__coffin_display_y_dim=\dimen193
\g__file_internal_ior=\read2
\l__coffin_bounding_shift_dim=\dimen194
\l__coffin_left_corner_dim=\dimen195
\l__coffin_right_corner_dim=\dimen196
\l__coffin_bottom_corner_dim=\dimen197
\l__coffin_top_corner_dim=\dimen198
\l__coffin_scaled_total_height_dim=\dimen199
\l__coffin_scaled_width_dim=\dimen256
\l__seq_internal_a_int=\count274
\l__seq_internal_b_int=\count275
)
(/usr/share/texmf-dist/tex/latex/l3kernel/l3pdfmode.def
File: l3pdfmode.def 2019-02-15 v L3 Experimental driver: PDF mode
\l__driver_color_stack_int=\count276
))
(/usr/share/texmf-dist/tex/latex/l3packages/xparse/xparse.sty
Package: xparse 2018-10-17 L3 Experimental document command parser
\l__xparse_current_arg_int=\count277
\g__xparse_grabber_int=\count278
\l__xparse_m_args_int=\count279
\l__xparse_mandatory_args_int=\count280
\l__xparse_v_nesting_int=\count281
)
Package: siunitx 2018/05/17 v2.7s A comprehensive (SI) units package
(/usr/share/texmf-dist/tex/latex/tools/array.sty
Package: array 2018/12/30 v2.4k Tabular extension package (FMi)
\col@sep=\dimen257
\ar@mcellbox=\box60
\extrarowheight=\dimen258
\NC@list=\toks44
\extratabsurround=\skip64
\backup@length=\skip65
\ar@cellbox=\box61
)
(/usr/share/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty
Package: l3keys2e 2018-10-17 LaTeX2e option processing using LaTeX3 keys
)
\l__siunitx_tmp_box=\box62
\l__siunitx_tmp_dim=\dimen259
\l__siunitx_tmp_int=\count282
\l__siunitx_number_mantissa_length_int=\count283
\l__siunitx_number_uncert_length_int=\count284
\l__siunitx_round_int=\count285
\l__siunitx_process_decimal_int=\count286
\l__siunitx_process_uncertainty_int=\count287
\l__siunitx_process_fixed_int=\count288
\l__siunitx_process_integer_min_int=\count289
\l__siunitx_process_precision_int=\count290
\l__siunitx_group_min_int=\count291
\l__siunitx_angle_marker_box=\box63
\l__siunitx_angle_unit_box=\box64
\l__siunitx_angle_marker_dim=\dimen260
\l__siunitx_angle_unit_dim=\dimen261
\l__siunitx_unit_int=\count292
\l__siunitx_unit_denominator_int=\count293
\l__siunitx_unit_numerator_int=\count294
\l__siunitx_unit_prefix_int=\count295
\l__siunitx_unit_prefix_base_int=\count296
\l__siunitx_unit_prefix_gram_int=\count297
\l__siunitx_number_product_int=\count298
\c__siunitx_one_fill_skip=\skip66
\l__siunitx_table_unit_align_skip=\skip67
\l__siunitx_table_exponent_dim=\dimen262
\l__siunitx_table_integer_dim=\dimen263
\l__siunitx_table_mantissa_dim=\dimen264
\l__siunitx_table_marker_dim=\dimen265
\l__siunitx_table_result_dim=\dimen266
\l__siunitx_table_uncert_dim=\dimen267
\l__siunitx_table_fill_pre_dim=\dimen268
\l__siunitx_table_fill_post_dim=\dimen269
\l__siunitx_table_fill_mid_dim=\dimen270
\l__siunitx_table_pre_box=\box65
\l__siunitx_table_post_box=\box66
\l__siunitx_table_mantissa_box=\box67
\l__siunitx_table_result_box=\box68
\l__siunitx_table_number_align_skip=\skip68
\l__siunitx_table_text_align_skip=\skip69
(/usr/share/texmf-dist/tex/latex/translator/translator.sty
Package: translator 2018/01/04 v1.12 Easy translation of strings in LaTeX
))
(/usr/share/texmf-dist/tex/latex/physics/physics.sty
Package: physics
) (./documentation.aux)
\openout1 = `documentation.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 29.
LaTeX Font Info: ... okay on input line 29.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 29.
LaTeX Font Info: ... okay on input line 29.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 29.
LaTeX Font Info: ... okay on input line 29.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 29.
LaTeX Font Info: ... okay on input line 29.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 29.
LaTeX Font Info: ... okay on input line 29.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 29.
LaTeX Font Info: ... okay on input line 29.
*geometry* driver: auto-detecting
*geometry* detected driver: pdftex
*geometry* verbose mode - [ preamble ] result:
* driver: pdftex
* paper: a4paper
* layout: <same size as paper>
* layoutoffset:(h,v)=(0.0pt,0.0pt)
* modes:
* h-part:(L,W,R)=(71.13188pt, 455.24411pt, 71.13188pt)
* v-part:(T,H,B)=(99.58464pt, 731.23584pt, 14.22636pt)
* \paperwidth=597.50787pt
* \paperheight=845.04684pt
* \textwidth=455.24411pt
* \textheight=731.23584pt
* \oddsidemargin=-1.1381pt
* \evensidemargin=-1.1381pt
* \topmargin=-9.68535pt
* \headheight=12.0pt
* \headsep=5.0pt
* \topskip=12.0pt
* \footskip=30.0pt
* \marginparwidth=35.0pt
* \marginparsep=10.0pt
* \columnsep=10.0pt
* \skip\footins=10.8pt plus 4.0pt minus 2.0pt
* \hoffset=0.0pt
* \voffset=-54.2025pt
* \mag=1000
* \@twocolumnfalse
* \@twosidefalse
* \@mparswitchfalse
* \@reversemarginfalse
* (1in=72.27pt=25.4mm, 1cm=28.453pt)
(/usr/share/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count299
\scratchdimen=\dimen271
\scratchbox=\box69
\nofMPsegments=\count300
\nofMParguments=\count301
\everyMPshowfont=\toks45
\MPscratchCnt=\count302
\MPscratchDim=\dimen272
\MPnumerator=\count303
\makeMPintoPDFobject=\count304
\everyMPtoPDFconversion=\toks46
) (/usr/share/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
Package: epstopdf-base 2016/05/15 v2.6 Base part for package epstopdf
(/usr/share/texmf-dist/tex/generic/oberdiek/infwarerr.sty
Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO)
)
(/usr/share/texmf-dist/tex/latex/oberdiek/grfext.sty
Package: grfext 2016/05/16 v1.2 Manage graphics extensions (HO)
(/usr/share/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty
Package: kvdefinekeys 2016/05/16 v1.4 Define keys (HO)
(/usr/share/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
)))
(/usr/share/texmf-dist/tex/latex/oberdiek/kvoptions.sty
Package: kvoptions 2016/05/16 v3.12 Key value format for package options (HO)
(/usr/share/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
Package: kvsetkeys 2016/05/16 v1.17 Key value parser (HO)
(/usr/share/texmf-dist/tex/generic/oberdiek/etexcmds.sty
Package: etexcmds 2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO)
(/usr/share/texmf-dist/tex/generic/oberdiek/ifluatex.sty
Package: ifluatex 2016/05/16 v1.4 Provides the ifluatex switch (HO)
Package ifluatex Info: LuaTeX not detected.
)
Package etexcmds Info: Could not find \expanded.
(etexcmds) That can mean that you are not using pdfTeX 1.50 or
(etexcmds) that some package has redefined \expanded.
(etexcmds) In the latter case, load this package earlier.
)))
(/usr/share/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
Package: pdftexcmds 2018/09/10 v0.29 Utility functions of pdfTeX for LuaTeX (HO
)
Package pdftexcmds Info: LuaTeX not detected.
Package pdftexcmds Info: \pdf@primitive is available.
Package pdftexcmds Info: \pdf@ifprimitive is available.
Package pdftexcmds Info: \pdfdraftmode found.
)
Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 4
38.
Package grfext Info: Graphics extension search list:
(grfext) [.pdf,.png,.jpg,.mps,.jpeg,.jbig2,.jb2,.PDF,.PNG,.JPG,.JPE
G,.JBIG2,.JB2,.eps]
(grfext) \AppendGraphicsExtensions on input line 456.
(/usr/share/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg
File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv
e
))
ABD: EveryShipout initializing macros
Now handling font encoding TS1 ...
... processing UTF-8 mapping file for font encoding TS1
(/usr/share/texmf-dist/tex/latex/base/ts1enc.dfu
File: ts1enc.dfu 2018/10/05 v1.2f UTF-8 support for inputenc
defining Unicode char U+00A2 (decimal 162)
defining Unicode char U+00A3 (decimal 163)
defining Unicode char U+00A4 (decimal 164)
defining Unicode char U+00A5 (decimal 165)
defining Unicode char U+00A6 (decimal 166)
defining Unicode char U+00A7 (decimal 167)
defining Unicode char U+00A8 (decimal 168)
defining Unicode char U+00A9 (decimal 169)
defining Unicode char U+00AA (decimal 170)
defining Unicode char U+00AC (decimal 172)
defining Unicode char U+00AE (decimal 174)
defining Unicode char U+00AF (decimal 175)
defining Unicode char U+00B0 (decimal 176)
defining Unicode char U+00B1 (decimal 177)
defining Unicode char U+00B2 (decimal 178)
defining Unicode char U+00B3 (decimal 179)
defining Unicode char U+00B4 (decimal 180)
defining Unicode char U+00B5 (decimal 181)
defining Unicode char U+00B6 (decimal 182)
defining Unicode char U+00B7 (decimal 183)
defining Unicode char U+00B9 (decimal 185)
defining Unicode char U+00BA (decimal 186)
defining Unicode char U+00BC (decimal 188)
defining Unicode char U+00BD (decimal 189)
defining Unicode char U+00BE (decimal 190)
defining Unicode char U+00D7 (decimal 215)
defining Unicode char U+00F7 (decimal 247)
defining Unicode char U+0192 (decimal 402)
defining Unicode char U+02C7 (decimal 711)
defining Unicode char U+02D8 (decimal 728)
defining Unicode char U+02DD (decimal 733)
defining Unicode char U+0E3F (decimal 3647)
defining Unicode char U+2016 (decimal 8214)
defining Unicode char U+2020 (decimal 8224)
defining Unicode char U+2021 (decimal 8225)
defining Unicode char U+2022 (decimal 8226)
defining Unicode char U+2030 (decimal 8240)
defining Unicode char U+2031 (decimal 8241)
defining Unicode char U+203B (decimal 8251)
defining Unicode char U+203D (decimal 8253)
defining Unicode char U+2044 (decimal 8260)
defining Unicode char U+204E (decimal 8270)
defining Unicode char U+2052 (decimal 8274)
defining Unicode char U+20A1 (decimal 8353)
defining Unicode char U+20A4 (decimal 8356)
defining Unicode char U+20A6 (decimal 8358)
defining Unicode char U+20A9 (decimal 8361)
defining Unicode char U+20AB (decimal 8363)
defining Unicode char U+20AC (decimal 8364)
defining Unicode char U+20B1 (decimal 8369)
defining Unicode char U+2103 (decimal 8451)
defining Unicode char U+2116 (decimal 8470)
defining Unicode char U+2117 (decimal 8471)
defining Unicode char U+211E (decimal 8478)
defining Unicode char U+2120 (decimal 8480)
defining Unicode char U+2122 (decimal 8482)
defining Unicode char U+2126 (decimal 8486)
defining Unicode char U+2127 (decimal 8487)
defining Unicode char U+212E (decimal 8494)
defining Unicode char U+2190 (decimal 8592)
defining Unicode char U+2191 (decimal 8593)
defining Unicode char U+2192 (decimal 8594)
defining Unicode char U+2193 (decimal 8595)
defining Unicode char U+2329 (decimal 9001)
defining Unicode char U+232A (decimal 9002)
defining Unicode char U+2422 (decimal 9250)
defining Unicode char U+25E6 (decimal 9702)
defining Unicode char U+25EF (decimal 9711)
defining Unicode char U+266A (decimal 9834)
defining Unicode char U+FEFF (decimal 65279)
)
(/usr/share/texmf-dist/tex/latex/translator/translator-basic-dictionary-English
.dict
Dictionary: translator-basic-dictionary, Language: English
) (/usr/share/texmf-dist/tex/latex/siunitx/siunitx-abbreviations.cfg
File: siunitx-abbreviations.cfg 2017/11/26 v2.7k siunitx: Abbreviated units
)
LaTeX Font Info: Try loading font information for U+msa on input line 29.
(/usr/share/texmf-dist/tex/latex/amsfonts/umsa.fd
File: umsa.fd 2013/01/14 v3.01 AMS symbols A
)
LaTeX Font Info: Try loading font information for U+msb on input line 29.
(/usr/share/texmf-dist/tex/latex/amsfonts/umsb.fd
File: umsb.fd 2013/01/14 v3.01 AMS symbols B
)
Overfull \hbox (49.22823pt too wide) detected at line 66
[]
[]
Package Fancyhdr Warning: \headheight is too small (12.0pt):
Make it at least 14.49998pt.
We now make it that large for the rest of the document.
This may cause the page layout to be inconsistent, however.
[1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}
]
LaTeX Font Info: Try loading font information for OMS+cmr on input line 80.
(/usr/share/texmf-dist/tex/latex/base/omscmr.fd
File: omscmr.fd 2014/09/29 v2.5h Standard LaTeX font definitions
)
LaTeX Font Info: Font shape `OMS/cmr/m/n' in size <12> not available
(Font) Font shape `OMS/cmsy/m/n' tried instead on input line 80.
Overfull \hbox (20.13353pt too wide) detected at line 109
[]
[]
[2] [3] (./documentation.aux) )
Here is how much of TeX's memory you used:
26358 strings out of 492616
520822 string characters out of 6135177
543202 words of memory out of 5000000
29928 multiletter control sequences out of 15000+600000
539931 words of font info for 50 fonts, out of 8000000 for 9000
1141 hyphenation exceptions out of 8191
55i,18n,63p,414b,317s stack positions out of 5000i,500n,10000p,200000b,80000s
{/usr/share/texmf-dist/fonts/enc/dvips/cm-super/
cm-super-t1.enc}</usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmex10.pf
b></usr/share/texmf-dist/fonts/type1/public/amsfonts/cmextra/cmex8.pfb></usr/sh
are/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi12.pfb></usr/share/texmf-dist
/fonts/type1/public/amsfonts/cm/cmmi6.pfb></usr/share/texmf-dist/fonts/type1/pu
blic/amsfonts/cm/cmmi8.pfb></usr/share/texmf-dist/fonts/type1/public/amsfonts/c
m/cmr12.pfb></usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmr6.pfb></us
r/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmr8.pfb></usr/share/texmf-di
st/fonts/type1/public/amsfonts/cm/cmsy10.pfb></usr/share/texmf-dist/fonts/type1
/public/amsfonts/cm/cmsy6.pfb></usr/share/texmf-dist/fonts/type1/public/amsfont
s/cm/cmsy8.pfb></usr/share/texmf-dist/fonts/type1/public/cm-super/sfrm1200.pfb>
</usr/share/texmf-dist/fonts/type1/public/cm-super/sfrm2488.pfb>
Output written on documentation.pdf (3 pages, 137761 bytes).
PDF statistics:
70 PDF objects out of 1000 (max. 8388607)
51 compressed objects within 1 object stream
0 named destinations out of 1000 (max. 500000)
13 words of extra memory for PDF output out of 10000 (max. 10000000)
File added
\documentclass[a4paper,12pt]{article}
\usepackage{amssymb,amsthm,amsmath} % ams
\usepackage[T1]{fontenc} % skanditavutus
%\usepackage[ansinew]{inputenc} % skandien sy�� (windows)
\usepackage[utf8]{inputenc} % 䤫k�� (linux)
\usepackage[finnish]{babel} % suomenkielinen tavutus
\usepackage[top=3.5cm, bottom=0.5cm, left=2.5cm, right=2.5cm]{geometry}
%\usepackage{layout}
\setlength{\voffset}{-0.75in}
\setlength{\headsep}{5pt}
\usepackage[]{graphicx}
\usepackage{fancyhdr}
\usepackage{amssymb,amsmath,amsthm}
\usepackage{float}
\usepackage{tikz}
\usepackage{siunitx}
\usepackage{physics}
\pagestyle{fancy}
\linespread{1.24} %riviv䬩 1.5
\lhead{\vspace{-10cm}aRc}
\rhead{\thepage}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
\newcommand{\R}{\mathbb{R}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\C}{\mathbb{C}}
\begin{document}
\begin{center}
\huge{Documentation for the program}
\end{center}
This is a good place to start when reading the code of Levämäki's DFTATOM modification for Nagy's (2011) version of orbital-free
density functional theory. The program can be seen in action in Levämäki 2015. You should have read that paper before reading this documentation
or you will likely not understand anything. Also, to understand the technicalities of the integration methods, read Johnson's Atomic Structure Theory
chapter 2. Here I will only describe the main points of the functioning of the program, so you don't need to deduce everything yourself.
Basically, the program works by solving these equations:
\begin{align}
\begin{cases}
P(\beta, r)&= \phi(\beta ,r),\ \ \ \ \ Q(\beta, r) = P'(\beta ,r)\\
P'(\beta, r) &= Q(\beta,r)\\
Q'(\beta ,r) &= 2[v_{ks}(r) + v_p(\beta ,r) - \mu ] P(\beta ,r) \\
v'_p(\beta ,r) &= 4\dfrac{[\mu - v_p(\beta ,r)] P(\beta ,r) Q(\beta ,r) - \frac{\partial P}{\partial \beta}(\beta ,r)Q(\beta ,r) - P(\beta ,r) \frac{\partial Q}{\partial \beta} (\beta ,r)}{P^2(\beta ,r)}
\end{cases}
\end{align}
using implicit Adams predictor-correctors and a two-point beta-grid (in the future, also a gamma grid).
main Be.f90 is the main driver for the program. We need several different sorts of arrays for it to work. P and Q hold the solutions for the
above differential equations (one for each point on the beta-grid). Pdot and Qdot hold the $\beta$-derivatives of the density. Pgdot and Qgdot hold the $\gamma$-derivatives of the
density when they are implemented (that imposes additional terms on our equations shown soon). The $\beta$-grid variables NbgGrid determine at
how many points are the $\beta$-derivatives evaluated --- more on that later. Here are the additional gamma-terms when they're
working:
\begin{align}
\begin{cases}
P(\beta, r)&= \phi(\beta ,r),\ \ \ \ \ Q(\beta, r) = P'(\beta ,r)\\
P'(\beta, r) &= Q(\beta,r)\\
Q'(\beta ,r) &= 2[v_{ks}(r) + v_p(\beta ,r) - \mu ] P(\beta ,r) \\
v'_p(\beta ,r) &= 4\dfrac{[\mu - v_p(\beta ,r)] P(\beta ,r) Q(\beta ,r) - \frac{\partial P}{\partial \beta}(\beta ,r)Q(\beta ,r) - P(\beta ,r) \frac{\partial Q}{\partial \beta} (\beta ,r)}{P^2(\beta ,r)} - 2\bigg[ \dfrac{\frac{\partial P}{\partial \gamma} Q}{r^2 P^2} + \dfrac{\frac{\partial Q}{\partial \gamma}}{r^2 P} \bigg]\\
&+ 2 \dfrac{\frac{\partial P}{\partial \gamma}}{r^3 P}
\end{cases}
\end{align}
Many of the files are rather self-explanatory. hartreepot.f90 integrates the Poisson equation
\begin{align}
V_H '' + 2/r V_H' + 4\pi \rho = 0
\end{align}
to get the Hartree potential. The xc.f90 file simply returns exchange- and correlation energies. It is best not to touch either of these files,
because these are well known problems and have been solved adequately in the code. energies.f90 likewise simply returns the energy values of
the system after the density has been solved --- again, no need to touch it.
The real magic happens in the OFDFT step in solverhovp.f90. This file contains the main logic. For this case of beryllium that is being investigated,
it does the following things:
\begin{itemize}
\item Calculate 1s orbital energy by demanding that $v_P$ approaches 0 far from the nucleus
\item Calculate $\mu$ with a shooting method, and this is the 2s orbital energy
\end{itemize}
1s orbital energy is calculated by repeatedly integrating outward from the nucleus towards the CTP-point, which is quite far from the nucleus.
After every integration, it is checked whether $v_P$ has increased from the previous round. If it has, then we have found a minimum (it first
decreases because of the initial guess, and after it hits a minimum, it starts increasing). This is near the correct value for 1s because we
need to have the $v_P$ potential vanish at CTP. The integrations are done in AdamsOutwardCTP. Once we find this nearly correct value, it is refined
with the bisection method. (All of this happens at the beginning of ofdft step, about until line 170).
$\mu$ is solved with a shooting method. We first integrate inward from practical infinity (about 50 Bohr away), and stop at the CTP point. Then we
integrate outward to the CTP point. We compare these solutions (done on lines 176-200 in solverhovp.f90) and force them to join at CTP. If it's
not continuous, so on of the solutions has to be changed a lot to make them continuous at CTP, then we change $\mu$ and try again (lines 220-230).
One important point about what happens inside the integration routines AdamsInward, Adamsoutward and AdamsOutwardCTP. The $\beta$-derivatives in our
equations are determined in DiffBeta and stored in Pdot and Qdot, by solving the following system of equations:
\begin{align}
\begin{cases}
\rho(\beta _1 ,r) &= \lambda _1 \exp[\beta _1 b_1]a_1(r) + \lambda _2 \exp[\beta _1 b_2] a_2(r)\\
\rho (\beta _2 ,r) &=\lambda _1 \exp[\beta _2 b_1]a_1(r) + \lambda _2 \exp[\beta _2 b_2] a_2(r)
\end{cases}
\end{align}
This is solved by calling a LAPACK routine. It is precisely this part of the code that is so slow to solve, because solving a system of equations
scales as $\mathcal{O}(N^3)$. For example, if we had a Neon atom instead of Beryllium, we would have not only orbitals 1s and 2s, but also the
2p orbital, so we would need 3 equations in (4). They would look like this:
\begin{align}
\rho (\beta _2 ,r) &=2 \exp[\beta _2 b_1]a_1(r) + 2 \exp[\beta _2 b_2] a_2(r) + 6(\exp [\beta _1 b_4] \exp[-2\gamma]a_4 +
\exp [\beta _1 b_5]\exp [-2\gamma]a_5
\end{align}
So then we must solve our equations on yet another grid! This is the part of the code that one must focus on to increase efficiency.
The entire solverhovp.f90 is also wrapped in an outer do loop, which is a sort of sanity check. Because the solution is sensitive to the initial
values, especially initial values of vP, we use the following procedure:
\begin{enumerate}
\item Do all the calculation steps described before
\item Obtain the new density with the mix $\rho _{new} = \alpha \rho _{currentsolution} + (1-\alpha)\rho_{old}$
\item Check this against known upper- and lower bounds of Weizsäcker energy (could also do this for vP energy) of the OLD density.
\item If bounds are violated, we probably have a bad solution, so we need new starting values
\end{enumerate}
Why do we have a bad solution if the lower- and upper bounds are violated? The upper- and lower bounds are quite generous. Our density shouldn't
change so rapidly as to violate those bounds. If it does, it is likely that the vP solution has somehow diverged and we need to try again!
The bounds used are $\frac{1}{8} \int r^{-2} \rho_{new}\mathrm{dr}\cdot \dfrac{1}{1-\frac{ \int r^{-1}
\rho_{new}\mathrm{dr}^2}{ \int r^{-2} \rho_{new}\mathrm{dr}}}< T_{vw} <
\frac{1}{4}\int r^{-2}\rho _{new}\mathrm{dr} $
\end{document}
\ No newline at end of file
No preview for this file type
......@@ -3,10 +3,10 @@ program main_Be
use constants, only: pi
use data
use init, only: initialize
use derivatives, only: genDcoeffs,xDiff1,xDiff2,xDiff3
use derivatives, only: genDcoeffs,xDiff1,xDiff2,xDiff3, Weizsacker
use derivatives, only: rDiff1,rDiff2,rDiff3
use mesh, only: logmesh
use trapezoidalrule, only: trapz7
use trapezoidalrule, only: trapz7, euler
use xc, only: LDAvX,LDAvC,LDAeX,LDAeC
use hartreepot, only: hartree
use solverhovp, only: ofdft_step
......@@ -21,10 +21,12 @@ program main_Be
real(dp), allocatable :: RhoOld(:)
real(dp) :: muNew,L2Norm,e1s
real(dp), allocatable :: outArray(:,:)
real(dp), allocatable :: vwp(:), muar(:)
character(len=100) :: filename
real(dp) :: Etot,EXC,ECoul,ENuc,EKin
real(dp) :: ConvTarget,mix
real(dp) :: ConvTarget
real(dp) :: BeforeLoop, AfterLoop
real(dp) :: xclb, vw, gkinetic, rhomu, paulik, vw_lb, vw_up, kin_up, vptest
! A program to solve the electronic structure of Be orbital-free
! with the accuracy of KS-DFT.
......@@ -69,17 +71,17 @@ program main_Be
RhoOld = (8.0_dp*exp(-2.0_dp*R*Z)*R**2.0_dp*Z**3.0_dp+&
exp(-R*Z)*R**2.0_dp*Z**3.0_dp*(1.0_dp-(R*Z)/2.0_dp)**2.0_dp)
RhoNew(:,1) = RhoOld
vH=hartree(RhoOld)
vXC=LDAvX(RhoOld)+LDAvC(RhoOld)
vKS=vExt+vH+vXC
!
ConvTarget=1.0e-8
ConvTarget=1.0e-5
! The main iteration loop can now begin
do iterMain=1,itersMainMax
print *,''
print *,'Iteration number ',iterMain
print *,''
call cpu_time(BeforeLoop)
call ofdft_step(vKS,rhoNew,gNew,vPNew,muNew,e1s)
......@@ -95,8 +97,19 @@ program main_Be
! of the difference between new and old).
L2Norm=trapz7((RhoNew(:,1)-RhoOld)**2,1,Nmesh)
write(*,'(A18,E12.6)') 'Error in density: ',L2Norm
print *, "STEP TIME", AfterLoop-BeforeLoop
write(*,'(A18,E12.6)') 'Step time: ',AfterLoop-BeforeLoop
RhoOld=RhoNew(:,1)
!xclb = 5.7425_dp * 2**(2.0_dp/3.0_dp)*trapz7(RhoNew(:,1)**(5.0_dp/3.0_dp),0, Nmesh)/(4.0_dp)
xclb = 2.871234 * trapz7(RhoNew(:,1) **(5/3),1,Nmesh)
paulik = trapz7(RhoNew(:,1)*vPNew(:,1),1,Nmesh)
gkinetic = trapz7(gNew(:,1),1,Nmesh)
vw = trapz7(RhoNew(:,1)*Weizsacker(RhoNew(:,1)),1,Nmesh)
vw_lb = 1.0_dp/8.0_dp * trapz7(RhoNew(:,1) * r**(-2), 1, Nmesh) *&
1/(1-1.0_dp/Z*trapz7(RhoNew(:,1) * r**(-1),1,Nmesh)**2/trapz7(RhoNew(:,1) * r**(-2),1,Nmesh))
vw_up = 0.25_dp * trapz7(r**(-2) * RhoNew(:,1),1, Nmesh)
kin_up = (1 + (4*3.141592653_dp)**2 * (Z/2.0_dp)**(2.0_dp/3.0_dp)*9.0_dp/5**(2.0_dp/3.0_dp) )*vw
rhomu = trapz7(muNew*RhoNew(:,1),1,Nmesh)
vptest = xclb - vw -gkinetic+rhomu
! Check convergence
if (L2Norm<ConvTarget) then
write(*,'(A48)') '################################################'
......@@ -106,10 +119,20 @@ program main_Be
call get_energies(Etot,EXC,ECoul,ENuc,EKin,RhoNew(:,1),gNew(:,1),vH,vExt,vPNew(:,1),muNew)
write(*,'(A29,F11.6)') 'Total energy =',Etot
write(*,'(A29,F11.6)') 'Kinetic energy =',EKin
write(*,'(A29,F11.6)') 'Kinetic energy upper bound =',kin_up
write(*,'(A29,F11.6)') 'Kinetic energy lower bound =',xclb
write(*,'(A29,F11.6)') 'Electron-electron energy =',ECoul
write(*,'(A29,F11.6)') 'Electron-nucleus energy =',ENuc
write(*,'(A29,F11.6)') 'Exchange-correlation energy =',EXC
write(*,'(A40)') '----------------------------------------'
write(*,'(A29,F11.6)') 'Von W kinetic energy =',vw
write(*,'(A29, F11.6)')'Von W lower bound =',vw_lb
write(*,'(A29, F11.6)')'Von W upper bound =',vw_up
write(*,'(A29, F11.6)')'VP lower bound =',vptest
write(*,'(A29,F11.6)') 'Pauli kinetic energy =',paulik
write(*,'(A29,F11.6)') 'g kinetic energy component =',gkinetic
write(*,'(A29,F11.6)') 'mu*rho kinetic energy =',rhomu
write(*,'(A40)') '----------------------------------------'
write(*,'(A3,F10.6)') '1s:',e1s
write(*,'(A3,F10.6)') '2s:',muNew
write(*,*) ''
......@@ -120,13 +143,24 @@ program main_Be
write(*,*) ''
!write(*,'(A33,I3,A12)') 'Convergence has been achieved in ',iterMain,' iterations.'
!write(*,*) ''
call get_energies(Etot,EXC,ECoul,ENuc,EKin,RhoNew(:,1),gNew(:,1),vH,vExt,vPNew(:,1),muNew)
write(*,'(A29,F11.6)') 'Total energy =',Etot
write(*,'(A29,F11.6)') 'Kinetic energy =',EKin
write(*,'(A29,F11.6)') 'Kinetic energy upper bound =',kin_up
write(*,'(A29,F11.6)') 'Kinetic energy lower bound =',xclb
write(*,'(A29,F11.6)') 'Electron-electron energy =',ECoul
write(*,'(A29,F11.6)') 'Electron-nucleus energy =',ENuc
write(*,'(A29,F11.6)') 'Exchange-correlation energy =',EXC
write(*,'(A40)') '----------------------------------------'
write(*,'(A29,F11.6)') 'Von W kinetic energy =',vw
write(*,'(A29, F11.6)')'Von W lower bound =',vw_lb
write(*,'(A29, F11.6)')'Von W upper bound =',vw_up
write(*,'(A29, F11.6)')'VP lower bound =',vptest
write(*,'(A29,F11.6)') 'Pauli kinetic energy =',paulik
write(*,'(A29,F11.6)') 'g kinetic energy component =',gkinetic
write(*,'(A29,F11.6)') 'mu*rho kinetic energy =',rhomu
write(*,'(A40)') '----------------------------------------'
write(*,'(A3,F10.6)') '1s:',e1s
write(*,'(A3,F10.6)') '2s:',muNew
write(*,*) ''
......@@ -136,10 +170,19 @@ program main_Be
! Save calculated quantities to disk.
write(filename,*) './results'
allocate(outArray(Nmesh,3))
allocate(vwp(Nmesh))
allocate(muar(Nmesh))
vwp = Weizsacker(RhoNew(:,1))
muar = muNew
outArray(:,1)=r
outArray(:,2)=vPNew(:,1)
!outArray(:,2)= vwp(:)
outArray(:,3)=vPNew(:,1)
outArray(:,2) = Pdotsol(:,1)
print *, minval(vPNew(:,1)), minval(Pdotsol(:,1))
!outArray(:,3) = Qdotout(:,1)
!outArray(:,3) = Psol(:,1)
!outArray(:,3)=vPNew(:,2)
outArray(:,3)=RhoNew(:,1)
!outArray(:,3)=RhoNew(:,1)
!outArray(:,3)=gNew(:,1)
!outArray(:,4)=vPNew(:,1)
!outArray(:,2)=orbs(1,:)
......
Source diff could not be displayed: it is too large. Options to address this: view the blob.
......@@ -11,6 +11,7 @@ contains
subroutine ofdft_step(vKS,rhoNew,gNew,vPNew,muNew,e1sOut)
use data
use derivatives, only: Weizsacker
real(dp), intent(in) :: vKS(:)
real(dp), intent(out) :: rhoNew(:,:),gNew(:,:),vPNew(:,:)
real(dp), intent(out) :: muNew,e1sOut
......@@ -21,10 +22,30 @@ contains
real(dp) :: norm0,normfac0,Qdiff,Pint,mu,dmu,dmuTarget,e1sTarget
real(dp) ::gammaMin,gammaMax,gammaMid,gammaTarget,e1sShift
integer :: iterGamma,iterGammaMax
real(dp) :: mumin,mumax,e1sMultiplier
real(dp) :: mumin,mumax,e1sMultiplier, gkinetic, rhomu, vw,xclb
real(dp) :: rhoOld(Nmesh), start = 10000.0_dp
integer, parameter :: prnt=0
!print *,'ofdft_step started'
! Starting from TH potential
!e1s=-2.849007_dp
!mu=-0.216434_dp
!gamma=47.798473897919941_dp
! Starting from H-like orbitals
!mu=-0.090_dp
!mu=-0.039249_dp
!e1s=-3.009855_dp
!e1s=-3.01_dp
!gamma=42.27944725494816_dp
!print *,'mu,dmu,gamma,ctp = ',mu,dmu,gamma,ctp
!stop
outer: do
Pin=0.0_dp
Pdotin=0.0_dp
Pout=0.0_dp
......@@ -75,36 +96,20 @@ contains
e1sShift=1.0e-5_dp
e1sMultiplier=1.0_dp
! Starting from TH potential
!e1s=-2.849007_dp
!mu=-0.216434_dp
!gamma=47.798473897919941_dp
! Starting from H-like orbitals
!mu=-0.090_dp
!mu=-0.039249_dp
!e1s=-3.009855_dp
!e1s=-3.01_dp
!gamma=42.27944725494816_dp
!print *,'mu,dmu,gamma,ctp = ',mu,dmu,gamma,ctp
call AdamsOutwardCTP(Pout,Pdotout,Pgdotout,Qout,Qdotout,Qgdotout,orbs,vPout,mu,vKS,ctp,e1s,gamma)
call AdamsOutwardCTP(Pout,Pdotout,Pgdotout,Qout,Qdotout,Qgdotout,orbs,vPout,mu,vKS,ctp,e1s,gamma,start)
!call AdamsInward(Pin,Pdotin,Qin,Qdotin,vPin,mu,vKS,ctp)
vPmin=vPout(ctp,1)
if (prnt==1) then
print *,'e1s,vPmin = ',e1s,vPmin
end if
!stop
!Outer loop to check for convergence issues
do itere=1,itereMax
e1s00=e1s0
vPmin00=vPmin0
e1s0=e1s
vPmin0=vPmin
e1s=e1s+step
call AdamsOutwardCTP(Pout,Pdotout,Pgdotout,Qout,Qdotout,Qgdotout,orbs,vPout,mu,vKS,ctp,e1s,gamma)
call AdamsOutwardCTP(Pout,Pdotout,Pgdotout,Qout,Qdotout,Qgdotout,orbs,vPout,mu,vKS,ctp,e1s,gamma,start)
vPmin=vPout(ctp,1)
if (prnt==1) then
print *,'e1s,vPmin,ctp = ',e1s,vPmin,ctp
......@@ -120,7 +125,7 @@ contains
end if
end do
e1smid=0.5_dp*(e1smin+e1smax)
call AdamsOutwardCTP(Pout,Pdotout,Pgdotout,Qout,Qdotout,Qgdotout,orbs,vPout,mu,vKS,ctp,e1smid,gamma)
call AdamsOutwardCTP(Pout,Pdotout,Pgdotout,Qout,Qdotout,Qgdotout,orbs,vPout,mu,vKS,ctp,e1smid,gamma,start)
vPminMid=vPout(ctp,1)
do itere=1,itereMax
if ((e1sMax-e1sMin)<e1sTarget) then
......@@ -131,7 +136,7 @@ contains
end if
if ((e1sMid-e1sMin)>=(e1sMax-e1sMid)) then
e1s=0.5_dp*(e1sMin+e1sMid)
call AdamsOutwardCTP(Pout,Pdotout,Pgdotout,Qout,Qdotout,Qgdotout,orbs,vPout,mu,vKS,ctp,e1s,gamma)
call AdamsOutwardCTP(Pout,Pdotout,Pgdotout,Qout,Qdotout,Qgdotout,orbs,vPout,mu,vKS,ctp,e1s,gamma,start)
vPmin=vPout(ctp,1)
if (prnt==1) then
print *,'bisection: e1s,vPmin,ctp = ',e1s,vPmin,ctp
......@@ -146,7 +151,7 @@ contains
end if
else
e1s=0.5_dp*(e1sMid+e1sMax)
call AdamsOutwardCTP(Pout,Pdotout,Pgdotout,Qout,Qdotout,Qgdotout,orbs,vPout,mu,vKS,ctp,e1s,gamma)
call AdamsOutwardCTP(Pout,Pdotout,Pgdotout,Qout,Qdotout,Qgdotout,orbs,vPout,mu,vKS,ctp,e1s,gamma,start)
vPmin=vPout(ctp,1)
if (prnt==1) then
print *,'bisection: e1s,vPmin,ctp = ',e1s,vPmin,ctp
......@@ -167,7 +172,7 @@ contains
!
do iterAdams=1,iterAdamsMax
!print *,'Adams iteration number ',iterAdams
call AdamsOutward(Pout,Pdotout,Pgdotout,Qout,Qdotout,Qgdotout,orbs,vPout,mu,vKS,ctp,e1s,gamma)
call AdamsOutward(Pout,Pdotout,Pgdotout,Qout,Qdotout,Qgdotout,orbs,vPout,mu,vKS,ctp,e1s,gamma,start)
call AdamsInward(Pin,Pdotin,Qin,Qdotin,vPin,mu,vKS,ctp)
!print *,orbs(1,ctp-5:ctp+5)
!print *,''
......@@ -233,7 +238,8 @@ contains
!
do iterGamma=1,iterGammaMax
gammaMid=0.5_dp*(gammaMin+gammaMax)
call AdamsOutward(Pout,Pdotout,Pgdotout,Qout,Qdotout,Qgdotout,orbs,vPout,mu,vKS,ctp,e1s,gammaMid)
call AdamsOutward(Pout,Pdotout,Pgdotout,Qout,Qdotout,Qgdotout,orbs,vPout,mu,vKS,ctp,e1s,gammaMid,start)
call AdamsInward(Pin,Pdotin,Qin,Qdotin,vPin,mu,vKS,ctp)
! Join the two solutions
do j=1,NbgGrid
......@@ -285,27 +291,53 @@ contains
!print *,'ctp,r(ctp) = ',ctp,r(ctp)
!print * ,orbs(1,:)
!print *,'ofdft_step: e1s,mu = ',e1s,mu
rhoNew=Psol**2
rhoOld = rhoNew(:,1)
if(CheckLowerBounds(Psol(:,1)**2, rhoOld) .and.&
CheckUpperBounds(Psol(:,1)**2, rhoOld)) then
print *, "Bound checks succesful"
gNew=2.0_dp*Psol*Pdotsol
rhoNew=Psol**2
vPNew=vPsol
muNew=mu
e1sOut=e1s
exit outer
else if(CheckLowerBounds(Psol(:,1)**2, rhoOld) .eqv. .false.) then
print *, "Lower bound failed, recycling"
xclb = 2.871234 * trapz7(RhoOld(:) **(5/3),1,Nmesh)
vw = trapz7(RhoOld(:)*Weizsacker(RhoOld(:)),1,Nmesh)
gkinetic = trapz7(gNew(:,1),1,Nmesh)
rhomu = trapz7(mu*RhoOld(:),1,Nmesh)
start = xclb - vw -gkinetic+rhomu
!gNew=2.0_dp*Psol*Pdotsol
cycle outer
else if(CheckUpperBounds(Psol(:,1)**2, rhoOld) .eqv. .false.) then
print *, "Upper bound failed, recycling"
xclb = 2.871234 * trapz7(RhoOld(:) **(5/3),1,Nmesh)
vw = trapz7(RhoOld(:)*Weizsacker(RhoOld(:)),1,Nmesh)
gkinetic = trapz7(gNew(:,1),1,Nmesh)
rhomu = trapz7(muNew*RhoOld(:),1,Nmesh)
start = xclb - vw -gkinetic+rhomu
!gNew=2.0_dp*Psol*Pdotsol
cycle outer
end if
end do outer
end subroutine ofdft_step
subroutine AdamsOutwardCTP(P,Pdot,Pgdot,Q,Qdot,Qgdot,orbs,vP,mu,vKS,ctp,e1s,gamma)
subroutine AdamsOutwardCTP(P,Pdot,Pgdot,Q,Qdot,Qgdot,orbs,vP,mu,vKS,ctp,e1s,gamma,start)
use data, only: Z,r,Dr,Nmesh,NbgGrid,AdamsOutwardOrder,Dbeta,Norbs,dx,LambdaOutward
use data, only: betaGrid,aOutward,aPredOutward,aCorrOutward,ctp0
real(dp), intent(out) :: P(:,:),Pdot(:,:),Q(:,:)
real(dp), intent(out) :: Qdot(:,:),vP(:,:),orbs(Norbs,Nmesh)
real(dp), intent(out) :: Pgdot(:, :), Qgdot(:,:)
real(dp), intent(in) :: mu,vKS(:),e1s,gamma
real(dp), intent(in) :: mu,vKS(:),e1s,gamma,start
integer, intent(inout) :: ctp
real(dp) :: ccc,ddd,eCoeff,P00,Q00
real(dp), dimension(Nmesh,NbgGrid) :: CC,Pp,Qp
real(dp) :: DvP(NbgGrid),fvPOutward(AdamsOutwardOrder,NbgGrid)
integer :: i,j,PECEiterMax,sigma,endPoint,PECEiter,vPMaxIndex
real(dp) :: Ptmp,Qtmp,Delta,M11,M12,M21,M22
!real(dp) :: test(size(vP(1,:),1))
real(dp) :: test(size(vP(1,:),1))
Pgdot = 0.0_dp
Qgdot = 0.0_dp
......@@ -320,9 +352,9 @@ contains
eCoeff=mu-e1s
P00=ccc*r(1)*(1.0_dp-Z*r(1))
Q00=ddd*(ccc-2.0_dp*ccc*Z*r(1))
!test=[0.0_dp,-1.0e-1_dp]
!vP(1,:)=gamma*eCoeff/(gamma+exp(betaGrid(:)*eCoeff))
vP(1,:)=0.0_dp
test=[0.0_dp,-1.0e-1_dp]
vP(1,:)=start!gamma*eCoeff/(gamma+exp(betaGrid(:)*eCoeff))
!vP(1,:)=0.0_dp
!vP(1,:)=gamma*eCoeff/(gamma+exp(betaGrid(:)*eCoeff))+test(:)
P(1,:)=sqrt(gamma*exp(betaGrid(:)*e1s)+exp(betaGrid(:)*mu))/sqrt(gamma+1.0_dp)*P00
Q(1,:)=sqrt(gamma*exp(betaGrid(:)*e1s)+exp(betaGrid(:)*mu))/sqrt(gamma+1.0_dp)*Q00
......@@ -371,6 +403,8 @@ contains
end do
call DiffBeta(Pdot(i+1,:),Qdot(i+1,:),orbs(:,i+1),P(i+1,:),Q(i+1,:),e1s,mu)
call DiffGamma(Pdot(i,:),Pgdot(i,:),Qdot(i,:),Qgdot(i,:),orbs(:,i),P(i,:),Q(i,:),e1s,mu)
do PECEiter=1,PECEiterMax
do j=1,NbgGrid
fvPOutward(:,j)=Dr(i-AdamsOutwardOrder+2:i+1)*4*((mu-vP(i-AdamsOutwardOrder+2:i+1,j))*&
......@@ -384,6 +418,7 @@ contains
(r(i-AdamsOutwardOrder+1:i)**2 * P(i-AdamsOutwardOrder+1:i,j)) +& !GAMMA 2 COMPLETE
Dr(i-AdamsOutwardOrder+1:i)*2*(Pgdot(i-AdamsOutwardOrder+1:i,j))/&
(r(i-AdamsOutwardOrder+1:i)**3 * P(i-AdamsOutwardOrder+1:i,j))
DvP(j)=MultistepOutward(fvPOutward(:,j),1,aCorrOutward)
vP(i+1,j)=vP(i,j)+DvP(j)
CC(i+1,j)=-2.0_dp*(mu-vKS(i+1)-vP(i+1,j))
......@@ -426,13 +461,13 @@ contains
!end do
end subroutine AdamsOutwardCTP
subroutine AdamsOutward(P,Pdot, Pgdot,Q,Qdot,Qgdot,orbs,vP,mu,vKS,ctp,e1s,gamma)
subroutine AdamsOutward(P,Pdot, Pgdot,Q,Qdot,Qgdot,orbs,vP,mu,vKS,ctp,e1s,gamma,start)
use data, only: Z,r,Dr,Nmesh,NbgGrid,AdamsOutwardOrder,Dbeta,Norbs,dx,LambdaOutward
use data, only: betaGrid,aOutward,aPredOutward,aCorrOutward
real(dp), intent(out) :: P(:,:),Pdot(:,:),Q(:,:)
real(dp), intent(out) :: Qdot(:,:),vP(:,:),orbs(Norbs,Nmesh)
real(dp), intent(out) :: Pgdot(:, :), Qgdot(:, :)
real(dp), intent(in) :: mu,vKS(:),e1s,gamma
real(dp), intent(in) :: mu,vKS(:),e1s,gamma,start
integer, intent(in) :: ctp
real(dp) :: ccc,ddd,eCoeff,P00,Q00
real(dp), dimension(Nmesh,NbgGrid) :: CC,Pp,Qp
......@@ -450,8 +485,8 @@ contains
Q00=ddd*(ccc-2.0_dp*ccc*Z*r(1))
test=[0.0_dp,-1.0e-1_dp]
!vP(1,:)=gamma*eCoeff/(gamma+exp(betaGrid(:)*eCoeff))
vP(1,:)=0.0_dp
!vP(1,:)=gamma*eCoeff/(gamma+exp(betaGrid(:)*eCoeff))+test(:)
!vP(1,:)=0.0_dp
vP(1,:)=start!gamma*eCoeff/(gamma+exp(betaGrid(:)*eCoeff))+test(:)
P(1,:)=sqrt(gamma*exp(betaGrid(:)*e1s)+exp(betaGrid(:)*mu))/sqrt(gamma+1.0_dp)*P00
Q(1,:)=sqrt(gamma*exp(betaGrid(:)*e1s)+exp(betaGrid(:)*mu))/sqrt(gamma+1.0_dp)*Q00
do j=1,NbgGrid
......@@ -683,6 +718,44 @@ contains
end do
end function MultistepInwardImp
function CheckLowerBounds(Rho, RhoOld) result(bounds)
use data, only: r, Nmesh, mix
use derivatives, only: Weizsacker
real(dp), intent(in) :: rho(:), RhoOld(:)
real(dp) :: vw_true, vw_lower, RhoMix(Nmesh)
logical :: bounds
RhoMix(:)=(1.0_dp-mix)*RhoOld+mix*Rho(:)
vw_lower = 1.0_dp/8.0_dp * trapz7(RhoOld(:) * r**(-2), 1, Nmesh) *&
1/(1-0.25_dp*trapz7(RhoOld(:) * r**(-1),1,Nmesh)**2&
/trapz7(RhoOld(:) * r**(-2),1,Nmesh))
!print *, vw_lower
vw_true = trapz7(RhoMix(:) * Weizsacker(RhoMix), 1, Nmesh)
!print *, vw_true
if (vw_lower < vw_true) then
bounds = .true.
else
bounds = .false.
end if
end function CheckLowerBounds
function CheckUpperBounds(Rho, RhoOld) result(bounds)
use data, only: r, Nmesh, mix
use derivatives, only: Weizsacker
real(dp), intent(in) :: rho(:), RhoOld(:)
real(dp) :: RhoMix(Nmesh)
real(dp) :: vw_true, vw_upper
logical :: bounds
RhoMix(:)=(1.0_dp-mix)*RhoOld+mix*Rho(:)
vw_true = trapz7(RhoMix(:) * Weizsacker(RhoMix), 1, Nmesh)
vw_upper = 0.25_dp * trapz7(r**(-2) * RhoOld(:),1, Nmesh)
if(vw_true < vw_upper) then
bounds = .true.
else
bounds = .false.
end if
end function CheckUpperBounds
subroutine DiffBeta(Pdot,Qdot,orbs,P,Q,e1s,mu)
use data, only: betaGrid,gammaGrid,NbgGrid,Norbs,leigens,lambdas
real(dp), intent(in) :: P(:),Q(:),e1s,mu
......
temp 0 → 100644
do iterGamma=1,iterGammaMax
gammaMid=0.5_dp*(gammaMin+gammaMax)
call AdamsOutward(Pout,Pdotout,Pgdotout,Qout,Qdotout,Qgdotout,orbs,vPout,mu,vKS,ctp,e1s,gammaMid)
call AdamsInward(Pin,Pdotin,Qin,Qdotin,vPin,mu,vKS,ctp)
! Join the two solutions
do j=1,NbgGrid
fac(j)=Pout(ctp,j)/Pin(ctp,j)
facdot(j)=Pdotout(ctp,j)/Pdotin(ctp,j)
!print *,fac(j)
end do
Psol(:ctp,:)=Pout(:ctp,:)
Pdotsol(:ctp,:)=Pdotout(:ctp,:)
do j=1,NbgGrid
Psol(ctp:,j)=Pin(ctp:,j)*fac(j)
Pdotsol(ctp:,j)=Pdotin(ctp:,j)*facdot(j)
end do
vPsol(:ctp,:)=vPout(:ctp,:)
vPsol(ctp:,:)=0.0
! Normalize
norm0=trapz7(Psol(:,1)**2,1,Nmesh)
normfac0=sqrt(real(Z,dp)/norm0)
Psol=normfac0*Psol
Pdotsol=normfac0*Pdotsol
! Construct orbitals
orbs=Normfac0**2*orbs
orbs(2,ctp:)=orbs(2,ctp)/Psol(ctp,1)**2*Psol(ctp:,1)**2
do j=1,size(orbs,1)
orbsNorms(j)=Trapz7(orbs(j,:),1,Nmesh)
if (prnt==1) then
print *,'ofdft_step: orbsNorms = ',orbsNorms(j)
end if
end do
!print *,'gamma,orbsNorms = ',gammaMid,orbsNorms
if (orbsNorms(1)<1.0_dp) then
gammaMin=gammaMid
else
gammaMax=gammaMid
end if
if (abs(orbsNorms(1)-1.0_dp)<gammaTarget) then
exit
end if
!if (orbsNorms(2)>1.0_dp) then
! gammaMin=gammaMid
!else
! gammaMax=gammaMid
!end if
!if (abs(orbsNorms(2)-1.0_dp)<gammaTarget) then
! exit
!end if
end do
\ No newline at end of file
......@@ -5,7 +5,7 @@ module trapezoidalrule
implicit none
private
public trapz7
public trapz7, euler
contains
......@@ -28,4 +28,15 @@ contains
s = s + sum(g(8:N-7))
end function trapz7
function euler(array, indMin, indMax) result(s)
real(dp), intent(in) :: array(:)
integer, intent(in) :: indMin, indMax
real(dp) :: s
real(dp) :: g(indMax-indMin+1)
g = array(indMin:indMax) * Dr(indMin:indMax)
s = sum(g)
end function euler
end module trapezoidalrule
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment