Description
In a number of places, the infrastructure for coupling svMultiPhysics to svZeroDSolver assumes that the coupling is happening for the first equation. This means that e.g. in electromechanics simulations (introduced in #578) the structural mechanics equation needs to be the first. If electrophysiology is the first equation, the 0D solver doesn't run, and no error message or warning is printed to make the user aware of this.
One instance of this is
|
for (auto& bc : com_mod.eq[0].bc) { |
|
// Check for coupled faces (Dir, Neu via cplBC) or Coupled BCs |
|
if (bc.cplBCptr != -1 || utils::btest(bc.bType, static_cast<int>(consts::BoundaryConditionType::bType_Coupled))) { |
|
com_mod.cplBC.coupled = true; |
|
break; |
|
} |
|
} |
The flag com_mod.cplBC.coupled is set to true only if com_mod.eq[0].bc contains some coupled condition. If the coupled condition is in some other equation, then com_mod.cplBC.coupled remains false, and the 0D solver is silently never called.
A similar behavior is happening in a few other places (I could find similar things in Integrator and set_bc.cpp, but there might be a few more).
Reproduction
From the branch of #578, try running an electromechanics simulation coupled to svZeroDSolver for the structure boundary conditions. The first equation must be CEP, the second struct.
Expected behavior
The coupling with the 0D solver should work independently of the ordering of the equations. The ordering of the equations should affect the order in which they are solved in partitioned schemes, but not the BCs that are applied to them.
Should that be impossible (but I don't see why it should), at least an error message should be raised to notify the user that the 0D solver is not being called despite being specified in the XML file.
Additional context
No response
Code of Conduct
Description
In a number of places, the infrastructure for coupling
svMultiPhysicstosvZeroDSolverassumes that the coupling is happening for the first equation. This means that e.g. in electromechanics simulations (introduced in #578) the structural mechanics equation needs to be the first. If electrophysiology is the first equation, the 0D solver doesn't run, and no error message or warning is printed to make the user aware of this.One instance of this is
svMultiPhysics/Code/Source/solver/initialize.cpp
Lines 416 to 422 in 042a155
The flag
com_mod.cplBC.coupledis set to true only ifcom_mod.eq[0].bccontains some coupled condition. If the coupled condition is in some other equation, thencom_mod.cplBC.coupledremainsfalse, and the 0D solver is silently never called.A similar behavior is happening in a few other places (I could find similar things in
Integratorandset_bc.cpp, but there might be a few more).Reproduction
From the branch of #578, try running an electromechanics simulation coupled to
svZeroDSolverfor the structure boundary conditions. The first equation must beCEP, the secondstruct.Expected behavior
The coupling with the 0D solver should work independently of the ordering of the equations. The ordering of the equations should affect the order in which they are solved in partitioned schemes, but not the BCs that are applied to them.
Should that be impossible (but I don't see why it should), at least an error message should be raised to notify the user that the 0D solver is not being called despite being specified in the XML file.
Additional context
No response
Code of Conduct