Skip to content

Commit

Permalink
fixing initialize check for seperate fluid equation in AD simulation (S…
Browse files Browse the repository at this point in the history
  • Loading branch information
zasexton committed Mar 16, 2024
1 parent fb17393 commit c499108
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions Code/Source/svFSI/initialize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -439,17 +439,23 @@ void initialize(Simulation* simulation, Vector<double>& timeP)
// degrees of freedom based on the precomputed state-variable (velocity)
// data.
if (eq.phys == Equation_heatF) {
bool fflag = false;
for (int jEq = 0; jEq < com_mod.nEq; jEq++) {
if (std::set<EquationType>{Equation_fluid, Equation_FSI, Equation_CMM, Equation_stokes}.count(com_mod.eq[jEq].phys)) {
fflag = true;
bool fflag = false;
for (int jEq = 0; jEq < com_mod.nEq; jEq++) {
if (std::set < EquationType >
{Equation_fluid, Equation_FSI, Equation_CMM, Equation_stokes}.count(com_mod.eq[jEq].phys)) {
fflag = true;
}
}
if (com_mod.usePrecomp) {
if (!fflag) {
tDof = tDof + nsd;
}
} else {
if (!fflag) {
throw std::runtime_error(
"HeatF equation must be accompanied by a fluid equation or precomputed velocity data.");
}
}
}
if (!fflag && com_mod.usePrecomp) {
tDof = tDof + nsd;
} else {
throw std::runtime_error("HeatF equation must be accompanied by a fluid equation or precomputed velocity data.");
}
}
eq.pNorm = std::numeric_limits<double>::max();
eq.af = 1.0 / (1.0 + eq.roInf);
Expand Down

0 comments on commit c499108

Please sign in to comment.