Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lammps
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
multiscale
lammps
Commits
f46eb9de
Commit
f46eb9de
authored
12 years ago
by
sjplimp
Browse files
Options
Downloads
Patches
Plain Diff
git-svn-id:
svn://svn.icms.temple.edu/lammps-ro/trunk@8225
f3b2605a-c512-4ea7-a41b-209d697bcdaa
parent
153bb556
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/update.cpp
+14
-5
14 additions, 5 deletions
src/update.cpp
src/update.h
+1
-0
1 addition, 0 deletions
src/update.h
with
15 additions
and
5 deletions
src/update.cpp
+
14
−
5
View file @
f46eb9de
...
...
@@ -344,7 +344,18 @@ void Update::create_minimize(int narg, char **arg)
}
/* ----------------------------------------------------------------------
reset timestep from input script
reset timestep as called from input script
------------------------------------------------------------------------- */
void
Update
::
reset_timestep
(
int
narg
,
char
**
arg
)
{
if
(
narg
!=
1
)
error
->
all
(
FLERR
,
"Illegal reset_timestep command"
);
bigint
newstep
=
ATOBIGINT
(
arg
[
0
]);
reset_timestep
(
newstep
);
}
/* ----------------------------------------------------------------------
reset timestep
do not allow dump files or a restart to be defined
do not allow any timestep-dependent fixes to be defined
do not allow any dynamic regions to be defined
...
...
@@ -354,10 +365,8 @@ void Update::create_minimize(int narg, char **arg)
clear timestep list of computes that store future invocation times
------------------------------------------------------------------------- */
void
Update
::
reset_timestep
(
int
n
arg
,
char
**
arg
)
void
Update
::
reset_timestep
(
big
int
n
ewstep
)
{
if
(
narg
!=
1
)
error
->
all
(
FLERR
,
"Illegal reset_timestep command"
);
for
(
int
i
=
0
;
i
<
output
->
ndump
;
i
++
)
if
(
output
->
last_dump
[
i
]
>=
0
)
error
->
all
(
FLERR
,
...
...
@@ -389,7 +398,7 @@ void Update::reset_timestep(int narg, char **arg)
for
(
int
i
=
0
;
i
<
modify
->
ncompute
;
i
++
)
if
(
modify
->
compute
[
i
]
->
timeflag
)
modify
->
compute
[
i
]
->
clearstep
();
ntimestep
=
ATOBIGINT
(
arg
[
0
])
;
ntimestep
=
newstep
;
if
(
ntimestep
<
0
)
error
->
all
(
FLERR
,
"Timestep must be >= 0"
);
if
(
ntimestep
>
MAXBIGINT
)
error
->
all
(
FLERR
,
"Too big a timestep"
);
}
...
...
This diff is collapsed.
Click to expand it.
src/update.h
+
1
−
0
View file @
f46eb9de
...
...
@@ -51,6 +51,7 @@ class Update : protected Pointers {
void
create_integrate
(
int
,
char
**
,
char
*
);
void
create_minimize
(
int
,
char
**
);
void
reset_timestep
(
int
,
char
**
);
void
reset_timestep
(
bigint
);
bigint
memory_usage
();
private:
...
...
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