using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Construction.BatchCreateMap
{
///
/// 网格化基础参数.
///
public class GridCreateParameterBase
{
private int m = 80;
private int n = 40;
private double xStep;
private double yStep;
[Category("\t\t\t基础数据")]
[DisplayName("\t\t\t\t\t\t\t\t名称")]
[ReadOnly(true)]
public string DataName { get; set; }
[Browsable(false)]
public GeoDataType DataType { get; set; }
///
/// Gets or sets X网格数.
///
/// The m.
[Category("\t\t\t基础数据")]
[DisplayName("\tX网格数")]
[ReadOnly(true)]
public int M
{
get
{
return this.m;
}
set
{
this.m = value;
this.xStep = (this.XMax - this.XMin) / value;
}
}
///
/// Gets or sets Y网格数.
///
/// The n.
[Category("\t\t\t基础数据")]
[DisplayName("\tY网格数")]
[ReadOnly(true)]
public int N
{
get
{
return this.n;
}
set
{
this.n = value;
this.yStep = (this.YMax - this.YMin) / value;
}
}
///
/// 加密后网格数
///
[Category("计算参数")]
[DisplayName("\t\t加密Y网格数")]
[ReadOnly(true)]
public int RefinedN
{
get
{
int nFactor = (int)Math.Pow(2, this.Times);
return (this.n * nFactor) - (nFactor - 1);
}
}
///
/// 加密后X网格数
///
[Category("计算参数")]
[DisplayName("\t\t\t加密X网格数")]
[ReadOnly(true)]
public int RefinedM
{
get
{
int nFactor = (int)Math.Pow(2, this.Times);
return (this.m * nFactor) - (nFactor - 1);
}
}
///
/// 加密后网格数
///
[Category("计算参数")]
[DisplayName("加密Y间隔")]
[ReadOnly(true)]
public double RefinedYStep
{
get
{
// return (this.YMax - this.YMin) / this.RefinedN;
return this.yStep / Math.Pow(2, this.Times);
}
}
///
/// 加密后X网格数
///
[Category("计算参数")]
[DisplayName("\t加密X间隔")]
[ReadOnly(true)]
public double RefinedXStep
{
get
{
// return (this.XMax - this.XMin) / this.RefinedM;
return this.xStep / Math.Pow(2, this.Times);
}
}
///
/// Gets or sets the x step.
///
/// The x step.
[Category("\t\t参数")]
[DisplayName("\t\t\t\tX间隔")]
public double XStep
{
get
{
return this.xStep;
}
set
{
this.xStep = value;
this.m = (int)(((this.XMax - this.XMin) / this.xStep) + 1 + 0.5);
}
}
[Category("\t\t\t基础数据")]
[DisplayName("\t\t\t\tZ最小"), ReadOnly(true)]
public double ZMin { get; set; } = 0;
[Category("\t\t\t基础数据")]
[DisplayName("\t\t\tZ最大"), ReadOnly(true)]
public double ZMax { get; set; } = 0;
///
/// Gets or sets the y maximum.
///
/// The y maximum.
[Category("\t\t\t基础数据")]
[DisplayName("\t\t\t\tY最大")]
[ReadOnly(true)]
public double YMax { get; set; } = -1;
///
/// Gets or sets the times.
///
/// The times.
[Category("\t\t参数")]
[DisplayName("\t\t加密次数")]
public int Times { get; set; } = 3;
///
/// Gets or sets the smooth.
///
/// The smooth.
[Category("\t\t参数")]
[DisplayName("\t光滑度")]
public int Smooth { get; set; } = 8;
/////
///// Gets or sets the times.
/////
///// The times.
//[Category("\t\t参数")]
//[DisplayName("断层优先级")]
//public int FaultLevel { get; set; } = 0;
///
/// Gets or sets the x maximum.
///
/// The x maximum.
[Category("\t\t\t基础数据")]
[DisplayName("\t\t\t\t\t\tX最大")]
[ReadOnly(true)]
public double XMax { get; set; } = -1;
///
/// Gets or sets the x minimum.
///
/// The x minimum.
[Category("\t\t\t基础数据")]
[DisplayName("\t\t\t\t\t\t\tX最小")]
[ReadOnly(true)]
public double XMin { get; set; } = -1;
///
/// Gets or sets the y minimum.
///
/// The y minimum.
[Category("\t\t\t基础数据")]
[DisplayName("\t\t\t\t\tY最小")]
[ReadOnly(true)]
public double YMin { get; set; } = -1;
///
/// Gets or sets the y step.
///
/// The y step.
[Category("\t\t参数")]
[DisplayName("\t\tY间隔")]
public double YStep
{
get
{
return this.yStep;
}
set
{
this.yStep = value;
this.n = (int)(((this.YMax - this.YMin) / this.yStep) + 1 + 0.5);
}
}
///
/// Computes the step.
///
public void ComputeStep()
{
this.xStep = (this.XMax - this.XMin) / (this.M - 1);
this.yStep = this.xStep; // (this.YMax - this.YMin) / this.N;
this.n = (int)(((this.YMax - this.YMin) / this.yStep) + 1 + 0.5);
}
}
public enum GeoDataType
{
///
/// 任意散点
///
XYZ,
///
/// The time
///
Time, // 时间
///
/// The deep
///
Deep, // 深度
///
/// The stratum thickness
///
StratumThickness, // 地层厚度
///
/// The well sand thickness
///
WellSandThickness, // 井砂岩厚度
///
/// The well vaild thickness
///
WellVaildThickness, // 井有效厚度
///
/// The forecast sand thickness
///
ForecastSandThickness, // 预测砂岩厚度
///
/// The forecast vaild thickness
///
ForecastVaildThickness, // 预测有效厚度
///
/// The porosity
///
Porosity, // 孔隙度
///
/// The permeability
///
Permeability, // 渗透率
///
/// The water saturation
///
WaterSaturation, // 含水饱和度
///
/// The beam water saturation
///
BeamWaterSaturation, // 束水饱和度
///
/// The dd
///
DD, // 断叠
///
/// The gd
///
GD, // 构叠
///
/// The syb
///
SYB, // 砂岩比
}
}