[petsc-users] Regarding DM Labels

MUKKUND SUNJII mukkundsunjii at gmail.com
Mon Jun 8 14:42:35 CDT 2020


Greetings, 

I am working on modifying the shallow water model in ex11 for the purpose of my thesis. 

I wish to run a specific dam break scenario using this model. In the scenario, the velocity fields of certain cells must be constrained. That is I want to create an “artificial wall” inside the domain by constraining the value [uh] to not change. 

For this purpose, I tried creating a separate label in the DM. Further, I added the cells whose velocity values I wanted to constrain to the label using the routine :  DMLabelSetValue(labelWall, c, 100);

Next, in the routine where the boundary conditions are set, I pass a separate command :

PetscDSAddBoundary(prob, DM_BC_ESSENTIAL, "wall", "DamWall", 0, 1, &comp, (void (*)(void)) PhysicsBoundary_Dam_Wall, sizeof(damWallids), &damWallids, phys);

Ofcourse, in the function PhysicsBoundary_Dam_Wall() I set the vector value of [uh] to 0. When I do run the program, I do not see any of this in play (i.e., the values are not being constrained). 

Is there a smarter way to go about this or would you suggest a correction in my current method?

Thank you in advance for your wonderful suggestions and work!

Regards, 

Mukkund Sunjii 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200608/aeee8a8c/attachment.html>


More information about the petsc-users mailing list