?? finityelement.cpp
字號:
#include "Onedimension.h"
#include "Twodimension.h"
//#include "teaminfo.h"
#include<time.h>
#include <stdio.h>
#include <conio.h>
int main()
{
char ch;
clock_t start,end;
double t=0;
while (true)
{
printf("*********************************************************\n");
printf("歡迎進入第七實驗小組有限元分析演示程序……\n");
printf(" 1:一維問題 \n");
printf(" 2:二維問題 \n");
printf(" 0:退出 \n");
printf("*********************************************************\n");
printf("請選擇(1, 2 或者 0)\n");
do
{
ch=(char) _getch();
}while (ch!='1' && ch!='2' && ch!='0');
system("cls");
if (ch=='0')
return 0;
else if (ch=='1')
{
cout<<"------------------------------一維有限元問題開始";
cout<<"--------------------------------"<<endl;
Onedimension a;
start=clock();
a.Dispart();
a.Radix();
a.Calculate();
a.Exact();
cout<<endl<<"步長h="<<h<<endl;
end=clock();
t=(double)(end-start);
cout<<endl<<"計算所用時間t="<<t<<"毫秒"<<endl<<endl;
a.Error();
cout<<endl;
cout<<"------------------------------一維有限元問題結束";
cout<<"--------------------------------"<<endl;
}
else
{
cout<<"------------------------------二維有限元問題開始";
cout<<"--------------------------------"<<endl;
Twodimension b;
start=clock();
b.Dispart();
b.Radix();
b.Calculate();
b.Exact();
cout<<endl<<"步長H="<<H<<endl;
end=clock();
t=(double)(end-start);
cout<<endl<<"計算所用時間T="<<t<<"毫秒"<<endl<<endl;
b.Error();
cout<<endl;
cout<<"------------------------------二維有限元問題結束";
cout<<"--------------------------------"<<endl;
}
//get_teaminfo();
printf("\nPress any key to continue\n");
_getch();
system("cls");
}
return 0;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -