Skip to content

New nonzero MALLOC error when using periodic boundary on a variable defined in a subdomain #4296

@AlbertoBittes

Description

@AlbertoBittes

I am trying to apply periodic boundary conditions on my computational domain. I have a system with one variable defined in the whole domain and another variable defined in a subdomain. My problem is a quarter of a sphere, generated by revolving a plane mesh. the second variable is defined only in the red elements in the picture:

Image

I apply periodic boundary conditions between the two bounding planes for the first variable, and another periodic boundary condition for the second variable between the red elements:

First variable periodic boundary:

Image

Those nodes connected to the axis are not included to the set that will delimit the sides for the periodic boundary conditions, because they will give invalid periodic boundary.

Second variable periodic boundary:

Image

When I try to add the constrained element matrix to the system matrix:

dof_map.constrain_element_matrix(Ke, dof_indices_buf);
matrix.add_matrix(Ke, dof_indices_buf);

I get the following error:

[0]PETSC ERROR: Argument out of range
[0]PETSC ERROR: New nonzero at (483,1287) caused a malloc

This happens when I try to add the element matrix of the element selected in the first paraview screenshot. This does not happen if I apply the periodic boundary only on the first variable. Are periodic boundaries supported for variables in subdomains? Can I someway fix this with a supplementary ghosting functor, or am I forced to define the variable in the whole domain and then exclude it via restrict_solve?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions