38#define _LS_LAMBDA 10.0e5
52 MMG5_int k,iel,jel,n,npf,nef,ip,nlay,refdirh,refdirnh,ilist,ilisto,ilistck;
53 MMG5_int vper[3],*perm,*list,*adja,*invperm;
62 ilist = ilisto = ilistck = 0;
75 for (k=1; k<=
mesh->
nt; k++) {
77 if ( !
MG_EOK(pt) )
continue;
98 for (n=0; n<nlay; n++) {
102 for (k=ilistck+1; k<=ilisto; k++) {
106 for (i=0; i<3; i++) {
108 if ( !jel )
continue;
113 assert ( ilist <= mesh->nt );
117 for (j=0; j<3; j++) {
130 "\n ## Error: %s: no triangle with reference %d in the mesh.\n"
151 for (k=1; k<=ilist; k++) {
156 for (i=0; i<3; i++) {
167 if ( !jel )
continue;
177 if ( !LS_mesh(lsst,npf,nef,ilist,0) ) {
178 fprintf(stdout,
" ## Problem in function LS_mesh. Exiting.\n");
189 for (k=1; k<=
mesh->
np; k++) {
196 if ( !LS_addVer(lsst,ip,p0->
c,p0->
ref) ) {
197 fprintf(stdout,
" ## Problem in fn LS_addVer. Exiting.\n");
205 for (k=1; k<=ilist; k++) {
210 vper[i] = perm[pt->
v[i]];
212 if (!LS_addTri(lsst,(
int)k,(
int*)vper,0) ) {
213 fprintf(stdout,
" ## Problem in fn LS_addTet. Exiting.\n");
222 for (k=1; k<=ilist; k++) {
227 for (i=0; i<3; i++) {
239 if ( !LS_addEdg(lsst,(
int)nef,(
int*)vper,refdirnh) ) {
240 fprintf(stdout,
" ## Problem in fn LS_addEdg. Exiting.\n");
252 if ( !LS_addEdg(lsst,(
int)nef,(
int*)vper,refdirh) ) {
253 fprintf(stdout,
" ## Problem in fn LS_addEdg. Exiting.\n");
263 printf(
"Number of packed triangles %" MMG5_PRId
", points %" MMG5_PRId
", edges %" MMG5_PRId
"\n",ilist,npf,nef);
272 if ( !LS_setBC(lsst,Dirichlet,refdirnh,
'f',LS_edg,NULL) ) {
273 fprintf(stdout,
" ## Problem in fn LS_set BC. Exiting.\n");
279 if ( !LS_setBC(lsst,Dirichlet,refdirh,
'v',LS_edg,u) ) {
280 fprintf(stdout,
" ## Problem in fn LS_set BC. Exiting.\n");
288 fprintf(stdout,
" ## Problem in fn LS_setLame. Exiting.\n");
295 if ( !LS_newSol(lsst) ) {
296 fprintf(stdout,
" ## Problem in fn LS_CreaSol. Exiting.\n");
302 for(k=1; k<=
mesh->
np; k++) {
305 if ( !LS_addSol(lsst,ip,&disp->
m[2*k]) ) {
306 fprintf(stdout,
" ## Problem in fn LS_addSol. Exiting.\n");
325 for (k=1; k<=
mesh->
np; k++) {
327 disp->
m[2*k+i] = 0.0;
330 for (k=1; k<=npf; k++) {
333 disp->
m[2*ip+i] = u[2*(k-1)+i];
342 MMG5_int npf,*invperm;
345 if (
sizeof(MMG5_int) == 8 ) {
346 fprintf(stderr,
"\n ## Error: %s: impossible to call elasticity library"
347 " with int64 integers.\n",__func__);
358 fprintf(stdout,
" ## Problem in fn MMG2D_packLS. Exiting.\n");
363 if ( !LS_elastic(lsst) ) {
364 fprintf(stdout,
" ## Problem in function elasti1. Exiting.\n");
370 fprintf(stdout,
" ## Problem in fn MMG2D_unpackLS. Exiting.\n");
378 if ( !LS_stop(lsst) ) {
379 fprintf(stdout,
" ## Problem in fn LS_stop. Exiting.\n");
393void MMG2D_unused_function(
void) {
397void __attribute__((unused)) MMG2D_unused_function(
void) {
if(!ier) exit(EXIT_FAILURE)
#define MMG5_SAFE_CALLOC(ptr, size, type, law)
#define MMG5_ADD_MEM(mesh, size, message, law)
static const uint8_t MMG5_iprv2[3]
#define MG_GET(flag, bit)
static const uint8_t MMG5_inxt2[6]
#define MMG5_DEL_MEM(mesh, ptr)
#define MG_SET(flag, bit)
Structure to store vertices of an MMG mesh.
Structure to store triangles of a MMG mesh.
MMG5_int * MMG2D_packLS(MMG5_pMesh mesh, MMG5_pSol disp, LSst *lsst, MMG5_int *npfin)
int MMG2D_unpackLS(MMG5_pMesh mesh, MMG5_pSol disp, LSst *lsst, MMG5_int npf, MMG5_int *invperm)
int MMG2D_velextLS(MMG5_pMesh mesh, MMG5_pSol disp)