Commit a9581509 authored by bonnell's avatar bonnell
Browse files

Add windows libs for Xdmf.

Fix small compile error with Xdmf reader.

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@11520 18c085ea-50e0-402c-830e-de6fd14e8384
parent ff584fba
......@@ -34,6 +34,10 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
# DAMAGE.
#
# Modifications:
# Kathleen Bonnell, Thu May 27 17:01:22 MST 2010
# Windows builds can be handled the same as non-windows for XDMF.
#
#****************************************************************************/
# Use the XDMF_DIR hint from the config-site .cmake file
......@@ -41,11 +45,7 @@
INCLUDE(${VISIT_SOURCE_DIR}/CMake/SetUpThirdParty.cmake)
IF (WIN32)
SET_UP_THIRD_PARTY(XDMF lib/${VISIT_MSVC_VERSION} include Xdmf vtklibxml2)
ELSE (WIN32)
SET_UP_THIRD_PARTY(XDMF lib include Xdmf vtklibxml2)
ENDIF (WIN32)
SET_UP_THIRD_PARTY(XDMF lib include Xdmf vtklibxml2)
SET(XDMF_DIR ${XDMF_LIBRARY_DIR}/XdmfCMake)
FIND_PACKAGE(XDMF QUIET)
......@@ -74,3 +74,10 @@ ENDIF (NOT CMAKE_CL_64)
VISIT_OPTION_DEFAULT(VISIT_SILO_LIBDEP HDF5_LIBRARY_DIR hdf5dll ${VISIT_HDF5_LIBDEP})
##
## Xdmf
##
IF (NOT MSVC_VERSION LESS 1400)
VISIT_OPTION_DEFAULT(VISIT_XDMF_DIR ${VISITHOME}/Xdmf/${VISIT_MSVC_VERSION})
VISIT_OPTION_DEFAULT(VISIT_XDMF_LIBDEP HDF5_LIBRARY_DIR hdf5dll ${VISIT_HDF5_LIBDEP})
ENDIF (NOT MSVC_VERSION LESS 1400)
......@@ -450,18 +450,18 @@ std::vector<std::string> avtXdmfFileFormat::GetComponentNames(std::string attrib
int tensorLength = 0;
if (attributeType == XDMF_ATTRIBUTE_TYPE_TENSOR || attributeType == XDMF_ATTRIBUTE_TYPE_TENSOR6) {
tensorLength = (int) sqrt(numComponents);
tensorLength = (int) sqrt((float)numComponents);
}
for (int i = 0; i < numComponents; ++i) {
std::stringstream name;
if (attributeType == XDMF_ATTRIBUTE_TYPE_TENSOR || attributeType == XDMF_ATTRIBUTE_TYPE_TENSOR6) {
int padding = (int) log10(tensorLength) + 1;
int padding = (int) log10((float)tensorLength) + 1;
name << attributeName << "-" << setw(padding) << (int) (i / tensorLength) + 1 << "-" << setw(padding) << (i
% tensorLength) + 1;
}
else {
name << attributeName << "-" << setw((int) log10(numComponents) + 1) << i + 1;
name << attributeName << "-" << setw((int) log10((float)numComponents) + 1) << i + 1;
}
componentNames.push_back(name.str());
}
......@@ -1164,7 +1164,7 @@ avtXdmfFileFormat::GetVectorVar(int timestate, int domain, const char *varname)
// Read in the array
if (attribute->GetAttributeType() == XDMF_ATTRIBUTE_TYPE_TENSOR6) {
// Rearrange Components to Make Square Matrix
int tensorSize = (int)sqrt(this->GetNumberOfSymmetricalTensorComponents(numXdmfComponents));
int tensorSize = (int)sqrt((float)this->GetNumberOfSymmetricalTensorComponents(numXdmfComponents));
if(tensorSize == 0)
{
EXCEPTION1(InvalidVariableException, varname);
......
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