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

Teuchos_MathExpr: Parsing complex expressions #12313

Open
fjrivero opened this issue Sep 22, 2023 · 4 comments
Open

Teuchos_MathExpr: Parsing complex expressions #12313

fjrivero opened this issue Sep 22, 2023 · 4 comments
Labels
MARKED_FOR_CLOSURE Issue or PR is marked for auto-closure by the GitHub Actions bot. pkg: Teuchos Issues primarily dealing with the Teuchos Package type: question

Comments

@fjrivero
Copy link

Question

We need to parse string math expression with complex syntaxis, as in, e^(jwt)) where j=sqrt(-1).
Does MathExpr accepts complex? Do we need to modify something to used?

Thanks.

@cgcgcg cgcgcg added the pkg: Teuchos Issues primarily dealing with the Teuchos Package label Sep 22, 2023
@cgcgcg
Copy link
Contributor

cgcgcg commented Sep 22, 2023

@bartlettroscoe ?

@jhux2
Copy link
Member

jhux2 commented Sep 22, 2023

@ibaned might be able to help, as well

@ibaned
Copy link
Contributor

ibaned commented Sep 22, 2023

Hi @fjrivero !

One important thing I would like to tell you is that TeuchosParser has evolved into its own software here:

https://github.com/sandialabs/parsegen-cpp

I am not aware of anyone supporting complex numbers yet using these tools, but you should be able to create a modified version of, for example, this calculator tool:

https://github.com/sandialabs/parsegen-cpp/blob/main/src/parsegen_calc.cpp

If you replace double with std::complex<double> in that tool it may be a good starting point for what you are looking for.

Feel free to ask follow-up questions.

Copy link

This issue has had no activity for 365 days and is marked for closure. It will be closed after an additional 30 days of inactivity.
If you would like to keep this issue open please add a comment and/or remove the MARKED_FOR_CLOSURE label.
If this issue should be kept open even with no activity beyond the time limits you can add the label DO_NOT_AUTOCLOSE.
If it is ok for this issue to be closed, feel free to go ahead and close it. Please do not add any comments or change any labels or otherwise touch this issue unless your intention is to reset the inactivity counter for an additional year.

@github-actions github-actions bot added the MARKED_FOR_CLOSURE Issue or PR is marked for auto-closure by the GitHub Actions bot. label Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MARKED_FOR_CLOSURE Issue or PR is marked for auto-closure by the GitHub Actions bot. pkg: Teuchos Issues primarily dealing with the Teuchos Package type: question
Projects
None yet
Development

No branches or pull requests

4 participants