- Thank you received: 0
Data structure of mesh for DG methods
3 years 7 months ago #3658
by Younghigh
Data structure of mesh for DG methods was created by Younghigh
Hi, all
When DG methods are employed in the Stokes equation, we tend to use some codes like:
My question is: for a fixed edge or facet, how do we know its inner element or outer element because we use
, and further the direction of its unit normal? Are the both consistent?
Best,
Di Yang
When DG methods are employed in the Stokes equation, we tend to use some codes like:
Code:
mesh = Mesh(geo.GenerateMesh(maxh=0.1, quad_dominated=False))
V = VectorL2(mesh, order=3, dgjumps=True)
n = specialcf.normal(mesh.dim)
u, v = V.TnT()
mean_grad_u = 0.5 * (grad(u)+grad(u.Other()))
jump_v = v-v.Other()
a = BilinearForm(V)
a += InnerProduct(mean_grad_u.trans*n, jump_v) * dx(skeleton=True)
My question is: for a fixed edge or facet, how do we know its inner element or outer element because we use
Code:
jump_v = v-v.Other()
Best,
Di Yang
- christopher
- Offline
- Administrator
Less
More
- Thank you received: 101
3 years 7 months ago #3659
by christopher
Replied by christopher on topic Data structure of mesh for DG methods
Hi,
n and .Other are consistent.
Best
Christopher
n and .Other are consistent.
Best
Christopher
The following user(s) said Thank You: Younghigh
3 years 7 months ago #3661
by Younghigh
Replied by Younghigh on topic Data structure of mesh for DG methods
How to make uniform triangle mesh on the square [-0.5,1.5]*[0,2], not regular domain [0,1]*[0,1]?
3 years 7 months ago - 3 years 7 months ago #3669
by hvwahl
Replied by hvwahl on topic Data structure of mesh for DG methods
Hi Di Yang,
you can make you own python function based on MakeStructured2DMesh in python/meshes.py. You should be able to get the desired effect by just scaling the mesh points appropriately (line 111 of the file).
Best,
Henry
you can make you own python function based on MakeStructured2DMesh in python/meshes.py. You should be able to get the desired effect by just scaling the mesh points appropriately (line 111 of the file).
Best,
Henry
Last edit: 3 years 7 months ago by hvwahl.
3 years 7 months ago #3670
by schruste
Replied by schruste on topic Data structure of mesh for DG methods
You don't need to implement the method yourself, see
ngsolve.org/forum/ngspy-forum/1360-how-t...ain-0-5-1-5-0-2#3663
.
Best,
Christoph
Best,
Christoph
Time to create page: 0.112 seconds