#include"Post_Base.h"

/*
2D_EigenMode
*/
void Post_2D_EigenMode::GetMesh(Mesh_2D* mesh)
{
	_mMesh = mesh;
}

void Post_2D_EigenMode::GetSolver(Solver_EigenMode* solver)
{
	_mSolver = solver;
}

void Post_2D_EigenMode::GetResult(Eigen::MatrixXcd* x, Eigen::VectorXcd* lambda)
{
	_mX = x;
	_mNeff = Eigen::VectorXcd::Zero(lambda[0].rows());
	for (int i = 0; i < lambda[0].rows(); i++)
		_mNeff(i) = lambda[0](i);
}

void Post_2D_Scatter::GetPhy(Phy_WaveOpticsModel* phy)
{
	_mPhy = phy;
}

/*
2D_EigenFreq
*/
void Post_2D_EigenFreq::GetMesh(Mesh_2D* mesh)
{
	_mMesh = mesh;
}

void Post_2D_EigenFreq::GetSolver(Solver_EigenFreq* solver)
{
	_mSolver = solver;
}

void Post_2D_EigenFreq::GetResult(Eigen::MatrixXcd* x, Eigen::VectorXcd* lambda)
{
	_mX = x;
	_mFreq= Eigen::VectorXcd::Zero(lambda[0].rows());
	for (int i = 0; i < lambda[0].rows(); i++)
		_mFreq(i) = lambda[0](i);
}

/*
2D_Scatter
*/
void Post_2D_Scatter::GetMesh(Mesh_2D* mesh)
{
	_mMesh = mesh;
}

void Post_2D_Scatter::GetSolver(Solver_LdaDom* solver)
{
	_mSolver = solver;
}

void Post_2D_Scatter::GetResult(Eigen::VectorXcd* x)
{
	_mX = x;
}

/*
3D_EigenFreq
*/
void Post_3D_EigenFreq::GetMesh(Mesh_3D* mesh)
{
	_mMesh = mesh;
}

void Post_3D_EigenFreq::GetSolver(Solver_EigenFreq* solver)
{
	_mSolver = solver;
}

void Post_3D_EigenFreq::GetResult(Eigen::MatrixXcd* x, Eigen::VectorXcd* lambda)
{
	_mX = x;
	_mFreq = Eigen::VectorXcd::Zero(lambda[0].rows());
	for (int i = 0; i < lambda[0].rows(); i++)
		_mFreq(i) = lambda[0](i);
}

/*
3D_Scatter
*/
void Post_3D_Scatter::GetMesh(Mesh_3D* mesh)
{
	_mMesh = mesh;
}

void Post_3D_Scatter::GetPhy(Phy_WaveOpticsModel* phy)
{
	_mPhy = phy;
}

void Post_3D_Scatter::GetResult(Eigen::VectorXcd* x)
{
	_mX = x;
}