[petsc-users] Testing DMPlex new functionalities

Luc Berger-Vergiat lb2653 at columbia.edu
Thu Jan 22 12:08:13 CST 2015


Hi all,
I'm trying to test some functionalities in DMPlex, specifically I want 
to do a 2d fem simulation using a mesh generated by GMSH.
At this point I am trying to understand how Dirichlet BC can be applied.

Can you explain to me what arguments I have to pass to:
DMPlexAddBoundary()?

I am attaching a little bit of c code and my mesh.geo and mesh.msh so 
that you understand the context.
The BCs I want to apply are displacement of 0.2 in the y direction if y==1.0
0.0 in the x direction if y==0.0

-- 
Best,
Luc

-------------- next part --------------
A non-text attachment was scrubbed...
Name: elast1.c
Type: text/x-csrc
Size: 1204 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150122/99fb0f40/attachment.c>
-------------- next part --------------
// Gmsh project created on Wed May 29 23:30:10 2013
// Light Options
General.Light0X = -0.70;
General.Light0Y = -0.70;
General.Light0Z = 0;

// Mesh Options
Mesh.RecombineAll=1; 
Mesh.Algorithm=8; 
Mesh.SubdivisionAlgorithm=1;
Mesh.ColorCarousel=0;
Mesh.Smoothing = 10; // Elliptic smoother

// Parameters
pw  = 1.0E-5; // Plate width
xx  = 100;
nn  = xx/2+1; // Number of nodes on each side of the square
pr  = 1.0;    // Progression of element sizes 
cl1 = 0.2;   // Mesh size - Not used in structured

// Nodes
//   4---3
//   |   |
//   1---2
Point(1) = {0, 0, 0, cl1};
Point(2) = {1, 0, 0, cl1};
Point(3) = {1, 1, 0, cl1};
Point(4) = {0, 1, 0, cl1};

// Exterior sides of the Square
//  4--iii--3
//  |       |
//  iv      ii
//  |       |
//  1-- i --2
Line(1) = {1, 2};
Line(2) = {2, 3};
Line(3) = {3, 4};
Line(4) = {4, 1};

// Surface
Line Loop(6) = { 1, 2, 3, 4};
Ruled Surface(7) = {6};

// Physical Surface
Physical Surface(1) = {7};
Physical Line(10) = {1};
Physical Line(11) = {2};
Physical Line(12) = {3};
Physical Line(13) = {4};
#Physical Line("bottom") = {1};
#Physical Line("right") = {2};
#Physical Line("left") = {3};
#Physical Line("top") = {4};
-------------- next part --------------
A non-text attachment was scrubbed...
Name: square.msh
Type: model/mesh
Size: 11040 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150122/99fb0f40/attachment.msh>


More information about the petsc-users mailing list