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

update maxwell_sibc case

parent aa5d124c
No related branches found
No related tags found
No related merge requests found
......@@ -11,11 +11,15 @@ Function{
angularFreqIm]; // [rad/m]
// Algebraic data //
DefineConstant[x() = {}, // Solution
b() = {}]; // Right hand side
DefineConstant[nRHS = 1]; // Number of RHS for this run
For i In {0:nRHS-1}
DefineConstant[x~{i}() = {}, // Solution
b~{i}() = {}]; // Right hand side
EndFor
// 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()?
doApply = 0, // Should I only apply x(): x <- Ax?
fileName = "eig.pos"]; // Postpro file name
......
......@@ -9,23 +9,32 @@ Resolution{
Operation{
Generate[A];
If(imposeRHS)
CopyRightHandSide[b(), A];
If(doInit)
CopySolution[A, x~{0}()];
EndIf
If(!doPostpro && !doApply)
If(doSolve)
// Full solve for first RHS
CopyRightHandSide[b~{0}(), 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
If(doApply)
CopySolution[x(), A];
CopySolution[x~{0}(), A];
Apply[A];
CopySolution[A, x()];
CopySolution[A, x~{0}()];
EndIf
If(doPostpro)
CopySolution[x(), A];
CopySolution[x~{0}(), A];
PostOperation[Post];
EndIf
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment