Inherited from NItem,
Inherited by NULL
Friend class NULL
Description
XResult是一种封装了离散网格上的结果数据的结果基类,作为结果分量(XResultComponent)的容器使用,常用基础类型分为标量结果(包含一个基础分量如温度结果)、矢量结果(包含3个基础分量如位移结果)和张量结果(包含6个基础分量如应力、应变结果)。
结果数据对象属性包含所属分析步、子步、结果位置、基础自由度、源文件序号、参考坐标系ID、参考结果ID、结果层ID(对杆梁结果或板壳结果有效)以及主结果ID。
其中:
结果位置分为积分点上的数据、单元内节点上的数据和节点上的数据等类型,对于部分给定类型的结果(如应力),其结果数据往往会同时存在在不同的位置上,不同位置的结果数据大小并不一致,这个时候需要分别构建不同的结果对象;
基础自由度表征了该结果的原始结果分量个数,在某些情况下会通过原始分量计算得到衍生分量,比如从应力张量计算得到三个主应力、米塞斯应力等,原始分量和衍生分量共同构成结果的全部结果分量;
源文件序号记录了结果源文件的序号,在某些情况下结果是放在一个目录下的若干文件组成,不同结果可能来源于不同的结果文件,在快速浏览模式下只记录文件序号以及位置,只在需用要查看结果的时候才从指定文件指定位置导入;
参考结果ID用于指定本结果所参考的结果,表示本结果的数据要从参考结果的数据计算得出,比如单元内节点上的数据要从积分点上的数据外插计算得到, 节点上的数据要从单元内节点上的数据磨平得到;指定坐标系下的结果要从全局坐标系的结果变换得到;如果该值为0,表示它本身就是原始结果;
参考坐标系ID用于指定结果数据的参考坐标系,它一般要从全局坐标系下的结果计算得到,如该值为0,表示该结果就是全局坐标系下的结果;
结果层ID用于杆梁结果或板壳结果,杆梁结果或者板壳结果可能分为多个层次,该ID表示它属于哪个层次,如果该ID为0,表示它是实体结果;
主结果ID是该结果对象的父结果ID,当该结果是局部坐标系结果、板壳层结果、杆梁层结果时都必须从属一个主结果,如果该ID为0,表示它本身就是主结果,主结果时可以在结果子步中遍历访问,从属结果不能在结果子步中直接访问;
区分结果对象的维度包含结果位置、局部坐标系、杆梁层次、板壳层次,不同的插值方法和磨平方法则须重新计算计算数据,
Members
static ResultComponentManager *
_compMgr
-
-
-
-
-
-
-
-
-
Public interface
-
-
-
-
XResult & operator
<< (TypeID compType)
-
-
-
-
-
-
-
-
-
-
void
setFlag(ResultStatus r, bool b)
-
-
-
-
ErrorCode
read(H5IO* io, H5Obj * grp)
void
write(H5IO * io, H5Obj * grp)
-
-
-
-
void
setStep(int iMainID, int iSubID)
-
-
-
-
-
-
-
-
-
-
bool
loadData(H5IO * io, H5Obj * grp,int component)
void
dumpData(H5IO * io, H5Obj * grp,int component)
-
bool
isIdentical(int type, const char * name, int loc) const
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
static ResultComponentManager * _compMgr
结果分量管理器
ResultHeader m_oHeader
结果属性块
const XResultSubstep * m_pSubstep
结果所属子步
vector<XResultComponent*> m_pComponents
结果分量数组
vector<XResult*> m_pShellLayers
板壳结果层数组
vector<XResult*> m_pBeamLayers
杆梁结果层数组
vector<XResult*> m_pLocalCsys
局部坐标系结果数组
XResult * m_pCurShellLayer
当前板壳结果层
XResult * m_pCurBeamLayer
当前杆梁结果层
XResult(ulong id, int type)
function: 构造函数
parameters:
[i]ulong id: 身份ID
[i] int type: 结果类型
return value: 无
void clear()
function: 清空结果分量
parameters: NULL
return value: 无
~XResult()
function: 析构函数
parameters: NULL
return value: 无
XResult & addComponent(TypeID compType)
function: 添加结果分量
parameters:
[i]TypeID compType: 结果分量类型
return value: 返回结果对象的引用
XResult & operator « (TypeID compType)
XResultComponent * getComponentByType(TypeID t)
function: 获取指定类型的结果分量
parameters:
[i]TypeID t: 结果分量类型
return value: 结果分量指针
XResultComponent * getComponent(const char * compName)
function: 获取给定名字的结果分量
parameters:
[i]const char * compName: 结果分量名字
return value: 结果分量指针
const char * getLabel(int component)
function: 获取结果分量的标签
parameters:
[i]int component: 结果分量序号
return value: 结果分量的标签字符串
int getDoF() const
function: 获取结果对象的基础自由度
parameters: NULL
return value: 无
TypeID getLocation() const
function: 获取结果对象的位置
parameters: NULL
return value: 结果对象的位置
void setLocation(TypeID loc)
function: 设置结果对象的位置
parameters:
[i]TypeID loc: 结果位置
return value: 无
ulong getLayerID() const
function: 获取所属结果层ID
parameters: NULL
return value: 所属结果层ID
void setLayerID(int lid)
function: 设置所属结果层ID
parameters:
[i]int lid: 结果层ID
return value: 无
ulong getCoordSysID()
function: 获取局部坐标系ID
parameters: NULL
return value: 局部坐标系ID
void setCoordSysID(ulong cid)
function: 设置局部坐标系ID
parameters:
[i]ulong cid: 局部坐标系ID
return value: 无
void setFlag(ResultStatus r, bool b)
function: 设置结果对象的状态
parameters:
[i] ResultStatus r: 结果对象的状态(分为正常结果、索引结果、虚结果类型)
[i] bool b: 激活或者失效
return value: 无
bool isVirtual() const
void setReference(ulong id)
function: 设置参考结果ID
parameters:
[i]ulong id: 参考结果ID
return value: 无
ulong getReference() const
function: 获取参考结果ID
parameters: NULL
return value: 参考结果ID
virtual bool buildDerivedComponent(TypeID t)
function: 构建衍生结果
parameters:
[i]TypeID t: 衍生结果分量类型
return value: 无
ErrorCode read(H5IO* io, H5Obj * grp)
void write(H5IO * io, H5Obj * grp)
ResultHeader & getHeader()
function: 结果属性
parameters: NULL
return value: 结果属性的引用
const ResultHeader & getHeader() const
function: 结果属性
parameters: NULL
return value: 结果属性的引用
int getComponentIndex(TypeID t) const
function: 获取结果分量的索引号
parameters:
[i]TypeID t: 结果分量类型
return value: 结果分量的索引号
int getComponentIndexByName(const char * label) const
function: 获取结果分量的索引号
parameters:
[i]const char * label: 结果分量的名字
return value: 结果分量的索引号
void setStep(int iMainID, int iSubID)
function: 设置结果所属的步、子步
parameters:
[i]int iMainID: 结果步序号
[i] int iSubID: 结果子步序号
return value: 无
float * getComponentData(int component)
function: 获取结果分量的数据首地址
parameters:
[i]int component: 结果分量索引号
return value: 结果分量的数据地址
const float * getComponentData(int component) const
function: 获取结果分量的数据首地址
parameters:
[i]int component: 结果分量索引号
return value: 结果分量的数据地址
float getNodeResultValue(const XNode * n, int component) const
float getElementResultValue(const XElement * n, int component) const
float getElementNodeResultValue(const XElement * n, int nodeIndex, const int * elemNodeIndexArray, int component) const
int getComponentCount() const
function: 获取分量的个数
parameters: NULL
return value: 分量的个数
void addBeamLayer(XResult * rlt)
function: 添加杆梁结果层
parameters:
[i]XResult * rlt: 杆梁结果层
return value: 无
void addShellLayer(XResult * rlt)
function: 添加板壳结果层
parameters:
[i]XResult * rlt: 板壳结果层
return value: 无
void addLocalCSResult(XResult * rlt)
void allocData(int component, int count)
function: 为指定分量分配内存空间
parameters:
[i]int component: 分量索引号
[i] int count:
return value:
bool loadData(H5IO * io, H5Obj * grp,int component)
void dumpData(H5IO * io, H5Obj * grp,int component)
bool isIdentical(XResult * rlt) const
bool isIdentical(int type, const char * name, int loc) const
bool isChief() const
bool isImported() const
bool isLoaded(int comp) const
XResult* getLCSResult(ulong cid)
int getLCSResultCount() const
XResult* getLCSResultByIndex(int idx)
XResult* getBeamLayer(ulong beamLayerID)
function: 获取杆梁层结果
parameters:
[i]ulong beamLayerID: 杆梁层ID
return value: 杆梁层结果指针
const XResult * getBeamLayer(ulong beamLayerID) const
function: 获取杆梁层结果
parameters:
[i]ulong beamLayerID: 杆梁层ID
return value: 杆梁层结果指针
int getBeamLayerCount() const
function: 获取杆梁层结果个数
parameters: NULL
return value: 杆梁层结果个数
XResult* getBeamLayerByIndex(int idx)
function: 通过序号获取杆梁层结果
parameters:
[i]int idx: 杆梁层序号
return value: 杆梁层结果指针
XResult* getShellLayerByIndex(int idx)
function: 通过序号获取板壳层结果
parameters:
[i]int idx: 板壳层序号
return value: 板壳层结果指针
XResult* getShellLayer(ulong shellLayerID)
function: 获取板壳层结果
parameters:
[i]ulong shellLayerID: 板壳层结果ID
return value: 板壳层结果指针
const XResult * getShellLayer(ulong shellLayerID) const
function: 获取板壳层结果
parameters:
[i]ulong shellLayerID: 板壳层结果ID
return value: 板壳层结果指针
int getShellLayerCount() const
function: 获取板壳层结果个数
parameters: NULL
return value: 板壳层结果个数
XResult * getLayer(ulong layerID)
XResult* getCurBeamLayer() const
function: 获取当前杆梁结果层
parameters: NULL
return value: 当前杆梁结果层
XResult* getCurShellLayer() const
function: 获取当前板壳结果层
parameters: NULL
return value: 当前板壳结果层
void setCurrentBeamLayer(ulong beamLayerID)
function: 设置当前杆梁结果层ID
parameters:
[i]ulong beamLayerID: 杆梁结果层ID
return value: 无
void setCurrentShellLayer(ulong shellLayerID)
function: 设置当前板壳结果层ID
parameters:
[i]ulong shellLayerID: 板壳结果层ID
return value: 无
const XResultComponent * getComponent(int cp) const
function: 获取指定结果分量
parameters:
[i]int cp: 分量索引号
return value: 指定结果分量指针
XResultComponent * getComponent(int cp)
function: 获取指定结果分量
parameters:
[i]int cp: 分量索引号
return value: 指定结果分量指针
void updateComponentExtrem(int cp, XModel * mdl, ResultIndexMap * rimap)
function:
parameters:
[i]int cp: 更新指定分量的极值
[i] XModel * mdl: 网格模型
[i] ResultIndexMap * rimap: 结果索引映射表
return value: 无
const XResultSubstep * getSubstep() const
function: 获取对象所在的结果子步
parameters: NULL
return value: 对象所在的结果子步
void setSubstep(const XResultSubstep * ss)
function: 设置结果子步
parameters:
[i]const XResultSubstep * ss: 结果子步指针
return value: 无