Flow123d  master-f44eb46
Public Member Functions | Private Attributes | Friends | List of all members
Neighbour Class Reference

#include <neighbours.h>

Collaboration diagram for Neighbour:
Collaboration graph
[legend]

Public Member Functions

 Neighbour ()
 
void reinit (MeshBase *mesh, unsigned int elem_idx, unsigned int edge_idx)
 
SideIter side () const
 
unsigned int edge_idx () const
 
Edge edge () const
 
ElementAccessor< 3 > element () const
 

Private Attributes

MeshBasemesh_
 Pointer to Mesh to which belonged. More...
 
unsigned int elem_idx_
 Index of element in Mesh::element_vec_. More...
 
unsigned int edge_idx_
 Index of Edge in Mesh. More...
 

Friends

class MeshBase
 
class Mesh
 
class BCMesh
 

Detailed Description

Navrh algoritmu pro hledani pruniku elementu dvou siti (libovlnych dimenzi) algoritmus postupuje od bodu pruniku pres usecky a polygony k mnohostenum

Vstup: Sit1 dimenze d1 a Sit2 dimenze d2 predpoladam d1<=d2

1) hladam body na hranici pruniku tj. Intersection<d> <d_e1,d_e2> .. prunik ma dimenzi d a pronikaji se simplexy dimenze d_e1, a d_e2

Intersection<0><0,0> .. totozne vrcholy El<0> Intersection<0><0,1> a <1,0> .. vrchol jedne site lezi na hrane druhe site Intersection<0><0,n> a <n,0> .. vrchol lezi na El<n> druhe site

Intersection<0><1,1> .. bodovy prusecik dvou usecek v rovine Intersection<0><1,2> a <2,1> ... prusecik hrany a trojuhelnika ... dalsi zvlastni pripady vcetne <0><3,3> .. tetrahedrony s vrcholem na povrchu druheho

2) liniove pruniky Intersection<1>: Intersection<1><1,1> .. usecky na spolecne primce Intersection<1><1,2> a <2,1>.. usecka v rovine trojuhelnika Intersection<1><1,3> a <3,1> .. usecka a tetrahedron Intersection<1><2,2> .. prusecik dvou trojuhelniku Intersection<1><2,3> a <3,2> .. trojuhelnik a hrana tetrahedronu ..

... doprcic je to fakt hodne moznosti a je otazka, zda je nutne je vsechny rozlisovat

Algoritmus by mel probuhat takto:

1) Najdu vrchol V site 1 a element E site 2 aby V byl v E (to neni tak trivialni, pokud site nepokryvaji stejnou oblast ale snad by to slo hledat v pruniku obalovych boxu) 2) najdu pruseciky P_i hran z vrcholu V s povrchem E, konstruuju vsechny potrebne pruniky elementu majici vrchol V s elementem E

Sousedni elementy spolu s hranami ktere do nich vedou ulozim do prioritni fronty.

3) Vyberu z prioritni fronty novy E, pricemz vyuzivam spositane pruseciky psislusne steny a okoli vrcholu V tj. jdu po hranach po kterych jsem do noveho lementu prisel a najdu vsechny hranove pruniky, pak konstuuju slozitejsi pruniky az mam vsechny pruniky s novym elementem ...

...

Prioritni fronta by preferovala elementy do kterych jsem se nejvicekrat dostal, tim se snazim minimalizovat povrch projite oblasti. Je ale mozne, ze to algoritmus naopak zpomali, pokud je prioritni fronta log(n).

Zpracovani jednoho elementu tedy zahrnuje 1) trasovani hran: pro hranu H: testuju hledam prusecik se ctyrstenem: ANO -> pamatuju si hranovy prunik a ke stene (resp. sousednimu elementu) kde hrana vychazi pridam vychozi hranu NE -> konci ve vrcholu, dalsi hrany vychazejici z vrcholu pridam na seznam hran vchazejicich do elementu

2) po nalezeni pruniku vsech hran, hledam pruniky vsech vchazejicich ploch: jedna plocha ma se vstupni stenou useckovy prunik na jehoz konci jsou: *vstupni hrana

3) Podobne trasuju vchazejici objemy

?? lze nejak vyuzit pokud ma element vice vstupnich sten minimalne se da kontrolovat ...

Struktura systemu pruniku do budoucna: 1) trida IntersectionManager, ma matici vektoru. Na poli A(i,j) je vektor lokalnich souradnic na elementu dimenze i pruniku dimenze j. 2) Jeden intersection objekt je pak iterator dvou elementu a dva indexy lokalnich souradnic v prislusnych vektorech

Prozatim to zjednodusime tak, ze

Nakonec potrebuju pocitat integral pres prunik z nejake funkce f(phi_a(x), phi_b(x)), kde phi_a je bazova funkce na jednom elementu a phi_b na druhem. To budu delat numerickou kvadraturou, takze potrebuji zobrazit prunik na jednotkovy simplex. Pro uzel kvardatury x_i musim najit body a_i a b_i na referencnich elementech A a B. Tj potrebuju lokalni souradnice (to jsou souradnice na referencnich elementech) kvadraturnich bodu. V nic pak umim spocitat hodnotu bazovych funkci a pak i hodnotu funkce f. Class only for VB neighbouring.

Definition at line 117 of file neighbours.h.

Constructor & Destructor Documentation

◆ Neighbour()

Neighbour::Neighbour ( )

Definition at line 26 of file neighbours.cc.

Member Function Documentation

◆ edge()

Edge Neighbour::edge ( ) const
inline

Definition at line 158 of file neighbours.h.

Here is the caller graph for this function:

◆ edge_idx()

unsigned int Neighbour::edge_idx ( ) const
inline

Definition at line 153 of file neighbours.h.

Here is the caller graph for this function:

◆ element()

ElementAccessor< 3 > Neighbour::element ( ) const
inline

Definition at line 163 of file neighbours.h.

Here is the caller graph for this function:

◆ reinit()

void Neighbour::reinit ( MeshBase mesh,
unsigned int  elem_idx,
unsigned int  edge_idx 
)

Definition at line 30 of file neighbours.cc.

◆ side()

SideIter Neighbour::side ( ) const
inline

Definition at line 147 of file neighbours.h.

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ BCMesh

friend class BCMesh
friend

Definition at line 142 of file neighbours.h.

◆ Mesh

friend class Mesh
friend

Definition at line 141 of file neighbours.h.

◆ MeshBase

friend class MeshBase
friend

Definition at line 140 of file neighbours.h.

Member Data Documentation

◆ edge_idx_

unsigned int Neighbour::edge_idx_
private

Index of Edge in Mesh.

Definition at line 138 of file neighbours.h.

◆ elem_idx_

unsigned int Neighbour::elem_idx_
private

Index of element in Mesh::element_vec_.

Definition at line 137 of file neighbours.h.

◆ mesh_

MeshBase* Neighbour::mesh_
private

Pointer to Mesh to which belonged.

Definition at line 136 of file neighbours.h.


The documentation for this class was generated from the following files: