Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
VTK
Moment Invariants
Commits
8cf0bf1d
Commit
8cf0bf1d
authored
Feb 03, 2021
by
Xinhua Zhang
Browse files
Fixed the Marco M_PI problem
parent
9ada9bc3
Changes
1
Hide whitespace changes
Inline
Side-by-side
MomentInvariants/vtkMomentsHelper.cxx
View file @
8cf0bf1d
...
...
@@ -74,6 +74,10 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include
<algorithm>
// std::sort
#include
<vector>
#ifndef M_PI
#define M_PI vtkMath::Pi()
#endif
/**
* The monomial basis is not orthonormal. We need this function for the reconstruction of the
* function from the moments. This function uses Gram Schmidt
...
...
@@ -839,7 +843,7 @@ std::vector<int> getTensorIndicesFromFieldName(std::string name)
for
(
int
i
=
name
.
find
(
"x"
)
+
1
;
i
<
name
.
length
();
++
i
)
{
// std::cout<<i<<" :"<<name[i]<<"\n";
indices
.
push_back
(
(
int
)
(
name
[
i
]));
indices
.
push_back
(
static_cast
<
int
>
(
name
[
i
]));
}
return
indices
;
}
...
...
@@ -1223,7 +1227,7 @@ double vtkMomentsHelper::normalizationWeight(unsigned dimension, unsigned i0, un
* @return normalized moments
*/
std
::
vector
<
vtkMomentsTensor
>
&
vtkMomentsHelper
::
normalizeMoments
(
std
::
vector
<
vtkMomentsTensor
>
&
moments
)
{
unsigned
order
=
moments
.
size
();
unsigned
order
=
static_cast
<
int
>
(
moments
.
size
()
)
;
unsigned
dimension
=
moments
.
front
().
getDimension
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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