Skip to content
Snippets Groups Projects
Commit 611e1c43 authored by Chris Cantwell's avatar Chris Cantwell
Browse files

Merge branch 'fix/electrogram-z-coord' into 'master'

Fix zeroing of memory when getting coordinates in electrogram calculation.

See merge request nektar/nektar!1285
parents be9f98de 7ef5f96f
No related branches found
No related tags found
No related merge requests found
......@@ -54,6 +54,7 @@ v5.1.0
**CardiacEPSolver**
- Added additional parameter sets to Fenton-Karma model (!1119)
- Fix electrogram calculation in 1D/2D domains (!1285)
**IncNavierStokesSolver**
- Add Smoothed Profile Method (SPM) for the formulation of immersed boundaries
......
......@@ -172,20 +172,20 @@ void FilterElectrogram::v_Initialise(
m_grad_R_y = Array<OneD, Array<OneD, NekDouble> >(npts);
m_grad_R_z = Array<OneD, Array<OneD, NekDouble> >(npts);
Array<OneD, NekDouble> x(nq);
Array<OneD, NekDouble> y(nq);
Array<OneD, NekDouble> z(nq);
Array<OneD, NekDouble> oneOverR(nq, 0.0);
Array<OneD, NekDouble> oneOverR(nq);
for (unsigned int i = 0; i < npts; ++i)
{
m_grad_R_x[i] = Array<OneD, NekDouble>(nq);
m_grad_R_y[i] = Array<OneD, NekDouble>(nq);
m_grad_R_z[i] = Array<OneD, NekDouble>(nq);
m_grad_R_x[i] = Array<OneD, NekDouble>(nq, 0.0);
m_grad_R_y[i] = Array<OneD, NekDouble>(nq, 0.0);
m_grad_R_z[i] = Array<OneD, NekDouble>(nq, 0.0);
Array<OneD, NekDouble> x(nq, 0.0);
Array<OneD, NekDouble> y(nq, 0.0);
Array<OneD, NekDouble> z(nq, 0.0);
// Compute 1/R
m_electrogramPoints[i]->GetCoords(px,py,pz);
pFields[0]->GetCoords(x,y,z);
Vmath::Sadd (nq, -px, x, 1, x, 1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment