*** Wartungsfenster jeden ersten Mittwoch vormittag im Monat ***

Skip to content
Snippets Groups Projects
Commit 9366fc50 authored by Hanser, Valentin's avatar Hanser, Valentin
Browse files

made real coefficients for HB possible

parent 2007002b
Branches
No related tags found
No related merge requests found
Pipeline #282488 passed
......@@ -472,8 +472,20 @@ void nonLinCF_harmonicBalance<T, DIM>::Update(const vector<shared_ptr<Coefficien
val_in_c = 0;
for(j = 0; j!= ptrInput_i.size(); ++j){
ptrInput_i[j]->Evaluate(this->mips[el][ip], fV_tmp);
val_in_c += fV_tmp(0) * std::exp( 1i * omega_i[j] * ti[i]);
if(ptrInput_i.size() == omega_i.size()){
// complex
val_in_c += fV_tmp(0) * std::exp( 1i * omega_i[j] * ti[i]);
}
else{
if ( j % 2 == 0){
// cosine
val_in_c += fV_tmp(0) * std::cos(omega_i[static_cast<unsigned int>(j/2)] * ti[i]);
}
else{
// sine
val_in_c += fV_tmp(0) * std::sin(omega_i[static_cast<unsigned int>(j/2)] * ti[i]);
}
}
}
// TODO: let the user decide....
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment