-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ToDo] [Core] Revamp Multifreedom Constraints #12787
Comments
I am OK with the changes, but this is super ultra deep change. But originally the constraints were managed in a very different manner, more like pure master-slave stuff. Me and @RiccardoRossi implemented the current B&S and we didn't change the name at the time. FYI @KratosMultiphysics/technical-committee |
Hi everyone! If this task goes ahead, it would be good to try to solve issue #9801 (When using multipoint constraints, the eigensolver produces spurious modes and non-diagonal mass matrices). |
I'm not an expert on eigenanalysis, but my takeaway after scrolling thorugh that issue is that having a separate constrained and unconstrained system would solve that problem. If that's the case then yes, I'm planning to write a B&S based on Note however that the B&S abstraction is going away in the future. |
Hi guys, we (@rubenzorrilla, @roigcarlo and myself) are already on the move for a big proposal on this, and we will address that. |
Hi, I'm assuming that's related to replacing the B&S. Can I get started on revamping the MFCs in the meantime, or are you touching them as well? |
well, the change will not touch the MPCs ... but you will still need them to hold the master and slave info... |
that is, how do you expect to pass the info of what is master and what is slave from outside? |
I wouldn't pass them from the outside. Whatever class is responsible for imposing the constraints (currently the B&S) would decide which DoFs are masters and which are slaves. |
An algorithmic partitioning into masters and slaves would have to follow these rules:
Following these rules would not lead to a unique partition in general. To ensure reproducible partitions, we can also add the extra rule that slaves should be preferably the |
Hi @matekelemen, it has to be possible that the user prescribes what is master and what is slave ... for example because for any reason one wants to have a specifical dof to be used as master and others as slave. This is not to say that it would be nice to have ways to only prescribe the relations to be complied with and the builder and solver takes care of imposing them. Now, if one wants to use lagrange multipliers (or penalty, or variations of it a-la augmented lagrangian) than this is easily accomplieshed by the element interface. What do you need that is not achievable by the element interface? |
If someone wants to manually force a specific master/slave partitioning, that'll have to happen through DataValueContainer (MasterSlaveConstraint already has one). How about this:
|
Motivation
As things stand right now, multifreedom constraints are handled in a rather rigid manner. They are assumed to be imposed using master-slave elimination (hence the name:
MasterSlaveConstraint
) and give off the impression that the constraint object is responsible for the imposition itself.In reality,
BuilderAndSolver
alone is responsible for modifying the linear system to impose these conditions, and it alone can choose what method to use (for example,ResidualBasedBlockBuilderAndSolver
can choose between a weird version of master-slave elimination and Lagrange multipliers). This leads to confusing setups in which "MasterSlaveConstraint
"s are imposed using Lagrange multipliers ¯\_(ツ)_/¯.Things get more complicated as I have to implement penalty-based constraint imposition, so I was thinking of refactoring the system a bit.
Proposal
First of all, rename the misleading
MasterSlaveConstraint
toMultifreedomConstraint
.At their core, multifreedom constraints represent linear equations of the form
where$u_j$ is the $j$ -th DoF, $a^i_j$ refers to the coefficient of the $j$ -th DoF in the $i$ -th constraint equation, and $b^i$ stands for the constraint gap of the $i$ -th constraint equation.
It stands to reason that
MultifreedomConstraint
should then only represent the (nonzero) coefficients, related DoFs and the constraint gap. @sunethwarna tells me that some types of constraints (especially in fluid dynamics) share coefficients between different equations, soMultifreedomConstraint
should represent a set of equations. This is exactly how the interface is defined right now, so no changes there.The first change would be getting rid of
GetMasterDofsVector
andGetSlaveDofsVector
, sinceBuilderAndSolver
decides on what imposition to perform, and how to partition DoFs into masters or slaves if master-slave imposition is chosen.Then, we could get completely rid of the
MASTER
andSLAVE
flags, and no longer flag anyNode
s during constraint imposition.BuilderAndSolver
would store an internal data structure that identifies masters and slaves.Tasks
MasterSlaveConstraint
=>MultifreedomConstraint
LinearMasterSlaveConstraint
=>LinearMultifreedomConstraint
GetMasterDofsVector
andGetSlaveDofsVector
BuilderAndSolver
perform the master/slave partitioning and store the result in internal data structuresThe text was updated successfully, but these errors were encountered: