// file DOMAIN.CPP
#include "domain.h"
#include "element.h"
#include "timestep.h"
#include "node.h"
#include "dof.h"
#include "material.h"
#include "load.h"
#include "enrichmentitem.h"
#include "crackinterior.h"
#include "enrichmentfunction.h"
#include "geometryentity.h"
#include "piecewiselinear.h"
#include "loadtime.h"
#include "timinteg.h"
#include "linsyst.h"
#include "newtonraphson.h"
#include "string.h"
#include "freader.h"
#include "delaunay.h"
#include "crackgrowthdirectionlaw.h"
#include "crackgrowthincrementlaw.h"
#include "cracktip.h"
#include "vertex.h"
#include "clock.h"
#include <typeinfo>
#include <fstream> // filestream flux sur les fichiers
#include <iostream>
Domain :: Domain ()
// Constructor. Creates a new domain.
{
dataFileName = NULL ;
elementList = new List(0) ;
nodeList = new List(0) ;
materialList = new List(0) ;
loadList = new List(0) ;
loadTimeFunctionList = new List(0) ;
enrichmentFunctionList = new List(0) ; // for XFEM
enrichmentItemList = new List(0) ; // for XFEM
geoEntityList = new List(0) ; // for XFEM
directionLaw = NULL ; // for XFEM
incrementLaw = NULL ; // for XFEM
isFEM = false ; // for XFEM
isXFEM = false ; // for XFEM
timeIntegrationScheme = NULL ;
nlSolver = NULL ;
inputStream = NULL ;
outputStream = NULL ;
numberOfElements = 0 ;
numberOfNodes = 0 ;
numberOfFreeDofs = 0 ;
numberOfEnrichmentFunctions = 0 ; // for XFEM
numberOfEnrichmentItems = 0 ; // for XFEM
numberOfGeoEntities = 0 ; // for XFEM
unknownArray = NULL ;
planeElasticity = PlaneStrain;
numfig = 0; //number of matlab figures exported sb-2004June29
enrichedNodesList = NULL ; // 2005-08-18, list of enriched nodes, just for quick post-processing
isMultiMatDomain = false ;
//numberOfInteractedElements = 0 ;
}
Domain :: Domain (char* s)
// Constructor. Creates a new domain with data file 's'.
{
dataFileName = new char[strlen(s)+1] ;
strcpy (dataFileName,s) ;
elementList = new List(0) ;
nodeList = new List(0) ;
materialList = new List(0) ;
loadList = new List(0) ;
loadTimeFunctionList = new List(0) ;
enrichmentFunctionList = new List(0) ; // for XFEM
enrichmentItemList = new List(0) ; // for XFEM
geoEntityList = new List(0) ; // for XFEM
directionLaw = NULL ; // for XFEM
incrementLaw = NULL ; // for XFEM
isFEM = false ;
isXFEM = false ;
timeIntegrationScheme = NULL ;
nlSolver = NULL ;
inputStream = NULL ;
outputStream = NULL ;
numberOfElements = 0 ;
numberOfNodes = 0 ;
numberOfEnrichmentFunctions = 0 ;
numberOfEnrichmentItems = 0 ;
numberOfFreeDofs = 0 ;
unknownArray = NULL ;
planeElasticity = PlaneStrain;
enrichedNodesList = NULL ; // 2005-08-18
}
Domain :: ~Domain ()
// Destructor.
{
delete dataFileName ;
delete s00FileName;
delete s01FileName;
delete hisFileName;
delete logFileName;
delete disFileName;
delete strFileName;
delete elementList ;
delete nodeList ;
delete materialList ;
delete enrichmentFunctionList; // XFEM
delete enrichmentItemList; // XFEM
delete directionLaw ;
delete incrementLaw ;
delete nlSolver ;
delete loadList ;
delete loadTimeFunctionList ;
delete timeIntegrationScheme ;
delete unknownArray ;
delete inputStream ;
delete enrichedNodesList ;
if (outputStream)
fclose(outputStream) ;
}
Skyline* Domain :: computeTangentStiffnessMatrix ()
// Computes the tangent stiffness matrix of the receiver submitted to the
// displacements d.
{
Element *elem;
FloatMatrix *k;
IntArray *loc;
Skyline *stiffnessMatrix;
stiffnessMatrix = new Skyline();
for (size_t i = 0 ; i < this->giveNumberOfElements() ; i++)
{
elem = this->giveElement(i+1);
k = elem->computeLhsAt(timeIntegrationScheme->giveCurrentStep());
loc = elem->giveLocationArray();
stiffnessMatrix->assemble(k,loc);
elem->reinitializeStiffnessMatrix();
delete k;
}
return stiffnessMatrix;
}
Skyline* Domain :: giveInitialStiffnessMatrix ()
{
Element *elem;
FloatMatrix *k;
IntArray *loc;
Skyline *answer;
answer = new Skyline();
for (size_t i = 0 ; i < this->giveNumberOfElements() ; i++)
{
elem = this->giveElement(i+1);
k = elem->GiveStiffnessMatrix();
loc = elem->giveLocationArray();
answer->assemble(k,loc);
delete k;
}
return answer;
}
Skyline* Domain :: giveInitialMassMatrix ()
{
Element *elem;
FloatMatrix *k;
IntArray *loc;
Skyline *answer;
answer = new Skyline();
for (size_t i = 0 ; i < this->giveNumberOfElements(); i++)
{
elem = this->giveElement(i+1);
k = elem->giveMassMatrix();
loc = elem->giveLocationArray();
answer->assemble(k,loc);
}
return answer;
}
void Domain :: formTheSystemAt (TimeStep* stepN)
// Assembles the system of linear equations, at the current time step.
// No assembly here, this will be made in NLSolver!!! - SC - 25.7.97
{
this -> giveNumberOfElements() ;
for (size_t i = 0 ; i < numberOfElements ; i++)
//this -> giveElement(i) -> assembleYourselfAt(stepN) ;
this -> giveElement(i+1) ;
int nNodes = this -> readNumberOf("Node") ;
for (size_t i = 0 ; i < nNodes ; i++)
//this -> giveNode(i) -> assembleYourLoadsAt(stepN) ;
this -> giveNode(i+1) ;
}
char* Domain :: giveDataFileName ()
// Returns the name of the file containing the data of the problem.
// The other files handling is also done here! - SC 08.97
{
char s[64] ;
char temp[64] = "";
FILE *hisFile, *s00File, *s01File, *logFile, *strFile, *disFile, *mlbFile ;
if (! dataFileName) {
printf ("***************************************************************\n") ;
printf ("*** ***\n") ;
printf ("*** Object Oriented Enriched Finite Elements Library ***\n") ;
printf ("*** OpenXFEM++ based on FEMOBJ, 08.2005 ***\n") ;
printf ("*** With applications to Fracture Mechanics ***\n") ;
printf ("*** (c) Nguyen Vinh Phu, Stephane Bordas and Cyrille Dunant ***\n") ;
printf ("*** ***\n") ;
printf ("*************************************************************** \n") ;
printf ("Please enter the name of the data file: \n") ;
gets (s) ;
dataFileName = new char[strlen(s)+1] ;
strcpy (dataFileName,s) ;
strncat(temp,dataFileName,strlen(s)-3);
s00FileName = new char[strlen(s)+1] ;
strcpy(s00FileName,temp);
strcat(s00FileName,"s00");
s01FileName = new char[strlen(s)+1] ;
strcpy(s01FileName,temp);
strcat(s01FileName,"s01");
s00File = fopen(s00FileName,"wb");
fclose (s00File) ;
s01File = fopen(s01FileName,"wb");
fclose (s01File) ;
//dis & str file names for ascii results, initialize files
disFileName = new char[strlen(s)+1] ;
strcpy(disFileName,temp);
strcat(disFileName,"dis");
strFileName = new char[strlen(s)+1] ;
strcpy(strFileName,temp);
strcat(strFileName,"str");
disFile = fopen(disFileName,"w");
fclose (disFile) ;
strFile = fopen(strFileName,"w");
fclose (strFile) ;
//his file name for history, write first dummy line
hisFileName = new char[strlen(s)+1] ;
strcpy(hisFileName,temp);
strcat(hisFileName,"his");
hisFile = fopen (hisFileName,"w") ;
fprintf (hisFile," 0 0 0
没有合适的资源?快使用搜索试试~ 我知道了~
openxfemPP.zip_fracture detection_openxfem_plasticity_visual c_x
共210个文件
h:110个
cpp:97个
def:3个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 129 浏览量
2022-07-13
19:21:25
上传
评论
收藏 306KB ZIP 举报
温馨提示
OpenXFEM++ with patches for Cygwin or Linux
资源推荐
资源详情
资源评论
收起资源包目录
openxfemPP.zip_fracture detection_openxfem_plasticity_visual c_x (210个子文件)
domain.cpp 57KB
element.cpp 49KB
delaunay.cpp 44KB
cracktip.cpp 38KB
main.cpp 37KB
geometry_base.cpp 26KB
plateiso.cpp 20KB
node.cpp 19KB
geometry_2D.cpp 15KB
piecewiselinear.cpp 15KB
quad_u.cpp 14KB
standardquadrature.cpp 14KB
tri_u.cpp 14KB
crackinterior.cpp 13KB
flotarry.cpp 13KB
tri6.cpp 12KB
bimatcrackasym.cpp 12KB
auxiliaryfield.cpp 12KB
homogeneouscrackasym.cpp 12KB
dof.cpp 10KB
flormtrx.cpp 10KB
freader.cpp 10KB
fei3dlineartetra.cpp 8KB
fei2dquadlin.cpp 8KB
skyline.cpp 7KB
vonmisesmaterial_h.cpp 7KB
vonmisesmaterial.cpp 7KB
tetra4.cpp 6KB
vertex.cpp 6KB
mitc4.cpp 6KB
nlsolver.cpp 6KB
enrichmentitem.cpp 6KB
fei2dtrilin.cpp 5KB
enrichmentfunction.cpp 5KB
modifiedhomocrackasymp.cpp 5KB
plateiso4.cpp 5KB
splitgaussquadrature.cpp 5KB
3disoelement.cpp 5KB
elasticmaterial.cpp 5KB
circle.cpp 4KB
gausspnt.cpp 4KB
enrichmentdetector.cpp 4KB
fei2dtriqua.cpp 4KB
planeproblem.cpp 4KB
femcmpnn.cpp 3KB
geometryentity.cpp 3KB
samplingcriterion.cpp 3KB
string.cpp 3KB
discontinuousfunction.cpp 3KB
abssigneddistance.cpp 3KB
ansplate.cpp 3KB
mathfem.cpp 3KB
timinteg.cpp 3KB
materialinterface.cpp 2KB
load.cpp 2KB
matrixops.cpp 2KB
planelast.cpp 2KB
junctionfunction.cpp 2KB
material.cpp 2KB
linsyst.cpp 2KB
polymtrx.cpp 2KB
list.cpp 2KB
integrationrule.cpp 2KB
crackgrowthincrementlaw.cpp 2KB
column.cpp 2KB
standarddescriptio.cpp 2KB
crackgrowthdirectionlaw.cpp 2KB
levelsetdescription.cpp 2KB
intarray.cpp 2KB
dictionr.cpp 2KB
timestep.cpp 2KB
voidenrichfunction.cpp 2KB
freestor.cpp 2KB
crackjunction.cpp 2KB
maxhoopstress.cpp 1KB
initial.cpp 1KB
diagmtrx.cpp 1KB
boundary.cpp 1KB
loadtime.cpp 1KB
fixedincrement.cpp 1KB
piecewis.cpp 1KB
clock.cpp 1KB
hole.cpp 1KB
mathutil.cpp 929B
constantstiffness.cpp 910B
newtonraphson.cpp 866B
polynoxy.cpp 818B
newmark.cpp 772B
deadwght.cpp 650B
peak.cpp 616B
matrix.cpp 587B
nodload.cpp 510B
constant.cpp 333B
stdafx.cpp 297B
stressarray.cpp 285B
lhs.cpp 150B
geometrydescription.cpp 69B
compiler.DEF 1KB
debug.DEF 712B
verbose.DEF 349B
共 210 条
- 1
- 2
- 3
资源评论
周楷雯
- 粉丝: 79
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功