Commit 8cf0bf1d authored by Xinhua Zhang's avatar Xinhua Zhang
Browse files

Fixed the Marco M_PI problem

parent 9ada9bc3
......@@ -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();
......
Supports Markdown
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