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