Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
aderrors
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alberto Ramos
aderrors
Commits
15e3f5cd
Commit
15e3f5cd
authored
Jan 11, 2019
by
Alberto Ramos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds supports for gaps in the MC histories
parent
b2fe6cd2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
77 additions
and
4 deletions
+77
-4
README.md
README.md
+1
-0
doc/aderrors.tex
doc/aderrors.tex
+38
-0
src/aderrors/aderrors.f90
src/aderrors/aderrors.f90
+38
-4
No files found.
README.md
View file @
15e3f5cd
...
...
@@ -27,6 +27,7 @@ robust and **exact error propagation even in iterative algorithms**.
different parameters).
-
Support for
**replicas**
(i.e. several runs with the same simulation
parameters).
-
Irrelagular MC measurements are handled transparently.
-
Standalone
**portable**
implementation without any external
dependencies.
-
**Fast**
computation of autocorrelation functions with the [FFT
...
...
doc/aderrors.tex
View file @
15e3f5cd
...
...
@@ -813,6 +813,44 @@ they cannot be called on derived observables.
\subsection
{
Externally accessible functions
}
\subsubsection
{
\texttt
{
aderr
\_
pobs(data, id
\_
msm, ivrep, nmsm)
}}
Returns a primary onservable with the measurements contained in
\texttt
{
data(:)
}
corresponding to MC time
\texttt
{
id
\_
msm(:)
}
. The
total number of measurements in the ensemble and the replica vector
are specified in
\texttt
{
nmsm
}
and
\texttt
{
id
\_
msm(:)
}
respectively.
Note that this call admits gaps in the MC history. For example if some
ensemble has measurements at MC times
$
1
,
2
,
\dots
,
100
$
for most
observables, but some observable has only been measured at MC times
$
1
,
3
,
5
,
\dots
,
99
$
, this data can still be used in any expression by
just calling
\begin{verbatim}
x = aderr
_
pobs(data(1:50),[(2*i-1,i=1,50)], [100], 100)
\end{verbatim}
will load in
\texttt
{
x
}
the measurements stored in
\texttt
{
data
}
that
are
\emph
{
only available for odd values of the MC time
}
.
Completely irregular MC histories are transparently dealt with in the code.
\begin{description}
\item
[\texttt{data(:)}:]
Type
\texttt
{
real double precision
}
one
dimensional array. The MC data.
\item
[\texttt{id\_msm(:)}:]
Type
\texttt
{
integer
}
one dimensional
array. The measurements ID (i.e. ``trajectories'' in lattice jargon)
of each of the measurements.
\item
[\texttt{ivrep(:)}:]
Type
\texttt
{
integer
}
one simansional
array. The replica vector of the ensemble.
\item
[\texttt{nmsm}:]
Type
\texttt
{
integer
}
. The total number of
measurements in the ensemble.
\item
[Output: ]
Type
\texttt
{
uwreal
}
. The primary observable.
\end{description}
\subsubsection
{
\texttt
{
aderr
\_
new
\_
id(name, [id])
}}
Stores
\texttt
{
name
}
in the database and associate it with ID
...
...
src/aderrors/aderrors.f90
View file @
15e3f5cd
...
...
@@ -254,6 +254,12 @@ module aderrors
type
(
uwreal
),
intent
(
in
)
::
a
(:)
real
(
kind
=
DP
),
intent
(
in
)
::
der
(
size
(
x
),
size
(
a
)),
mns
(
size
(
x
))
end
subroutine
module
subroutine
addobs_ds
(
x
,
a
,
der
,
mns
)
type
(
uwreal
),
intent
(
inout
)
::
x
type
(
uwreal
),
intent
(
in
)
::
a
(:)
real
(
kind
=
DP
),
intent
(
in
)
::
der
(:),
mns
end
subroutine
end
interface
interface
assignment
(
=
)
...
...
@@ -296,14 +302,15 @@ module aderrors
module
procedure
uwdobs_f
,
uwdobs_s
end
interface
uwdobs
interface
addobs
module
procedure
addobs_f
,
addobs_s
,
addobs_d
module
procedure
addobs_f
,
addobs_s
,
addobs_d
,
addobs_ds
end
interface
addobs
public
::
uwdobs
,
addobs
interface
module
subroutine
uwerr
(
p
)
module
subroutine
uwerr
(
p
,
ids_texp
)
class
(
uwreal
),
intent
(
inout
)
::
p
integer
,
intent
(
in
),
optional
::
ids_texp
(:)
end
subroutine
end
interface
...
...
@@ -604,7 +611,8 @@ module aderrors
end
function
end
interface
public
::
aderr_set_mode
,
aderr_get_mode
,
adset_default_dsig
,
adset_default_stau
public
::
aderr_set_mode
,
aderr_get_mode
,
adset_default_dsig
,
&
adset_default_stau
,
aderr_pobs
contains
...
...
@@ -1247,7 +1255,33 @@ contains
return
end
subroutine
print_hist
! *****************************
! *
function
aderr_pobs
(
data
,
id_msm
,
ivrep
,
nmsm
)
result
(
p
)
! *
! *****************************
type
(
uwreal
)
::
p
real
(
kind
=
DP
),
intent
(
in
)
::
data
(:)
integer
,
intent
(
in
)
::
id_msm
(:),
ivrep
(:),
nmsm
integer
::
i
if
(
size
(
data
)
.ne.
size
(
id_msm
))
call
module_error
(
'[aderr_pobs]'
,&
' Data and trajectories do not match'
)
call
p
%
init
(
1
,
[
nmsm
],
[
size
(
ivrep
)],
ivrep
)
p
%
mean
=
sum
(
data
)/
real
(
size
(
data
),
kind
=
DP
)
p
%
data
=
0.0_DP
do
i
=
1
,
size
(
id_msm
)
p
%
data
(
id_msm
(
i
))
=
data
(
i
)
-
p
%
mean
end
do
p
%
data
=
real
(
nmsm
,
kind
=
DP
)/
real
(
size
(
id_msm
))
*
p
%
data
return
end
function
aderr_pobs
! ********************************
! *
Subroutine
module_error
(
routine
,
msg
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment