Commit f79bf1e3 authored by Chris Cantwell's avatar Chris Cantwell
Browse files

Fixed overwritten array bug in reading diffusion tensor in cardiac solver.

Fixed error with session reader initialisation in VtkToFld.


git-svn-id: https://gforge.sci.utah.edu/svn/nektar/trunk@4006 305cdda6-5ce1-45b3-a98d-dfc68c8b3305
parent 325fd9d1
......@@ -265,7 +265,6 @@ namespace Nektar
{
vVarCoeffMap[x->first] = x->second + cnt;
}
cnt += vExp->GetTotPoints();
}
LocalRegions::MatrixKey matkey( m_linSysKey.GetMatrixType(),
......@@ -307,7 +306,7 @@ namespace Nektar
const DNekMatSharedPtr& GlobalLinSys::v_GetGmat(void) const
{
NEKERROR(ErrorUtil::efatal,"Method does not exist for this shape" );
return NullDNekMatSharedPtr;
return NullDNekMatSharedPtr;
}
} //end of namespace
......
......@@ -101,14 +101,16 @@ namespace Nektar
"AnisotropicConductivityY",
"AnisotropicConductivityZ"
};
int nq = m_fields[0]->GetNpoints();
Array<OneD, NekDouble> vTemp;
if (m_session->DefinesFunction("IsotropicConductivity"))
{
EvaluateFunction(varName, vTemp, "IsotropicConductivity");
for (int i = 0; i < m_spacedim; ++i)
{
m_vardiff[varCoeffEnum[i]] = vTemp;
m_vardiff[varCoeffEnum[i]] = Array<OneD, NekDouble>(nq);
Vmath::Vcopy(nq, vTemp, 1, m_vardiff[varCoeffEnum[i]], 1);
}
}
else if (m_session->DefinesFunction(varCoeffs[0]))
......@@ -118,7 +120,8 @@ namespace Nektar
ASSERTL0(m_session->DefinesFunction(varCoeffs[i], varName),
"Function '" + varCoeffs[i] + "' not correctly defined.");
EvaluateFunction(varName, vTemp, varCoeffs[i]);
m_vardiff[varCoeffEnum[i]] = vTemp;
m_vardiff[varCoeffEnum[i]] = Array<OneD, NekDouble>(nq);
Vmath::Vcopy(nq, vTemp, 1, m_vardiff[varCoeffEnum[i]], 1);
}
}
......@@ -131,7 +134,6 @@ namespace Nektar
if (m_session->DefinesParameter("d_min"))
{
// Normalise and invert
int nq = m_fields[0]->GetNpoints();
NekDouble f_min = m_session->GetParameter("d_min");
NekDouble f_max = m_session->GetParameter("d_max");
NekDouble f_range = f_max - f_min;
......
......@@ -56,7 +56,7 @@ int main(int argc, char* argv[])
vFilenames.push_back(std::string(argv[1]));
LibUtilities::SessionReaderSharedPtr vSession
= LibUtilities::SessionReader::CreateInstance(argc, argv, vFilenames);
= LibUtilities::SessionReader::CreateInstance(2, argv, vFilenames);
try
{
......
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