Commit 13b8c2d5 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

improve comments and line length

parent 5d5f2a1a
Pipeline #4343 passed with stage
in 49 minutes and 22 seconds
......@@ -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_;
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment