Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
182 commits
Select commit Hold shift + click to select a range
ee586fb
Example 1 lattice extrude mesh
RaulRubioSerrano May 3, 2023
700318c
Merge branch 'master' into Domain_decomposition
RaulRubioSerrano May 3, 2023
81be150
"small change"
FerrerFerreAlex May 3, 2023
4dcdae2
"refactor"
FerrerFerreAlex May 3, 2023
2fa844f
copy subdomains
RaulRubioSerrano May 5, 2023
d55f102
mesh merging
RaulRubioSerrano May 8, 2023
5e28b42
"small ref"
FerrerFerreAlex May 8, 2023
5b766f1
refactored domain decomposition
RaulRubioSerrano May 9, 2023
bbd1f76
remove duplicated functions
RaulRubioSerrano May 9, 2023
282620c
comments removed
RaulRubioSerrano May 9, 2023
9758199
Merge branch 'master' into Domain_decomposition
RaulRubioSerrano May 10, 2023
701a190
Merge branch 'master' into Domain_decomposition
RaulRubioSerrano Sep 13, 2023
b727a29
rigid body
RaulRubioSerrano Sep 14, 2023
d90687a
"small changes"
FerrerFerreAlex Sep 14, 2023
59e43d3
small changes
RaulRubioSerrano Sep 15, 2023
44efda8
"small chang"
FerrerFerreAlex Sep 15, 2023
f522493
modal function
RaulRubioSerrano Sep 20, 2023
f375302
Update RigidBodyFunction.m
FerrerFerreAlex Oct 3, 2023
cb2a7cb
small changes
RaulRubioSerrano Oct 3, 2023
ac10c36
Merge branch 'Domain_decomposition' of https://github.com/SwanLab/Swa…
RaulRubioSerrano Oct 3, 2023
e8cab26
projection to RB
RaulRubioSerrano Oct 4, 2023
d0f1940
projector to rigid body and modes
RaulRubioSerrano Oct 9, 2023
84998ee
small changes
RaulRubioSerrano Oct 11, 2023
2ba6598
Create LHS_integratorStiffnessModal.m
FerrerFerreAlex Oct 27, 2023
ddcc25d
modal stiffness
RaulRubioSerrano Oct 28, 2023
44b225a
stfifness global added
RaulRubioSerrano Oct 31, 2023
f696bf1
Update modesTesting.m
FerrerFerreAlex Oct 31, 2023
916652c
eifem matrices (not validated)
RaulRubioSerrano Nov 1, 2023
7db863e
pcg added
RaulRubioSerrano Nov 6, 2023
d0e817b
"error"
FerrerFerreAlex Nov 6, 2023
339d8cb
modal testing
RaulRubioSerrano Nov 8, 2023
b56e82e
small changes
RaulRubioSerrano Nov 13, 2023
bc6d72f
Eifem matrices 1st try
RaulRubioSerrano Nov 16, 2023
f39feae
cg and pcg plot data
RaulRubioSerrano Nov 16, 2023
f8a8ccf
Merge branch 'master' into Domain_decomposition
RaulRubioSerrano Nov 17, 2023
f597ba7
pcg jacobi
RaulRubioSerrano Nov 22, 2023
89b541b
"some small changes"
FerrerFerreAlex Nov 23, 2023
321f909
mesh from rve corrected + class
RaulRubioSerrano Dec 1, 2023
c2b6553
Small changes EIFEM
RaulRubioSerrano Jan 9, 2024
6d44a88
small changes
RaulRubioSerrano Jan 17, 2024
33de2e6
eifem testing
RaulRubioSerrano Jan 18, 2024
7783a3a
dirichlet neumann + corrected bc
RaulRubioSerrano Feb 6, 2024
8dd4ea1
small changes
RaulRubioSerrano Feb 6, 2024
4c6f468
small changes
RaulRubioSerrano Feb 21, 2024
37e2909
neumann neumann
RaulRubioSerrano Feb 26, 2024
ed1571c
Create NeumannNeumann.m
RaulRubioSerrano Feb 26, 2024
235f4b0
Update NeumannNeumann.m
FerrerFerreAlex Feb 26, 2024
59e74fe
updated Neumann-Neumann
RaulRubioSerrano Feb 27, 2024
dc3db0a
small changes
RaulRubioSerrano Feb 27, 2024
9f52b81
"small chang"
FerrerFerreAlex Feb 28, 2024
6cc1186
Update NeumannNeumann.m
RaulRubioSerrano Feb 28, 2024
b8e7d93
bnn 1st try
RaulRubioSerrano Mar 18, 2024
b164233
small changes
RaulRubioSerrano Mar 19, 2024
78bb7fb
bnn n domains 1st try
RaulRubioSerrano Mar 26, 2024
d060951
harmonic extension
RaulRubioSerrano Mar 27, 2024
73973bf
coarse space
RaulRubioSerrano Mar 28, 2024
fde776e
bnn 2nd try
RaulRubioSerrano Apr 3, 2024
eef2e8e
small bug
RaulRubioSerrano Apr 8, 2024
12b8ac7
changes
RaulRubioSerrano Apr 10, 2024
04a4bd7
small changes
RaulRubioSerrano Apr 18, 2024
0aa216d
small changes
RaulRubioSerrano Apr 24, 2024
11a1a6c
bc for ndom + lagrange coarse
RaulRubioSerrano Apr 25, 2024
800b47e
Merge branch 'master' into Domain_decomposition
RaulRubioSerrano Apr 29, 2024
3c96b85
small changes
RaulRubioSerrano Apr 29, 2024
cc61660
merge + preparing eifem
RaulRubioSerrano May 2, 2024
aece1f6
small changes
RaulRubioSerrano May 9, 2024
c9c76c1
cg+eifem
RaulRubioSerrano May 15, 2024
58b00e4
small changes
RaulRubioSerrano May 15, 2024
0764329
small changes
RaulRubioSerrano Jun 20, 2024
7230d7b
small changes
RaulRubioSerrano Jul 10, 2024
7e2cde0
"some precond"
FerrerFerreAlex Jul 10, 2024
9e28095
Update EIFEMtesting.m
FerrerFerreAlex Jul 10, 2024
b88d942
Update EIFEMtesting.m
FerrerFerreAlex Jul 12, 2024
42c44a3
eifem+illllu
RaulRubioSerrano Sep 10, 2024
55b537e
Update EIFEMtesting.m
FerrerFerreAlex Sep 10, 2024
d547e8a
Update EIFEMtesting.m
FerrerFerreAlex Sep 10, 2024
2cdf187
Update EIFEMtesting.m
FerrerFerreAlex Sep 10, 2024
cda81c9
Update EIFEMtesting.m
FerrerFerreAlex Sep 10, 2024
4021a3f
small changeeeees
RaulRubioSerrano Sep 17, 2024
01d6f23
small changes
RaulRubioSerrano Sep 18, 2024
74e91ae
Update EIFEMtesting.m
FerrerFerreAlex Sep 18, 2024
a61a050
small changes
RaulRubioSerrano Sep 30, 2024
eecbe83
"some updates"
FerrerFerreAlex Sep 30, 2024
ad70d21
"some upd"
FerrerFerreAlex Sep 30, 2024
c2c5ffb
small changes
RaulRubioSerrano Sep 30, 2024
bf31e4d
"some ref"
FerrerFerreAlex Sep 30, 2024
43399f6
"some adv"
FerrerFerreAlex Sep 30, 2024
59ea49c
Update GeneralPreconditioner.m
FerrerFerreAlex Sep 30, 2024
b27e8a5
"created ILU Prec"
FerrerFerreAlex Oct 9, 2024
5b67a60
"created Jacobi"
FerrerFerreAlex Oct 9, 2024
38e0452
"Prec Modal"
FerrerFerreAlex Oct 9, 2024
948464a
Domain decomposition dof manager
RaulRubioSerrano Oct 9, 2024
85b00a8
Domain decomposition dof manager
RaulRubioSerrano Oct 9, 2024
be8cd32
local-global on ddDofManager
RaulRubioSerrano Oct 9, 2024
a8bacca
small changes
RaulRubioSerrano Oct 9, 2024
34bea56
"chang"
FerrerFerreAlex Oct 10, 2024
683fdf0
assemble dissemble
RaulRubioSerrano Oct 10, 2024
093affe
"sm up"
FerrerFerreAlex Oct 10, 2024
36d6da1
"sm upd"
FerrerFerreAlex Oct 10, 2024
acf90aa
"some upd"
FerrerFerreAlex Oct 10, 2024
4b3aa5e
Update EIFEMtesting.m
FerrerFerreAlex Oct 10, 2024
06a9d8a
Delete GeneralPreconditioner.m
FerrerFerreAlex Oct 10, 2024
181ac0b
small changes
RaulRubioSerrano Oct 10, 2024
d78cc54
some updates
RaulRubioSerrano Oct 10, 2024
b1bcecf
some changes
RaulRubioSerrano Oct 15, 2024
aae6d09
"Some chang"
FerrerFerreAlex Oct 17, 2024
33bf8c2
"dirichlet New advances"
FerrerFerreAlex Oct 17, 2024
7752a9f
small changes
RaulRubioSerrano Oct 17, 2024
10975a1
"sm chang"
FerrerFerreAlex Oct 23, 2024
33ac63f
InitSwan
gervilquin Nov 4, 2024
47a8f0c
"some upd"
FerrerFerreAlex Nov 11, 2024
b42faf4
Merge branch 'master' into Domain_decomposition
FerrerFerreAlex Nov 11, 2024
ece3862
"updated with Mater"
FerrerFerreAlex Nov 11, 2024
fa8291b
"update"
FerrerFerreAlex Nov 11, 2024
e995445
small changes
RaulRubioSerrano Nov 11, 2024
fad63a6
Merge branch 'Domain_decomposition' of https://github.com/SwanLab/Swa…
RaulRubioSerrano Nov 11, 2024
28f7df1
Merge branch 'master' into Domain_decomposition
FerrerFerreAlex Nov 13, 2024
92f4819
"coord unique bug solved"
FerrerFerreAlex Nov 13, 2024
2878983
Inclusion set up example
RaulRubioSerrano Nov 13, 2024
a2cb259
small changes
RaulRubioSerrano Nov 13, 2024
8c065b7
Reshape interface
RaulRubioSerrano Nov 14, 2024
b63f2d8
"reshape working"
FerrerFerreAlex Nov 14, 2024
31a0dc8
"some ch"
FerrerFerreAlex Nov 14, 2024
a82bb36
"bug repaired"
FerrerFerreAlex Nov 20, 2024
42b1b4d
small changes
RaulRubioSerrano Nov 22, 2024
7f8560b
"chang"
FerrerFerreAlex Nov 22, 2024
3ff5180
bug solved
RaulRubioSerrano Nov 25, 2024
6bb6a37
tolerance bug solved
RaulRubioSerrano Nov 26, 2024
cddd734
automated training
AlbertFoGu Dec 3, 2024
2aed641
Merge remote-tracking branch 'origin/Domain_decomposition' into Alber…
AlbertFoGu Dec 3, 2024
bd780c5
Small changes
RaulRubioSerrano Dec 4, 2024
cef819e
Merge branch 'master' into Domain_decomposition
FerrerFerreAlex Dec 4, 2024
c9b34d6
some changes for plotting
RaulRubioSerrano Dec 18, 2024
2a40dc7
Update
AlbertFoGu Dec 18, 2024
fe29817
Merge remote-tracking branch 'origin/Domain_decomposition' into Alber…
AlbertFoGu Dec 18, 2024
1e7e95c
implementing c matrix
RaulRubioSerrano Jan 28, 2025
b6220bc
some changes
RaulRubioSerrano Jan 29, 2025
5fc6653
implemented c matrix
RaulRubioSerrano Feb 4, 2025
aa79a82
smll bug
RaulRubioSerrano Feb 4, 2025
aae83f7
Merge branch 'master' into AlbertFontTFG
RaulRubioSerrano Feb 5, 2025
d5500cf
small bug solved
RaulRubioSerrano Feb 5, 2025
f699065
added line print
RaulRubioSerrano Feb 5, 2025
6ed3adb
small plot changes
RaulRubioSerrano Feb 5, 2025
aca1129
Merge branch 'AlbertFontTFG' of https://github.com/SwanLab/Swan into …
AlbertFoGu Feb 6, 2025
12e2adf
Changes
AlbertFoGu Feb 11, 2025
985f46a
trying rigid body
RaulRubioSerrano Feb 13, 2025
85b2dad
Merge branch 'AlbertFontTFG' of https://github.com/SwanLab/Swan into …
RaulRubioSerrano Feb 13, 2025
4959298
update
AlbertFoGu Feb 18, 2025
af7b734
Merge branch 'AlbertFontTFG' of https://github.com/SwanLab/Swan into …
RaulRubioSerrano Feb 19, 2025
ccbb592
some changes
RaulRubioSerrano Feb 19, 2025
ee4467e
coarse added
RaulRubioSerrano Feb 19, 2025
378be03
small changes
RaulRubioSerrano Feb 19, 2025
3449fde
Merge branch 'master' into Domain_decomposition_merge
RaulRubioSerrano Feb 25, 2025
6914c6f
merged master
RaulRubioSerrano Feb 25, 2025
94e5cde
Changes 26-02-2025
AlbertFoGu Feb 26, 2025
338228a
trying RB
RaulRubioSerrano Feb 27, 2025
49f4a00
small changes
RaulRubioSerrano Feb 27, 2025
19d81b2
03-03-2025
AlbertFoGu Mar 3, 2025
7d2c9d4
lhs shape shape
RaulRubioSerrano Mar 5, 2025
ce733cc
training and projector to rigid body
RaulRubioSerrano Mar 10, 2025
c08025c
Changes
AlbertFoGu Mar 12, 2025
e31c657
implementing EIFEM
RaulRubioSerrano Mar 13, 2025
ae4167e
implementing eifem bug rb solved
RaulRubioSerrano Mar 14, 2025
2bb6a17
bug
RaulRubioSerrano Mar 17, 2025
8e42b22
Organized files
AlbertFoGu Mar 24, 2025
7c4f194
plain strain
RaulRubioSerrano Mar 27, 2025
4d4323d
without hole
RaulRubioSerrano Mar 27, 2025
cd81900
plus minus functions
RaulRubioSerrano Mar 28, 2025
3894dbf
minus refactoring
gervilquin Mar 28, 2025
913adba
Update 07-04-2025
AlbertFoGu Apr 7, 2025
ff89a51
Merge remote-tracking branch 'origin/Domain_decomposition_merge' into…
jose-antonio-torres Apr 8, 2025
a949de5
Update levelSetTestingAusetic.m
jose-antonio-torres Apr 8, 2025
a6c95ef
Merge branch 'master' into AlbertFontTFG
jose-antonio-torres Apr 8, 2025
310ab80
Update multi radius
AlbertFoGu May 7, 2025
ea7a40f
uncomplete CoarsePlot
AlbertFoGu May 7, 2025
38d7ab8
some changes for plotting
RaulRubioSerrano May 13, 2025
52a9841
Update CoarsePlotSolution.m
RaulRubioSerrano May 13, 2025
028f1ba
plotting with holes
RaulRubioSerrano May 13, 2025
a28b247
Update 21-05-2025
AlbertFoGu May 21, 2025
ca0f975
Merge branch 'master' into AlbertFontTFG
AlbertFoGu May 22, 2025
eaaaf5e
Update 27-05-2025
AlbertFoGu May 27, 2025
a18f931
updates
abrilbertran Jul 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions AlbertTFG files/.~lock.k_longer.csv#
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
,LEGIONALBERT/fontg,LegionAlbert,27.05.2025 16:20,file:///C:/Users/fontg/AppData/Roaming/LibreOffice/4;
224 changes: 224 additions & 0 deletions AlbertTFG files/CoarsePlotSolution.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,224 @@
classdef CoarsePlotSolution < handle
%UNTITLED Summary of this class goes here
% Detailed explanation goes here

properties
mesh
u
originalBCApplier
outputFileName
r
centroids
end

methods
function obj = CoarsePlotSolution(u, mesh, bcApplier,outputFileName, r, centroids)

if isempty(r)
obj.plot(u, mesh, bcApplier,outputFileName);
else
obj.init(u, mesh, bcApplier,outputFileName,r, centroids);
obj.makeHole(bcApplier,outputFileName);

end
end

% function makeHole(~, x, mesh, bcApplier,outputFileName,r,holeCoords)
% x = obj.createXHole(x, mesh, r, holeCoords);
% mesh = createHole(mesh, r, holeCoords);
% obj.plot(x, mesh, bcApplier,outputFileName);
%o
% end



end

methods (Access = private) %%% treure Static

function makeHole(obj, bcApplier,outputFileName)

%uH = obj.createUHole();
uMeshFun = obj.createUnfittedMeshFun();
obj.plot(uMeshFun,outputFileName);

end

function init(obj, u, mesh, bcApplier,outputFileName,r,centroids)
obj.mesh = mesh;
obj.u = u;
obj.originalBCApplier = bcApplier;
obj.outputFileName = outputFileName;
obj.r = r;
obj.centroids = centroids;

end

function U = createUHole(obj)
U = obj.u;

for i = obj.mesh.nnodes:-1:1
if sqrt( (obj.mesh.coord(i,1) )^2 + (obj.mesh.coord(i,2))^2 ) <= obj.r
U(2*i-1:2*i) = [];
end

