⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cpole.h

📁 本程序主要用于计算空间刚架的位移。通过直接输入结构基本信息
💻 H
字号:
/* CPole类声明 */

#ifndef POLE
#define POLE

#include "Head.h"
// 计算两点间距离

class CPole
{
public:
	CPole();

	CPole( CNode* begin, CNode* end,
		CShape* shape, double alph);

	double Distance( CNode i, CNode j)
	{
		double temp = pow( i.x - j.x, 2)
			+ pow( i.y - j.y, 2)
			+ pow( i.z - j.z, 2);

		return sqrt(temp);
	};


	/*  初始化参数
	*  计算转置矩阵
	*/
	void Init( void);

	// 添加端点约束
	bool AddBeginCons( BOOL constant[]);

	// 添加终点约束
	bool AddEndCons( BOOL constant[]);

	// 添加荷载
	void AddLoad( SLoad load);

	// 杆端自由度释放
	bool Release( bool DOF[]);

	// 获取端点坐标
	CNode* GetBegin(void);

	// 获取终点坐标
	CNode* GetEnd(void);

	// 获取截面形状
	CShape* GetShape(void);

	// 获取杆件转换矩阵
	const CMatrix& CPole::GetTrans(void);

	// 计算杆长
    void Length(void);
	
	// 计算杆件被划分等份
	int DivNum(double length);

	// 从文件中读取一个杆件
	bool Read( ifstream& readfile );

	// 写入一个杆件到文件中
	bool Write( ofstream& writefile);
	
	SLoad m_Load;
	
	// 杆件截面定位角(定位力方向)
	double m_Alph;
	
	// 力转换矩阵
//	CMatrix m_T1;
	// 单刚转换矩阵
	CMatrix m_T;

protected:
	// 节点号,截面号
	int m_nBegin, m_nEnd;

	int m_nShape;
	
	CNode *p_Begin, *p_End;
		
	CShape *p_Shape;

	double m_Length;

	// 杆件自由度释放表示,true表示释放,默认为false
	bool m_DOF[12];
	

};

/* CElement类声明 */

class CElement:public CPole
{
public:
	/* 构造函数 
	*  初始化参数
	*/
	CElement(){};

	CElement( CNode* begin, CNode* end, CPole* pole);

	// 设置荷载并计算等效荷载向量
	void Init(void);

	// 计算节点码差
	int GetDif(void);
	
	/*  K2	整体刚度矩阵 
	*  FVector	整体坐标系下等效荷载阵列
	*/
	CDMatrix m_K2;	
	CMatrix  m_FVector;
	
	/* K1	局部单元刚度矩阵
	*/ 
	CDMatrix m_K1;
protected:		
	


private:

};


#endif // CElEMENT

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -