time-dependent model reduction
******************* This email originates from outside Imperial. Do not click on links and attachments unless you recognise the sender. If you trust the sender, add them to your safe senders list https://spam.ic.ac.uk/SpamConsole/Senders.aspx to disable email stamping for this address. ******************* Dear all, I would like to implement a time-dependent model reduction. To do that, I want to mirror some of the class structure in the reduced order setting. I would like to start with the UnsteadySystem class, since there the time-stepping takes place. Now I am not so familiar with this factory pattern scheme. What would I need to do to have a, say UnsteadySystem_ReducedOrder class, which (for a start) does the same as the UnsteadySystem class and can be called with a different EQTYPE identifier in the session file? I want to use it for UnsteadyNavierStokes, the incompressible case. Thanks for any help, Martin Hess -- -- Martin Hess, Ph.D., Post-doctoral research fellow SISSA mathLab, International School for Advanced Studies Office A-434 (4th floor), via Bonomea 265, I-34136 Trieste, Italy phone: +39 040 3787 491 email: mhess@sissa.it
HI Martin, Thanks for your email. Possibly the easiest place to start with for now is within the sovler/IncNavierStokesSolver directory. If you were to copy EquationSystems/VelocityCorrectionScheme.cpp (and .h) file to MyNewScheme.cpp and then change the details at the top of the .cpp file from string VelocityCorrectionScheme::className = SolverUtils::GetEquationSystemFactory().RegisterCreatorFunction( "VelocityCorrectionScheme", VelocityCorrectionScheme::create); to string VelocityCorrectionScheme::className = SolverUtils::GetEquationSystemFactory().RegisterCreatorFunction( “MyNewScheme", VelocityCorrectionScheme::create); you possibly would have the building block you need. You will need to add MyNewScheme.cpp to the CMakeLists.txt file in sovler/IncNavierStokesSolver. Then if in the input xml file you specify <I PROPERTY="SolverType" VALUE=“MyNewScheme" /> it would use the definition the myNewScheme.cpp file. The UnsteadySystem.cpp file is not directly in a factory pattern but rather part of the class hierarchy so I think it might be easier to start further down the class hierarchy in the solver part of the code. Cheers, Spencer. Spencer Sherwin FREng, FRAeS Head of Aerodynamics Section, Director of Research Computing Service, Professor of Computational Fluid Mechanics, Department of Aeronautics, s.sherwin@imperial.ac.uk<mailto:s.sherwin@imperial.ac.uk> South Kensington Campus, Phone: +44 (0)20 7594 5052 Imperial College London, Fax: +44 (0)20 7594 1974 London, SW7 2AZ, UK http://www.imperial.ac.uk/people/s.sherwin/ On 2 Jul 2020, at 12:35, Martin Wilfried Hess <mhess@sissa.it<mailto:mhess@sissa.it>> wrote: ******************* This email originates from outside Imperial. Do not click on links and attachments unless you recognise the sender. If you trust the sender, add them to your safe senders list https://spam.ic.ac.uk/SpamConsole/Senders.aspx to disable email stamping for this address. ******************* Dear all, I would like to implement a time-dependent model reduction. To do that, I want to mirror some of the class structure in the reduced order setting. I would like to start with the UnsteadySystem class, since there the time-stepping takes place. Now I am not so familiar with this factory pattern scheme. What would I need to do to have a, say UnsteadySystem_ReducedOrder class, which (for a start) does the same as the UnsteadySystem class and can be called with a different EQTYPE identifier in the session file? I want to use it for UnsteadyNavierStokes, the incompressible case. Thanks for any help, Martin Hess -- -- Martin Hess, Ph.D., Post-doctoral research fellow SISSA mathLab, International School for Advanced Studies Office A-434 (4th floor), via Bonomea 265, I-34136 Trieste, Italy phone: +39 040 3787 491 email: mhess@sissa.it<mailto:mhess@sissa.it> _______________________________________________ Nektar-users mailing list Nektar-users@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/nektar-users
Thank you very much! It seems to be working after I replaced all the occurrences of "VelocityCorrectionScheme" with "MyNewScheme" in MyNewScheme.cpp and MyNewScheme.h. Martin Hess On 7/8/20 7:36 PM, Sherwin, Spencer J wrote:
HI Martin,
Thanks for your email. Possibly the easiest place to start with for now is within the sovler/IncNavierStokesSolver directory. If you were to copy EquationSystems/VelocityCorrectionScheme.cpp (and .h) file to MyNewScheme.cpp and then change the details at the top of the .cpp file from
string VelocityCorrectionScheme::className = SolverUtils::GetEquationSystemFactory().RegisterCreatorFunction( "VelocityCorrectionScheme", VelocityCorrectionScheme::create);
to
string VelocityCorrectionScheme::className = SolverUtils::GetEquationSystemFactory().RegisterCreatorFunction( “MyNewScheme", VelocityCorrectionScheme::create);
you possibly would have the building block you need. You will need to add MyNewScheme.cpp to the CMakeLists.txt file in sovler/IncNavierStokesSolver.
Then if in the input xml file you specify
<I PROPERTY="SolverType" VALUE=“MyNewScheme" />
it would use the definition the myNewScheme.cpp file.
The UnsteadySystem.cpp file is not directly in a factory pattern but rather part of the class hierarchy so I think it might be easier to start further down the class hierarchy in the solver part of the code.
Cheers, Spencer.
Spencer Sherwin FREng, FRAeS Head of Aerodynamics Section, Director of Research Computing Service, Professor of Computational Fluid Mechanics, Department of Aeronautics, s.sherwin@imperial.ac.uk <mailto:s.sherwin@imperial.ac.uk> South Kensington Campus, Phone: +44 (0)20 7594 5052 Imperial College London, Fax: +44 (0)20 7594 1974 London, SW7 2AZ, UK http://www.imperial.ac.uk/people/s.sherwin/
On 2 Jul 2020, at 12:35, Martin Wilfried Hess <mhess@sissa.it <mailto:mhess@sissa.it>> wrote:
******************* This email originates from outside Imperial. Do not click on links and attachments unless you recognise the sender. If you trust the sender, add them to your safe senders list https://spam.ic.ac.uk/SpamConsole/Senders.aspx to disable email stamping for this address. *******************
Dear all,
I would like to implement a time-dependent model reduction. To do that, I want to mirror some of the class structure in the reduced order setting.
I would like to start with the UnsteadySystem class, since there the time-stepping takes place. Now I am not so familiar with this factory pattern scheme.
What would I need to do to have a, say UnsteadySystem_ReducedOrder class, which (for a start) does the same as the UnsteadySystem class and can be called with a different EQTYPE identifier in the session file?
I want to use it for UnsteadyNavierStokes, the incompressible case.
Thanks for any help,
Martin Hess
--
-- Martin Hess, Ph.D., Post-doctoral research fellow
SISSA mathLab, International School for Advanced Studies Office A-434 (4th floor), via Bonomea 265, I-34136 Trieste, Italy phone: +39 040 3787 491 email: mhess@sissa.it <mailto:mhess@sissa.it>
_______________________________________________ Nektar-users mailing list Nektar-users@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/nektar-users
-- -- Martin Hess, Ph.D., Post-doctoral research fellow SISSA mathLab, International School for Advanced Studies Office A-434 (4th floor), via Bonomea 265, I-34136 Trieste, Italy phone: +39 040 3787 491 email: mhess@sissa.it
Dear Spencer, I managed to do a few things within the scope of VelocityCorrectionScheme.cpp but I did not reach the system matrices. For example I would need the matrix used for the Helmholtz solve as in m_fields[i]->HelmSolve( ... ); Can this matrix be obtained from VelocityCorrectionScheme.cpp ? Of course I could solve for every canonical basis function and thus build the inverse matrix column-by-column, but this is very cumbersome and limiting future extension. Thanks, Martin Hess On 2020-07-08 19:36, Sherwin, Spencer J wrote:
HI Martin,
Thanks for your email. Possibly the easiest place to start with for now is within the sovler/IncNavierStokesSolver directory. If you were to copy EquationSystems/VelocityCorrectionScheme.cpp (and .h) file to MyNewScheme.cpp and then change the details at the top of the .cpp file from
string VelocityCorrectionScheme::className =
SolverUtils::GetEquationSystemFactory().RegisterCreatorFunction( "VelocityCorrectionScheme", VelocityCorrectionScheme::create);
to
string VelocityCorrectionScheme::className =
SolverUtils::GetEquationSystemFactory().RegisterCreatorFunction( “MyNewScheme", VelocityCorrectionScheme::create);
you possibly would have the building block you need. You will need to add MyNewScheme.cpp to the CMakeLists.txt file in sovler/IncNavierStokesSolver.
Then if in the input xml file you specify
<I PROPERTY="SolverType" VALUE=“MyNewScheme" />
it would use the definition the myNewScheme.cpp file.
The UnsteadySystem.cpp file is not directly in a factory pattern but rather part of the class hierarchy so I think it might be easier to start further down the class hierarchy in the solver part of the code.
Cheers, Spencer.
Spencer Sherwin FREng, FRAeS Head of Aerodynamics Section, Director of Research Computing Service, Professor of Computational Fluid Mechanics, Department of Aeronautics, s.sherwin@imperial.ac.uk South Kensington Campus, Phone: +44 (0)20 7594 5052 Imperial College London, Fax: +44 (0)20 7594 1974 London, SW7 2AZ, UK http://www.imperial.ac.uk/people/s.sherwin/
On 2 Jul 2020, at 12:35, Martin Wilfried Hess <mhess@sissa.it> wrote:
******************* This email originates from outside Imperial. Do not click on links and attachments unless you recognise the sender. If you trust the sender, add them to your safe senders list https://spam.ic.ac.uk/SpamConsole/Senders.aspx to disable email stamping for this address. *******************
Dear all,
I would like to implement a time-dependent model reduction. To do that, I want to mirror some of the class structure in the reduced order setting.
I would like to start with the UnsteadySystem class, since there the time-stepping takes place. Now I am not so familiar with this factory pattern scheme.
What would I need to do to have a, say UnsteadySystem_ReducedOrder class, which (for a start) does the same as the UnsteadySystem class and can be called with a different EQTYPE identifier in the session file?
I want to use it for UnsteadyNavierStokes, the incompressible case.
Thanks for any help,
Martin Hess
--
-- Martin Hess, Ph.D., Post-doctoral research fellow
SISSA mathLab, International School for Advanced Studies Office A-434 (4th floor), via Bonomea 265, I-34136 Trieste, Italy phone: +39 040 3787 491 email: mhess@sissa.it
_______________________________________________ Nektar-users mailing list Nektar-users@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/nektar-users
Dear Martin, I believe it might be possible to get hold of the matrix (or at least we could add an access method to allow this) but it would not then be possible to update the matrix in the library. Would that be sufficient for your purposes? The reason is that we would not want to be able to change the matrix system in a solve that could then inadvertently change the matrix for another part of the system. To modify an existing matrix system (which we do sometime for preconditioning) we would typically do this at the library level and probably give the matrix a new type/key. What is the operator you are trying to implement? Cheers, Spencer. Spencer Sherwin FREng, FRAeS Head of Aerodynamics Section, Director of Research Computing Service, Professor of Computational Fluid Mechanics, Department of Aeronautics, South Kensington Campus, Imperial College London, SW7 2AZ, UK Phone: +44 (0)20 7594 5052 http://www.imperial.ac.uk/people/s.sherwin/ On 12 Aug 2020, at 21:46, Martin Wilfried Hess <mhess@sissa.it<mailto:mhess@sissa.it>> wrote: Dear Spencer, I managed to do a few things within the scope of VelocityCorrectionScheme.cpp but I did not reach the system matrices. For example I would need the matrix used for the Helmholtz solve as in m_fields[i]->HelmSolve( ... ); Can this matrix be obtained from VelocityCorrectionScheme.cpp ? Of course I could solve for every canonical basis function and thus build the inverse matrix column-by-column, but this is very cumbersome and limiting future extension. Thanks, Martin Hess On 2020-07-08 19:36, Sherwin, Spencer J wrote: HI Martin, Thanks for your email. Possibly the easiest place to start with for now is within the sovler/IncNavierStokesSolver directory. If you were to copy EquationSystems/VelocityCorrectionScheme.cpp (and .h) file to MyNewScheme.cpp and then change the details at the top of the .cpp file from string VelocityCorrectionScheme::className = SolverUtils::GetEquationSystemFactory().RegisterCreatorFunction( "VelocityCorrectionScheme", VelocityCorrectionScheme::create); to string VelocityCorrectionScheme::className = SolverUtils::GetEquationSystemFactory().RegisterCreatorFunction( “MyNewScheme", VelocityCorrectionScheme::create); you possibly would have the building block you need. You will need to add MyNewScheme.cpp to the CMakeLists.txt file in sovler/IncNavierStokesSolver. Then if in the input xml file you specify <I PROPERTY="SolverType" VALUE=“MyNewScheme" /> it would use the definition the myNewScheme.cpp file. The UnsteadySystem.cpp file is not directly in a factory pattern but rather part of the class hierarchy so I think it might be easier to start further down the class hierarchy in the solver part of the code. Cheers, Spencer. Spencer Sherwin FREng, FRAeS Head of Aerodynamics Section, Director of Research Computing Service, Professor of Computational Fluid Mechanics, Department of Aeronautics, s.sherwin@imperial.ac.uk<mailto:s.sherwin@imperial.ac.uk> South Kensington Campus, Phone: +44 (0)20 7594 5052 Imperial College London, Fax: +44 (0)20 7594 1974 London, SW7 2AZ, UK http://www.imperial.ac.uk/people/s.sherwin/ On 2 Jul 2020, at 12:35, Martin Wilfried Hess <mhess@sissa.it> wrote: ******************* This email originates from outside Imperial. Do not click on links and attachments unless you recognise the sender. If you trust the sender, add them to your safe senders list https://spam.ic.ac.uk/SpamConsole/Senders.aspx to disable email stamping for this address. ******************* Dear all, I would like to implement a time-dependent model reduction. To do that, I want to mirror some of the class structure in the reduced order setting. I would like to start with the UnsteadySystem class, since there the time-stepping takes place. Now I am not so familiar with this factory pattern scheme. What would I need to do to have a, say UnsteadySystem_ReducedOrder class, which (for a start) does the same as the UnsteadySystem class and can be called with a different EQTYPE identifier in the session file? I want to use it for UnsteadyNavierStokes, the incompressible case. Thanks for any help, Martin Hess -- -- Martin Hess, Ph.D., Post-doctoral research fellow SISSA mathLab, International School for Advanced Studies Office A-434 (4th floor), via Bonomea 265, I-34136 Trieste, Italy phone: +39 040 3787 491 email: mhess@sissa.it _______________________________________________ Nektar-users mailing list Nektar-users@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/nektar-users
Thanks, I have another look to get hold of the matrix. I want to project the system solve onto a reduced order space, i.e., given a system A x = f and a rectangular matrix V, which is projecting onto the reduced space, compute (V^T A V) (V^T x) = (V^T f) Currently I have the parameter-dependency only in the forcing, so A does not change (I think...). In more complicated settings like a parameter-dependent geometry, it would become more involved. Martin On 8/14/20 10:25 AM, Sherwin, Spencer J wrote:
Dear Martin,
I believe it might be possible to get hold of the matrix (or at least we could add an access method to allow this) but it would not then be possible to update the matrix in the library. Would that be sufficient for your purposes? The reason is that we would not want to be able to change the matrix system in a solve that could then inadvertently change the matrix for another part of the system.
To modify an existing matrix system (which we do sometime for preconditioning) we would typically do this at the library level and probably give the matrix a new type/key.
What is the operator you are trying to implement?
Cheers, Spencer.
Spencer Sherwin FREng, FRAeS Head of Aerodynamics Section, Director of Research Computing Service, Professor of Computational Fluid Mechanics, Department of Aeronautics, South Kensington Campus, Imperial College London, SW7 2AZ, UK Phone: +44 (0)20 7594 5052 http://www.imperial.ac.uk/people/s.sherwin/
On 12 Aug 2020, at 21:46, Martin Wilfried Hess <mhess@sissa.it <mailto:mhess@sissa.it>> wrote:
Dear Spencer,
I managed to do a few things within the scope of VelocityCorrectionScheme.cpp but I did not reach the system matrices.
For example I would need the matrix used for the Helmholtz solve as in
m_fields[i]->HelmSolve( ... );
Can this matrix be obtained from VelocityCorrectionScheme.cpp ?
Of course I could solve for every canonical basis function and thus build the inverse matrix column-by-column, but this is very cumbersome and limiting future extension.
Thanks, Martin Hess
On 2020-07-08 19:36, Sherwin, Spencer J wrote:
HI Martin, Thanks for your email. Possibly the easiest place to start with for now is within the sovler/IncNavierStokesSolver directory. If you were to copy EquationSystems/VelocityCorrectionScheme.cpp (and .h) file to MyNewScheme.cpp and then change the details at the top of the .cpp file from string VelocityCorrectionScheme::className = SolverUtils::GetEquationSystemFactory().RegisterCreatorFunction( "VelocityCorrectionScheme", VelocityCorrectionScheme::create); to string VelocityCorrectionScheme::className = SolverUtils::GetEquationSystemFactory().RegisterCreatorFunction( “MyNewScheme", VelocityCorrectionScheme::create); you possibly would have the building block you need. You will need to add MyNewScheme.cpp to the CMakeLists.txt file in sovler/IncNavierStokesSolver. Then if in the input xml file you specify <I PROPERTY="SolverType" VALUE=“MyNewScheme" /> it would use the definition the myNewScheme.cpp file. The UnsteadySystem.cpp file is not directly in a factory pattern but rather part of the class hierarchy so I think it might be easier to start further down the class hierarchy in the solver part of the code. Cheers, Spencer. Spencer Sherwin FREng, FRAeS Head of Aerodynamics Section, Director of Research Computing Service, Professor of Computational Fluid Mechanics, Department of Aeronautics, s.sherwin@imperial.ac.uk <mailto:s.sherwin@imperial.ac.uk> South Kensington Campus, Phone: +44 (0)20 7594 5052 Imperial College London, Fax: +44 (0)20 7594 1974 London, SW7 2AZ, UK http://www.imperial.ac.uk/people/s.sherwin/
On 2 Jul 2020, at 12:35, Martin Wilfried Hess <mhess@sissa.it> wrote: ******************* This email originates from outside Imperial. Do not click on links and attachments unless you recognise the sender. If you trust the sender, add them to your safe senders list https://spam.ic.ac.uk/SpamConsole/Senders.aspx to disable email stamping for this address. ******************* Dear all, I would like to implement a time-dependent model reduction. To do that, I want to mirror some of the class structure in the reduced order setting. I would like to start with the UnsteadySystem class, since there the time-stepping takes place. Now I am not so familiar with this factory pattern scheme. What would I need to do to have a, say UnsteadySystem_ReducedOrder class, which (for a start) does the same as the UnsteadySystem class and can be called with a different EQTYPE identifier in the session file? I want to use it for UnsteadyNavierStokes, the incompressible case. Thanks for any help, Martin Hess -- -- Martin Hess, Ph.D., Post-doctoral research fellow SISSA mathLab, International School for Advanced Studies Office A-434 (4th floor), via Bonomea 265, I-34136 Trieste, Italy phone: +39 040 3787 491 email: mhess@sissa.it _______________________________________________ Nektar-users mailing list Nektar-users@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/nektar-users
-- -- Martin Hess, Ph.D., Post-doctoral research fellow SISSA mathLab, International School for Advanced Studies Office A-434 (4th floor), via Bonomea 265, I-34136 Trieste, Italy phone: +39 040 3787 491 email: mhess@sissa.it
participants (2)
- 
                
                Martin Wilfried Hess
- 
                
                Sherwin, Spencer J