Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
e433eb5
add torsion computation for annulus and cylinder
hverhelst Sep 12, 2024
0d525db
Merge branch 'opt-solver' into torsion
hverhelst Sep 17, 2024
2f14466
add explicit case for cylinder and annulus
hverhelst Nov 29, 2024
4c56065
static solver changes
hverhelst Dec 4, 2024
bbcc129
Merge branch 'torsion' of github.com:gismo/gsStructuralAnalysis into …
hverhelst Dec 4, 2024
338242c
add `gsStaticOpt` in example
hverhelst Dec 5, 2024
33af7ba
add unittest
hverhelst Dec 8, 2024
3233d57
add loop for failure of load step
hverhelst Jan 2, 2025
bed82fe
incremental in z
hverhelst Jan 3, 2025
77b1895
merge main
Jan 7, 2025
8b8a050
update benchmark
Jan 15, 2025
4f749d5
remove slack multiplier
Jan 15, 2025
ad3bb57
change output moment
Jan 15, 2025
dea2760
small cleanup
hverhelst Jan 15, 2025
86c1a2e
Merge branch 'torsion' of github.com:gismo/gsStructuralAnalysis into …
hverhelst Jan 15, 2025
0e70bca
staticDR will re-scale residual correctly in second iteration, iff re…
hverhelst Jan 15, 2025
c568540
add skip after three refinements
Jan 27, 2025
7dadeda
fix stepping
hverhelst Jan 27, 2025
c68ffb4
small
Jan 28, 2025
b5fb7db
add output line, remove intermediate artificial step
hverhelst Jan 28, 2025
0299b85
add lines per coordinate
hverhelst Jan 30, 2025
b4d9780
improved export of lines
hverhelst Jan 31, 2025
f1b0c4b
add checkpoints
hverhelst Feb 1, 2025
b3c3c7b
add membrane option to Pillow
hverhelst Feb 1, 2025
09ed5a2
add tolerance for DynamicRelaxation
hverhelst Jun 25, 2025
99cebaa
add comments to torsion example
hverhelst Jun 25, 2025
0fa15f7
Merge branch 'main' into torsion
hverhelst Jun 25, 2025
10554c4
add lumping
hverhelst Jun 25, 2025
13789e5
small review fix
hverhelst Jun 25, 2025
fa69269
Update benchmarks/benchmark_cylinder_DC.cpp
hverhelst Jul 11, 2025
3054493
Update benchmarks/benchmark_cylinder_DC.cpp
hverhelst Jul 11, 2025
2bd678c
add correct paths elasticity, fix frustrum example
hverhelst Jul 11, 2025
d7784af
Merge branch 'torsion' of github.com:gismo/gsStructuralAnalysis into …
hverhelst Jul 11, 2025
9373594
small
hverhelst Jul 11, 2025
7fa8dd9
Update benchmarks/benchmark_UniaxialTension.cpp
hverhelst Jul 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions benchmarks/benchmark_Elasticity_Beam_APALM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
#include <gismo.h>

#ifdef gsElasticity_ENABLED
#include <gsElasticity/gsGeoUtils.h>
#include <gsElasticity/gsElasticityAssembler.h>
#include <gsElasticity/gsWriteParaviewMultiPhysics.h>
#include <gsElasticity/src/gsGeoUtils.h>
#include <gsElasticity/src/gsElasticityAssembler.h>
#include <gsElasticity/src/gsWriteParaviewMultiPhysics.h>
#endif

#include <gsStructuralAnalysis/src/gsALMSolvers/gsALMBase.h>
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/benchmark_FrustrumALM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ int main (int argc, char** argv)
// Initialise solution object
mp_def = mp;

gsMultiBasis<> dbasis(mp,true);
gsMultiBasis<> dbasis(mp,false);
gsInfo<<"Basis (patch 0): "<< mp.patch(0).basis() << "\n";

// Boundary conditions
Expand Down
16 changes: 14 additions & 2 deletions benchmarks/benchmark_Pillow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ int main (int argc, char** argv)
bool DR = false;
bool NR = false;
int verbose = 0;
bool membrane = false;

real_t tolDR = 1e-1;

index_t Compressibility = 1;
index_t material = 1;
Expand Down Expand Up @@ -78,6 +81,8 @@ int main (int argc, char** argv)

cmd.addReal( "L", "maxLoad", "Maximum load", maxLoad );

cmd.addReal( "T", "tolDR", "Tolerance for the DR solver", tolDR );

cmd.addSwitch("plot", "Plot result in ParaView format", plot);
cmd.addSwitch("write", "Write data to file", write);
cmd.addSwitch("stress", "Plot stress in ParaView format", stress);
Expand All @@ -86,6 +91,7 @@ int main (int argc, char** argv)
cmd.addSwitch("split", "Split to a multi-patch", split);
cmd.addSwitch("smooth", "Use a smooth basis (maximum regularity)", smooth);
cmd.addInt("v","verbose", "0: no; 1: iteration output; 2: Full matrix and vector output", verbose);
cmd.addSwitch("membrane", "Membrane element", membrane);

