#include"../Interface/FEM_Interface.h"

#include <fstream>
#include <iostream>
#include <string>

int main()
{
	std::ifstream fd("sbc3d.json");  // FemType=4 散射；本征请改为 eigen3d.json 并编译 eigen3D 目录
	if (!fd.is_open())
	{
		std::cout << "cannot open sbc3d.json" << std::endl;
		return -1;
	}
	std::string str((std::istreambuf_iterator<char>(fd)), std::istreambuf_iterator<char>());

	OpticsFEM_API femAPI;
	OpticsFEMData data;
	data.test1 = 1;
	data.test2 = 2;
	data.data = (char*)str.data();

	int ret = femAPI.OpticsFEM_All(data);
	std::cout << "OpticsFEM_All returned " << ret << std::endl;
	return ret;
}
