本文整理汇总了C++中TPZCompEl类的典型用法代码示例。如果您正苦于以下问题:C++ TPZCompEl类的具体用法?C++ TPZCompEl怎么用?C++ TPZCompEl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了TPZCompEl类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: point
void TPZAnalysis::PrePostProcessTable(){
TPZCompEl *cel;
int numvar = fTable.fVariableNames.NElements();
for(int iv=0; iv<numvar; iv++) {
int numel = fTable.fCompElPtr.NElements();
for(int iel=0; iel<numel; iel++) {
cel = (TPZCompEl *) fTable.fCompElPtr[iel];
if(cel) cel->PrintTitle((char *)fTable.fVariableNames[iv],*(fTable.fOutfile));
}
}
*(fTable.fOutfile) << endl;
int dim;
TPZVec<REAL> point(fTable.fDimension);
for(dim=1; dim<fTable.fDimension+1; dim++) {
for(int iv=0; iv<numvar; iv++) {
int numel = fTable.fCompElPtr.NElements();
for(int iel=0; iel<numel; iel++) {
int d;
for(d=0; d<fTable.fDimension; d++) {
point[d] = fTable.fLocations[iel*fTable.fDimension+d];
}
cel = (TPZCompEl *) fTable.fCompElPtr[iel];
if(cel) cel->PrintCoordinate(point,dim,*(fTable.fOutfile));
}
}
*(fTable.fOutfile) << endl;
}
}
开发者ID:JoaoFelipe,项目名称:oceano,代码行数:28,代码来源:pzanalysis.cpp
示例2:
TPZGraphMesh::TPZGraphMesh(TPZCompMesh *cm, int dimension, TPZAutoPointer<TPZMaterial> mat)
{
int nel,i;
fElementList.Resize(0);
fElementList.CompactDataStructure(1);
fNodeMap.Resize(0);
fNodeMap.CompactDataStructure(1);
fMaterial = mat;
fCompMesh = cm;
fDimension = dimension;
// TPZGeoMesh *geomesh = fCompMesh->Reference();
// TPZAdmChunkVector<TPZGeoEl *> &gelvec = geomesh->ElementVec();
// TPZGeoEl *ge;
// nel = gelvec.NElements();
// for(i=0;i<nel;i++) {
// ge = gelvec[i];
// if(!ge || !ge->Reference() || ge->Reference()->Type() == EInterface ) continue;
// ge->Reference()->CreateGraphicalElement(*this, dimension);
// }
TPZAdmChunkVector<TPZCompEl *> &celvec = fCompMesh->ElementVec();
TPZCompEl *ce;
nel = celvec.NElements();
for(i=0;i<nel;i++) {
ce = (TPZCompEl *) celvec[i];
if(!ce) continue;
// if (ce->Dimension() != dimension) continue;
ce->CreateGraphicalElement(*this, dimension);
}
fScalarNames = "";
fVecNames = "";
}
开发者ID:JoaoFelipe,项目名称:oceano,代码行数:33,代码来源:pzgraphmesh.cpp
示例3: TPZGraphMesh
TPZDXGraphMesh::TPZDXGraphMesh(TPZCompMesh *cmesh, int dimension, TPZAutoPointer<TPZMaterial> mat, const TPZVec<std::string> &scalarnames, const TPZVec<std::string> &vecnames) :
TPZGraphMesh(cmesh,dimension,mat) {
SetNames(scalarnames,vecnames);
fNextDataField = 1;
fStyle = EDXStyle;
// int index = 0;
TPZCompEl *ce = FindFirstInterpolatedElement(cmesh,dimension);
fElementType = "noname";
if(ce) {
int type = ce->Type();
if(type == EOned) fElementType = "lines";
if(type == ETriangle) fElementType = "triangles";
if(type == EQuadrilateral) fElementType = "quads";
if(type == ECube) fElementType = "cubes";
if(type == EPrisma) fElementType = "cubes";
TPZGeoEl *gel = ce->Reference();
if( type == EDiscontinuous || (type == EAgglomerate && gel) ){
int nnodes = gel->NNodes();
if(nnodes==4 && dimension==2) fElementType = "quads";
if(nnodes==3 && dimension==2) fElementType = "triangles";
if(dimension==3) fElementType = "cubes";
}
}
fNumCases = 0;
fNumConnectObjects[0] = 1;
fNumConnectObjects[1] = 1;
fNumConnectObjects[2] = 1;
fNormalObject = 0;
for(int i = 0; i < 8; i++) fElConnectivityObject[i] = -1;
}
开发者ID:JoaoFelipe,项目名称:oceano,代码行数:32,代码来源:pzdxmesh.cpp
示例4: ErrorH1
void ErrorH1(TPZCompMesh *l2mesh, std::ostream &out)
{
int64_t nel = l2mesh->NElements();
int dim = l2mesh->Dimension();
TPZManVector<STATE,10> globerrors(10,0.);
for (int64_t el=0; el<nel; el++) {
TPZCompEl *cel = l2mesh->ElementVec()[el];
if (!cel) {
continue;
}
TPZGeoEl *gel = cel->Reference();
if (!gel || gel->Dimension() != dim) {
continue;
}
TPZManVector<STATE,10> elerror(10,0.);
elerror.Fill(0.);
cel->EvaluateError(SolSuave, elerror, NULL);
int nerr = elerror.size();
//globerrors.resize(nerr);
#ifdef LOG4CXX
if (logger->isDebugEnabled()) {
std::stringstream sout;
sout << "L2 Error sq of element " << el << elerror[0]*elerror[0];
LOGPZ_DEBUG(logger, sout.str())
}
#endif
for (int i=0; i<nerr; i++) {
globerrors[i] += elerror[i]*elerror[i];
}
}
开发者ID:labmec,项目名称:neopz,代码行数:31,代码来源:main.cpp
示例5: DebugStop
TPZCompEl *TPZGraphMesh::FindFirstInterpolatedElement(TPZCompMesh *mesh, int dim) {
int64_t nel = mesh->NElements();
TPZCompEl *cel;
int64_t iel;
for(iel=0; iel<nel; iel++) {
cel = mesh->ElementVec()[iel];
if(!cel) continue;
int type = cel->Type();
if(type == EAgglomerate){
#ifndef STATE_COMPLEX
if(!cel->Reference()) continue;
TPZAgglomerateElement *agg = dynamic_cast<TPZAgglomerateElement *>(cel);
if(agg && agg->Dimension() == dim) return agg;
#else
DebugStop();
#endif
}
if(type == EDiscontinuous){
TPZCompElDisc *disc = dynamic_cast<TPZCompElDisc *>(cel);
if(disc && disc->Reference()->Dimension() == dim) return disc;
}
TPZCompEl *intel = dynamic_cast<TPZInterpolatedElement *>(cel);
if(intel && intel->Reference()->Dimension() == dim) return intel;
TPZSubCompMesh *subcmesh = dynamic_cast<TPZSubCompMesh *> (cel);
if(subcmesh) {
intel = FindFirstInterpolatedElement(subcmesh,dim);
if(intel) return intel;
}
}
return 0;
}
开发者ID:labmec,项目名称:neopz,代码行数:31,代码来源:pzgraphmesh.cpp
示例6: ReadSolution
void ReadSolution(ifstream &arq, TPZVec<REAL> &sol, TPZCompMesh *cmesh, int &nstate, TPZVec<int> &dimstate){
int i,j,totaldim=0;
for(i=0;i<nstate;i++) totaldim += dimstate[i];
TPZVec<REAL> pt(3,0.);
TPZVec<REAL> coord(3,0.);
TPZVec<REAL> auxsol(totaldim,0.);
int iter = 0;
int nel = cmesh->NElements();
int solsize = totaldim * nel;
sol.Resize(solsize);
sol.Fill(0.);
for(i=0; i<nel; i++){
TPZCompEl *el = cmesh->ElementVec()[i];
if (!el) continue;
el->Reference()->CenterPoint(el->Reference()->NSides()-1,pt);
el->Reference()->X(pt,coord);
EvaluateSolution(coord,auxsol);
for (j=0;j<totaldim;j++){
sol[iter] = auxsol[j];
iter++;
}
}
}
开发者ID:labmec,项目名称:neopz,代码行数:26,代码来源:main.cpp
示例7: RemoveCloneBC
void TPZAdaptMesh::RemoveCloneBC(TPZCompMesh *mesh)
{
int nelem = mesh->NElements();
int iel;
for(iel=0; iel<nelem; iel++) {
TPZCompEl *cel = mesh->ElementVec()[iel];
if(!cel) continue;
int matid = cel->Material()->Id();
if(matid == -1000) delete cel;
}
}
开发者ID:labmec,项目名称:neopz,代码行数:11,代码来源:pzadaptmesh.cpp
示例8: sloan
void TPZAnalysis::SetBlockNumber(){
//enquanto nao compilamos o BOOST no windows, vai o sloan antigo
#ifdef WIN32
if(!fCompMesh) return;
fCompMesh->InitializeBlock();
TPZVec<int> perm,iperm;
TPZStack<int> elgraph,elgraphindex;
int nindep = fCompMesh->NIndependentConnects();
fCompMesh->ComputeElGraph(elgraph,elgraphindex);
int nel = elgraphindex.NElements()-1;
TPZSloan sloan(nel,nindep);
sloan.SetElementGraph(elgraph,elgraphindex);
sloan.Resequence(perm,iperm);
fCompMesh->Permute(perm);
#else
if(!fCompMesh) return;
fCompMesh->InitializeBlock();
TPZVec<int> perm,iperm;
TPZStack<int> elgraph,elgraphindex;
int nindep = fCompMesh->NIndependentConnects();
fCompMesh->ComputeElGraph(elgraph,elgraphindex);
int nel = elgraphindex.NElements()-1;
int el,ncel = fCompMesh->NElements();
int maxelcon = 0;
for(el = 0; el<ncel; el++)
{
TPZCompEl *cel = fCompMesh->ElementVec()[el];
if(!cel) continue;
std::set<int> indepconlist,depconlist;
cel->BuildConnectList(indepconlist,depconlist);
int locnindep = indepconlist.size();
maxelcon = maxelcon < locnindep ? locnindep : maxelcon;
}
fRenumber->SetElementsNodes(nel,nindep);
// TPZSloan sloan(nel,nindep,maxelcon);
fRenumber->SetElementGraph(elgraph,elgraphindex);
fRenumber->Resequence(perm,iperm);
fCompMesh->Permute(perm);
/*
fCompMesh->ComputeElGraph(elgraph,elgraphindex);
TPZMetis metis(nel,nindep);
metis.SetElementGraph(elgraph,elgraphindex);
metis.Resequence(perm,iperm);
fCompMesh->Permute(iperm);
*/
#endif
}
开发者ID:JoaoFelipe,项目名称:oceano,代码行数:53,代码来源:pzanalysis.cpp
示例9: RefinElemComp
void RefinElemComp(TPZCompMesh *cMesh, int indexEl)
{
TPZVec<int64_t > subindex;
int64_t nel = cMesh->ElementVec().NElements();
for(int64_t el=0; el < nel; el++){
TPZCompEl * compEl = cMesh->ElementVec()[el];
if(!compEl) continue;
int64_t ind = compEl->Index();
if(ind==indexEl){
compEl->Divide(indexEl, subindex, 1);
}
}
}
开发者ID:labmec,项目名称:neopz,代码行数:14,代码来源:Main.cpp
示例10: HasTrueError
int TPZAdaptMesh::HasTrueError(int clindex, REAL &minerror, TPZVec<REAL> &ervec){
TPZGeoCloneMesh *gmesh = dynamic_cast<TPZGeoCloneMesh *> (fCloneMeshes [clindex]->Reference());
int nref = gmesh->NReference();
int i;
for (i=0;i<nref;i++){
TPZGeoEl *gel = gmesh->ReferenceElement(i);
TPZCompEl *cel = gel->Reference();
if (!cel) continue;
int celindex = cel->Index();
if (ervec[celindex] >= minerror) return 1;
}
return 0;
}
开发者ID:labmec,项目名称:neopz,代码行数:14,代码来源:pzadaptmesh.cpp
示例11: RefinUniformElemComp
void RefinUniformElemComp(TPZCompMesh *cMesh, int ndiv)
{
TPZVec<int64_t > subindex;
for (int64_t iref = 0; iref < ndiv; iref++) {
TPZAdmChunkVector<TPZCompEl *> elvec = cMesh->ElementVec();
int64_t nel = elvec.NElements();
for(int64_t el=0; el < nel; el++){
TPZCompEl * compEl = elvec[el];
if(!compEl) continue;
int64_t ind = compEl->Index();
compEl->Divide(ind, subindex, 0);
}
}
}
开发者ID:labmec,项目名称:neopz,代码行数:15,代码来源:Main.cpp
示例12: CreatInterface
void CreatInterface(TPZCompMesh *cmesh){
for(int el = 0; el < cmesh->ElementVec().NElements(); el++)
{
TPZCompEl * compEl = cmesh->ElementVec()[el];
if(!compEl) continue;
int index = compEl ->Index();
if(compEl->Dimension() == cmesh->Dimension())
{
TPZInterpolationSpace * InterpEl = dynamic_cast<TPZInterpolationSpace *>(cmesh->ElementVec()[index]);
if(!InterpEl) continue;
InterpEl->CreateInterfaces(false);
}
}
// cmesh->AdjustBoundaryElements();
//cmesh->CleanUpUnconnectedNodes();
}
开发者ID:labmec,项目名称:neopz,代码行数:18,代码来源:main.cpp
示例13: elerror
void TPZAnalysisError::EvaluateError(REAL CurrentEtaAdmissible, std::ostream &out) {
//Code isn�t place to chat
//#warning Philippe, tambem nao entendo aqui //<!>
TPZManVector<REAL,3> elerror(3);
elerror.Fill(0.);
TPZManVector<REAL,3> errorSum(3);
errorSum.Fill(0.0);
TPZBlock<REAL> *flux = 0;
int elcounter=0;
int numel = Mesh()->ElementVec().NElements();
fElErrors.Resize(numel);
fElIndexes.Resize(numel);
Mesh()->ElementSolution().Redim(numel,1);
//soma de erros sobre os elementos
int el;
for(el=0;el< numel;el++) {
TPZCompEl *elptr = Mesh()->ElementVec()[el];
if(elptr && !(elptr->Material()->Id() < 0)) {
elptr->EvaluateError(fExact,elerror, flux);
int nerrors = elerror.NElements();
errorSum.Resize(nerrors, 0.);
for(int ii = 0; ii < nerrors; ii++)
errorSum[ii] += elerror[ii]*elerror[ii];
fElErrors[elcounter] = elerror[0];
(Mesh()->ElementSolution())(el,0) = elerror[0];
fElIndexes[elcounter++] = el;
} else {
(Mesh()->ElementSolution())(el,0) = 0.;
}
}
fElErrors.Resize(elcounter);
fElIndexes.Resize(elcounter);
fTotalError = sqrt(errorSum[0]);
Mesh()->EvaluateError(NullFunction,elerror);
// fAdmissibleError = CurrentEtaAdmissible*sqrt(true_error*true_error + fTotalError*fTotalError) / sqrt(1.*elcounter);
//<!>pra compilar
//Code isn�t place to chat
//#warning Phil, ver isso urgente. Tiago
fAdmissibleError = CurrentEtaAdmissible*sqrt(elerror[0]*elerror[0] + fTotalError*fTotalError) / sqrt(1.*elcounter);
}
开发者ID:JoaoFelipe,项目名称:oceano,代码行数:43,代码来源:pzanalysiserror.cpp
示例14: fCompMesh
TPZGraphMesh::TPZGraphMesh(TPZCompMesh *cm, int dimension, const std::set<int> & matids, const TPZVec<std::string> &scalarnames, const TPZVec<std::string> &vecnames, const TPZVec<std::string> &tensornames) :
fCompMesh(cm), fDimension(dimension), fMaterialIds(matids), fScalarNames(scalarnames), fVecNames(vecnames), fTensorNames(tensornames)
{
int64_t nel,i;
fElementList.Resize(0);
fElementList.CompactDataStructure(fElementList.NOW);
fNodeMap.Resize(0);
fNodeMap.CompactDataStructure(fNodeMap.NOW);
TPZAdmChunkVector<TPZCompEl *> &celvec = fCompMesh->ElementVec();
TPZCompEl *ce;
nel = celvec.NElements();
for(i=0;i<nel;i++) {
ce = (TPZCompEl *) celvec[i];
if(!ce) continue;
ce->CreateGraphicalElement(*this, dimension);
}
}
开发者ID:labmec,项目名称:neopz,代码行数:19,代码来源:pzgraphmesh.cpp
示例15: elerror
void TPZAnalysisError::EvaluateError(REAL CurrentEtaAdmissible, bool store_error, std::ostream &out) {
//Code isn�t place to chat
//#warning Philippe, tambem nao entendo aqui //<!>
TPZManVector<REAL,3> elerror(3);
elerror.Fill(0.);
TPZManVector<REAL,3> errorSum(3);
errorSum.Fill(0.0);
TPZBlock<REAL> *flux = 0;
int64_t elcounter=0;
int64_t numel = Mesh()->ElementVec().NElements();
fElErrors.Resize(numel);
fElIndexes.Resize(numel);
Mesh()->ElementSolution().Redim(numel,1);
// Sum of the errors over all computational elements
int64_t el;
for(el=0;el< numel;el++) {
TPZCompEl *elptr = Mesh()->ElementVec()[el];
if(elptr && !(elptr->Material()->Id() < 0)) {
elptr->EvaluateError(fExact,elerror, flux);
int nerrors = elerror.NElements();
errorSum.Resize(nerrors, 0.);
for(int ii = 0; ii < nerrors; ii++)
errorSum[ii] += elerror[ii]*elerror[ii];
fElErrors[elcounter] = elerror[0];
(Mesh()->ElementSolution())(el,0) = elerror[0];
fElIndexes[elcounter++] = el;
} else {
(Mesh()->ElementSolution())(el,0) = 0.;
}
}
fElErrors.Resize(elcounter);
fElIndexes.Resize(elcounter);
fTotalError = sqrt(errorSum[0]);
// void NullFunction(TPZVec<REAL> &point,TPZVec<STATE>&val,TPZFMatrix<STATE> &deriv);
std::function<void(const TPZVec<REAL> &,TPZVec<STATE>&,TPZFMatrix<STATE> &)> func(NullFunction);
Mesh()->EvaluateError(func,store_error, elerror);
fAdmissibleError = CurrentEtaAdmissible*sqrt(elerror[0]*elerror[0] + fTotalError*fTotalError) / sqrt(1.*elcounter);
}
开发者ID:labmec,项目名称:neopz,代码行数:42,代码来源:pzanalysiserror.cpp
示例16: void
void TPZMGAnalysis::MeshError(TPZCompMesh *fine, TPZCompMesh *coarse, TPZVec<REAL> &ervec,
void (*f)(TPZVec<REAL> &loc, TPZVec<REAL> &val, TPZFMatrix<REAL> &deriv),TPZVec<REAL> &truervec){
coarse->Reference()->ResetReference();
coarse->LoadReferences();
int dim = fine->MaterialVec().begin()->second->Dimension();
ervec.Resize(coarse->NElements());
if(f) {
truervec.Resize(coarse->NElements());
truervec.Fill(0.,0);
}
ervec.Fill(0.,0);
TPZCompEl *cel;
TPZAdmChunkVector<TPZCompEl *> &elementvec = fine->ElementVec();
int numel = elementvec.NElements();
int el;
for(el=0; el<numel; el++) {
cel = elementvec[el];
if (!cel) continue;
TPZInterpolatedElement *cint = dynamic_cast<TPZInterpolatedElement *> (cel);
if(!cint) continue;
int ncon = cint->NConnects();
TPZGeoElSide gelside(cint->Reference(),ncon-1);
if(gelside.Dimension() != dim) continue;
TPZGeoElSide gellarge(gelside);
while(!gellarge.Reference().Exists() && gellarge.Father2().Exists()) gellarge = gellarge.Father2();
if(!gellarge.Reference().Exists()) {
cout << "TPZMGAnalsysis::BuildTransferMatrix element " << el << " found no corresponding element\n";
continue;
}
TPZCompElSide cellargeside = gellarge.Reference();
TPZCompEl *cellarge = cellargeside.Element();
TPZInterpolatedElement *cintlarge = (TPZInterpolatedElement *) cellarge;
TPZTransform transform(gelside.Dimension(),gellarge.Dimension());
gelside.SideTransform3(gellarge,transform);
int index = cellarge->Index();
REAL truerror = 0.;
ervec[index] += ElementError(cint,cintlarge,transform,f,truerror);
if(f) truervec[index] += truerror;
}
}
开发者ID:JoaoFelipe,项目名称:oceano,代码行数:40,代码来源:pzmganalysis.cpp
示例17: SetCompMesh
void TPZGraphMesh::SetCompMesh(TPZCompMesh *mesh, const std::set<int> & matids){
if(fCompMesh == mesh && matids == fMaterialIds) return;
int64_t i;
fCompMesh = mesh;
fMaterialIds = matids;
int64_t nel = fElementList.NElements();
TPZGraphEl *el;
for(i=0;i<nel;i++) {
el = fElementList[i];
if(!el) continue;
if(el) delete el;
}
fElementList.Resize(0);
fNodeMap.Resize(0);
TPZAdmChunkVector<TPZCompEl *> &celvec = fCompMesh->ElementVec();
TPZCompEl *ce;
nel = celvec.NElements();
for(i=0;i<nel;i++) {
ce = (TPZCompEl *) celvec[i];
if(ce) ce->CreateGraphicalElement(*this, fDimension);
}
}
开发者ID:labmec,项目名称:neopz,代码行数:22,代码来源:pzgraphmesh.cpp
示例18: CreateInterfaces
void TPZDarcyAnalysis::CreateInterfaces()
{
fgmesh->ResetReference();
fcmeshdarcy->LoadReferences();
// Creation of interface elements
int nel = fcmeshdarcy->ElementVec().NElements();
for(int el = 0; el < nel; el++)
{
TPZCompEl * compEl = fcmeshdarcy->ElementVec()[el];
if(!compEl) continue;
TPZGeoEl * gel = compEl->Reference();
if(!gel) {continue;}
if(gel->HasSubElement()) {continue;}
int index = compEl ->Index();
if(compEl->Dimension() == fcmeshdarcy->Dimension())
{
TPZMultiphysicsElement * InterpEl = dynamic_cast<TPZMultiphysicsElement *>(fcmeshdarcy->ElementVec()[index]);
if(!InterpEl) continue;
InterpEl->CreateInterfaces();
}
}
}
开发者ID:labmec,项目名称:neopz,代码行数:23,代码来源:TPZDarcyAnalysis.cpp
示例19: Reference
TPZMultiphysicsInterfaceElement * TPZMultiphysicsElement::CreateInterface(int side)
{
// LOGPZ_INFO(logger, "Entering CreateInterface");
TPZMultiphysicsInterfaceElement * newcreatedinterface = NULL;
TPZGeoEl *ref = Reference();
if(!ref) {
LOGPZ_WARN(logger, "Exiting CreateInterface Null reference reached - NULL interface returned");
return newcreatedinterface;
}
TPZCompElSide thisside(this,side);
TPZStack<TPZCompElSide> list;
list.Resize(0);
thisside.EqualLevelElementList(list,0,0);//retorna distinto ao atual ou nulo
int64_t size = list.NElements();
//espera-se ter os elementos computacionais esquerdo e direito
//ja criados antes de criar o elemento interface
// try to create an interface element between myself and an equal sized neighbour
for (int64_t is=0; is<size; is++)
{
//Interface has the same material of the neighbour with lesser dimension.
//It makes the interface have the same material of boundary conditions (TPZCompElDisc with interface dimension)
int matid;
int thisdim = this->Dimension();
int neighbourdim = list[is].Element()->Dimension();
if(thisdim != neighbourdim)
{
if (thisdim < neighbourdim)
{
// return the material id of boundary condition IF the associated material is derived from bndcond
TPZMaterial *mat = this->Material();
TPZBndCond *bnd = dynamic_cast<TPZBndCond *>(mat);
if(bnd)
{
matid = this->Material()->Id();
}
else
{
matid = this->Mesh()->Reference()->InterfaceMaterial(this->Reference()->MaterialId(),list[0].Element()->Reference()->MaterialId());
continue;
}
}
else
{
TPZMaterial *mat = list[is].Element()->Material();
TPZBndCond *bnd = dynamic_cast<TPZBndCond *>(mat);
if (bnd) {
matid = bnd->Id();
}
else {
matid = this->Mesh()->Reference()->InterfaceMaterial(this->Reference()->MaterialId(), list[0].Element()->Reference()->MaterialId());
continue;
}
}
}else
{
matid = this->Mesh()->Reference()->InterfaceMaterial(this->Reference()->MaterialId(), list[0].Element()->Reference()->MaterialId());
if(matid == GMESHNOMATERIAL)
{
continue;
}
}
int64_t index;
TPZGeoEl *gel = ref->CreateBCGeoEl(side,matid); //isto acertou as vizinhanas da interface geometrica com o atual
if(!gel){
DebugStop();
#ifdef LOG4CXX
if (logger->isDebugEnabled())
{
std::stringstream sout;
sout << "CreateBCGeoEl devolveu [email protected]@@@";
LOGPZ_DEBUG(logger,sout.str());
}
#endif
}
bool withmem = fMesh->ApproxSpace().NeedsMemory();
if(Dimension() > list[is].Reference().Dimension()) {
//o de volume eh o direito caso um deles seja BC
//a normal aponta para fora do contorno
TPZCompElSide thiscompelside(this, thisside.Side());
TPZCompElSide neighcompelside(list[is]);
if (!withmem) {
newcreatedinterface = new TPZMultiphysicsInterfaceElement(*fMesh,gel,index,thiscompelside,neighcompelside);
}
else
{
newcreatedinterface = new TPZCompElWithMem<TPZMultiphysicsInterfaceElement>(*fMesh,gel,index,thiscompelside,neighcompelside);
}
} else {
//caso contrario ou caso ambos sejam de volume
TPZCompElSide thiscompelside(this, thisside.Side());
TPZCompElSide neighcompelside(list[is]);
if (!withmem) {
newcreatedinterface = new TPZMultiphysicsInterfaceElement(*fMesh,gel,index,neighcompelside,thiscompelside);
}
//.........这里部分代码省略.........
开发者ID:labmec,项目名称:neopz,代码行数:101,代码来源:pzmultiphysicselement.cpp
示例20: UpdateLeakoff
void InputDataStruct::UpdateLeakoff(TPZCompMesh * cmesh)
{
#ifdef PZDEBUG
if(fLeakoffmap.size() == 0)
{//Se a fratura nao alcancou ainda a regiao elastica 2, este mapa estah vazio!!!
//DebugStop();
}
#endif
std::map<int,REAL>::iterator it;
int outVlCount = 0;
for(int i = 0; i < cmesh->ElementVec().NElements(); i++)
{
///////////////////////
TPZCompEl * cel = cmesh->ElementVec()[i];
#ifdef PZDEBUG
if(!cel)
{
DebugStop();
}
#endif
TPZGeoEl * gel = cel->Reference();
if(gel->Dimension() != 1)
{
continue;
}
TPZInterpolatedElement * sp = dynamic_cast <TPZInterpolatedElement*> (cel);
if(!sp)
{
continue;
}
it = globFractInputData.GetLeakoffmap().find(gel->Id());
if(it == globFractInputData.GetLeakoffmap().end())
{
continue;
}
TPZVec<REAL> qsi(1,0.);
cel->Reference()->CenterPoint(cel->Reference()->NSides()-1, qsi);
TPZMaterialData data;
sp->InitMaterialData(data);
sp->ComputeShape(qsi, data);
sp->ComputeSolution(qsi, data);
REAL pfrac = data.sol[0][0];
///////////////////////
REAL deltaT = globFractInputData.actDeltaT();
REAL VlAcum = it->second;
REAL tStar = FictitiousTime(VlAcum, pfrac);
REAL Vlnext = VlFtau(pfrac, tStar + deltaT);
if (fusingLeakOff) {
it->second = Vlnext;
}
else{
it->second = 0.;
}
outVlCount++;
}
#ifdef PZDEBUG
if(outVlCount < globFractInputData.GetLeakoffmap().size())
{
DebugStop();
}
#endif
}
开发者ID:labmec,项目名称:neopz,代码行数:80,代码来源:pznlfluidstructureData.cpp
注:本文中的TPZCompEl类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论