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.
70 lines
1.7 KiB
C++
70 lines
1.7 KiB
C++
#ifndef NMCALCULATIONPEBIGRID_H
|
|
#define NMCALCULATIONPEBIGRID_H
|
|
|
|
#include "nmCalculation_global.h"
|
|
#include <QVector>
|
|
#include <QPointF>
|
|
|
|
#include "pch.h"
|
|
|
|
#include <vtkUnstructuredGrid.h>
|
|
#include <vtkSmartPointer.h>
|
|
|
|
class NMCALCULATION_EXPORT nmCalculationPebiGrid
|
|
{
|
|
public:
|
|
static nmCalculationPebiGrid* getInstance();
|
|
nmCalculationPebiGrid();
|
|
~nmCalculationPebiGrid();
|
|
|
|
// 生成Pebi网格
|
|
bool meshGenPebi();
|
|
// 设置PEBI GridControl控制参数
|
|
void setGridControl(double gridControl);
|
|
// 清理单例中的网格输入输出数据
|
|
void clearGridData();
|
|
|
|
private:
|
|
// 边界
|
|
bool meshGenPebiBoundary(HX_NWTM_GRID_INPUT& inputObj);
|
|
// 井
|
|
bool meshGenPebiWells(HX_NWTM_GRID_INPUT& inputObj);
|
|
// 断层
|
|
bool meshGenPebiFault(HX_NWTM_GRID_INPUT& inputObj);
|
|
// 裂缝
|
|
bool meshGenPebiCrack(HX_NWTM_GRID_INPUT& inputObj);
|
|
|
|
// 生成vtk数据
|
|
void genPebiVTK(const HX_NWTM_GRID_OUTPUT1& P1, QString vtkDir);
|
|
|
|
// 根据网格输出结构体创建 vtkUnstructuredGrid 对象
|
|
vtkSmartPointer<vtkUnstructuredGrid> createPebiUnstructuredGrid(const HX_NWTM_GRID_OUTPUT1& P1);
|
|
|
|
// 日志输出
|
|
void logCurrentState();
|
|
void logInputParameters(const HX_NWTM_GRID_INPUT& input);
|
|
|
|
public:
|
|
// 仅生成输出参数p1、p2
|
|
bool generateOutputPara();
|
|
|
|
public:
|
|
// 获取输出结果
|
|
HX_NWTM_GRID_OUTPUT1 getGridOutput1();
|
|
HX_NWTM_GRID_OUTPUT2 getGridOutput2();
|
|
private:
|
|
// 静态对象
|
|
static nmCalculationPebiGrid* m_instance;
|
|
|
|
// 存储输出/输入参数
|
|
HX_NWTM_GRID_INPUT p0;
|
|
HX_NWTM_GRID_OUTPUT1 p1;
|
|
HX_NWTM_GRID_OUTPUT2 p2;
|
|
// 对应HX_NWTM_GRID_INPUT::GridControl
|
|
double m_dGridControl;
|
|
|
|
};
|
|
|
|
#endif // NMCALCULATIONPEBIGRID_H
|
|
|