Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Plumed AlphaFold
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martin Kurečka
Plumed AlphaFold
Commits
88763dae
There was an error fetching the commit references. Please try again later.
Commit
88763dae
authored
12 years ago
by
Gareth Tribello
Browse files
Options
Downloads
Patches
Plain Diff
Fixed a number of bugs that appear when the code is compiled without -DNDEBUG
parent
bd67911a
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/multicolvar/MultiColvar.h
+0
-2
0 additions, 2 deletions
src/multicolvar/MultiColvar.h
src/tools/DynamicList.h
+7
-0
7 additions, 0 deletions
src/tools/DynamicList.h
src/vesselbase/ActionWithVessel.h
+0
-4
0 additions, 4 deletions
src/vesselbase/ActionWithVessel.h
with
7 additions
and
6 deletions
src/multicolvar/MultiColvar.h
+
0
−
2
View file @
88763dae
...
@@ -180,7 +180,6 @@ public:
...
@@ -180,7 +180,6 @@ public:
inline
inline
unsigned
MultiColvar
::
getFirstDerivativeToMerge
(){
unsigned
MultiColvar
::
getFirstDerivativeToMerge
(){
imerge_deriv
=
0
;
imerge_natoms
=
atoms_with_derivatives
.
getNumberActive
();
imerge_deriv
=
0
;
imerge_natoms
=
atoms_with_derivatives
.
getNumberActive
();
plumed_dbg_assert
(
colvar_atoms
[
current
].
isActive
(
atoms_with_derivatives
[
imerge_deriv
]
)
);
return
3
*
getAtomIndex
(
atoms_with_derivatives
[
imerge_deriv
]
);
return
3
*
getAtomIndex
(
atoms_with_derivatives
[
imerge_deriv
]
);
}
}
...
@@ -189,7 +188,6 @@ unsigned MultiColvar::getNextDerivativeToMerge( const unsigned& j){
...
@@ -189,7 +188,6 @@ unsigned MultiColvar::getNextDerivativeToMerge( const unsigned& j){
imerge_deriv
++
;
imerge_deriv
++
;
if
(
imerge_deriv
>=
3
*
imerge_natoms
)
return
3
*
getNumberOfAtoms
()
-
3
*
imerge_natoms
+
imerge_deriv
;
if
(
imerge_deriv
>=
3
*
imerge_natoms
)
return
3
*
getNumberOfAtoms
()
-
3
*
imerge_natoms
+
imerge_deriv
;
unsigned
imerge_atom
=
std
::
floor
(
imerge_deriv
/
3
);
unsigned
imerge_atom
=
std
::
floor
(
imerge_deriv
/
3
);
plumed_dbg_assert
(
colvar_atoms
[
current
].
isActive
(
atoms_with_derivatives
[
imerge_atom
]
)
);
return
3
*
getAtomIndex
(
imerge_atom
)
+
imerge_deriv
%
3
;
return
3
*
getAtomIndex
(
imerge_atom
)
+
imerge_deriv
%
3
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/tools/DynamicList.h
+
7
−
0
View file @
88763dae
...
@@ -163,6 +163,8 @@ public:
...
@@ -163,6 +163,8 @@ public:
unsigned
fullSize
()
const
;
unsigned
fullSize
()
const
;
/// Return the number of elements that are currently active
/// Return the number of elements that are currently active
unsigned
getNumberActive
()
const
;
unsigned
getNumberActive
()
const
;
/// Find out if a member is active
bool
isActive
(
const
unsigned
&
)
const
;
/// Add something to the active list
/// Add something to the active list
void
addIndexToList
(
const
T
&
ii
);
void
addIndexToList
(
const
T
&
ii
);
/// Make a particular element inactive
/// Make a particular element inactive
...
@@ -194,6 +196,11 @@ void DynamicList<T>::clear() {
...
@@ -194,6 +196,11 @@ void DynamicList<T>::clear() {
onoff
.
resize
(
0
);
active
.
resize
(
0
);
onoff
.
resize
(
0
);
active
.
resize
(
0
);
}
}
template
<
typename
T
>
bool
DynamicList
<
T
>::
isActive
(
const
unsigned
&
i
)
const
{
return
(
onoff
[
i
]
>
0
);
}
template
<
typename
T
>
template
<
typename
T
>
unsigned
DynamicList
<
T
>::
fullSize
()
const
{
unsigned
DynamicList
<
T
>::
fullSize
()
const
{
return
all
.
size
();
return
all
.
size
();
...
...
This diff is collapsed.
Click to expand it.
src/vesselbase/ActionWithVessel.h
+
0
−
4
View file @
88763dae
...
@@ -207,10 +207,6 @@ void ActionWithVessel::addElementDerivative( const unsigned& ider, const double&
...
@@ -207,10 +207,6 @@ void ActionWithVessel::addElementDerivative( const unsigned& ider, const double&
inline
inline
void
ActionWithVessel
::
setElementDerivative
(
const
unsigned
&
ider
,
const
double
&
der
){
void
ActionWithVessel
::
setElementDerivative
(
const
unsigned
&
ider
,
const
double
&
der
){
#ifndef NDEBUG
unsigned
ndertmp
=
getNumberOfDerivatives
();
if
(
ider
>=
ndertmp
&&
ider
<
2
*
ndertmp
)
plumed_dbg_massert
(
weightHasDerivatives
,
"In "
+
getLabel
()
);
#endif
plumed_dbg_assert
(
ider
<
derivatives
.
size
()
);
plumed_dbg_assert
(
ider
<
derivatives
.
size
()
);
derivatives
[
ider
]
=
der
;
derivatives
[
ider
]
=
der
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment