⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fdtd_1d_hzey_lorentz.h

📁 2Dfdtd算法
💻 H
字号:
// FDTD_1D_HzEy_LORENTZ.h: interface for the CFDTD_1D_HzEy_LORENTZ class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_FDTD_1D_HZEY_LORENTZ_H__A3F43E06_5925_4004_970E_5864CC77625C__INCLUDED_)
#define AFX_FDTD_1D_HZEY_LORENTZ_H__A3F43E06_5925_4004_970E_5864CC77625C__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CFDTD_1D_HzEy_LORENTZ  
{
protected:
	double *Ey_1D, *Hz_1D;

private:
	//the parameters of the FDTD algorithm
	double pi, eps_0, mu_0;
	
	double *Dy;
	double **Sy, **Sy_2, Sy_r;
	double *K_E1_a, *K_E1_b, *K_E2_a, *K_E2_b;
	double *K_a, *K_b, *K_c;

	int n_L_mat;
	double mu_r, eps_inf;
	
	int nx, n_PML; //the length of the computational space [cells]
	
	int source_type; //the type of the excitation
	double H0, t0, tw, omega, phi; //the parameters of the excitation
	double dx, dt;
	int i;

public:
	CFDTD_1D_HzEy_LORENTZ();
	virtual ~CFDTD_1D_HzEy_LORENTZ();

	BOOL Init_Main_Param_1D(int n_x, int n_pml, double *&par_mat,
		                    double d_t, double d_x);
	
	void Set_PML_Param_1D(double eps_r, double mu_r);
	
	void calc_Hz_1D(double t);
	void calc_Ey_1D();
	
	void Init_Gauss_1D(double H_0, double t_0, double t_w);
	void Init_Sinus_1D(double H_0, double om, double Phi);
	void Init_Wave_Packet_1D(double H_0, double t_0, double t_w, double om, double Phi);

	void Get_Data_1D(double *&X, double *&Y);

	void Free_Mem_1D();
};

#endif // !defined(AFX_FDTD_1D_HZEY_LORENTZ_H__A3F43E06_5925_4004_970E_5864CC77625C__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -