[petsc-users] Using DMPlex

Mohammad Hassan Baghaei mhbaghaei at mail.sjtu.edu.cn
Tue Dec 26 00:54:19 CST 2017


Hello

I want to know whether is it possible that a specific field in the section have been defined at some time on edges and other times on the vertices. This change in the dof , I think, may cause problem, especially in the global vector size of the dm. At times when the field changes to be defined on the edges, I think, I need to reset the dof with routine. I know how to do this, thanks to Matt.  But, how I can deal with the global vector. At first, the global vector was defined on the vertices, but by this change. How would the global vector would response? Do I need to change the global vector?

Thanks

Amir

 

 

 

Hello

I am using the DMPlex interface for the solving PDEs.

 

Great. What discretization are you using?

 

A  part of mesh, considering, is staggered grid, at the location of middle of each edge.

 

So you would like to put variables at each edge midpoint?

 

After generation of main grid points, I find it hard to have the staggered grid at the prescribed location.

 

In Plex, the topology is specified by the DMPlex, but the dof layout is specified by a PetscSection. To put

variables on edges, you could use:

 

DMGetDefaultSection(dm, &s);

DMPlexGetDepthStratum(dm, 1, &eStart, &eEnd);

for (e = eStart; e < eEnd; ++e) {

  PetscSectionAddDof(s, e, 1);

}

 

and of course any other dofs you are using.

 

I want to know how to deal with the staggered besides of main grid. Is it better to have another DM for the staggered?

 

Another option is to use several DMDA. This has its own drawbacks.

 

Is it possible to extend the DMChart and inserting the points.

 

If the chart does not have edges, it is because it has not been interpolated. Either pass the PETSC_TRUE, or call

 

  http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DMPLEX/DMPlexInterpolate.html

 

  Thanks,

 

      Matt

 

I would really appreciate for your time.

Amir  





 

-- 

What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
-- Norbert Wiener

 

https://www.cse.buffalo.edu/~knepley/ <http://www.caam.rice.edu/~mk51/> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20171226/2da29146/attachment.html>


More information about the petsc-users mailing list