From 1923ced6a66394f09c9e09b3e8936911078946aa Mon Sep 17 00:00:00 2001
From: "Ruth Sabariego (U0089683)" <Ruth.Sabariego@esat.kuleuven.be>
Date: Mon, 13 Mar 2023 15:51:48 +0100
Subject: [PATCH] minor corrections

---
 ...Formulation_FullWave_E_ece_secondOrder.pro | 21 +++--
 ...ion_FullWave_H_ece_cplx_3D_secondOrder.pro | 83 ++++++++-----------
 cylinderCoax/geo_pro/cylinder2Daxi_data.pro   | 49 ++---------
 3 files changed, 50 insertions(+), 103 deletions(-)

diff --git a/cylinderCoax/formulations/only_FunctionSpace_and_Formulation_FullWave_E_ece_secondOrder.pro b/cylinderCoax/formulations/only_FunctionSpace_and_Formulation_FullWave_E_ece_secondOrder.pro
index 88d5adb..06901e5 100644
--- a/cylinderCoax/formulations/only_FunctionSpace_and_Formulation_FullWave_E_ece_secondOrder.pro
+++ b/cylinderCoax/formulations/only_FunctionSpace_and_Formulation_FullWave_E_ece_secondOrder.pro
@@ -18,19 +18,18 @@ FunctionSpace {
 					Support Dom_FW ; Entity EdgesOf[All, Not Sur_FW]; }
 			EndIf
 
-				{ Name sn; NameOfCoef vn; Function BF_GradNode; 
-					Support Dom_FW ; Entity NodesOf[Sur_FW, Not Sur_Terminals_FWece]; } 
-				If(FE_Order == 2)
-					// GradNode BFs
-					{ Name sn2; NameOfCoef vn2; Function BF_GradNode_2E;
-					Support Dom_FW ; Entity EdgesOf[Sur_FW, Not Sur_Terminals_FWece]; }
-				EndIf		 
-		 
-	  
+      { Name sn; NameOfCoef vn; Function BF_GradNode; 
+          Support Dom_FW ; Entity NodesOf[Sur_FW, Not Sur_Terminals_FWece]; } 
+      If(FE_Order == 2)
+        // GradNode BFs
+        { Name sn2; NameOfCoef vn2; Function BF_GradNode_2E;
+          Support Dom_FW ; Entity EdgesOf[Sur_FW, Not Sur_Terminals_FWece]; }
+      EndIf		 
+
 			{ Name sf; NameOfCoef vf; Function BF_GradGroupOfNodes; 
 				Support Dom_FW ; Entity GroupsOfNodesOf[Sur_Terminals_FWece]; }
-			 
 		}