end

end

function uMeshFun = createUnfittedMeshFun(obj)
% mR = obj.createReferenceMesh();

gPar.type = 'Circle';

% Initialize the sum as the zero function
f_sum = @(x) 0;
u = obj.u;
mesh = obj.mesh;
f = @(x) 0;
s.x0 = obj.centroids(:,1);
s.y0 = obj.centroids(:,2);
s.r = obj.r;
s.type = 'Circles';
g = GeometricalFunction(s);
ls = g.computeLevelSetFunction(obj.mesh);

lsCircle = ls.fValues;
lsCircleInclusion = -lsCircle;

sUm.backgroundMesh = obj.mesh;
sUm.boundaryMesh = obj.mesh.createBoundaryMesh;
uMesh = UnfittedMesh(sUm);
uMesh.compute(lsCircleInclusion);
uMeshFun = uMesh.obtainFunctionAtUnfittedMesh(u);
% s.fValues = reshape(uMeshFun.innerMeshFunction.fValues,2,[])';

end

function newMesh = createReferenceMesh(obj)
xmin = -1;
xmax = 1;
ymin = -1;
ymax = 1;

n1 = numel(find(obj.mesh.coord(:,1)==xmin));
n2 = n1;%numel(find(obj.mesh.coord(:,2)==ymin));


%UnitMesh better
x1 = linspace(xmin,xmax,n1);
x2 = linspace(ymin,ymax,n2);
[xv,yv] = meshgrid(x1,x2);
[F,V] = mesh2tri(xv,yv,zeros(size(xv)),'x');
s.coord = V(:,1:2);
s.connec = F;
newMesh = Mesh.create(s);
end

function levelSet = createLevelSetFunction(obj,mR)
sLS.type = 'CircleInclusion';
sLS.xCoorCenter = 0;
sLS.yCoorCenter = 0;
sLS.radius = obj.r;
g = GeometricalFunction(sLS);
lsFun = g.computeLevelSetFunction(mR);
levelSet = lsFun.fValues;
end

function uMesh = computeUnfittedMesh(obj, mR,levelSet)
sUm.backgroundMesh = mR;
sUm.boundaryMesh = mR.createBoundaryMesh();
uMesh = UnfittedMesh(sUm);
uMesh.compute(levelSet);
end

function plot(~, uMeshFun,outputFileName)
row = 0;
col = 0;
iter = 0;
flag = 0;

% if ~isempty(bcApplier)
% x = bcApplier.reducedToFullVectorDirichlet(x);
% end
% if nargin <7
% flag =0;
% end
% % xFull = bc.reducedToFullVector(x);
% if size(x,2)==1
% s.fValues = reshape(x,2,[])';
% else
% s.fValues = x;
% end
% %
%
% s.mesh = mesh;
% s.fValues(:,end+1) = 0;
% s.ndimf = 2;
% s.order = 'P1';
% xF = LagrangianFunction(s);
% % xF.plot();
% if flag == 0
% xF.print(['domain',num2str(row),num2str(col),'_',num2str(iter)],'Paraview')
% elseif flag == 1
% xF.print(['DomainResidual',num2str(row),num2str(col),'_',num2str(iter)],'Paraview')
% elseif flag == 2
% xF.print(['Residual',num2str(row),num2str(col),'_',num2str(iter)],'Paraview')
% elseif flag == 3
% xF.print(['domainFine',num2str(row),num2str(col),'_',num2str(iter)],'Paraview')
% elseif flag == 4
% xF.print(['domainNeuman',num2str(row),num2str(col),'_',num2str(iter)],'Paraview')
% end



%uMeshFun.innerMeshFunction.print(['inner',num2str(row),num2str(col),'_',num2str(iter)],'Paraview')
%uMeshFun.innerCutMeshFunction.print(['innerCut',num2str(row),num2str(col),'_',num2str(iter)],'Paraview')

fvalues = [uMeshFun.innerMeshFunction.fValues;
uMeshFun.innerCutMeshFunction.fValues];

s.coord = [uMeshFun.innerMeshFunction.mesh.coord;
uMeshFun.innerCutMeshFunction.mesh.coord];

s.connec = [uMeshFun.innerMeshFunction.mesh.connec;
uMeshFun.innerCutMeshFunction.mesh.connec + max(uMeshFun.innerMeshFunction.mesh.connec(:))];

mh = Mesh.create(s);

ss.mesh = mh;
ss.fValues = fvalues;
ss.order = 'P1';
ss.ndimf = size(fvalues,2)

u = LagrangianFunction(ss);

u.print([outputFileName],'Paraview')

% fileName = [num2str(row),num2str(col),'_',num2str(iter)];
%
% s = dir(pwd);
% s = struct2table(s);
% idx = startsWith(s.name, fileName);
% s = s(idx,:);
% oldFileName = s.name;
% newFileName = replace(oldFileName, fileName, outputFileName);
% fclose('all');
% movefile(oldFileName{1}, newFileName{1});
%
% fileName = ['innerCut',num2str(row),num2str(col),'_',num2str(iter)];
%
% s = dir(pwd);
% s = struct2table(s);
% idx = startsWith(s.name, fileName);
% s = s(idx,:);
% oldFileName = s.name;
% newFileName = replace(oldFileName, fileName, [outputFileName, '_cut']);
% fclose('all');
% movefile(oldFileName{1}, newFileName{1});

end


end
end
Loading