Compare commits

..

20 Commits

Author SHA1 Message Date
lh dfe628e19b feat(nmNum): 接入 HX_NWTM 绘图接口并移除旧曲线库
- 使用 HX_NWTM_PLOT 生成双对数和半对数曲线
- 预初始化输出矩阵,修复打开数值解时的访问冲突
- 统一 HX_NWTM 接口调用锁并增加输入输出校验
- 移除 singlePhaseSolverDll 的代码及工程依赖
- 更新 HX_NWTM DLL、头文件和导入库
1 week ago
lh 78d5f934cd fix(nmNum): 修复井删除及页签销毁时的崩溃 2 weeks ago
lh 553ae6a488 build(vtk): 清理未使用的头文件和导入库 2 weeks ago
lh 4137b83146 build(vtk): 补充精简运行库及第三方交付材料 2 weeks ago
lh 523765976f build(i18n): 重新生成合并后的数值模块中文翻译 2 weeks ago
lh 7188383ff7 Merge branch 'feature/nmNum-postprocessing-view-20260910' into develop
# Conflicts:
#	Src/nmNum/nmSubWnd/nmSubWndUtils.cpp
2 weeks ago
lvjunjie 4583e657cf fix(nmNum): 补齐气井目标历史曲线的拟压力转换
- 复用框架 calPS 接口和所属分析窗口配置,转换气井目标曲线的双对数、半对数计算输入
- 生成结果及开始自动拟合前刷新气井历史缓存,避免继续使用未转换的目标曲线
- 保留原始历史压力,转换失败时清除旧曲线有效标记,无曲线计算条件时跳过转换
3 weeks ago
lvjunjie 13a7318267 Merge branch 'feature/Adapt-Autofit-20260904' into develop
# Conflicts:
#	Bin/Config/Lang/cn/nmNum_cn.qm   resolved by develop version
3 weeks ago
lvjunjie ee3bf4f692 fix(nmNum): 误差计算跳过负导数和零导数数据,调整结果生成阶段按钮内容,同步更新中文翻译。 3 weeks ago
lvjunjie 1968c790bc fix(nmNum): 统一自动拟合目标曲线读取来源
油、气、水井统一读取所选目标井的历史双对数曲线,移除气井从主界面读取曲线的逻辑及结果井一致性提示。
3 weeks ago
lvjunjie c3297259b2 fix(nmNum): LM 模式下禁用 PSO 加速选项
- 选择 LM 时置灰 PSO 加速标签和下拉框

- 切回 PSO 时恢复可用状态并保留原选择
3 weeks ago
lvjunjie 6dd776ebc7 fix(nmNum): 将拟合停止按钮文案缩短为正在停止 3 weeks ago
lvjunjie 19c7c7cf02 fix(nmNum): 修复 LM 等待求解时停止按钮无法响应
- 等待 DLL 求解期间处理鼠标和键盘事件,使停止按钮能够响应
- 移除停止函数中的阻塞等待,登记停止请求后立即返回
- 用户停止改用协作取消接口,等待 DLL 返回后丢弃本次结果,避免强制终止线程破坏内部锁
3 weeks ago
lvjunjie ec384f7483 fix(nmNum): 移除储层厚度及压缩系数的自动拟合功能
- 删除厚度、综合压缩系数 Ct、岩石压缩系数 Cf 的拟合控件、选择标志、上下界及配置读写代码
- 同步精简 LM、PSO 参数向量,调整剩余参数索引、初值读取和拟合结果回写
- 更新拟合记录字段及元数据版本,保持参数名称与索引一致
- 保留厚度、Ct、Cf 作为求解器和代理模型的固定输入,拟合过程不再调整
3 weeks ago
lvjunjie 586a40df5c fix(numerical): 捕获网格访问违例
- 为网格 DLL 调用增加访问违例捕获,异常时返回生成失败
- 失败时清理临时网格文件并释放 DLL,保留已有成果
- 启用 LM 拟合诊断轨迹
4 weeks ago
lvjunjie b7148fcfc9 过滤自动拟合目标井列表
- 默认显示当前分析主井
- 仅显示“包含其他井”中已勾选的井
- 过滤缺少有效流量或压力数据的包含井
4 weeks ago
lvjunjie 073db447a3 拟合相关翻译 4 weeks ago
lvjunjie 27256f9c59 fix(numerical): 修复停止拟合后结果未刷新
- LM 和 PSO 停止优化后保留当前最优参数并执行最终完整求解
- 最终求解成功后提交正式结果快照并刷新主界面
- 增加最终结果生成状态,避免重复停止及未提交快照时误报成功
4 weeks ago
lvjunjie b9181b9dce fix(numerical): 修复自动拟合结果未刷新
- LM 和 PSO 通过正式结果快照刷新主界面
- PSO 最优参数落地后补充最终完整求解与快照提交
- 区分快照发布、结果井切换与手工生成刷新流程
1 month ago
lvjunjie 77bd6cd4e9 fix(numerical): 修复拟合后井参数无法修改
- LM 和 PSO 通过参数副本更新现有井属性
- 避免整井赋值重建射孔并导致参数绑定失效
- 保存拟合初值及拟合结束后刷新 PEBI 参数面板
1 month ago

@ -49,12 +49,9 @@ include 和 compat。直接交付整个目录已经覆盖这些内容。
lib MSVC x86 导入库
bin 运行库及自动部署来源
nmSubWxs 工程已经默认启用以下构建配置:
CONFIG += nm_ffmpeg_video_export
启用后,qmake 会检查头文件、导入库、兼容头和四个运行库;链接完成后
自动将四个 DLL 复制到当前 Debug 或 Release 输出目录。
nmSubWxs 工程通过 Src4/ffmpeg.pri 默认启用FFmpeg视频导出并链接上述
四个导入库。当前工程不在链接完成后自动复制DLL;制作开发或运行环境时,
应将四个运行DLL分别预置到 Bin/Debug 和 Bin/Release 中。
四、不要混入的旧文件
--------------------

Binary file not shown.

@ -0,0 +1,128 @@
#pragma once
#ifdef _WIN32
# ifdef ACCELWT_DLL_EXPORTS
# define ACCELWT_API __declspec(dllexport)
# else
# define ACCELWT_API __declspec(dllimport)
# endif
#else
# define ACCELWT_API
#endif
#ifdef __cplusplus
extern "C" {
#endif
enum AccelWTStatus
{
ACCELWT_STATUS_SUCCESS = 0,
ACCELWT_STATUS_INVALID_ARGUMENT = 1,
ACCELWT_STATUS_CREATE_FAILED = 2,
ACCELWT_STATUS_SETUP_FAILED = 3,
ACCELWT_STATUS_SOLVE_FAILED = 4,
ACCELWT_STATUS_NOT_CONVERGED = 5,
ACCELWT_STATUS_UNSUPPORTED_BACKEND = 6
};
typedef struct AccelWTSolveOptions
{
int max_iter;
double rel_tol;
double abs_tol;
int ilu_jacobi_iters;
int omp_threads;
int use_initial_guess;
} AccelWTSolveOptions;
typedef struct AccelWTSolveInfo
{
int iterations;
double final_rel_residual;
double setup_seconds;
int status;
} AccelWTSolveInfo;
typedef struct AccelWTDatasetOptions
{
const char *dataset_dir;
int lagged_ilu_k;
int lagged_ilu_max_iters;
int solve_omp_threads;
int host_residual_interval;
int print_progress;
} AccelWTDatasetOptions;
typedef struct AccelWTDatasetSummary
{
int num_steps;
int total_solves;
int early_exit_steps;
int ilu_refresh_steps;
int ilu_lagged_reuse_steps;
int not_converged_steps;
long long total_iterations;
double time_read_t;
double time_read_b;
double time_read_a;
double time_csr;
double time_create;
double time_prepare_step;
double time_solve;
double time_total;
double avg_prepare_ms;
double avg_solve_ms;
int status;
} AccelWTDatasetSummary;
ACCELWT_API const char *accelwt_backend_name(void);
ACCELWT_API void accelwt_default_options(AccelWTSolveOptions *options);
ACCELWT_API void accelwt_default_dataset_options(AccelWTDatasetOptions *options);
ACCELWT_API int accelwt_solve_csr(int n,
int nnz,
const int *row_ptr,
const int *col_ind,
const double *values,
const double *b,
double *x,
const AccelWTSolveOptions *options,
AccelWTSolveInfo *info);
ACCELWT_API int accelwt_solve_csr_cpu(int n,
int nnz,
const int *row_ptr,
const int *col_ind,
const double *values,
const double *b,
double *x,
const AccelWTSolveOptions *options,
AccelWTSolveInfo *info);
ACCELWT_API int accelwt_solve_csr_cuda(int n,
int nnz,
const int *row_ptr,
const int *col_ind,
const double *values,
const double *b,
double *x,
const AccelWTSolveOptions *options,
AccelWTSolveInfo *info);
ACCELWT_API int accelwt_solve_dataset_cpu(const char *dataset_dir,
const AccelWTDatasetOptions *options,
AccelWTDatasetSummary *summary);
ACCELWT_API int accelwt_solve_dataset_cuda(const char *dataset_dir,
const AccelWTDatasetOptions *options,
AccelWTDatasetSummary *summary);
ACCELWT_API int accelwt_solve_dataset(const char *dataset_dir,
const AccelWTDatasetOptions *options,
AccelWTDatasetSummary *summary);
#ifdef __cplusplus
}
#endif

