Commits

Lisandro Dalcin committed a57e67a

Set field names in linear elasticity example

Comments (0)

Files changed (1)

demo/Elasticity.c

   ierr = IGASetOrder(iga,1);CHKERRQ(ierr);
   ierr = IGASetUp(iga);CHKERRQ(ierr);
 
+  const char *fieldname[3] = {"u", "v", "w"};
+  for (i=0; i<dim; i++) {ierr = IGASetFieldName(iga,i,fieldname[i]);CHKERRQ(ierr);}
+
   // Set boundary conditions
   for (i=0; i<dim; i++) {ierr = IGASetBoundaryValue(iga,0,0,i,0.0);CHKERRQ(ierr);}     // Dirichlet
   for (i=0; i<dim; i++) {ierr = IGASetBoundaryLoad (iga,0,1,i,load[i]);CHKERRQ(ierr);} // Neumann