Conversation
…match for solving exists
…rify the apt implementation
|
@SarveshJoshi33 Thanks for making a fork so we can start to review this work. I opened a Pull Request so we can compare changes and make comments here. |
| class DofManager(eqx.Module): | ||
| # TODO get type hints below correct | ||
| # TODO this one could be moved to jax types if we move towards | ||
| # TODO jit safe preconditioners/solvers | ||
| fieldShape: Tuple[int, int] | ||
| isBc: any | ||
| isUnknown: any | ||
| ids: any | ||
| unknownIndices: any | ||
| bcIndices: any | ||
| dofToUnknown: any | ||
| HessRowCoords: any | ||
| HessColCoords: any | ||
| hessian_bc_mask: any |
There was a problem hiding this comment.
It looks like you started making changes to FunctionSpace.py before some newer changes were made to make it an Equinox module. Can you keep the Equinox module implementations of FunctionSpace and DofManager classes and implement your DOFManagerMPC class as a module? Let me know if you want my help.
There was a problem hiding this comment.
Hi Ryan,
I updated the DofManagerMPC class using the updated FunctionSpace with the equinox module and pushed it to the forked repository.
test/MeshFixture.py
Outdated
There was a problem hiding this comment.
It looks like you made changes to test files before they got moved out of the test directory. Could you move these back to where they are in the latest main branch? That way we can see clearly any changes you made. Again, let me know if you want help.
optimism/FunctionSpace.py
Outdated
| return hessian_bc_mask | ||
|
|
||
|
|
||
| # Different class for Multi-Point Constrained Problem |
There was a problem hiding this comment.
| # Different class for Multi-Point Constrained Problem | |
| # DOF Manager for Multi-Point Constrained Problem |
optimism/FunctionSpace.py
Outdated
| from optimism import Mesh | ||
| import equinox as eqx | ||
| import jax.numpy as np | ||
| import numpy as onp |
There was a problem hiding this comment.
| from optimism import Mesh | |
| import equinox as eqx | |
| import jax.numpy as np | |
| import numpy as onp |
These can all be removed as they are imported at the top of the file.
optimism/FunctionSpace.py
Outdated
| import equinox as eqx | ||
| import jax.numpy as np | ||
| import numpy as onp | ||
| from typing import List, Tuple |
There was a problem hiding this comment.
| from typing import List, Tuple |
You can just change line 6 to this.
…the aspect of Objective.py and merge the DofManagerMPC with the original class
|
@cmhamel I have pushed the code on the fork. I am having an issue with non_homogenous_MPC.py, specifically with creating the function space. The error I get is - |
This is a work in progress to implement MPCs.