How to get intermediate variables in function solvetime

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to get intermediate variables in function solvetime

lusongno1
I call ex_navierstokes6 function to solve time-dependent flow around a cylinder and it works fine.
However, I want to take out the assembled matrix (such as stiffness matrix, mass matrix, etc.) during the time step, but it is embedded in the FEA kernel. I can only see this line of code which call the embedding functions:
````
if ~(nargin||nargout),help mfilename,return,end,varargout=cell(1,nargout);[varargout{:}]=featool('feval','solvetime',varargin{:});if ~ nargout,clear varargout,end
````
Is there any way I can get these intermediate data? It is important for my research.
Reply | Threaded
Open this post in threaded view
|

Re: How to get intermediate variables in function solvetime

Precise Simulation
Administrator
The built-in solvers currently can't return FEM matrices, however you can access and manipulate the system matrix and load vector using solver hooks

https://www.featool.com/doc/solver#solver_hooks

Alternatively, you can use the assembly functions to define your own custom solver (and thereby access the matrices)

https://www.featool.com/doc/Classic_PDE_01a_poisson1#tut_pde01_cli3

https://www.featool.com/doc/assembleprob_8m
https://www.featool.com/doc/assemblea_8m
https://www.featool.com/doc/assemblef_8m