This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Periodic boundary conditions in c++

0 votes

Hi all,

I want to use periodic boundary conditions using c++ in my recent simulation. I know how to implement pbc's with the python interface, but I can't find the way to do it in c++ with newest fenics version. I try to find a demo or anything like this for the newest fenics, but I couldn't find anything.

All I know by know is, that I have to use the function
"PeriodicBoundaryComputation" to get a map for master and slave dofs. But what can I do with this map?

If anyone could give me a little example for applying pbc's in c++, that would be enough to solve my problem.

asked May 2, 2014 by soply FEniCS Novice (400 points)

1 Answer

+1 vote
 
Best answer

Hi, there is a demo showing Poisson problem with periodic boundary conditions here.

answered May 2, 2014 by MiroK FEniCS Expert (80,920 points)
selected May 2, 2014 by soply

Thank you, somehow I must have miss this demos :) I was sure, that I tried it this way, but apparently I didn't, because it works now. Thanks!

...