XIAN-FEM-2026June/3D opticsfem-master/test/interfaceClass.h

56 lines
2.3 KiB
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#pragma once
#include<vector>
#include<string>
struct FemInput
{
//物理场
int FemType;//有限元类型 0为本征模式问题1为本征频率问题2为激励问题根据选择求解问题类型决定
int EletricType;//求解场类型 0为电场1为散射场默认为0
int NbrBoundary;//边界数目 由几何决定
std::vector<int> BoundaryFlag;//边界对应边界条件 0为完美磁导体 1为完美电导体 2为散射边界条件 3为电场默认为0
/*
std::vector<double> E0x; //边界条件-电场 x分量 FemType=2时才存在默认为0
std::vector<double> E0y; //边界条件-电场 y分量 FemType=2时才存在默认为0
std::vector<double> E0z; //边界条件-电场 z分量 FemType=2时才存在默认为0
std::string Eincx; //边界条件-散射边界入射电场 x分量 FemType=2时才存在默认为0
std::string Eincy; //边界条件-散射边界入射电场 y分量 FemType=2时才存在默认为0
std::string Eincz; //边界条件-散射边界入射电场 z分量 FemType=2时才存在默认为0
double nx;//边界条件-散射边界入射电场 x方向 FemType=2时才存在默认为0
double ny;//边界条件-散射边界入射电场 y方向 FemType=2时才存在默认为0
std::string Ebx; //背景场-电场 x分量 ElectricType=1时开启默认为0
std::string Eby; //背景场-电场 y分量 ElectricType=1时开启默认为0
std::string Ebz; //背景场-电场 z分量 ElectricType=1时开启默认为0
int NbrDomainOfEb; //背景场-区域数目 ElectricType=1时开启默认为总区域数目
std::vector<int> DomainOfEb; //背景场-区域 ElectricType=1时开启默认为所有区域索引
*/
//材料
int NbrDomain; //区域数目
std::vector<double> epsilonr;//相对介电常数 数值默认为1
std::vector<double> mur;//相对磁导率 数值默认为1
std::vector<double> sigma;//电导率 数值默认为0
//网格数据
std::string MeshFile; //网格文件所在文件夹
//求解器
//本征求解器{分为 本征模式求解器 和 本征频率求解器}
int NbrMode;//模式数目 默认为6
int searchType;//搜索方式 0为附近搜索1为更大实部2为更小实部默认为0
double searchValue;//搜索值 本征模式时默认为1本征频率时默认为3e8
int solverType;//求解器类型 0为Krylov schur默认为0
/*
int maxIterNum;//最大迭代次数 默认值40
double tol;//误差 默认为le-6
int tolType;//误差类型 o为绝对值 1为相对值默认为0
//本征模式求解特有
double lambda0;//波长 默认为1.55e-6
//波长域求解器
*/
double lambda;//波长 默认为1.55e-6
//输出
std::string OutFile; //有限元输出文件夹
};