40#define MMG5_DEGTOL 0.75
41#define _LS_LAMBDA 10.0e5
64 int n,nlay,ilist,ilisto,ilistck;
65 MMG5_int k,ip,npf,ntf,iel,jel,*perm,*invperm,*adja,*list,vper[4];
71 fprintf(stderr,
"\n ## Error: %s: impossible to call elasticity library"
72 " with int64 integers.\n",__func__);
81 u[0] = u[1] = u[2] = 0.0;
90 ilist = ilisto = ilistck = 0;
92 for (k=1; k<=
mesh->
ne; k++)
96 for(k=1; k<=mesh->ne; k++) {
98 if ( !
MG_EOK(pt) || !pt->
xt )
continue;
120 "\n ## Error: %s: no triangle with reference %d in the mesh.\n"
128 for(n=0; n<nlay; n++) {
132 for(k=ilistck+1; k<=ilisto; k++) {
138 if ( !jel )
continue;
142 assert( ilist <= mesh->ne );
172 for(k=1; k<=ilist; k++) {
188 if ( !jel )
continue;
198 if ( !LS_mesh(lsst,npf,0,ntf,ilist) ) {
199 fprintf(stderr,
"\n ## Error: %s: problem in fn LS_mesh. Exiting.\n",
212 for(k=1; k<=
mesh->
np; k++) {
218 if ( !LS_addVer(lsst,ip,p0->
c,p0->
ref) ) {
219 fprintf(stderr,
"\n ## Error: %s: problem in fn LS_addVer. Exiting.\n",
229 for(k=1; k<=ilist; k++) {
234 vper[i] = perm[pt->
v[i]];
236 if (!LS_addTet(lsst,(
int)k,(
int*)vper,0) ) {
237 fprintf(stderr,
"\n ## Error: %s: problem in fn LS_addTet. Exiting.\n",
248 for(k=1; k<=ilist; k++) {
265 if ( !LS_addTri(lsst,(
int)ntf,(
int*)vper,refdirnh) ) {
266 fprintf(stderr,
"\n ## Error: %s: problem in fn LS_addTri. Exiting.\n",
280 if ( !LS_addTri(lsst,(
int)ntf,(
int*)vper,refdirh) ) {
281 fprintf(stderr,
"\n ## Error: %s: problem in fn LS_addTri. Exiting.\n",
293 printf(
"Number of packed tetra %d, points %" MMG5_PRId
294 ", triangles %" MMG5_PRId
"\n",ilist,npf,ntf);
297 if ( !LS_setBC(lsst,Dirichlet,refdirnh,
'f',LS_tri,NULL) ) {
298 fprintf(stderr,
"\n ## Error: %s: problem in fn LS_set BC. Exiting.\n",
306 if ( !LS_setBC(lsst,Dirichlet,refdirh,
'v',LS_tri,u) ) {
307 fprintf(stderr,
"\n ## Error: %s: problem in fn LS_set BC. Exiting.\n",
317 fprintf(stderr,
"\n ## Error: %s: problem in fn LS_setLame. Exiting.\n",
326 if ( !LS_newSol(lsst) ) {
327 fprintf(stderr,
"\n ## Error: %s: problem in fn LS_newSol. Exiting.\n",
335 for(k=1; k<=
mesh->
np; k++) {
339 if ( !LS_addSol(lsst,ip,&disp->
m[3*k]) ) {
340 fprintf(stderr,
"\n ## Error: %s: problem in fn LS_addSol. Exiting.\n",
376 for(k=1; k<=
mesh->
np; k++) {
378 disp->
m[3*k+i] = 0.0;
381 for(k=1; k<=npf; k++) {
385 disp->
m[3*ip+i] = u[3*(k-1)+i];
402 MMG5_int npf,*invperm;
409 fprintf(stderr,
"\n ## Error: %s: problem in fn MMG5_packLS. Exiting.\n",
415 if ( !LS_elastic(lsst) ) {
416 fprintf(stderr,
"\n ## Error: %s: Problem in fn elasti1. Exiting.\n",
423 fprintf(stderr,
"\n ## Error: %s: problem in fn MMG5_unpackLS. Exiting.\n",
431 if ( !LS_stop(lsst) ) {
432 fprintf(stderr,
"\n ## Error: %s: problem in fn LS_stop. Exiting.\n",
446void MMG3D_unused_function(
void) {
450void __attribute__((unused)) MMG3D_unused_function(
void) {
if(!ier) exit(EXIT_FAILURE)
static const uint8_t MMG5_idir[4][3]
idir[i]: vertices of face opposite to vertex i
#define MMG5_SAFE_CALLOC(ptr, size, type, law)
#define MMG5_ADD_MEM(mesh, size, message, law)
#define MG_GET(flag, bit)
#define MMG5_DEL_MEM(mesh, ptr)
#define MG_SET(flag, bit)
Structure to store points of a MMG mesh.
Structure to store the surface tetrahedra of a MMG mesh.
MMG5_int * MMG5_packLS(MMG5_pMesh mesh, MMG5_pSol disp, LSst *lsst, MMG5_int *npfin)
int MMG5_unpackLS(MMG5_pMesh mesh, MMG5_pSol disp, LSst *lsst, MMG5_int npf, MMG5_int *invperm)
int MMG5_velextLS(MMG5_pMesh mesh, MMG5_pSol disp)