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
7acbdce5
There was an error fetching the commit references. Please try again later.
Commit
7acbdce5
authored
6 years ago
by
Giovanni Bussi
Browse files
Options
Downloads
Patches
Plain Diff
unique_ptr: removed delete statement
parent
cfb5355b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/gridtools/GridSearch.h
+6
-7
6 additions, 7 deletions
src/gridtools/GridSearch.h
with
6 additions
and
7 deletions
src/gridtools/GridSearch.h
+
6
−
7
View file @
7acbdce5
...
...
@@ -25,6 +25,7 @@
#include
"tools/MinimiseBase.h"
#include
"GridVessel.h"
#include
<iostream>
#include
<memory>
namespace
PLMD
{
namespace
gridtools
{
...
...
@@ -36,12 +37,11 @@ private:
/// calculating class that calculates the energy
typedef
double
(
FCLASS
::*
engf_pointer
)(
const
std
::
vector
<
double
>&
p
,
std
::
vector
<
double
>&
der
);
FCLASS
*
myclass_func
;
GridVessel
*
mygrid
;
GridVessel
*
myfgrid
;
std
::
unique_ptr
<
GridVessel
>
mygrid
;
std
::
unique_ptr
<
GridVessel
>
myfgrid
;
public:
GridSearch
(
const
std
::
vector
<
double
>&
mmin
,
const
std
::
vector
<
double
>&
mmax
,
const
std
::
vector
<
unsigned
>&
ng
,
const
std
::
vector
<
unsigned
>&
nfg
,
FCLASS
*
funcc
)
:
myclass_func
(
funcc
),
myfgrid
(
NULL
)
myclass_func
(
funcc
)
{
// Create the grid objects
std
::
string
nstr
,
vstring
=
"COMPONENTS=func COORDINATES=x1"
;
...
...
@@ -50,8 +50,8 @@ public:
vesselbase
::
VesselOptions
da
(
"mygrid"
,
""
,
-
1
,
vstring
,
NULL
);
Keywords
keys
;
gridtools
::
GridVessel
::
registerKeywords
(
keys
);
vesselbase
::
VesselOptions
dar
(
da
,
keys
);
mygrid
=
new
GridVessel
(
dar
);
if
(
nfg
[
0
]
>
0
)
myfgrid
=
new
GridVessel
(
dar
);
mygrid
.
reset
(
new
GridVessel
(
dar
)
)
;
if
(
nfg
[
0
]
>
0
)
myfgrid
.
reset
(
new
GridVessel
(
dar
)
)
;
// Now setup the min and max values for the grid
std
::
vector
<
std
::
string
>
gmin
(
nfg
.
size
()
),
gmax
(
nfg
.
size
()
);
std
::
vector
<
double
>
dummy_spacing
;
...
...
@@ -59,7 +59,6 @@ public:
mygrid
->
setBounds
(
gmin
,
gmax
,
ng
,
dummy_spacing
);
mygrid
->
resize
();
if
(
myfgrid
)
myfgrid
->
setBounds
(
gmin
,
gmax
,
nfg
,
dummy_spacing
);
}
~
GridSearch
()
{
delete
mygrid
;
if
(
myfgrid
)
delete
myfgrid
;
}
bool
minimise
(
std
::
vector
<
double
>&
p
,
engf_pointer
myfunc
);
};
...
...
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