Repository navigation
Improvement in shape function computation - #38
Merged
Merged
Conversation
| \param num_sample_gs_pnts Number of sample Gauss points. | ||
| */ | ||
| ShapeFunctionPool(const std::vector<MshElemType::type>& elem_types, | ||
| CElement& quadrature, const int num_sample_gs_pnts); |
Contributor
There was a problem hiding this comment.
Why is CElement object named quadrature?
Member
Author
There was a problem hiding this comment.
The name of CElement is not proper, the class actually provides the computation of shape functions and their derivatives etc. Therefore I the second argument is named as quadrature.
wenqing
force-pushed
the
shapefct_cache
branch
3 times, most recently
from
April 29, 2016 14:34
ec6186e to
7aa8974
Compare
| Stiff_Bulirsch-Stoer.cpp | ||
| tools.cpp | ||
| vtk.cpp | ||
| ShapeFunctionPool.h |
Contributor
|
@wenqing This PR looks ok besides one minor comment. Have you checked why Jenkins is failing? |
Member
Author
|
@norihiro-w Jenkin falied in the result comparison. Almost all results of the benchmarks have tiny difference against their references. I have checked these results, which look good. I wonder whether we should ask the people in charge of the benchmarks for a quick verification. |
wenqing
force-pushed
the
shapefct_cache
branch
3 times, most recently
from
May 6, 2016 12:46
639147e to
802dee1
Compare
This was referenced May 6, 2016
Contributor
|
Jenkins, test this please! |
…ape function calculation
Member
Author
|
@norihiro-w Rebased. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In the previous versions, the computations of shape functions are conducted within the local assembly over each element, which is redundant for the elements with the same type.
In this PR, a class is introduced for computing shape functions N and their derivatives with respect to the local coordinates d N /d xi. The class is used to compute N and d N /d xi at each integration points of all involved element types in a FEM computation, and it also holds all the computation results for later usage in the process of Neumann BC and the local assembly. During the local assembly, the derivatives of shape functions with respect to the global local coordinates are computed and cached before any numerical integration happens. By this way,
For the problem with big mesh or many time steps, the speedup of this improvement vs the previous versions could be distinct (20% has been reported).
Since all local shape function computations have been replaced with the cached data acquisition, all benchmarks give tiny errors in their results against to that obtained by the previous versions.