Commit 45484692 authored by Andrew J. Burns (Cont's avatar Andrew J. Burns (Cont

fixed installation of Python libs and took care of polymorphism issue with std::floor

parent 5c29c742
...@@ -158,7 +158,7 @@ if(XDMF_WRAP_PYTHON) ...@@ -158,7 +158,7 @@ if(XDMF_WRAP_PYTHON)
install(FILES ${CMAKE_BINARY_DIR}/${python_name}.py install(FILES ${CMAKE_BINARY_DIR}/${python_name}.py
DESTINATION lib/python) DESTINATION lib/python)
install(TARGETS ${SWIG_MODULE_${python_name}_REAL_NAME} install(TARGETS ${SWIG_MODULE_${python_name}Python_REAL_NAME}
DESTINATION lib/python) DESTINATION lib/python)
endmacro(XDMF_SWIG_PYTHON) endmacro(XDMF_SWIG_PYTHON)
endif(XDMF_WRAP_PYTHON) endif(XDMF_WRAP_PYTHON)
......
...@@ -930,9 +930,9 @@ XdmfFunction::interlace(shared_ptr<XdmfArray> val1, shared_ptr<XdmfArray> val2) ...@@ -930,9 +930,9 @@ XdmfFunction::interlace(shared_ptr<XdmfArray> val1, shared_ptr<XdmfArray> val2)
if (((amountWritten * arrayRatio1) + i) < (int)val1->getSize()) { if (((amountWritten * arrayRatio1) + i) < (int)val1->getSize()) {
amountWritten++; amountWritten++;
} }
if (amountWritten > floor(val2->getSize()/arrayRatio2)) { if (amountWritten > floor(static_cast<double>(val2->getSize())/arrayRatio2)) {
arrayExcess1 += amountWritten - (int)floor(val2->getSize()/arrayRatio2); arrayExcess1 += amountWritten - (int)floor(static_cast<double>(val2->getSize())/arrayRatio2);
amountWritten = (int)floor(val2->getSize()/arrayRatio2); amountWritten = (int)floor(static_cast<double>(val2->getSize())/arrayRatio2);
} }
returnArray->insert(i, val1, i, amountWritten, stride, arrayRatio1); returnArray->insert(i, val1, i, amountWritten, stride, arrayRatio1);
} }
...@@ -942,9 +942,9 @@ XdmfFunction::interlace(shared_ptr<XdmfArray> val1, shared_ptr<XdmfArray> val2) ...@@ -942,9 +942,9 @@ XdmfFunction::interlace(shared_ptr<XdmfArray> val1, shared_ptr<XdmfArray> val2)
if (((amountWritten * arrayRatio2) + i) < (int)val2->getSize()) { if (((amountWritten * arrayRatio2) + i) < (int)val2->getSize()) {
amountWritten++; amountWritten++;
} }
if (amountWritten > floor(val1->getSize()/arrayRatio1)) { if (amountWritten > floor(static_cast<double>(val1->getSize())/arrayRatio1)) {
arrayExcess2 += amountWritten - (int)floor(val1->getSize()/arrayRatio1); arrayExcess2 += amountWritten - (int)floor(static_cast<double>(val1->getSize())/arrayRatio1);
amountWritten = (int)floor(val1->getSize()/arrayRatio1); amountWritten = (int)floor(static_cast<double>(val1->getSize())/arrayRatio1);
} }
returnArray->insert(i, val2, i-arrayRatio1, amountWritten, stride, arrayRatio2); returnArray->insert(i, val2, i-arrayRatio1, amountWritten, stride, arrayRatio2);
} }
......
Markdown is supported
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