Author Topic: Solving multiple right hand sides  (Read 5855 times)

d.brands

  • Jr. Member
  • **
  • Posts: 19
Solving multiple right hand sides
« on: March 01, 2022, 03:42:28 AM »
Dear all,

is it possible to solve multiple right hand sides in one solution step?
If yes, how can it be implemented in the elements?

Bests
Dominik

Prof. S. Govindjee

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 1164
Re: Solving multiple right hand sides
« Reply #1 on: March 02, 2022, 12:46:06 AM »
You'll have to explain your use case more fully, but note that it is possible to FORM the residual separately from the TANGent and then separately perform a SOLVe.  Thus the FORM and SOLVe can be performed independently of the TANGent computations.

d.brands

  • Jr. Member
  • **
  • Posts: 19
Re: Solving multiple right hand sides
« Reply #2 on: March 02, 2022, 02:01:24 AM »
Okay, I will try to explain it.

We are working on a problem with displacement and electric fields.
Therefore, we want to compute the effective overall moduli of the computed structure.
This should be done in the way, as it is done in FE^2.
I.e.
A = <A> − L T K^−1 L
with <A> ... volume average of the "individual" moduli (Voigt)
with L ... generalied right hand sides taking into account the sensitivity of the moduli of the individual finite elements.

To avoid the inversion of K, we want to solve the system
K X = L   with X = K^-1 L

Since K is already assembled, we want to provide the further right sides L to the solver, to get the solution together with the solution of the BVP

I hope, this description is helpful.

Prof. R.L. Taylor

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 2649
Re: Solving multiple right hand sides
« Reply #3 on: March 02, 2022, 09:12:06 AM »
 There is a module in feap that does this, it is called formhh.f in ./program.   I uses the current factored matrix (A) to do multiple RHS solutions on an array and returns the reduced moduli you want.  We use it in the FE2 module.

d.brands

  • Jr. Member
  • **
  • Posts: 19
Re: Solving multiple right hand sides
« Reply #4 on: March 02, 2022, 01:17:35 PM »
Thank for this hint.

How can I use this module in a single scale computation?
Assemble the multiple RHS in the Element under isw=3 to the "G-Vector"?
But what is the "Export matrix".

Thanks in advance

Prof. R.L. Taylor

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 2649
Re: Solving multiple right hand sides
« Reply #5 on: March 02, 2022, 04:09:37 PM »
You will have to write a user macro to form L(neq,neqg) -> g(neq,neqg,1) = g(neq,neqg,2) where neqg is the number of RHS you want to solve and 'neq' the number of equations when you form TANG and is passed in cdata.h

Also A(neqg,neqg) must be formed by your user macro.

After you have formed the arrays call formhh(A,g,neqg,neq,neq)

The returned value in A will be what you want.

So to use you just use
TANG    - which forms K and its factors
UMAC    - where UMAC is replaced by the name of your user macro.

formhh uses the factors to do the multiple RHS solves -- it does do them 1 at a time.

I hope this is clear.

Prof. R.L. Taylor

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 2649
Re: Solving multiple right hand sides
« Reply #6 on: March 02, 2022, 04:11:19 PM »
One more thing, you need to allocate the storage for the G and A using either the feap allocation of temporary arrays or fortran allocatable arrays.