getfem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Getfem-commits] r4874 - in /trunk/getfem: doc/sphinx/source/userdoc/ in


From: Yves . Renard
Subject: [Getfem-commits] r4874 - in /trunk/getfem: doc/sphinx/source/userdoc/ interface/src/ interface/tests/matlab/ src/ tests/
Date: Tue, 10 Mar 2015 10:11:00 -0000

Author: renard
Date: Tue Mar 10 11:10:59 2015
New Revision: 4874

URL: http://svn.gna.org/viewcvs/getfem?rev=4874&view=rev
Log:
deprecation of basic nonlinear brick

Removed:
    trunk/getfem/doc/sphinx/source/userdoc/model_basic_nonlinear.rst
Modified:
    trunk/getfem/doc/sphinx/source/userdoc/model.rst
    trunk/getfem/interface/src/gf_model_set.cc
    trunk/getfem/interface/tests/matlab/demo_continuation.m
    trunk/getfem/src/getfem_models.cc
    trunk/getfem/tests/bilaplacian.cc

Modified: trunk/getfem/doc/sphinx/source/userdoc/model.rst
URL: 
http://svn.gna.org/viewcvs/getfem/trunk/getfem/doc/sphinx/source/userdoc/model.rst?rev=4874&r1=4873&r2=4874&view=diff
==============================================================================
--- trunk/getfem/doc/sphinx/source/userdoc/model.rst    (original)
+++ trunk/getfem/doc/sphinx/source/userdoc/model.rst    Tue Mar 10 11:10:59 2015
@@ -53,7 +53,6 @@
    model_linear_elasticity.rst
    model_mass.rst
    model_time_integration.rst
-   model_basic_nonlinear.rst
    model_nonlinear_elasticity.rst
    model_contact_friction.rst
    model_contact_friction_large_sliding.rst

Removed: trunk/getfem/doc/sphinx/source/userdoc/model_basic_nonlinear.rst
URL: 
http://svn.gna.org/viewcvs/getfem/trunk/getfem/doc/sphinx/source/userdoc/model_basic_nonlinear.rst?rev=4873&view=auto
==============================================================================
--- trunk/getfem/doc/sphinx/source/userdoc/model_basic_nonlinear.rst    
(original)
+++ trunk/getfem/doc/sphinx/source/userdoc/model_basic_nonlinear.rst    
(removed)
@@ -1,39 +0,0 @@
-.. $Id: model.rst 3655 2010-07-17 20:42:08Z renard $
-
-.. include:: ../replaces.txt
-
-.. highlightlang:: c++
-
-.. index:: models, model bricks
-
-.. _ud-model-basic-nonlinear:
-
-
-Basic nonlinear brick
----------------------
-
-This brick represents a weak term of the form
-
-.. math::
-
-   \int_{\Omega} f(u,\lambda)\cdot v\ dx + \ldots
-
-.. |muparser| replace:: muparser
-.. _muparser: http://muparser.sourceforge.net/
-
-
-where :math:`f` is a function given by a string and interpreted with 
|muparser|_. This means in particular that this bricks need that Getfem++ is 
build with |muparser|_ library being installed. Here also, :math:`u` is the 
unknown and  :math:`\lambda` is an optional real parameter. This brick can be 
used to add basic nonlinear term such as :math:`u^2` or :math:`e^u`.
-
-The function which adds this brick to a model is::
-
-  ind_brick = add_basic_nonlinear_brick(md, mim, varname, const std::string &f,
-               const std::string &dfdu, region = size_type(-1),
-               dataname_parameter = "");
-
-where ``varname`` is the name of the variable on which the term will be added, 
``f`` is the string containing the expression of the function,  ``dfdu`` is the 
string containing the expression of the derivative of the function with respect 
to the variable,  ``region`` is an optional mesh region and  
``dataname_parameter`` is the name of the optional scalar parameter.
-
-Note that in the expression of ``f`` the variable and the parameter should be 
represented by their respective names. For instance, to add the nonlinear term 
:math:`\lambda e^u` on a model on a variable ``u`` and a parameter ``lambda``, 
the command is::
-
-       add_basic_nonlinear_brick(md, mim, "u", "lambda*exp(u)",
-                                 "lambda*exp(u)", size_type(-1), "lambda");
-

