Skip to content
Snippets Groups Projects
Commit 1b0c42f0 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

use DOS end of lines

parent 1ca17e96
No related branches found
No related tags found
No related merge requests found
Pipeline #
Showing
with 3071 additions and 3075 deletions
......@@ -267,7 +267,7 @@ Formulation {
}
Equation {
// FEM domain
Galerkin { [ kappa[] * Dof{d V}, {d V} ]; In Vol_Ele;
Integral { [ kappa[] * Dof{d V}, {d V} ]; In Vol_Ele;
Integration I1; Jacobian JVol; }
GlobalTerm{ [ Dof{I}, {U} ]; In Sur_Ele; }
......
......@@ -264,7 +264,7 @@ Formulation {
}
Equation {
// FEM domain
Galerkin { [ kappa[] * Dof{d V}, {d V} ];
Integral { [ kappa[] * Dof{d V}, {d V} ];
In Vol_Ele; Integration I1; Jacobian JVol; }
GlobalTerm { [ Dof{I} , {U} ]; In Sur_Ele; }
......
......@@ -271,23 +271,23 @@ Formulation {
{ Name uy ; Type Local ; NameOfSpace H_uy_Mec ; }
}
Equation {
Galerkin { [ -C_xx[] * Dof{d ux}, {d ux} ] ;
Integral { [ -C_xx[] * Dof{d ux}, {d ux} ] ;
In Vol_Elast_Mec ; Jacobian Vol ; Integration Gauss_v ; }
Galerkin { [ -C_xy[] * Dof{d uy}, {d ux} ] ;
Integral { [ -C_xy[] * Dof{d uy}, {d ux} ] ;
In Vol_Elast_Mec ; Jacobian Vol ; Integration Gauss_v ; }
Galerkin { [ -C_yx[] * Dof{d ux}, {d uy} ] ;
Integral { [ -C_yx[] * Dof{d ux}, {d uy} ] ;
In Vol_Elast_Mec ; Jacobian Vol ; Integration Gauss_v ; }
Galerkin { [ -C_yy[] * Dof{d uy}, {d uy} ] ;
Integral { [ -C_yy[] * Dof{d uy}, {d uy} ] ;
In Vol_Elast_Mec ; Jacobian Vol ; Integration Gauss_v ; }
Galerkin { [ force_x[] , {ux} ];
Integral { [ force_x[] , {ux} ];
In Vol_Force_Mec ; Jacobian Vol ; Integration Gauss_v ; }
Galerkin { [ force_y[] , {uy} ];
Integral { [ force_y[] , {uy} ];
In Vol_Force_Mec ; Jacobian Vol ; Integration Gauss_v ; }
Galerkin { [ pressure_x[] , {ux} ];
Integral { [ pressure_x[] , {ux} ];
In Sur_Force_Mec ; Jacobian Sur ; Integration Gauss_v ; }
Galerkin { [ pressure_y[] , {uy} ];
Integral { [ pressure_y[] , {uy} ];
In Sur_Force_Mec ; Jacobian Sur ; Integration Gauss_v ; }
}
}
......@@ -363,4 +363,3 @@ DefineConstant[
P_ = {"pos", Name "GetDP/2PostOperationChoices", Visible 0},
C_ = {"-solve -pos -v2", Name "GetDP/9ComputeCommand", Visible 0}
];
......@@ -181,19 +181,21 @@ Formulation {
product over the domain D. If the test-functions v' are differentiable,
integration by parts using Green's identity leads to finding v such that
(epsilon Grad v, Grad v')_Vol_Ele + (epsilon n.Grad v, v')_Sur_Neumann_Ele = 0
(epsilon Grad v, Grad v')_Vol_Ele + (epsilon n.Grad v, v')_Bnd_Vol_Ele = 0
holds for all v'.
In our microstrip example the Neumann boundary term vanishes and we are
looking for functions v in the function space Hgrad_v_Ele such that
holds for all v', where Bnd_Vol_Ele is the boundary of Vol_Ele. In our
microstrip example this surface term vanishes, as either there is no test
function v' (on the Dirichlet boundary) or the "epsilon n.Grad v" is zero
(on the homogeneous Neumann boundary). We are thus eventually looking for
functions v in the function space Hgrad_v_Ele such that
(epsilon Grad v, Grad v')_Vol_Ele = 0
holds for all v', where the test functions v' are the same basis functions
("sn_k") as the ones used to interpolate the unknown potential v.
holds for all v'. Finally, our choice here is to use a Gakerkin method,
where the test functions v' are the same basis functions ("sn_k") as the
ones used to interpolate the unknown potential v.
The Galerkin statement in the Formulation is a symbolic representation of
The "Integral" statement in the Formulation is a symbolic representation of
this weak formulation. It has got 4 semicolon separated arguments:
* the density [.,.] to be integrated (note the square brackets instead of
the parentheses), with the test-functions (always) after the comma
......@@ -211,12 +213,13 @@ Formulation {
density are not interpreted exactly in the same way. Let us unravel this in
detail.
As the Galerkin method uses as test functions the basis functions "sn_k" of
the unknown field "v", the second term in the density should be something
like this [ ... , basis_functions_of {d v} ]. However, since the second
term is always devoted to test functions, the operator "basis_functions_of"
would always be there. It can therefore be made implicit, and, according
to the GetDP syntax, it is omitted. So, one writes simply [ ... , {d v} ].
As the Galerkin method uses as test functions the same basis functions
"sn_k" as for the unknown field "v", the second term in the density should
be something like this [ ... , basis_functions_of {d v} ]. However, since
the second term is always devoted to test functions, the operator
"basis_functions_of" would always be there. It can therefore be made
implicit, and, according to the GetDP syntax, it is omitted. So, one writes
simply [ ... , {d v} ].
The first term, on the other hand, can contain a much wider variety of
expressions than the second one. In our case it should be expressed in
......@@ -247,7 +250,7 @@ Formulation {
{ Name v; Type Local; NameOfSpace Hgrad_v_Ele; }
}
Equation {
Galerkin { [ epsilon[] * Dof{d v} , {d v} ];
Integral { [ epsilon[] * Dof{d v} , {d v} ];
In Vol_Ele; Jacobian Vol; Integration Int; }
}
}
......@@ -285,22 +288,16 @@ Resolution {
PostProcessing {
{ Name EleSta_v; NameOfFormulation Electrostatics_v;
Quantity {
{ Name v;
Value {
Local { [ {v} ];
In Dom_Hgrad_v_Ele; Jacobian Vol; }
{ Name v; Value {
Local { [ {v} ]; In Dom_Hgrad_v_Ele; Jacobian Vol; }
}
}
{ Name e;
Value {
Local { [ -{d v} ];
In Dom_Hgrad_v_Ele; Jacobian Vol; }
{ Name e; Value {
Local { [ -{d v} ]; In Dom_Hgrad_v_Ele; Jacobian Vol; }
}
}
{ Name d;
Value {
Local { [ -epsilon[] * {d v} ];
In Dom_Hgrad_v_Ele; Jacobian Vol; }
{ Name d; Value {
Local { [ -epsilon[] * {d v} ]; In Dom_Hgrad_v_Ele; Jacobian Vol; }
}
}
}
......
......@@ -229,19 +229,19 @@ Formulation {
{ Name ir; Type Local; NameOfSpace Hregion_i_2D; }
}
Equation {
Galerkin { [ nu[] * Dof{d a} , {d a} ];
Integral { [ nu[] * Dof{d a} , {d a} ];
In Vol_Mag; Jacobian Vol; Integration Gauss_v; }
Galerkin { [ -nu[] * br[] , {d a} ];
Integral { [ -nu[] * br[] , {d a} ];
In VolM_Mag; Jacobian Vol; Integration Gauss_v; }
Galerkin { [ -js0[] , {a} ];
Integral { [ -js0[] , {a} ];
In VolS0_Mag; Jacobian Vol; Integration Gauss_v; }
Galerkin { [ - (js0[]*Vector[0,0,1]) * Dof{ir} , {a} ];
Integral { [ - (js0[]*Vector[0,0,1]) * Dof{ir} , {a} ];
In VolS_Mag; Jacobian Vol; Integration Gauss_v; }
Galerkin { [ nxh[] , {a} ];
Integral { [ nxh[] , {a} ];
In SurFluxTube_Mag; Jacobian Sur; Integration Gauss_v; }
}
}
......@@ -269,53 +269,53 @@ Formulation {
EndIf
}
Equation {
Galerkin { [ nu[] * Dof{d a} , {d a} ];
Integral { [ nu[] * Dof{d a} , {d a} ];
In Vol_Mag; Jacobian Vol; Integration Gauss_v; }
Galerkin { [ -nu[] * br[] , {d a} ];
Integral { [ -nu[] * br[] , {d a} ];
In VolM_Mag; Jacobian Vol; Integration Gauss_v; }
// Electric field e = -Dt[{a}]-{ur},
// with {ur} = Grad v constant in each region of VolC
Galerkin { DtDof [ sigma[] * Dof{a} , {a} ];
Integral { DtDof [ sigma[] * Dof{a} , {a} ];
In VolC_Mag; Jacobian Vol; Integration Gauss_v; }
Galerkin { [ sigma[] * Dof{ur} / CoefGeos[] , {a} ];
Integral { [ sigma[] * Dof{ur} / CoefGeos[] , {a} ];
In VolC_Mag; Jacobian Vol; Integration Gauss_v; }
Galerkin { [ - sigma[] * (Velocity[] /\ Dof{d a}) , {a} ];
Integral { [ - sigma[] * (Velocity[] /\ Dof{d a}) , {a} ];
In VolV_Mag; Jacobian Vol; Integration Gauss_v; }
Galerkin { [ -js0[] , {a} ];
Integral { [ -js0[] , {a} ];
In VolS0_Mag; Jacobian Vol; Integration Gauss_v; }
Galerkin { [ nxh[] , {a} ];
Integral { [ nxh[] , {a} ];
In SurFluxTube_Mag; Jacobian Sur; Integration Gauss_v; }
Galerkin { DtDof [ Ysur[] * Dof{a} , {a} ];
Integral { DtDof [ Ysur[] * Dof{a} , {a} ];
In SurImped_Mag; Jacobian Sur; Integration Gauss_v; }
Galerkin { [ Ysur[] * Dof{ur} / CoefGeos[] , {a} ];
Integral { [ Ysur[] * Dof{ur} / CoefGeos[] , {a} ];
In SurImped_Mag; Jacobian Sur; Integration Gauss_v; }
// When {ur} act as a test function, one obtains the circuits relations,
// relating the voltage and the current of each region in VolC
Galerkin { DtDof [ sigma[] * Dof{a} , {ur} ];
Integral { DtDof [ sigma[] * Dof{a} , {ur} ];
In VolC_Mag; Jacobian Vol; Integration Gauss_v; }
Galerkin { [ sigma[] * Dof{ur} / CoefGeos[] , {ur} ];
Integral { [ sigma[] * Dof{ur} / CoefGeos[] , {ur} ];
In VolC_Mag; Jacobian Vol; Integration Gauss_v; }
GlobalTerm { [ Dof{I} *(CoefGeos[]/Fabs[CoefGeos[]]) , {U} ]; In VolC_Mag; }
Galerkin { DtDof [ Ysur[] * Dof{a} , {ur} ];
Integral { DtDof [ Ysur[] * Dof{a} , {ur} ];
In SurImped_Mag; Jacobian Sur; Integration Gauss_v; }
Galerkin { [ Ysur[] * Dof{ur} / CoefGeos[] , {ur} ];
Integral { [ Ysur[] * Dof{ur} / CoefGeos[] , {ur} ];
In SurImped_Mag; Jacobian Sur; Integration Gauss_v; }
GlobalTerm { [ Dof{I} *(CoefGeos[]/Fabs[CoefGeos[]]) , {U} ]; In SurImped_Mag; }
// js[0] should be of the form: Ns[]/Sc[] * Vector[0,0,1]
Galerkin { [ - (js0[]*Vector[0,0,1]) * Dof{ir} , {a} ];
Integral { [ - (js0[]*Vector[0,0,1]) * Dof{ir} , {a} ];
In VolS_Mag; Jacobian Vol; Integration Gauss_v; }
Galerkin { DtDof [ Ns[]/Sc[] * Dof{a} , {ir} ];
Integral { DtDof [ Ns[]/Sc[] * Dof{a} , {ir} ];
In VolS_Mag; Jacobian Vol; Integration Gauss_v; }
Galerkin { [ Ns[]/Sc[] / sigma[] * (js0[]*Vector[0,0,1]) * Dof{ir} , {ir} ];
Integral { [ Ns[]/Sc[] / sigma[] * (js0[]*Vector[0,0,1]) * Dof{ir} , {ir} ];
In VolS_Mag; Jacobian Vol; Integration Gauss_v; }
GlobalTerm { [ Dof{Us} / CoefGeos[] , {Is} ]; In VolS_Mag; }
// Attention: CoefGeo[.] = 2*Pi for Axi
......
......@@ -108,14 +108,14 @@ Function {
The constraint "SourceCurrentDensityZ" fixes all these dofs,
so the FunctionSpace "Hregion_j_Mag_2D" is fully fixed and has no FE unknowns.
One could thus have replaced it by a simple function
and the Galerkin term would have been
and the Integral term would have been
Galerkin { [ Vector[ 0,0,-Js_fct[] ] , {a} ]; In Vol_Js_Mag;
Integral { [ Vector[ 0,0,-Js_fct[] ] , {a} ]; In Vol_Js_Mag;
Jacobian Vol; Integration Int; }
instead of
Galerkin { [ - Dof{js} , {a} ]; In Vol_Js_Mag;
Integral { [ - Dof{js} , {a} ]; In Vol_Js_Mag;
Jacobian Vol; Integration Int; }
Thechosen implementation below is however more effeicient
......@@ -193,9 +193,9 @@ Formulation {
{ Name js; Type Local; NameOfSpace Hregion_j_Mag_2D; }
}
Equation {
Galerkin { [ nu[] * Dof{d a} , {d a} ]; In Vol_Nu_Mag;
Integral { [ nu[] * Dof{d a} , {d a} ]; In Vol_Nu_Mag;
Jacobian Vol; Integration Int; }
Galerkin { [ -Dof{js} , {a} ]; In Vol_Js_Mag;
Integral { [ -Dof{js} , {a} ]; In Vol_Js_Mag;
Jacobian Vol; Integration Int; }
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment