I am using something like

//struct has variable
Array<OneD, Array<OneD, NekCDouble> > m_unsteady;


// so the code instantiates
 struct->m_complexArray = <OneD, Array<OneD, std::complex<NekDouble> > > (npts);
Array<OneD, Array<OneD, std::complex<NekDouble>  > > ukwbc(npts);

for (i = 0, i<npts; i++)
{
    ukwbc[i] = Array<OneD, std::complex<NekDouble> > (M-1);
    variable[i] = Array<OneD, std::complex<NekDouble> > (M-1);
    
    for(k = 0; k < M-1; ++k)
    {
        ukwbc[i][k] = std::complex<NekDouble>  (5.0, 1.0);
    }
    Vmath::Vcopy(M-1, ukwbc[i], 1, variable[i],1);
}

regards,
~Kurt






On Wed, Mar 22, 2017 at 7:36 AM, David Moxey <d.moxey@imperial.ac.uk> wrote:
Hi Kurt,

Can you supply the datatypes and function call from where you are calling the Vcopy routine? On the face of things, it would seem that the Vmath declaration is okay, unless I'm missing something obvious.

Cheers,

Dave

> On 21 Mar 2017, at 19:17, Kurt Sansom <kayarre@gmail.com> wrote:
>
> I am trying to implement Vcopy for complex data type. What I started with was adding this line to Vmath.cpp in the template section.
>
> line 1082
>
> template  LIB_UTILITIES_EXPORT void  Vcopy( int n, const std::complex<Nektar::NekDouble> *x, const int incx, std::complex<Nektar::NekDouble> *y, const int incy);
>
> but that seems to be insufficient because it compiles but gives the following error:
>
> dyld: Symbol not found: __ZN5Vmath5VcopyINSt3__17complexIdEEEEviPKT_iPS4_i
>
>
> I started looking at how the coefficients are handled in the FFT section, but It wasn't directly clear what the best approach to copying an array of complex numbers would be?
>
> Regards,
>   ~Kurt
>
> --
> Kurt Sansom
> Research Assistant
> Cardiovascular and Multiphase Flow Lab
> University of Washington
> _______________________________________________
> Nektar-users mailing list
> Nektar-users@imperial.ac.uk
> https://mailman.ic.ac.uk/mailman/listinfo/nektar-users




--
Kurt Sansom