@ -14,13 +14,12 @@
#include <iomanip>
#include <unordered_set>
#include <Windows.h>
#include "accelwt_solver_api.h"
#include "accelwt_cpu.h"
#include <cstdio>
#ifndef M_PI
const double M_PI = acos(-1.0);
#endif
typedef std::vector<std::vector<std::vector<double>>>dVec3; //三维数组:double
typedef std::vector<std::vector<double>>dVec2; //二维数组:double
typedef std::vector<std::vector<int>>iVec2; //二维数组:int
@ -169,7 +168,7 @@ struct HX_NWTM_GRID_INPUT
d[0] = -200; d[1] = -200; d[2] = 200; d[3] = -200; d[4] = 0.05; d[5] = 0; FractureVerticalWell[0] = d;
MultistageFracturedHorizontalWell.resize(1);
MultistageFracturedHorizontalWell[0].resize(3, dVec1(5));
MultistageFracturedHorizontalWell[0].resize(3, dVec1(6));
d[0] = -600; d[1] = 600; d[2] = -400; d[3] = 600; d[4] = 0.1; d[5] = 0; MultistageFracturedHorizontalWell[0][0] = d;
d[0] = -600; d[1] = 400; d[2] = -400; d[3] = 400; d[4] = 0.1; d[5] = 0; MultistageFracturedHorizontalWell[0][1] = d;
d[0] = -600; d[1] = 200; d[2] = -400; d[3] = 200; d[4] = 0.1; d[5] = 0; MultistageFracturedHorizontalWell[0][2] = d;
@ -473,13 +472,19 @@ struct HX_NWTM_MODEL_OUTPUT
~HX_NWTM_MODEL_OUTPUT() {}
};
struct HX_PLOT_DATA
{
dVec2 loglog; //双对数数据loglog[0]:时间差,loglog[1]:压力差,loglog[2]:压力差导数
dVec2 semilog; //半对数数据semilog[0]:时间差,semilog[1]:压力
};
HX_API void HX_NWTM_GRID(HX_NWTM_GRID_OUTPUT1& p1, HX_NWTM_GRID_OUTPUT2& p2, const HX_NWTM_GRID_INPUT& p0, std::string LIC); //数值试井网格接口
HX_API void HX_NWTM_KRINGING(HX_KRING_OUTPUT& p1, const HX_KRING_INPUT p0, std::string LIC); //数值试井非均质性计算接口
HX_API void HX_NWTM_MODEL(HX_NWTM_MODEL_OUTPUT& p1, const HX_NWTM_MODEL_INPUT& p0, std::string LIC); //数值试井模型求解器接口
HX_API void HX_NWTM_PLOT(HX_PLOT_DATA& res, const dVec2& Rate, const dVec2& Press, const double tmin, const double tmax, std::string LIC);//数值试井绘图接口
HX_API void set_omp_threads(int n);
HX_API void set_ilu_reuse_steps(int n);
HX_API int getPEBInum();
HX_API int getsolvetime();
HX_API void set_solvetype(int n);

Binary file not shown.

Binary file not shown.

@ -148,7 +148,7 @@ int main()
std::cout << solvetypename[type] << "\n";
int threads ;
if (solvetype[type] == 1) {
threads = 5;
threads = 1;
}
else if (solvetype[type] == 2) {
threads = 1;
@ -157,7 +157,7 @@ int main()
{
set_omp_threads(omp_threads[thr]);
std::cout << omp_threads[thr] << "线程测试\n";
for (int iiii = 0; iiii < 8; ++iiii)
for (int iiii = 0; iiii < 1; ++iiii)
{
welltype = WT[iiii];
flowtype = FT[iiii];
@ -442,7 +442,7 @@ int main()
p3.CS.C.resize(1);
p3.CS.C[0] = 0.1;
p3.CS.S.resize(1);
p3.CS.S[0] = 0.1;
p3.CS.S[0] = -0.87;
p3.PVT.p = dVec1(200, 0); for (int i = 0; i < 200; ++i) { p3.PVT.p[i] = (i + 1.0); }
p3.PVT.Bw = dVec1(200, 1.05);//所有数为一个值
p3.PVT.miuw = dVec1(200, 0.8);//所有数为一个值
@ -624,18 +624,18 @@ int main()
std::cout << " " << name[iiii] << ":" << getPEBInum() << "," << getsolvetime() << "ms\n";
//数据导出
/*dVec2 pwf;
for (int i = 0; i < p4.t.size(); ++i) {
dVec1 a;
a.resize(p4.pw.size() + 1);
a[0] = p4.t[i];
for (int j = 1; j < a.size(); ++j) {
a[j] = p4.pw[j - 1][i];
}
pwf.push_back(a);
}
std::string filename = solvetypename[type] + name[iiii] + "pwf.csv";
Write2DVectorToCSV(pwf, filename);*/
//dVec2 pwf;
//for (int i = 0; i < p4.t.size(); ++i) {
// dVec1 a;
// a.resize(p4.pw.size() + 1);
// a[0] = p4.t[i];
// for (int j = 1; j < a.size(); ++j) {
// a[j] = p4.pw[j - 1][i];
// }
// pwf.push_back(a);
//}
//std::string filename = solvetypename[type] + name[iiii] + "pwf.csv";
//Write2DVectorToCSV(pwf, filename);
/* Write1DVectorToCSV(p4.t, "t.csv");
Write2DVectorToCSV(p4.pw, "pw.csv");

@ -0,0 +1,12 @@
# Keep the prebuilt dependency and corresponding source despite repository-wide
# compiler-output ignore rules.
!bin/
!bin/**
!lib/
!lib/**
!libd/
!libd/**
!source/
!source/**
!licenses/
!licenses/**

@ -0,0 +1,37 @@
VTK 7.1.1 第三方依赖交付清单
===========================
一、程序运行包
--------------
Release 版本发布时,将 bin/Release 中的 50 个 DLL 与程序可执行文件放在
同一运行目录。Debug 开发环境使用 bin/Debug 中对应的 50 个 DLL。
不要再混入未列入本目录的 VTK DLL,尤其是 OpenGL2、图表、并行、地理、
数据库和未使用的文件格式模块。这些模块不属于当前产品依赖范围。
二、提供给甲方的第三方材料
----------------------------
建议将整个 VTK7.1 目录作为第三方材料一并提供,至少应包含:
README.txt
THIRD_PARTY_NOTICES.txt
DELIVERY-zh-CN.txt
licenses/
source/
如甲方还需要复核二进制构建或重新链接,则同时提供 include、lib、libd 和
bin。源码和许可证不是程序运行所需文件,但应作为第三方合规材料保留。
三、项目开发环境
----------------
工程通过 Src4/vtk.pri 使用本目录:
include VTK 公共头文件
lib Release 导入库
libd Debug 导入库
bin/Release Release 运行库
bin/Debug Debug 运行库
当前构建目标为 Visual Studio 2010、Win32/x86、Qt 4.8.2,使用 VTK 7.1.1
传统 OpenGL 渲染后端。运行库不通过编译后事件自动复制,制作运行包时应按
配置从 bin 目录复制。

@ -0,0 +1,43 @@
VTK 7.1.1 rendering dependency
==============================
Purpose
-------
This directory is the single VTK dependency root used by the project. It
contains the Win32 development files and runtime DLLs used by the numerical
module, plus the corresponding source and license material for delivery.
Directory layout
----------------
include/
Installed VTK 7.1.1 public headers.
lib/
Visual Studio 2010 Win32 Release import libraries.
libd/
Visual Studio 2010 Win32 Debug import libraries.
bin/Release/
The 50 Release runtime DLLs required by the supported project features.
bin/Debug/
The corresponding 50 Debug runtime DLLs.
source/VTK-7.1.1/
Corresponding VTK and bundled third-party source supplied with this build.
licenses/
VTK and bundled third-party copyright and license notices.
Build and runtime
-----------------
The project consumes this directory through Src4/vtk.pri. The qmake file links
only the 50 modules present in bin/Debug and bin/Release. Runtime DLLs are not
copied by a post-build command; copy the matching configuration from bin/ to
the application output directory when preparing a development or delivery
package.
This package targets Win32/x86, Visual Studio 2010, Qt 4.8.2, and the legacy
VTK OpenGL rendering backend. OpenGL2 DLLs are intentionally not included.
Licensing
---------
VTK uses its BSD-style license. Several VTK modules embed third-party
libraries with their own permissive licenses. See THIRD_PARTY_NOTICES.txt and
licenses/ for the authoritative notices. The corresponding files are also
retained in source/VTK-7.1.1/.

@ -0,0 +1,35 @@
Third-party notices for the VTK rendering dependency
====================================================
1. VTK 7.1.1
-------------
VTK is distributed under a BSD-style license.
License:
licenses/VTK/Copyright.txt
Corresponding source:
source/VTK-7.1.1
2. Bundled third-party components
---------------------------------
The shipped VTK modules include or depend on code from ALGLIB, Expat,
FreeType, the Independent JPEG Group, libogg, libtheora, libpng, libtiff,
zlib, DICOMParser, KWSys, and MetaIO.
Their notices are retained under:
licenses/alglib/
licenses/expat/
licenses/freetype/
licenses/jpeg/
licenses/libogg/
licenses/libtheora/
licenses/libpng/
licenses/libtiff/
licenses/zlib/
licenses/DICOMParser/
licenses/KWSys/
licenses/MetaIO/
The original notice files are also present in source/VTK-7.1.1. This summary
does not replace those authoritative license texts.

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save