+
 		GlobalQuantity {
 			{ Name TerminalPotential; Type AliasOf       ; NameOfCoef vf; }
 			{ Name TerminalCurrent  ; Type AssociatedWith; NameOfCoef vf; }
@@ -40,7 +39,7 @@ FunctionSpace {
 			{ Name dv ; NameOfBasisFunction {sn}; } // Subspace, it maybe use in equations or post-pro
 			{ Name dvf ; NameOfBasisFunction {sf}; } 
 		}
-
+S
 		Constraint {
 			{ NameOfCoef TerminalPotential; EntityType GroupsOfNodesOf;
 				NameOfConstraint SetTerminalPotential; }
diff --git a/cylinderCoax/formulations/only_FunctionSpace_and_Formulation_FullWave_H_ece_cplx_3D_secondOrder.pro b/cylinderCoax/formulations/only_FunctionSpace_and_Formulation_FullWave_H_ece_cplx_3D_secondOrder.pro
index 4478882..4d4992a 100644
--- a/cylinderCoax/formulations/only_FunctionSpace_and_Formulation_FullWave_H_ece_cplx_3D_secondOrder.pro
+++ b/cylinderCoax/formulations/only_FunctionSpace_and_Formulation_FullWave_H_ece_cplx_3D_secondOrder.pro
@@ -5,52 +5,48 @@
 FunctionSpace {
 
 	{ Name Hcurl_H; Type Form1;   // Hspace for 3D
-		BasisFunction {
-	
-				{ Name se; NameOfCoef he; Function BF_Edge;
-					Support Dom_FW;	Entity EdgesOf[All, Not BoundaryNotTerminal]; }
-					
-				{ Name sn; NameOfCoef phin; Function BF_GradNode;
-					Support Dom_FW;
-					//Entity NodesOf[BoundaryNotTerminal, Not Cut1H]; }
-					Entity NodesOf[BoundaryNotTerminal]; }
-
-				{ Name sc; NameOfCoef ic; Function BF_GroupOfEdges;
-					Support Dom_FW;	Entity GroupsOfEdgesOf[Cut1H]; }
-		
-				If(FE_Order == 2) // hierarchical basis functions for 2nd order interpolation 
-					// Edge BFs => FEorder = {0.5, Choices{0.5="Lowest",1="1st order",1.5="Reduced 2nd order",2="2nd order"}
-					// 1st order
-					{ Name se2; NameOfCoef ee2; Function BF_Edge_2E;  
-					Support Dom_FW; Entity EdgesOf[All, Not BoundaryNotTerminal]; }        
-					// Reduced 2nd order
-					{ Name se3a ; NameOfCoef ee3a ; Function BF_Edge_3F_a ;
-					Support Dom_FW ; Entity FacetsOf[All, Not BoundaryNotTerminal] ; }
-					{ Name se3b ; NameOfCoef ee3b ; Function BF_Edge_3F_b ;
-					Support Dom_FW ; Entity FacetsOf[ All, Not BoundaryNotTerminal] ; }
-					// 2nd order
-					{ Name se4; NameOfCoef ee4; Function BF_Edge_4E;
-					Support Dom_FW ; Entity EdgesOf[All, Not BoundaryNotTerminal]; }
+		BasisFunction {	
+      { Name se; NameOfCoef he; Function BF_Edge;
+        Support Dom_FW;	Entity EdgesOf[All, Not BoundaryNotTerminal]; }
         
-					// GradNode BFs
-					{ Name sn2; NameOfCoef vn2; Function BF_GradNode_2E;
-					Support Dom_FW ; Entity EdgesOf[BoundaryNotTerminal]; }
-				EndIf
-				
+      { Name sn; NameOfCoef phin; Function BF_GradNode;
+        Support Dom_FW; Entity NodesOf[BoundaryNotTerminal]; }
+
+      { Name sc; NameOfCoef ic; Function BF_GroupOfEdges;
+        Support Dom_FW;	Entity GroupsOfEdgesOf[Cut1H]; }
+
+      If(FE_Order == 2) // hierarchical basis functions for 2nd order interpolation 
+        // Edge BFs => FEorder = {0.5, Choices{0.5="Lowest",1="1st order",1.5="Reduced 2nd order",2="2nd order"}
+        // 1st order
+        { Name se2; NameOfCoef ee2; Function BF_Edge_2E;  
+        Support Dom_FW; Entity EdgesOf[All, Not BoundaryNotTerminal]; }        
+        // Reduced 2nd order
+        { Name se3a ; NameOfCoef ee3a ; Function BF_Edge_3F_a ;
+        Support Dom_FW ; Entity FacetsOf[All, Not BoundaryNotTerminal] ; }
+        { Name se3b ; NameOfCoef ee3b ; Function BF_Edge_3F_b ;
+        Support Dom_FW ; Entity FacetsOf[ All, Not BoundaryNotTerminal] ; }
+        // 2nd order
+        { Name se4; NameOfCoef ee4; Function BF_Edge_4E;
+        Support Dom_FW ; Entity EdgesOf[All, Not BoundaryNotTerminal]; }
+      
+        // GradNode BFs
+        { Name sn2; NameOfCoef vn2; Function BF_GradNode_2E;
+        Support Dom_FW ; Entity EdgesOf[BoundaryNotTerminal]; }
+      EndIf	
     }
 	
-	GlobalQuantity {
+    GlobalQuantity {
       { Name TerminalCurrent;   Type AliasOf       ; NameOfCoef ic; }
       { Name TerminalPotential; Type AssociatedWith; NameOfCoef ic; }
-	}
+    }
 	
-	Constraint {
+    Constraint {
       { NameOfCoef TerminalPotential; EntityType GroupsOfEdgesOf;
         NameOfConstraint SetTerminalPotentialH; }
       { NameOfCoef TerminalCurrent; EntityType GroupsOfEdgesOf;
         NameOfConstraint SetTerminalCurrentH; }
-	}
- }
+    }
+  }  
 }
 
 Function{
@@ -77,24 +73,15 @@ Formulation {
     Equation {
       // multiplying with j omega
       // \int_D \alpha * curl(\vec{H}) \cdot  curl(\vec{h}) dv
-	  
-	  
-	  Galerkin { [ alphaRe[] * Dof{d h} , {d h} ];      In Vol_FW; Jacobian Vol; Integration Int; }
+	
+      Galerkin { [ alphaRe[] * Dof{d h} , {d h} ];      In Vol_FW; Jacobian Vol; Integration Int; }
       Galerkin { [ alphaIm[] * Dof{d h} , {d h} ];      In Vol_FW; Jacobian Vol; Integration Int; }
-	      	  
-		/* 
-	  Galerkin { [ alphaRe[] * Dof{d h} , {d h} ];      In Vol_FW_SigmaNonZero; Jacobian Vol; Integration Int; }
-      Galerkin { [ alphaIm[] * Dof{d h} , {d h} ];      In Vol_FW_SigmaNonZero; Jacobian Vol; Integration Int; }
-      Galerkin { [ alphaReSigmaZero[] * Dof{d h} , {d h} ];  In Vol_FW_SigmaZero; Jacobian Vol; Integration Int; }
-      //Galerkin { [ alphaImSigmaZero[] * Dof{d h} , {d h} ];      In Vol_FW_SigmaZero; Jacobian Vol; Integration Int; }
-	  */
-	    
+
       // \int_D j*\omega*(j*\omega*\mu) \vec{H} \cdot \vec{h} dv
       Galerkin { [ jOmega2[] * mu[] * Dof{h} , {h} ]; In Vol_FW; Jacobian Vol; Integration Int; }
 	  
       // sum (Vk ik);  for k - all terminals so that the terminal voltages will be computed as well
       GlobalTerm { [ jOmega[]*Dof{V}, {I} ]; In Cut1H; }
-	  
     }
   }
   
diff --git a/cylinderCoax/geo_pro/cylinder2Daxi_data.pro b/cylinderCoax/geo_pro/cylinder2Daxi_data.pro
index 0e10b24..a7150d6 100644
--- a/cylinderCoax/geo_pro/cylinder2Daxi_data.pro
+++ b/cylinderCoax/geo_pro/cylinder2Daxi_data.pro
@@ -44,25 +44,21 @@ DefineConstant[
 	];
 	
 If (Flag_WhichTest==0)
-	/* dimensions used in the SCEE 2020 and JMI papers */
+	// dimensions used in the SCEE 2020 and JMI papers
 	a = 2.5e-6;
 	l = 10e-6;
 	fmin = 1e7;   // Hz
 	fmax = 100e9; // Hz
 	nop = 20;
-    freqs()=LogSpace[Log10[fmin],Log10[fmax],nop];
-    //freqs()=LinSpace[fmin,fmax,nop];
+  freqs()=LogSpace[Log10[fmin],Log10[fmax],nop];
 Else
-	/* a inspired  from Wu coax, but l is short */
+	// a inspired  from Wu coax, but l is short
 	a = 4e-3;
 	l = 10e-3;
 	fmin = 1;   // Hz
-	//fmax = 600e6; // Hz
 	fmax = 100e6; // Hz
-	//fmax = 1e4; 
 	nop = 20;
 	freqs()=LogSpace[Log10[fmin],Log10[fmax],nop];
-    //freqs()=LinSpace[fmin,fmax,nop];
 EndIf
 	
 epsr = 1;
@@ -111,32 +107,19 @@ DefineConstant[
     ServerAction Str["Reset", "GetDP/1ResolutionChoices"]}
 ];
 
-//s_min = 0.5; // the finest mesh
 s_min = 1;
-//s_min = 0.7071067811865475; // 1/sqrt(2)
-//s_min = 1.414213562373095; //sqrt(2)
-//
-//s_min = 7.75E-3;
-//s_min = 3.31E-2;
-
-s_max = 1.414213562373095; //the coarsest mesh
+s_max = 1.414213562373095; 
 nops = 7;
 
-
 s_values()=LinSpace[s_min,s_max,nops];
 
-
-/* Mesh setings */
 DefineConstant[
    _use_uniformMesh = {1, Choices{0,1}, Name StrCat[mTypeMesh,"0Uniform mesh?"], Highlight "Pink", Closed !close_menu},
    _use_progression = {0, Choices{0,1}, Name StrCat[mTypeMesh,"1Use geometric progression on the bottom line (only for non-uniform mesh)?"], Highlight "Pink", Closed !close_menu, ReadOnly _use_uniformMesh},
    _use_transfinite = {0, Choices{0,1}, Name StrCat[mTypeMesh,"2One element along Oy ; Transfinite for uniform mesh?"], Highlight "Pink", Closed !close_menu, ReadOnly _use_uniformMesh},
    _use_recombine = {0, Choices{0,1}, Name StrCat[mTypeMesh,"3Use recombine"], Highlight "Pink", Closed !close_menu},
-   //_use_s_loop = {0, Choices{0,1}, Name StrCat[mTypeMesh,"4Use s loop"],
-   // ServerAction Str["Reset", StrCat[mTypeMesh, "5Mesh factor s, where car.length = s*a*0.1"]],   Highlight "Pink", Closed !close_menu},
    s = {s_min, Name StrCat[mTypeMesh,"6Mesh factor"]}
-   //s  = {s_values(0), Choices{s_values()}, Loop _use_s_loop, Name StrCat[mTypeMesh, "6Mesh factor s, where car.length = s*a*0.1"],
-   // Units "-", Highlight  Str[colorMTypeMesh], Closed !close_menu}
+   
    FE_Order = { FE_ORDER,
     Choices{
       1="1: first order elements",
@@ -144,7 +127,6 @@ DefineConstant[
     },
     Name StrCat[mTypeMesh,"7Element order"], Highlight Str[colorMTypeMesh], Closed !close_menu,
     ServerAction Str["Reset", "GetDP/1ResolutionChoices"]}
-   
 ];
 
 Printf("a = %g  m",a);
@@ -179,24 +161,3 @@ LEFTBOUNDARY  = 132; // axis
 
 BOUNDARY  = 331; 
 
-
-
-/* Hint:
-
-Concerning the 2nd order elements, there are two ways of doing it:
-
-1) using hierarchical elements (BFs associated to nodes and edges; or to
-edges and facets);
-
-2) using 2nd order mesh and the corresponding BFs => adding in the geo
-file: Mesh.ElementOrder = 2; // Element order (1: first order elements)
-
-For the former, you need to modify add some lines in the pro-file of the BFs
-For the latter, you have to generate the 2nd order mesh and add the new
-second order elements in the integration.
-
-1) and 2) are incompatible => 1) works with 1st order geometrical elements
-2) it is experimental, element-type: Triangle2, Quadrangle2,
-Tetrahedron2 and so forth.
-
-*/
\ No newline at end of file
-- 
GitLab