// Scalar_Helmholtz - A linear solver for the scalar helmholtz equation
// Copyright (C) 2012-2026 Eric Bechet
//
// See the LICENSE file for license information.
// Please report all bugs and problems to <bechet@cadxfem.org>.

#ifndef _HELMHOLTZ_MULTLAG_H_
#define _HELMHOLTZ_MULTLAG_H_

#include <complex>
#include "helmholtz_xfem_domain.h"
#include "helmholtz_multlag_interfacedomain.h"
#include "levelSetDomain.h"
#include "scalar_helmholtz.h"
#include "helmholtz_multlag_domain.h"


class HelmholtzMultLagSolver : public ScalarHelmholtzSolver
{
protected :
  std::vector<genTerm<genTensor0<double >,0>::Handle> Field_ANA;
  std::vector<genTerm<genTensor0<double >,0>::Handle> Field_DIFF;
  std::vector<genTerm<genTensor0<double>,0>::Handle> Field_NUM;
  genDataHLS* DataHLS;
  std::vector<HelmholtzLevelsetDomain*> HLSdomains;
  std::vector<InterfaceDomain*> InterfaceDomains;
  std::vector<genFSpace<genTensor0<std::complex<double> > >::Handle> FSpaces;
  std::vector<genFSpace<genTensor0<std::complex<double> > >::Handle> FSpacesLag;
  std::vector<HelmholtzMultLagDomain*> HelmholtzMultLagDomains;
public :
HelmholtzMultLagSolver() : ScalarHelmholtzSolver()
    { 
      DataHLS = new genDataHLS; 
      Data = DataHLS;
      
    }
  virtual ~HelmholtzMultLagSolver();

  virtual void readInputFile(const std::string &fileName);
  
  virtual void CheckProperties();
  
  virtual void CreateFunctionSpace();
  
  virtual void BuildFunctionSpaces();
  
  virtual void AssembleRHS();
  
  virtual void AssembleLHS();
  
  
  void erreur();
  
  void errorlag();
  
  virtual PView *buildViewAna(const std::string &postFileName);
  virtual PView *buildViewDiff(const std::string &postFileName);
  virtual PView *buildViewNum(const std::string &postFileName);
};


#endif //_HELMHOTZ_MULTAG_H_