Modified: trunk/getfem/interface/src/gf_model_set.cc
URL: 
http://svn.gna.org/viewcvs/getfem/trunk/getfem/interface/src/gf_model_set.cc?rev=4874&r1=4873&r2=4874&view=diff
==============================================================================
--- trunk/getfem/interface/src/gf_model_set.cc  (original)
+++ trunk/getfem/interface/src/gf_model_set.cc  Tue Mar 10 11:10:59 2015
@@ -1,6 +1,7 @@
+/* -*- c++ -*- (enables emacs c++ mode) */
 /*===========================================================================
  
- Copyright (C) 2009-2012 Yves Renard.
+ Copyright (C) 2009-2015 Yves Renard.
  
  This file is a part of GETFEM++
  
@@ -1235,6 +1236,7 @@
 
 
     /address@hidden ind = ('add basic nonlinear brick', @tmim mim, @str 
varname, @str f, @str dfdu[, @str dataname, @int region])
+    DEPRECATED (use `add nonlinear generic assembly brick` instead).
     Add a brick representing a scalar term :math:`f(u)` to the left-hand
     side of the model. In the weak form, one adds :math:`+\int f(u)v`.
     The function :math:`f` may optionally depend on :math:`\lambda`, i.e.,
@@ -1255,6 +1257,8 @@
        if (in.remaining()) dataname = in.pop().to_string();
        size_type region = size_type(-1);
        if (in.remaining()) region = in.pop().to_integer();
+       cerr << "Deprecated basic nonlinear brick. "
+            << "Use `add nonlinear generic assembly brick` instead." << endl;
        size_type ind
        = getfem::add_basic_nonlinear_brick(md->model(), gfi_mim->mesh_im(),
                                            varname, f, dfdu,

Modified: trunk/getfem/interface/tests/matlab/demo_continuation.m
URL: 
http://svn.gna.org/viewcvs/getfem/trunk/getfem/interface/tests/matlab/demo_continuation.m?rev=4874&r1=4873&r2=4874&view=diff
==============================================================================
--- trunk/getfem/interface/tests/matlab/demo_continuation.m     (original)
+++ trunk/getfem/interface/tests/matlab/demo_continuation.m     Tue Mar 10 
11:10:59 2015
@@ -68,9 +68,6 @@
 gf_model_set(md, 'add fem variable', 'u', mf);
 gf_model_set(md, 'add Laplacian brick', mim, 'u');
 gf_model_set(md, 'add data', 'lambda', 1);
-% gf_model_set(md, 'add basic nonlinear brick', mim, 'u', ...
-%              'u-lambda*exp(u)', '1-lambda*exp(u)', 'lambda');
-
 gf_model_set(md, 'add nonlinear generic assembly brick', mim, ...
             '(u-lambda*exp(u))*Test_u');
         

Modified: trunk/getfem/src/getfem_models.cc
URL: 
http://svn.gna.org/viewcvs/getfem/trunk/getfem/src/getfem_models.cc?rev=4874&r1=4873&r2=4874&view=diff
==============================================================================
--- trunk/getfem/src/getfem_models.cc   (original)
+++ trunk/getfem/src/getfem_models.cc   Tue Mar 10 11:10:59 2015
@@ -1,7 +1,7 @@
 /* -*- c++ -*- (enables emacs c++ mode) */
 /*===========================================================================
 
- Copyright (C) 2009-2013 Yves Renard
+ Copyright (C) 2009-2015 Yves Renard
 
  This file is a part of GETFEM++
 
@@ -5759,7 +5759,7 @@
 
   // ----------------------------------------------------------------------
   //
-  // Basic nonlinear brick
+  // Basic nonlinear brick. Deprecated brick
   //
   // ----------------------------------------------------------------------
 
@@ -5950,6 +5950,8 @@
   (model &md, const mesh_im &mim, const std::string &varname,
    const std::string &f, const std::string &dfdu, size_type region,
    const std::string &dataname) {
+    cerr << "Deprecated basic nonlinear brick. "
+         << "Use nonlinear generic assembly brick instead." << endl;
     pbrick pbr = new basic_nonlinear_brick(f, dfdu);
     model::termlist tl;
     tl.push_back(model::term_description(varname, varname, true));

Modified: trunk/getfem/tests/bilaplacian.cc
URL: 
http://svn.gna.org/viewcvs/getfem/trunk/getfem/tests/bilaplacian.cc?rev=4874&r1=4873&r2=4874&view=diff
==============================================================================
--- trunk/getfem/tests/bilaplacian.cc   (original)
+++ trunk/getfem/tests/bilaplacian.cc   Tue Mar 10 11:10:59 2015
@@ -172,8 +172,9 @@
 
   bool KL, newbricks;
   size_type NX ;
-  size_type boundary_ref ;        /* boundary_ref = 0 corresponds to clamped 
edge on the 4 edges   
-                                     boundary_ref = 1 corresponds to :    
+  size_type boundary_ref ;
+  /* boundary_ref = 0 corresponds to clamped edge on the 4 edges   
+     boundary_ref = 1 corresponds to :    
                                     
                                                free edge
                                               __________
@@ -184,7 +185,8 @@
                                              |__________|
                                     
                                                clamped
-                                               edge          */
+                                               edge
+  */
                                  
   bool solve(plain_vector &U);
   void init(void);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]