Commit 5f6999a8 authored by Chris Cantwell's avatar Chris Cantwell

Cleaned up FibreRegister code.

Moved QT4 search to ThirdParty module.
Tidied up other parts of cardiac solver code.
parent 65768a93
......@@ -160,6 +160,7 @@ INCLUDE (ThirdPartyFFTW)
INCLUDE (ThirdPartyArpack)
INCLUDE (ThirdPartyMPI)
INCLUDE (ThirdPartyVTK)
INCLUDE (ThirdPartyQT4)
IF( NEKTAR_USE_MKL )
INCLUDE (FindMKL)
......
# FFTW
OPTION(NEKTAR_USE_QT4
"Use QT4 for graphical tools and utilities." OFF)
IF( NEKTAR_USE_QT4 )
FIND_PACKAGE(Qt4 COMPONENTS QtCore QtGui REQUIRED)
INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS})
ENDIF( NEKTAR_USE_QT4 )
......@@ -8,6 +8,7 @@ library/CPackRPM.cmake
library/Demos/StdRegions/ExtraDemos
library/Demos/MultiRegions/ExtraDemos
solvers/ADR2DManifoldSolver
solvers/CardiacEPSolver/Utilities
solvers/FitzHughNagumoSolver
solvers/ImageWarpingSolver
solvers/PulseWaveSolver
......
......@@ -101,11 +101,6 @@ namespace Nektar
StdRegions::eVarCoeffD22
};
std::string varName = "intensity";
// std::string varCoeffs[3] = {
// "AnisotropicConductivityX",
// "AnisotropicConductivityY",
// "AnisotropicConductivityZ"
// };
std::string aniso_var[3] = {
"fx", "fy", "fz"
};
......@@ -128,7 +123,9 @@ namespace Nektar
EvaluateFunction(varName, vTemp, "IsotropicConductivity");
for (int i = 0; i < m_spacedim; ++i)
{
Vmath::Vmul(nq, vTemp, 1, m_vardiff[varCoeffEnum[i]], 1, m_vardiff[varCoeffEnum[i]], 1);
Vmath::Vmul(nq, vTemp, 1,
m_vardiff[varCoeffEnum[i]], 1,
m_vardiff[varCoeffEnum[i]], 1);
}
}
......@@ -175,7 +172,7 @@ namespace Nektar
}
}
}
// Apply fibre map (range 0 -> 1)
if (m_session->DefinesFunction("AnisotropicConductivity"))
{
......@@ -185,11 +182,15 @@ namespace Nektar
}
for (int i = 0; i < m_spacedim; ++i)
{
ASSERTL0(m_session->DefinesFunction("AnisotropicConductivity", aniso_var[i]),
"Function 'AnisotropicConductivity' not correctly defined.");
EvaluateFunction(aniso_var[i], vTemp, "AnisotropicConductivity");
//m_vardiff[varCoeffEnum[i]] = Array<OneD, NekDouble>(nq);
Vmath::Vmul(nq, vTemp, 1, m_vardiff[varCoeffEnum[i]], 1, m_vardiff[varCoeffEnum[i]], 1);
ASSERTL0(m_session->DefinesFunction("AnisotropicConductivity",
aniso_var[i]),
"Function 'AnisotropicConductivity' not correctly "
"defined.");
EvaluateFunction(aniso_var[i], vTemp,
"AnisotropicConductivity");
Vmath::Vmul(nq, vTemp, 1,
m_vardiff[varCoeffEnum[i]], 1,
m_vardiff[varCoeffEnum[i]], 1);
// Transform variable coefficient and write out to file.
m_fields[0]->FwdTrans_IterPerExp(m_vardiff[varCoeffEnum[i]],
......
SET(FR_SOURCES FibreRegister.cpp
MainWindow.cpp)
IF (NEKTAR_USE_VTK AND NEKTAR_USE_QT4)
SET(FR_SOURCES FibreRegister.cpp
MainWindow.cpp)
SET(QT_OBJECT_HEADERS MainWindow.h)
SET(QT_OBJECT_HEADERS MainWindow.h)
# Find QT4
FIND_PACKAGE(Qt4 COMPONENTS QtCore QtGui REQUIRED)
INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS})
QT4_WRAP_CPP(QT_OBJECT_HEADERS_MOC ${QT_OBJECT_HEADERS})
QT4_WRAP_CPP(QT_OBJECT_HEADERS_MOC ${QT_OBJECT_HEADERS})
ADD_EXECUTABLE(FibreRegister ${FR_SOURCES} ${QT_OBJECT_HEADERS_MOC})
TARGET_LINK_LIBRARIES(FibreRegister ${QT_LIBRARIES})
IF (NEKTAR_USE_VTK)
ADD_EXECUTABLE(FibreRegister ${FR_SOURCES} ${QT_OBJECT_HEADERS_MOC})
TARGET_LINK_LIBRARIES(FibreRegister ${QT_LIBRARIES})
TARGET_LINK_LIBRARIES(FibreRegister vtkCommon vtksys QVTK vtkViews vtkWidgets vtkRendering vtkIO)
ENDIF (NEKTAR_USE_VTK)
INSTALL(TARGETS FibreRegister
RUNTIME DESTINATION ${NEKTAR_BIN_DIR} COMPONENT solvers OPTIONAL)
INSTALL(TARGETS FibreRegister
RUNTIME DESTINATION ${NEKTAR_BIN_DIR} COMPONENT solvers OPTIONAL)
ENDIF (NEKTAR_USE_VTK AND NEKTAR_USE_QT4)
......@@ -139,8 +139,6 @@ vtkPolyData* LoadDataFile(string nxdxl) {
}
}
vtkDoubleArray* vCFAEMean = vtkDoubleArray::New();
while (!f.eof()) {
getline(f,input);
if (input.length() > 16 && input.substr(0,16) == "Exported seconds") {
......
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