Skip to content
Snippets Groups Projects
Commit e00cc997 authored by Nicolas Marsic's avatar Nicolas Marsic
Browse files

update maxwell_sibc case

parent aa5d124c
Branches
Tags
No related merge requests found
...@@ -11,11 +11,15 @@ Function{ ...@@ -11,11 +11,15 @@ Function{
angularFreqIm]; // [rad/m] angularFreqIm]; // [rad/m]
// Algebraic data // // Algebraic data //
DefineConstant[x() = {}, // Solution DefineConstant[nRHS = 1]; // Number of RHS for this run
b() = {}]; // Right hand side For i In {0:nRHS-1}
DefineConstant[x~{i}() = {}, // Solution
b~{i}() = {}]; // Right hand side
EndFor
// Control data // // Control data //
DefineConstant[imposeRHS = 0, // Should I use an imposed RHS? DefineConstant[doInit = 0, // Should I initialize some stuff?
doSolve = 0, // Should I solve Ax = b?
doPostpro = 0, // Should I only create a view for x()? doPostpro = 0, // Should I only create a view for x()?
doApply = 0, // Should I only apply x(): x <- Ax? doApply = 0, // Should I only apply x(): x <- Ax?
fileName = "eig.pos"]; // Postpro file name fileName = "eig.pos"]; // Postpro file name
......
...@@ -9,23 +9,32 @@ Resolution{ ...@@ -9,23 +9,32 @@ Resolution{
Operation{ Operation{
Generate[A]; Generate[A];
If(imposeRHS) If(doInit)
CopyRightHandSide[b(), A]; CopySolution[A, x~{0}()];
EndIf EndIf
If(!doPostpro && !doApply) If(doSolve)
// Full solve for first RHS
CopyRightHandSide[b~{0}(), A];
Solve[A]; Solve[A];
CopySolution[A, x()]; CopySolution[A, x~{0}()];
// SolveAgain for other RHSs
For i In {1:nRHS-1}
CopyRightHandSide[b~{i}(), A];
SolveAgain[A];
CopySolution[A, x~{i}()];
EndFor
EndIf EndIf
If(doApply) If(doApply)
CopySolution[x(), A]; CopySolution[x~{0}(), A];
Apply[A]; Apply[A];
CopySolution[A, x()]; CopySolution[A, x~{0}()];
EndIf EndIf
If(doPostpro) If(doPostpro)
CopySolution[x(), A]; CopySolution[x~{0}(), A];
PostOperation[Post]; PostOperation[Post];
EndIf EndIf
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment