Skip to main content
. 2021 Sep 9;23(9):1193. doi: 10.3390/e23091193
Algorithm 2 Online phase
Require: choose a query parameter θq, choose a time step δtROM>0.
 Initialization: t=t0,ROM=0, α0=0, ξ0=ξD(0);
 Compute Ψu(θq) and Ψv(θq) from the diffuse approximation approach;
for i=1,Nt do
  {u}({x},ti,θq)ΦurA(ti)Ψu(θq);
  {v}({x},ti,θq)ΦvrB(ti)Ψv(θq);
end for
U(θq)[{u}({x},t1,θq),,{u}({x},tNt,θq)];
V(θq)[{v}({x},t1,θq),,{v}({x},tNt,θq)];
 Compute Φ(θq), Γ(θq), Q(θq), αD(ti) and ξD(θi), i=1,,Nt;
while t<Tf do
  tt+δtROM; ti+1,ROM=ti,ROM+δtROM;
  αi+1=αi+δtROMQ(θq)ξi;
  Compute ak(ti+1,ROM), k=1,,mv from the diffuse approximation approach;
  ξki+1=p(αi+1)Tak(ti+1,ROM);
  If needed, reconstruct the high-dimensional displacements/velocity fields:
  {u}{X},ti+1,ROM,θq=Φ(θq)αi+1;
  {v}{X},ti+1,ROM,θq=Γ(θq)ξi+1;
end while