FlowModelingControl / flowtorch

flowTorch - a Python library for analysis and reduced-order modeling of fluid flows
GNU General Public License v3.0
131 stars 45 forks source link

Functionality of POD #37

Closed kowshiksri closed 1 year ago

kowshiksri commented 1 year ago

Hi Andre,

I was using the Flowtorch library to perform snapshot POD. After loading initial data and creating an instance of POD class, when I call on the _computedecomposition method it throws an error.

` 17 def compute_decomposition(self, mode="snapshot", solver="svd", device="cpu", precision="single"): 18 if mode == "snapshot": ---> 19 data_matrix = self._data.get_data_matrix() 20 if not data_matrix.device == device: 21 data_matrix.to(device=device)

AttributeError: 'Tensor' object has no attribute 'get_data_matrix'`

The data was passed as a tensor to the POD class, as expected by its constructor class.

I was also unable to find any implementation of the _get_datamatrix method. Is this functionality available? Can POD be performed using the given script?

AndreWeiner commented 1 year ago

Hi Kowshik, the POD class is just an experimental leftover from the initial development of flowtorch. Instead, use flowtorch.analysis.SVD. Have a look at this tutorial for a reference. Best, Andre

kowshiksri commented 1 year ago

ok thank you