FS#271 Stokes: replace unnecessary loops over FieldVector entries
Metadata
Property | Value |
---|---|
Project | dumux |
Category | General |
Reported by | Bernd Flemisch (bernd@iws.uni-stuttgart.de) |
Reported at | Jul 1, 2015 09:57 |
Type | Feature Request |
Version | Git |
Last edited by | Bernd Flemisch (bernd@iws.uni-stuttgart.de) |
Last edited at | Jul 30, 2015 09:50 |
Closed by | Bernd Flemisch (bernd@iws.uni-stuttgart.de) |
Closed at | Jul 30, 2015 09:50 |
Closed in version | 2.8 |
Resolution | Implemented |
Description
Within Stokes, there are several loops like
for (int dimIdx = 0; dimIdx<dim; ++dimIdx)
{
tmp = face().grad[idx];
tmp *= elemVolVars[idx].velocity()[dimIdx];
velocityGrad_[dimIdx] += tmp;
}
which can be replaced by FieldVector functionality
auto tmp = face().grad[idx];
tmp *= elemVolVars[idx].velocity();
velocityGrad_ += tmp;