Compare commits

..

No commits in common. 'develop' and 'feature/nmNum-postprocessing-view-20260910' have entirely different histories.

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

Binary file not shown.

@ -1,128 +0,0 @@
#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,12 +14,13 @@
#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
@ -168,7 +169,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(6));
MultistageFracturedHorizontalWell[0].resize(3, dVec1(5));
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;
@ -472,19 +473,13 @@ 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 = 1;
threads = 5;
}
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 < 1; ++iiii)
for (int iiii = 0; iiii < 8; ++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.87;
p3.CS.S[0] = 0.1;
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");

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

@ -1,37 +0,0 @@
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 目录复制。

@ -1,43 +0,0 @@
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/.

@ -1,35 +0,0 @@
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