Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimizations #695

Merged
merged 12 commits into from
Jun 9, 2015
Merged

Optimizations #695

merged 12 commits into from
Jun 9, 2015

Conversation

endJunction
Copy link
Member

  • One very big optimization in vtk mesh conversion routine. See commit msg for details; in summary the ctest -E diff command needs around 10% less time.
  • Smaller optimization for boost::multi_index table: making comparison operator available for inlining indeed inlines the code. (around 1% overall improvement).
  • Replace MathLib::nomalize and fastpow with faster implementations.

The latter changes are touching a createMeshPropertiesFromASCRaster, which I could not test. It seems the code is not compiling at all. Probably I miss some special flags for cmake. (Thanks to Lars for fixing compilation)
Please test this.

Also the performance of VtkTextureOnSurfaceFilter should increase significantly. How can one check this? (and more important, that my changes do not break anything?) (:white_check_mark: Thanks Lars!)

@@ -120,7 +120,7 @@ void GMSHAdaptiveMeshDensity::getSteinerPoints (std::vector<GeoLib::Point*> & pn
if ((*it)->getDepth() + additional_levels > max_depth) {
additional_levels = max_depth - (*it)->getDepth();
}
const std::size_t n_pnts_per_quad_dim (MathLib::fastpow(2, additional_levels));
const std::size_t n_pnts_per_quad_dim = 1 << additional_levels;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Readability vs. optimization 😃

@TomFischer
Copy link
Member

🍰 🍺 🎸 or ⏩ Whatever you want.

@bilke
Copy link
Member

bilke commented Jun 8, 2015

  • see my PR.
  • VtkTextureOnSurfaceFilter works and is fast (did not check the difference) 😄
  • otherwise: 👍

@endJunction
Copy link
Member Author

Merged subPRs and rebased.
@TomFischer Would you please check the createMeshPropertiesFromASCRaster utility. It should be working now with Lars' changes pulled in.

@TomFischer
Copy link
Member

Fixed some issues in createMeshProperiesFromASCRaster.

endJunction and others added 11 commits June 9, 2015 12:15
In the conversion of a vtkUnstructuredGrid replace
the 5*(nr of elements) GetCell() calls with vtk's
provided function.

The 5*(nr of elements) GetCell() calls make around
50% of total instruction spent in
convertUnstructuredGrid().

For current groundwater flow simulation without the
linear solver call it makes around 1/6 of total
instructions.
This saves 16% of instructions in the
GroundwaterFlow::init() code due to faster access
in the multi-index table.
Replace two-pass method in
createMeshElemPropertiesFromASCRaster untility.
In particular use shift operation.
if(TARGET ..) only works if the target is defined before this statement
which was not the case. The OGS_BUILD_GUI variable is always defined.
@bilke
Copy link
Member

bilke commented Jun 9, 2015

👍

TomFischer added a commit that referenced this pull request Jun 9, 2015
@TomFischer TomFischer merged commit bb4a63a into ufz:master Jun 9, 2015
@TomFischer TomFischer deleted the Optimizations branch June 9, 2015 11:57
@ogsbot
Copy link
Member

ogsbot commented Jun 19, 2020

OpenGeoSys development has been moved to GitLab.

See this pull request on GitLab.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants