//#####################################################################
// Copyright 2016, Lin Huang, Craig Schroeder.
// This file is part of PhysBAM whose distribution is governed by the license contained in the accompanying file PHYSBAM_COPYRIGHT.txt.
//#####################################################################
// Class MPM_PROJECTION_VECTOR
//#####################################################################
#ifndef __MPM_PROJECTION_VECTOR__
#define __MPM_PROJECTION_VECTOR__

#include <Core/Arrays/ARRAY.h>
#include <Core/Krylov_Solvers/KRYLOV_VECTOR_BASE.h>
#include <Core/Vectors/VECTOR.h>
namespace PhysBAM{

template<class TV>
class MPM_PROJECTION_VECTOR:public KRYLOV_VECTOR_BASE<typename TV::SCALAR>
{
    typedef typename TV::SCALAR T;
public:
    ARRAY<T> v;

    MPM_PROJECTION_VECTOR();
    virtual ~MPM_PROJECTION_VECTOR();

    KRYLOV_VECTOR_BASE<T>& operator+=(const KRYLOV_VECTOR_BASE<T>& bv) override;
    KRYLOV_VECTOR_BASE<T>& operator-=(const KRYLOV_VECTOR_BASE<T>& bv) override;
    KRYLOV_VECTOR_BASE<T>& operator*=(const T a) override;
    void Copy(const T c,const KRYLOV_VECTOR_BASE<T>& bv) override;
    void Copy(const T c,const KRYLOV_VECTOR_BASE<T>& bv1,const KRYLOV_VECTOR_BASE<T>& bv2) override;
    int Raw_Size() const override;
    T& Raw_Get(int i) override;
    KRYLOV_VECTOR_BASE<T>* Clone_Default() const override;
    void Resize(const KRYLOV_VECTOR_BASE<T>& v) override;
    void Get(ARRAY_VIEW<T> a) const override;
    void Set(ARRAY_VIEW<const T> a) override;
    void Set_Zero() override;
//#####################################################################
};
}
#endif
