Skip to content
Snippets Groups Projects
cimResolution.pro 1.13 KiB
Newer Older
/////////////////////////////////////////////////////////////////////
// Resolution for contour integral method.                         //
// Transforms Beyn random source into a divergence free one.       //
// Warning, the master file should include "cimParameters.pro",    //
// and should also define "FormulationCIM" the formulation to use. //
/////////////////////////////////////////////////////////////////////
Resolution{
  { Name Solve;
    System{
      { Name A; NameOfFormulation FormulationCIM; Type ComplexValue; }
      { Name B; NameOfFormulation Source;         Type ComplexValue; }
    }
    Operation{
      // Divergence free source
      If(imposeRHS)
        Generate[B];
        CopyRightHandSide[b(), B];
        Solve[B];
        PostOperation[Source];
      EndIf

      // Beyn (source given by dSrc)
      Generate[A];

      If(!doPostpro && !doApply)
        Solve[A];
        CopySolution[A, x()];
      EndIf

      If(doApply)
        CopySolution[x(), A];
        Apply[A];
        CopySolution[A, x()];
      EndIf

      If(doPostpro)
        CopySolution[x(), A];
        PostOperation[Post];
      EndIf
    }
  }
}