Skip to content
Snippets Groups Projects
Commit 9de4957c authored by Guillaume Demesy's avatar Guillaume Demesy
Browse files

runtine variables + SolveAgain

parent 33747375
No related branches found
No related tags found
No related merge requests found
Pipeline #4686 passed
...@@ -39,6 +39,7 @@ Function{ ...@@ -39,6 +39,7 @@ Function{
// For i In {0:#test()-1} // For i In {0:#test()-1}
// Printf("%g",test(i)); // Printf("%g",test(i));
// EndFor // EndFor
I[] = Complex[0,1]; I[] = Complex[0,1];
avoid_sing = 1.e-14; avoid_sing = 1.e-14;
mu0 = 4*Pi*100.0*nm; mu0 = 4*Pi*100.0*nm;
...@@ -323,6 +324,19 @@ Formulation { ...@@ -323,6 +324,19 @@ Formulation {
} }
} }
EndFor EndFor
{Name VPWM_helmholtz_vector_test; Type FemEquation;
Quantity {
{ Name u; Type Local; NameOfSpace Hcurl;}
}
Equation {
Galerkin { [-1/mur[]*Dof{Curl u} , {Curl u}]; In All_domains; Jacobian JVol; Integration Int_1; }
Galerkin { [(omega0/cel)^2*epsilonr[]*Dof{u} , {u} ]; In All_domains; Jacobian JVol; Integration Int_1; }
// For pe In {1:p_max}
Galerkin { [ (omega0/cel)^2*(epsilonr[]-epsilonr1[])*Mnm[$PE,ne,me,XYZ[],k_Out], {u} ]; In Scat_In; Jacobian JVol; Integration Int_1;}
// EndFor
}
}
EndIf EndIf
If (flag_study==RES_GREEN) If (flag_study==RES_GREEN)
For ncomp In {0:2} For ncomp In {0:2}
...@@ -357,41 +371,49 @@ Resolution { ...@@ -357,41 +371,49 @@ Resolution {
} }
EndIf EndIf
If (flag_study==RES_TMAT) If (flag_study==RES_TMAT)
{ Name res_VPWall_helmholtz_vector; // { Name res_VPWall_helmholtz_vector;
// System {
// For pe In {1:p_max}
// { Name M~{pe}; NameOfFormulation VPWM_helmholtz_vector~{pe}; Type ComplexValue; Frequency Freq; }
// { Name N~{pe}; NameOfFormulation VPWN_helmholtz_vector~{pe}; Type ComplexValue; Frequency Freq; }
// EndFor
// }
// Operation {
// CreateDir[Str[myDir]];
// Evaluate[Python[]{"scattering_init.py"}];
// For pe In {1:p_max}
// Generate[M~{pe}];
// Solve[M~{pe}];
// PostOperation[VPWM_postop~{pe}];
// Generate[N~{pe}];
// Solve[N~{pe}];
// PostOperation[VPWN_postop~{pe}];
// EndFor
// Evaluate[Python[]{"scattering_post.py"}];
// }
// }
{ Name res_VPWall_helmholtz_vector;
System { System {
For pe In {1:p_max} { Name A; NameOfFormulation VPWM_helmholtz_vector_test; Type ComplexValue; }
{ Name M~{pe}; NameOfFormulation VPWM_helmholtz_vector~{pe}; Type ComplexValue; Frequency Freq; }
{ Name N~{pe}; NameOfFormulation VPWN_helmholtz_vector~{pe}; Type ComplexValue; Frequency Freq; }
EndFor
} }
Operation { Operation {
CreateDir[Str[myDir]]; CreateDir[Str[myDir]];
Evaluate[Python[]{"scattering_init.py"}]; Evaluate[Python[]{"scattering_init.py"}];
Evaluate[ $PE = 1 ];
Generate[A];
// Generate[M_1]; Solve[A];
// Solve[M_1]; PostOperation[VPWM_postop~{1}];
// PostOperation[VPWM_postop_1]; For pe In {2:p_max}
For pe In {1:p_max} Evaluate[ $PE = pe ];
// GenerateRHS[M~{pe}]; GenerateRHS[A];
Solve[M~{pe}]; SolveAgain[A];
PostOperation[VPWM_postop~{pe}]; PostOperation[VPWM_postop~{pe}];
Generate[N~{pe}];
Solve[N~{pe}];
PostOperation[VPWN_postop~{pe}];
EndFor EndFor
// Evaluate[Python[]{"scattering_post.py"}];
// For pe In {1:p_max}
// Generate[M~{pe}];
// Solve[M~{pe}];
// PostOperation[VPWM_postop~{pe}];
// Generate[N~{pe}];
// Solve[N~{pe}];
// PostOperation[VPWN_postop~{pe}];
// EndFor
Evaluate[Python[]{"scattering_post.py"}];
} }
} }
EndIf EndIf
If (flag_study==RES_GREEN) If (flag_study==RES_GREEN)
{ Name res_GreenAll_helmholtz_vector; { Name res_GreenAll_helmholtz_vector;
...@@ -461,8 +483,13 @@ PostProcessing { ...@@ -461,8 +483,13 @@ PostProcessing {
} }
EndIf EndIf
If (flag_study==RES_TMAT) If (flag_study==RES_TMAT)
{ Name VPWM_postpro_test; NameOfFormulation VPWM_helmholtz_vector_test; NameOfSystem A;
Quantity {
{ Name E_scat ; Value { Local { [$PE]; In All_domains; Jacobian JVol; } } } }
}
For pe In {1:p_max} For pe In {1:p_max}
{ Name VPWM_postpro~{pe}; NameOfFormulation VPWM_helmholtz_vector~{pe};NameOfSystem M~{pe}; // { Name VPWM_postpro~{pe}; NameOfFormulation VPWM_helmholtz_vector~{pe};NameOfSystem M~{pe};
{ Name VPWM_postpro~{pe}; NameOfFormulation VPWM_helmholtz_vector_test; NameOfSystem A;
Quantity { Quantity {
{ Name E_scat ; Value { Local { [{u}]; In All_domains; Jacobian JVol; } } } { Name E_scat ; Value { Local { [{u}]; In All_domains; Jacobian JVol; } } }
{ Name E_scat_sph ; Value { Local { [Vector[ { Name E_scat_sph ; Value { Local { [Vector[
...@@ -566,6 +593,11 @@ PostOperation { ...@@ -566,6 +593,11 @@ PostOperation {
} }
EndIf EndIf
If (flag_study==RES_TMAT) If (flag_study==RES_TMAT)
{Name VPWM_postop_test ; NameOfPostProcessing VPWM_postpro_test;
Operation {
Print [ E_scat , OnElementsOf Domain , File StrCat[myDir,"Escat.pos"]];
}
}
For pe In {1:p_max} For pe In {1:p_max}
{Name VPWM_postop~{pe}; NameOfPostProcessing VPWM_postpro~{pe} ; {Name VPWM_postop~{pe}; NameOfPostProcessing VPWM_postpro~{pe} ;
Operation { Operation {
......
This diff is collapsed.
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