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];
74 u[0] = u[1] = u[2] = 0.0;
83 ilist = ilisto = ilistck = 0;
85 for (k=1; k<=
mesh->
ne; k++)
89 for(k=1; k<=mesh->ne; k++) {
91 if ( !
MG_EOK(pt) || !pt->
xt )
continue;
113 "\n ## Error: %s: no triangle with reference %d in the mesh.\n"
121 for(n=0; n<nlay; n++) {
125 for(k=ilistck+1; k<=ilisto; k++) {
131 if ( !jel )
continue;
135 assert( ilist <= mesh->ne );
165 for(k=1; k<=ilist; k++) {
181 if ( !jel )
continue;
191 if ( !LS_mesh(lsst,npf,0,ntf,ilist) ) {
192 fprintf(stderr,
"\n ## Error: %s: problem in fn LS_mesh. Exiting.\n",
205 for(k=1; k<=
mesh->
np; k++) {
211 if ( !LS_addVer(lsst,ip,p0->
c,p0->
ref) ) {
212 fprintf(stderr,
"\n ## Error: %s: problem in fn LS_addVer. Exiting.\n",
222 for(k=1; k<=ilist; k++) {
227 vper[i] = perm[pt->
v[i]];
229 if (!LS_addTet(lsst,(
int)k,(
int*)vper,0) ) {
230 fprintf(stderr,
"\n ## Error: %s: problem in fn LS_addTet. Exiting.\n",
241 for(k=1; k<=ilist; k++) {
258 if ( !LS_addTri(lsst,(
int)ntf,(
int*)vper,refdirnh) ) {
259 fprintf(stderr,
"\n ## Error: %s: problem in fn LS_addTri. Exiting.\n",
273 if ( !LS_addTri(lsst,(
int)ntf,(
int*)vper,refdirh) ) {
274 fprintf(stderr,
"\n ## Error: %s: problem in fn LS_addTri. Exiting.\n",
286 printf(
"Number of packed tetra %d, points %" MMG5_PRId
287 ", triangles %" MMG5_PRId
"\n",ilist,npf,ntf);
290 if ( !LS_setBC(lsst,Dirichlet,refdirnh,
'f',LS_tri,NULL) ) {
291 fprintf(stderr,
"\n ## Error: %s: problem in fn LS_set BC. Exiting.\n",
299 if ( !LS_setBC(lsst,Dirichlet,refdirh,
'v',LS_tri,u) ) {
300 fprintf(stderr,
"\n ## Error: %s: problem in fn LS_set BC. Exiting.\n",
310 fprintf(stderr,
"\n ## Error: %s: problem in fn LS_setLame. Exiting.\n",
319 if ( !LS_newSol(lsst) ) {
320 fprintf(stderr,
"\n ## Error: %s: problem in fn LS_newSol. Exiting.\n",
328 for(k=1; k<=
mesh->
np; k++) {
332 if ( !LS_addSol(lsst,ip,&disp->
m[3*k]) ) {
333 fprintf(stderr,
"\n ## Error: %s: problem in fn LS_addSol. Exiting.\n",
369 for(k=1; k<=
mesh->
np; k++) {
371 disp->
m[3*k+i] = 0.0;
374 for(k=1; k<=npf; k++) {
378 disp->
m[3*ip+i] = u[3*(k-1)+i];
395 MMG5_int npf,*invperm;
398 if (
mesh->
np > INT_MAX ||
mesh->
ne > INT_MAX ||
sizeof(MMG5_int) == 8 ) {
399 fprintf(stderr,
"\n ## Error: %s: impossible to call elasticity library"
400 " with int64 integers.\n",__func__);
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 vertices of an MMG mesh.
Structure to store tetrahedra of an MMG mesh.
Structure to store additional information for the surface tetrahedra of an 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)