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
amdis
amdis-core
Commits
13b8c2d5
Commit
13b8c2d5
authored
Jul 11, 2020
by
Praetorius, Simon
Browse files
improve comments and line length
parent
5d5f2a1a
Changes
1
Hide whitespace changes
Inline
Side-by-side
amdis/BiLinearForm.hpp
View file @
13b8c2d5
...
...
@@ -129,15 +129,22 @@ namespace AMDiS
}
/// @}
/// Provide some additional information about the structure of the values of the pattern
/// Provide some additional information about the structure of the matrix pattern
/**
* If the symmetry structure is changed, it forces the matrix to
* rebuild its patterns.
**/
void
setSymmetryStructure
(
SymmetryStructure
symm
)
{
updatePattern_
=
(
symmetry_
!=
symm
);
// Force rebuild if symmetry structure changes
updatePattern_
=
(
symmetry_
!=
symm
);
symmetry_
=
symm
;
}
/// Set the symmetry structure using a string
void
setSymmetryStructure
(
std
::
string
str
)
{
setSymmetryStructure
(
symmetryStructure
(
str
));
}
void
setSymmetryStructure
(
std
::
string
str
)
{
setSymmetryStructure
(
symmetryStructure
(
str
));
}
/// Assemble the matrix operators on the bound element.
template
<
class
RowLocalView
,
class
ColLocalView
,
...
...
@@ -149,7 +156,16 @@ namespace AMDiS
/// Assemble all matrix operators, TODO: incorporate boundary conditions
void
assemble
();
/// Prepare the underlying matrix for insertion and rebuild the sparsity pattern if required
/// Prepare the underlying matrix for insertion and rebuild the sparsity pattern
/// if required.
/**
* The pattern is rebuild if either the parameter `forceRebuild` is set to true
* or if for some other reasons the internal flag `updatePattern_` is set.
* This might be the case if the symmetry structure is changed or the basis
* is updated.
*
* If the pattern is not updated, just the values are set to zero.
**/
void
init
(
bool
forcePatternRebuild
=
false
)
{
if
(
updatePattern_
||
forcePatternRebuild
)
...
...
@@ -163,7 +179,8 @@ namespace AMDiS
}
}
/// Set the updatePattern_ flag since the pattern must be rebuilt after a basis change
/// Set the flag that forces an update of the pattern since the underlying
/// basis that defines the indexset has been changed
void
updateImpl
(
event
::
adapt
e
,
index_t
<
0
>
i
)
override
{
updatePattern_
=
true
;
}
void
updateImpl
(
event
::
adapt
e
,
index_t
<
1
>
i
)
override
{
updatePattern_
=
true
;
}
...
...
@@ -181,7 +198,7 @@ namespace AMDiS
std
::
shared_ptr
<
ColBasis
const
>
colBasis_
;
private:
//
/
The pattern is rebuilt on calling init if this flag is set
// The pattern is rebuilt on calling init if this flag is set
bool
updatePattern_
;
};
...
...
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