Periodic BCs in parallel

General discussion about Elmer
Post Reply
Franz Pichler
Posts: 196
Joined: 29 Sep 2011, 12:25
Antispam: Yes

Periodic BCs in parallel

Post by Franz Pichler »

I just tried a run of a program that include periodic bcs in serial and in parallel.
The parallel run is ignoring the periodic bcs.

Should that work or is that a feature that only works in serial?

Thanks my Elmer friends
Franz
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Periodic BCs in parallel

Post by raback »

Hi Franz

The periodic BCs need to be in the same partition. For this purpose there is the "-periodic 1 0 0" flag in ElmerGrid. 1 means periodicity in directions 1, 2 or 3, and 0 means no periodicity. Unfortunately this trick can only deal with conforming meshes when using -metis partitioning. The -partition method might work also for nonconforming meshes.

Ideally periodicity should be implemented so that it would work in parallel also even though the periodic counterparts belong to different partition. For the current implementation that would require some additional coding effort though.

-Peter
denis.cohen
Posts: 56
Joined: 15 Dec 2010, 13:50

Re: Periodic BCs in parallel

Post by denis.cohen »

Hi Peter,

Reopening this post.
I also have periodic bc in parallel.
Tried the -periodic but that crashed:
$ ElmerGrid 2 2 mesh3d_fit -metis 4 4 -periodic 0 1 0
Starting program Elmergrid
Elmergrid reading in-line arguments
The mesh will be partitioned with Metis to 4 partitions.
Output will be saved to file mesh3d_fit.

Elmergrid loading data:
-----------------------
Loading mesh in ElmerSolver format from directory mesh3d_fit.
Loading header from mesh.header
Maximum elementtype index is: 706
Allocating for 67473 knots and 125216 elements.
Loading 67473 Elmer nodes from mesh.nodes
Loading 125216 bulk elements from mesh.elements
Loading 14312 boundary elements from mesh.boundary
Elmer mesh loaded succesfully

Elmergrid creating and manipulating meshes:
-------------------------------------------

Elmergrid partitioning meshes:
------------------------------
Finding periodic nodes in direction 2
Coordinate in dimension 2 is at the interval [-0.0524, 0.471]
Looking for 810 periodic nodes
Found all in all 810 periodic nodes.
Making a Metis partitioning for 67473 nodes in 3-dimensions.
Creating a nodal graph of the finite element mesh
There are at maximum 26 connections in nodal graph.
There are at all in all 1286370 connections in nodal graph.
There are 810 periodic connections in nodal graph.
There are 1286370 connections altogether in the graph.
Creating weight for 1286370 connections.
For weighted partitioning Metis subroutine METIS_PartGraphKway is enforced
Setting periodic connections to dominate 1286370
Starting graph partitioning METIS_PartGraphKway.
***ASSERTION failed on line 65 of file fm.c: ComputeCut(graph, where) == graph->mincut
You suggested the -partition option. This takes 4 int. Can you explain? The help line "the mesh will be partitioned in main directions" is not very useful.

Thank you

Denis Cohen
Post Reply