You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
AppFlow/FITK_Interface/FITKInterfaceFlowOF/FITKOFSolution.h

255 lines
8.1 KiB
C

/**********************************************************************
* @file FITKOFSolution.h
* @brief solution
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-08-22
*********************************************************************/
#ifndef _FITK_OF_SOLUTION_H___
#define _FITK_OF_SOLUTION_H___
#include "FITKInterfaceFlowOFAPI.h"
#include "FITK_Kernel/FITKCore/FITKAbstractNDataObject.h"
#include "FITKOFEnum.hpp"
namespace Core
{
class FITKParameter;
}
namespace Interface
{
class FITKOFAbsSolutionSolver;
/**
* @brief
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-09-03
*/
class FITKInterfaceFlowOFAPI FITKOFAlgebraicEquationsPara
{
public:
explicit FITKOFAlgebraicEquationsPara();
virtual ~FITKOFAlgebraicEquationsPara();
/**
* @brief
* @return QString
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-09-03
*/
QString getVariableName();
/**
* @brief solver
* @return FITKOFAbsSolutionSolver *
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-09-03
*/
FITKOFAbsSolutionSolver* getSolutionSolver();
/**
* @brief
* @return Core::FITKParameter *
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-09-03
*/
Core::FITKParameter* getSolverAdditionalPara();
/**
* @brief
* @param[i] vname
* @return void
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-09-03
*/
void setVariableName(QString vname);
/**
* @brief solver
* @param[i] solver
* @return void
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-09-03
*/
void setSolutionSolver(FITKOFAbsSolutionSolver* solver);
/**
* @brief
* @param[i] para
* @return void
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-09-03
*/
void setSolverAdditionalPara(Core::FITKParameter* para);
private:
/**
* @brief
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-09-03
*/
QString _variableName{};
/**
* @brief
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-09-03
*/
FITKOFAbsSolutionSolver* _solver{};
/**
* @brief
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-09-03
*/
Core::FITKParameter* _solverAdditionalPara{};
};
/**
* @brief Solution
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-08-21
*/
class FITKInterfaceFlowOFAPI FITKOFSolution : public Core::FITKAbstractNDataObject
{
Q_OBJECT
FITKCLASS(Interface, FITKOFSolution);
public:
explicit FITKOFSolution();
virtual ~FITKOFSolution();
void onlyKeepSolvers(QStringList nameList);
void onlyKeepResiduals(QStringList nameList);
/**
* @brief solver
* @return int
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-08-22
*/
int getSolversCount();
/**
* @brief solver
* @param[i] index
* @return FITKOFAlgebraicEquationsPara *
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-08-22
*/
FITKOFAlgebraicEquationsPara* getSolverVariablePara(int index);
/**
* @brief
* @return QString
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-08-22
*/
QString getSolverSpeciallyDataName();
/**
* @brief
* @return Core::FITKParameter*
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-08-22
*/
Core::FITKParameter* getSolverSpeciallyDataPara();
/**
* @brief Residuals
* @return int
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-08-22
*/
int getResidualsCount();
/**
* @brief Residuals
* @param[i] index
* @return QString
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-08-22
*/
QString getResidualVariableName(int index);
/**
* @brief Residuals
* @param[i] index
* @return Core::FITKParameter *
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-08-22
*/
Core::FITKParameter* getResidualVariablePara(int index);
/**
* @brief Relaxation
* @return Core::FITKParameter *
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-08-22
*/
Core::FITKParameter* getRelaxation();
/**
* @brief Limits
* @return Core::FITKParameter *
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-08-22
*/
Core::FITKParameter* getLimits();
/**
* @brief Solver
* @param[i] vname
* @param[i] vpara
* @return void
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-08-22
*/
void appendSolutionSolver(FITKOFAlgebraicEquationsPara* vpara);
/**
* @brief
* @param[i] name
* @param[i] para
* @return void
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-08-22
*/
void setSpeciallyData(QString name, Core::FITKParameter* para);
/**
* @brief Residual
* @param[i] name
* @param[i] para
* @return void
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-08-23
*/
void setResidualData(QString name, Core::FITKParameter* para);
/**
* @brief Residuals
* @param[i] name
* @param[i] calcName
* @return void
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-08-22
*/
void initAppendResidual(QString name, QString calcName = QString());
private:
private:
/**
* @brief
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-08-22
*/
QList<FITKOFAlgebraicEquationsPara*> _solvers{};
/**
* @brief < >
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-08-22
*/
QPair<QString, Core::FITKParameter*> _speciallyData{};
/**
* @brief residuals
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-08-22
*/
QList<QPair<QString, Core::FITKParameter*>> _residuals{};
/**
* @brief Relaxation
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-08-22
*/
Core::FITKParameter* _relaxation{};
/**
* @brief limits
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-08-22
*/
Core::FITKParameter* _limits{};
};
}
#endif