Probably what should happen is that everything is done with the user_index, and that everything with respect to that should be done in the NematicSystemMPI class. Hence, a non-const reference to a Triangulation would have to be passed in, and NematicSystemMPI would just have to make sure that the user_index are cleared at the end. Further, the information that's needed to set internal boundary conditions is a struct which contains:
A function which eats a cell object and spits out an unsigned int which corresponds to the internal region which will have boundaries.
A map between unsigned ints (perhaps aliased as internal_region_id or something) and dealii::Function pointers.
Then the functions internal to NematicSystemMPI just set the user_index based on the function from 1. and then add lines to the AffineConstraints objects using 2. and the SetDefectBoundaries function (although I should rename that for sure).
Probably what should happen is that everything is done with the
user_index
, and that everything with respect to that should be done in theNematicSystemMPI
class. Hence, a non-const reference to aTriangulation
would have to be passed in, andNematicSystemMPI
would just have to make sure that theuser_index
are cleared at the end. Further, the information that's needed to set internal boundary conditions is a struct which contains:internal_region_id
or something) and dealii::Function pointers.Then the functions internal to
NematicSystemMPI
just set theuser_index
based on the function from 1. and then add lines to theAffineConstraints
objects using 2. and theSetDefectBoundaries
function (although I should rename that for sure).