Dear Anne-Cecile, How many Newton iterations does a typical Newton step take? If it takes more than 7-8 iterations then there is something to fix (augmentation parameter, line search options, ...).
Rigid-deformable contact is the fastest case that you can have. It doesn't make a lot of difference if it is with penalization or Lagrange multipliers. Penalization saves you just a few dofs. For optimizing your running speed it would be nice to know how much percent of the time is spent in the linear system solve with MUMPS (running in fortran), how much percent of the time is spent in assemblies (running in C++), and how much time is spent inside your Python script itself. In general, to save time I would try to make as big (implicit) time steps as possible, or even do variable time steps. For variable time steps you need to write your implementation in a general form that allows for that. If the assembly time is considerable you can save time by making sure that you use "add_linear_term" instead of "add_nonlinear_term" for terms that are in fact linear. For improving the linear system solve speed, make sure that you use mumps, and make sure that both MUMPS uses a fast blas implementation (atlas,openblas or MKL are all good options). The same applies to GetFEM regarding assembly times, GetFEM needs to be linked to a fast blas/lapack library. Of course you can also improve the speed by reducing the number of nodes in your mesh. In general, try to use adaptive meshing with large elements in regions where you do not expect very abrupt changes in displacement and pressure fields. Best regards Kostas On Tue, Apr 19, 2022 at 12:43 AM Lesage,Anne Cecile J < ajles...@mdanderson.org> wrote: > Dear all > > > > I have tried the following rigid contact option for an arbitrary 2D > surface obstacle and a 3D mesh in python scripting > > It looks quite successful > > However it takes a lot of time for me to finish a viscoelastic computation > (28h) > > How can I speed it up? By reducing the number of Newton iteration for > example? > > I can read in the documentation that there are three other options > > How to they compare in terms of speed and accuracy? > > How do they compare to a nonlinear stiffness penalty method between the > rigid contact surface considered as master and the 3D solid mesh considered > as slave nodes sets? > > > > Thank you > > Regards > > Anne-Cecile > > > > > > ldof = mflambda.dof_on_region(BRAIN_BOUND) > > mflambda_partial = gf.MeshFem('partial', mflambda, ldof) > > md.add_fem_variable('lambda_n', mflambda_partial) > > md.add_initialized_data('r', [r]) > > > > md.add_initialized_fem_data('obstacle', mfpb, levelset) > > md.add_integral_contact_with_rigid_obstacle_brick(mim_friction, 'ub', > 'lambda_n', > > 'obstacle', 'r', > BRAIN_BOUND, 1); > > > The information contained in this e-mail message may be privileged, > confidential, and/or protected from disclosure. This e-mail message may > contain protected health information (PHI); dissemination of PHI should > comply with applicable federal and state laws. If you are not the intended > recipient, or an authorized representative of the intended recipient, any > further review, disclosure, use, dissemination, distribution, or copying of > this message or any attachment (or the information contained therein) is > strictly prohibited. If you think that you have received this e-mail > message in error, please notify the sender by return e-mail and delete all > references to it and its contents from your systems. >