Skip to content
GitLab
Menu
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 {
...
@@ -67,14 +67,18 @@ namespace AMDiS {
public
:
public
:
void
setMatrix
(
const
Matrix
<
DOFMatrix
*>&
A
)
void
setMatrix
(
const
Matrix
<
DOFMatrix
*>&
A
)
{
{
int
ns
=
A
.
getSize
(),
size
=
A
[
0
][
0
]
->
getFESpace
()
->
getAdmin
()
->
getUsedSize
(),
int
ns
=
A
.
getSize
();
new_size
=
ns
*
size
;
std
::
vector
<
int
>
block_starts
(
ns
+
1
);
matrix
.
change_dim
(
new_size
,
new_size
);
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
);
DOFMatrix
::
inserter_type
ins
(
matrix
);
for
(
int
rb
=
0
;
rb
<
ns
;
++
rb
)
for
(
int
rb
=
0
;
rb
<
ns
;
++
rb
)
for
(
int
cb
=
0
;
cb
<
ns
;
++
cb
)
for
(
int
cb
=
0
;
cb
<
ns
;
++
cb
)
if
(
A
[
rb
][
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
;
}
const
DOFMatrix
::
base_matrix_type
&
getMatrix
()
const
{
return
matrix
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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