Skip to content

CtcLohner porting#352

Open
godardma wants to merge 8 commits intocodac-team:codac2_devfrom
godardma:lohner
Open

CtcLohner porting#352
godardma wants to merge 8 commits intocodac-team:codac2_devfrom
godardma:lohner

Conversation

@godardma
Copy link
Copy Markdown
Collaborator

No description provided.

Comment on lines +23 to +33
h(h),
direction((forward) ? FWD : BWD),
eps(eps),
contractions(contractions),
u(u0),
z(u0 - u0.mid()),
r(z),
B(Matrix::eye(dim,dim)),
Binv(Matrix::eye(dim,dim)),
u_hat(u0.mid()),
f(f) {}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Les noms des arguments se confondent avec ceux des attributs -> bug possible ?
(par convention dans Codac : les attributs commencent par '_')

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On m'a dit de recopier j'ai recopié... mais je suis d'accord que respecter la convention est préférable.

if (u_0.is_superset(u_1)) {
return u_0;
} else {
u_0 = (1 + eps) * u_1 - eps * u_1;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cette ligne est étrange.. u_0 = u_1 ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

u_1 est un IntervalVector (voir ligne 65) donc " epsu_1 - epsu_1 " est non nul et u_0 != u_1.

*/
class LohnerAlgorithm {
public:
constexpr static const double FWD = 1., BWD = -1.;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Je ne suis pas sûr. Autant dans le CtcLohner on utilise la classe TimePropag, autant dans l'algo lui-même la notion de forward ou backward est représenté par un double 1 ou -1 (stocké dans _direction) pour éviter des "if / else" dans le code. La seule apparition de la variable direction est suffisante pour gérer le sens de propagation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants