-
Notifications
You must be signed in to change notification settings - Fork 20
/
SRC_FILES
221 lines (174 loc) · 8.14 KB
/
SRC_FILES
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
File Name Conventions:
Files named <base>_mod.f90 are Fortran 90 modules
Files named <name>.fp.f90 are preprocessor input files.
The un-preprocessed version of the main program is src/pscf.fp.f90.
A corresponding compilable fortran program is generated by applying
a preprocessor script, which installs the resulting program in the
build directory. See the end of this file for a discussion of the
use of a preprocessor.
---------------------------------------------------------------------
! Directories and Files !
---------------------------------------------------------------------
src/
----
pscf.fp.f90
Main program (preprocessor input file). Used to generate the
compilable fortran file pscf.f90 in the build directory.
const_mod
Defines global variable dim (= # dimensions of space) and
parameter long (=real kind for double precision). Used by
all other modules.
src/io/
-------
io/io_mod
Defines generic interfaces for parameter input and output.
io/field_io_mod
Routines to input and output fields, as lists of coefficients
of symmetry-adapted basis functions.
io/string_mod
Utilities to convert integers to strings. Used in io formats.
io/version_mod
Defines a version_type derived type, with major and minor
integer version numbers, and routines to read and write this.
Version numbers are used to specify file format versions.
src/grid/
---------
grid/fft3_mod.f90
Fortran 90 wrappers for FFTW Fourier transform functions,
for FFTW version 3 (Either this or fft2_mod.f90 is linked)
grid/fft2_mod.f90
Fortran 90 wrappers for FFTW Fourier transform functions,
for FFTW version 2 (Either this or fft3_mod.f90 is linked)
grid/grid_mod.f90
Defines scf data structures on an FFT grid, and routines
to allocate, deallocate, and manipulate these structures.
Defines ngrid, rho_grid, omega_grid, and ksq_grid. Also
contains several functions for manipulating single FFT
wavevectors, including norm, G_to_fft and G_to_bz.
src/crystal/
------------
crystal/unit_cell_mod
Creates Bravais and reciprocal basis vectors, using user
supplied name of crystal system and cell parameters. Defines
data structures specifying cell parameters, Bravais and
reciprocal lattice basis vectors, and some related quantities.
crystal/group_mod
Defines derived types and operations for space group
symmetries and space groups
crystal/space_groups_mod
Routine space_groups creates space group specified by user
by name or number, using look-up table of all 230 3D space
groups, 17 2D plane groups, and 2 1D groups.
crystal/basis_mod
Module to construct basis functions for periodic crystal.
Defines data structures describing reciprocal wavevectors and
stars. Contains routines to generate reciprocal wavevectors,
to group them into stars of wavevectors related by symmetry,
and to calculate coefficients of plane waves in symmetry
adapted basis functions. A discussion of the data structures
and conventions used in basis_mod is given within a long
comment within basis_mod, which is reproduced in the
developer/api documentation for the module.
crystal/grid_basis_mod.f90
Contains routines to convert between representations of a
field as a 1D array of coefficients of symmetry-adpated
basis functions and as a set of values defined at points
on a regular grid.
src/scf/
--------
scf/chemistry_mod
Defines data structures required to specify chemistry of an
incompressible polymer blend (chi, Kuhn lengths, block lengths,
molecular volume fractions etc.), and routines to input and
output this data.
scf/scf_mod.fp.f90
Contains routines to solve diffusion equation by the
pseudo-spectral method, and to calculate monomer
concentration fields, the free and energy, and stress.
Note: scf/scf_mod.fp.f90 is a preprocessor input file, which
is used to generate file scf_mod.f90 in the build directory.
scf/step_mod.f90
Routines to integrate one time step of modified diffusion
equation, using the Rasmussen-Kaloskas pseudo-spectral
algorithm and extrapolation with respect to contour
length step size.
scf/chain_mod.f90
Defines a derived type chain_type that contains the
q(r,s) =qf and q^{+}(r,s) =qr functions for a chain, and
information about discretization in r and s. Also defines
arrays of chain_types and subroutines to allocate and
destroy these arrays.
src/iterate
------------
iterate/iterate_mod.fp.f90
Iterates scf equations to convergence. Currently contains
Newton-Raphson (NR) algorithm for both fixed and variable
unit cells. Note: File iterate_mod.fp.f90 is a preprocessor
input file, which is used to generate file iterate_mod.f90
in the build directory.
iterate/sweep_mod
Used to conduct a "sweep" along a path through the space
of SCF input parameters (i.e., chi, block_lengths, etc).
Implements 1st and 2nd order continuation of solutions
along such a path.
iterate/respond_pd_mod.f90
Calculate response of periodic structures in form needed to
construct approximate Jacobian for iterate_mod.f90
src/response/
-------------
response/response_mod.f90
Module for calculating SCF linear response of period structure
response/response_step_mod.f90
Routines to integrate inhomogeneous PDE required in the ideal
gas perturbation theory
response/extrapolate_mod.f90
Implements extrapolation with respect to contour length step
size ds.
src/attic/
----------
Random programs, tests and utilities that are not fit for
public consumption. Please ignore.
---------------------------------------------------------------------
! Preprocessor Usage !
---------------------------------------------------------------------
Several fortran files are generated by applying a python
preprocessor script named FORPEDO to corresponding preprocessor
input files. This script is included as part of the pscf package
in a subdirectory of the tools/python directory.
The relevant preprocesor input files are:
src/pscf.fp.f90
src/iterate/iterate_mod.fp.f90
src/scf/scf_mod.fp.f90
These are fortran files that contain preprocessor directives that
control conditional compilation of some sections of code. The
FORPEDO preprocessor is used here in manner similar to the use
of the standard C preprocessor to control conditional compilation
in C and C++ programs. Preprocessing each of these files generates
a Fortran file with the same name as the preprocessor input file
without the .fp. string. The resulting fortran files are thus named:
build/scf.f90
build/iterate_mod.f90
build/scf_mod.f90
These preprocessed fortran files installed in the build directory
from which make is invoked, rather than in the src/ directory. If
pscf is built using the simple makefile that is provided in the
pscf/make directory, then these files are installed in the
pscf/make directory. If pscf is built out-of-source using cmake,
by invoking cmake and make from a build directory outside the
pscf/ directory tree, then these fortran files will be installed
in that build directory tree.
An external script is used for preprocessing because Fortran
(unlike C) does not provide a standard preprocessor. The use of
a preprocessor makes it easier for developers to maintain code
that contains experimental features that are not yet ready to be
released as part of a stable version, without maintaining separate
development and release version. Sections of code containing
features that are not ready for prime time are surrounded by
conditional compilation directives and are excluded from release
versions of the corresponding fortran files.
If the *.fp.f90 preprocessor files are modified, and the program
is then recompiled using either cmake or the make file in the
pscf/make directory, then the *.f90 fortran files will be regenerated
regenerated as part of the build process. When compiled with make
in the src/make directory, the src/make/*.f90 fortran files are also
removed by the 'make clean' command.