Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Backofen, Rainer
amdis
Commits
8e0d7493
Commit
8e0d7493
authored
May 05, 2009
by
Peter Gottschling
Browse files
Unterschiedliche Blockgroessen.
parent
60ef1112
Changes
1
Hide whitespace changes
Inline
Side-by-side
AMDiS/src/SolverMatrix.h
View file @
8e0d7493
...
...
@@ -67,14 +67,18 @@ namespace AMDiS {
public
:
void
setMatrix
(
const
Matrix
<
DOFMatrix
*>&
A
)
{
int
ns
=
A
.
getSize
(),
size
=
A
[
0
][
0
]
->
getFESpace
()
->
getAdmin
()
->
getUsedSize
(),
new_size
=
ns
*
size
;
matrix
.
change_dim
(
new_size
,
new_size
);
int
ns
=
A
.
getSize
();
std
::
vector
<
int
>
block_starts
(
ns
+
1
);
block_starts
[
0
]
=
0
;
for
(
int
i
=
0
;
i
<
ns
;
++
i
)
block_starts
[
i
+
1
]
=
block_starts
[
i
]
+
A
[
i
][
i
]
->
getFESpace
()
->
getAdmin
()
->
getUsedSize
();
matrix
.
change_dim
(
block_starts
[
ns
],
block_starts
[
ns
]);
DOFMatrix
::
inserter_type
ins
(
matrix
);
for
(
int
rb
=
0
;
rb
<
ns
;
++
rb
)
for
(
int
cb
=
0
;
cb
<
ns
;
++
cb
)
if
(
A
[
rb
][
cb
])
ins
[
rb
*
size
][
cb
*
size
]
<<
A
[
rb
][
cb
]
->
getBaseMatrix
();
ins
[
block_starts
[
rb
]][
block_starts
[
cb
]
]
<<
A
[
rb
][
cb
]
->
getBaseMatrix
();
}
const
DOFMatrix
::
base_matrix_type
&
getMatrix
()
const
{
return
matrix
;
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment