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

Method anasol missing from API for PhysicsModel #11

Closed
keileg opened this issue Nov 18, 2021 · 2 comments
Closed

Method anasol missing from API for PhysicsModel #11

keileg opened this issue Nov 18, 2021 · 2 comments

Comments

@keileg
Copy link
Contributor

keileg commented Nov 18, 2021

``In the IOT physical model, the physics based model is assumed to have a function anasol

state = pbm.anasol(params)['primary']

This is however not specified in API for PhysicsModels

class PhysicsModel(ABC):

I tried to find the implied method signature from the IFEM repository, but got lost in the class structure in that repo. Is it correct that the method implements something like

def anasol(params: Dict[str, Union[float, List[float]]]) -> Dict[str, np.ndarray]):
    return {'primary': np.ndarray([values_given_information_from_params])
@akva2
Copy link
Collaborator

akva2 commented Nov 18, 2021

that is correct yes, it's a dict with [string : array-like] entries.

the name of the entries are a convention thing, you can do whatever you want as such, but in IFEM-CoSTA we use 'primary' and 'secondary_(x|y|z)'.

it's not in the PhysicsModel because it's not strictly necessary as such, just convenient for testing. I guess @TheBB forgot and stuck in in there without considering whether or not we should really require it.

@keileg
Copy link
Contributor Author

keileg commented Nov 18, 2021

Yes, a hack like that was mentioned.

Thanks a lot, I will adjust my code accordingly.

@keileg keileg closed this as completed Nov 18, 2021
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

No branches or pull requests

2 participants