Skip to content
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

Allow turning off linearity checks in bilinear and linear forms #153

Merged
merged 2 commits into from
Apr 19, 2024

Conversation

e-moral-sanchez
Copy link
Contributor

@e-moral-sanchez e-moral-sanchez commented Apr 18, 2024

Add the boolean flag check_linearity to the constructors of BilinearForm and LinearForm. The default value is True. If set to False, the linearity checks are turned off completely. This is different than the existing flag ignore_linearity_errors, which controls whether we get a warning or an error when the linearity check fails.

The new flag might be useful when the expression in the bilinear or linear form is complicated, because then the linearity check calls the SymPy Expr method .expand(deep=True), which is recursive and can take a very long time.

Copy link
Member

@yguclu yguclu left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@yguclu yguclu changed the title Add boolean to turn off linearity check when declaring bilinear and linear forms Allow turning off linearity checks in bilinear and linear forms Apr 19, 2024
@yguclu yguclu merged commit 809b2e0 into master Apr 19, 2024
5 checks passed
@yguclu yguclu deleted the check_linearity branch April 19, 2024 09:54
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