try { cmd.getValues(argc,argv); } catch (int rv) { return rv; }
GISMO_ASSERT(NR || DR,"At least a Newton Raphson or a Dynamic Relaxation solver needs to be enabled. Run with option NR or DR.");
Expand Down Expand Up @@ -236,7 +242,11 @@ int main (int argc, char** argv)
// materialMatrixTFT->options().setSwitch("Explicit",true);

gsThinShellAssemblerBase<real_t>* assembler;
if (TFT)
if (!membrane && TFT)
assembler = new gsThinShellAssembler<3, real_t, true >(mp,dbasis,BCs,force,materialMatrixTFT);
else if (!membrane && !TFT)
assembler = new gsThinShellAssembler<3, real_t, true >(mp,dbasis,BCs,force,materialMatrix);
else if (membrane && TFT)
assembler = new gsThinShellAssembler<3, real_t, false >(mp,dbasis,BCs,force,materialMatrixTFT);
else
assembler = new gsThinShellAssembler<3, real_t, false >(mp,dbasis,BCs,force,materialMatrix);
Expand Down Expand Up @@ -305,7 +315,7 @@ int main (int argc, char** argv)
DROptions.setReal("damping",damping);
DROptions.setReal("alpha",alpha);
DROptions.setInt("maxIt",1e6);
DROptions.setReal("tol",1e-2);
DROptions.setReal("tol",tolDR);
DROptions.setReal("tolE",1e-5);
DROptions.setInt("verbose",verbose);
DROptions.setInt("ResetIt",(index_t)(100));
Expand Down Expand Up @@ -437,6 +447,8 @@ int main (int argc, char** argv)
gsVector<> data(1);
data<<load_fac;
writer.add(result,data);

gsWrite(mp_def,dirname + "/" + "deformed");
Comment thread
hverhelst marked this conversation as resolved.
}

/*
Expand Down
26 changes: 23 additions & 3 deletions benchmarks/benchmark_UniaxialTension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@brief Uniaxial Tension Test benchmark

e.g. Section 8.1. from Kiendl et al 2015
Kiendl, J., Hsu, M.-C., Wu, M. C. H., & Reali, A. (2015). Isogeometric Kirchhoff–Love shell formulations for general hyperelastic materials. Computer Methods in Applied Mechanics and Engineering, 291, 280–303. https://doi.org/10.1016/J.CMA.2015.03.010
Kiendl, J., Hsu, M.-C., Wu, M. C. H., & Reali, A. (2015). Isogeometric Kirchhoff–Love shell formulations for general hyperelastic materials. Computer Methods in Applied Mechanics and Engineering, 291, 280–303. https://doi.org/10.1016/J.CMA.2015.03.010

This file is part of the G+Smo library.

Expand Down Expand Up @@ -344,11 +344,30 @@ int main (int argc, char** argv)
assembler->constructSolution(solVector,mp_def);

gsMatrix<> pts(2,1);
pts<<0.5,0.5;
pts<<1,0;

lambdas.col(k) = assembler->computePrincipalStretches(pts,mp_def,0);
S.at(k) = Lold / 1e-3 / lambdas(0,k) / lambdas(2,k);
San.at(k) = mu * (math::pow(lambdas(1,k),2)-1/lambdas(1,k));
if (material==1 && !Compressibility)
San.at(k) = mu * (math::pow(lambdas(0,k),2)-1/lambdas(0,k));
else if (material==3 && !Compressibility)
{
real_t c2 = 1.0 / (Ratio+1);
real_t c1 = 1.0 - c2;
San.at(k) =-mu*(c2*lambdas(0,k)*lambdas(0,k)+c2/lambdas(0,k)+c1)/lambdas(0,k)+lambdas(0,k)*(c1*lambdas(0,k)*mu+2*c2*mu);
}
else if (material==4 && !Compressibility)
{
real_t a1 = alpha1.value(0);
real_t a2 = alpha2.value(0);
real_t a3 = alpha3.value(0);
real_t m1 = mu1.value(0);
real_t m2 = mu2.value(0);
real_t m3 = mu3.value(0);
San.at(k) =-m1*math::pow((1./lambdas(0,k)),0.5*a1)-m2*math::pow((1./lambdas(0,k)),0.5*a2)-m3*math::pow((1./lambdas(0,k)),0.5*a3)+m1*math::pow(lambdas(0,k),a1)+m2*math::pow(lambdas(0,k),a2)+m3*math::pow(lambdas(0,k),a3);
}
else
San.at(k) = 0.;

deformation = mp_def;
deformation.patch(0).coefs() -= mp.patch(0).coefs();// assuming 1 patch here
Expand Down Expand Up @@ -408,6 +427,7 @@ int main (int argc, char** argv)
gsInfo<<"Lambdas:\n"<<lambdas<<"\n";
gsInfo<<"S\t:\n"<<S<<"\n";
gsInfo<<"San\t:\n"<<San<<"\n";
gsInfo<<"NOTE: If San is zero, the analytical solution is not implemented for this material.\n";

if (plot)
{
Expand Down
Loading