Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PuReMD
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
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
SParTA
PuReMD
Commits
7add25ac
Commit
7add25ac
authored
8 years ago
by
Kurt A. O'Hearn
Browse files
Options
Downloads
Patches
Plain Diff
sPuReMD: add to print utils.
parent
a544b061
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
puremd_rc_1003/sPuReMD/print_utils.c
+30
-1
30 additions, 1 deletion
puremd_rc_1003/sPuReMD/print_utils.c
with
30 additions
and
1 deletion
puremd_rc_1003/sPuReMD/print_utils.c
+
30
−
1
View file @
7add25ac
...
...
@@ -744,6 +744,29 @@ void Print_Linear_System( reax_system *system, control_params *control,
fclose
(
out
);
sprintf
(
fname
,
"%s.H_sp%d.out"
,
control
->
sim_name
,
step
);
out
=
fopen
(
fname
,
"w"
);
H
=
workspace
->
H_sp
;
for
(
i
=
0
;
i
<
system
->
N
;
++
i
)
{
for
(
j
=
H
->
start
[
i
];
j
<
H
->
start
[
i
+
1
]
-
1
;
++
j
)
{
fprintf
(
out
,
"%6d%6d %24.15e
\n
"
,
workspace
->
orig_id
[
i
],
workspace
->
orig_id
[
H
->
entries
[
j
].
j
],
H
->
entries
[
j
].
val
);
fprintf
(
out
,
"%6d%6d %24.15e
\n
"
,
workspace
->
orig_id
[
H
->
entries
[
j
].
j
],
workspace
->
orig_id
[
i
],
H
->
entries
[
j
].
val
);
}
// the diagonal entry
fprintf
(
out
,
"%6d%6d %24.15e
\n
"
,
workspace
->
orig_id
[
i
],
workspace
->
orig_id
[
i
],
H
->
entries
[
j
].
val
);
}
fclose
(
out
);
/*sprintf( fname, "%s.b_s%d", control->sim_name, step );
out = fopen( fname, "w" );
for( i = 0; i < system->N; i++ )
...
...
@@ -814,8 +837,14 @@ void Print_Sparse_Matrix2( sparse_matrix *A, char *fname )
FILE
*
f
=
fopen
(
fname
,
"w"
);
for
(
i
=
0
;
i
<
A
->
n
;
++
i
)
{
for
(
j
=
A
->
start
[
i
];
j
<
A
->
start
[
i
+
1
];
++
j
)
fprintf
(
f
,
"%d%d %.15e
\n
"
,
A
->
entries
[
j
].
j
,
i
,
A
->
entries
[
j
].
val
);
{
//fprintf( f, "%d%d %.15e\n", A->entries[j].j, i, A->entries[j].val );
//Convert 0-based to 1-based (for Matlab)
fprintf
(
f
,
"%6d%6d %24.15e
\n
"
,
i
+
1
,
A
->
entries
[
j
].
j
+
1
,
A
->
entries
[
j
].
val
);
}
}
fclose
(
f
);
}
...
...
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