[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Getfem-commits] (no subject)
From: |
Tetsuo Koyama |
Subject: |
[Getfem-commits] (no subject) |
Date: |
Fri, 15 Feb 2019 02:44:42 -0500 (EST) |
branch: fixmisspell
commit 18eb0d6021370652b68591bce14c8340e70ef3a9
Merge: a79e4ad 6df7941
Author: Tetsuo Koyama <address@hidden>
Date: Fri Feb 15 16:43:45 2019 +0900
Merge branch 'master' of ssh://git.sv.gnu.org:/srv/git/getfem into
fixmisspell
.gitignore | 4 +
configure.ac | 14 +-
doc/sphinx/source/conf.py | 3 +
doc/sphinx/source/tutorial/thermo_coupling.rst | 51 +-
doc/sphinx/source/userdoc/interNMM.rst | 31 +-
doc/sphinx/source/userdoc/model_object.rst | 11 +
interface/src/getfemint.h | 1 +
interface/src/gf_fem.cc | 70 +-
interface/src/gf_mesh_get.cc | 26 +
interface/src/scilab/builder.sce | 4 +-
.../src/scilab/macros/gf_compute_Q1grid_interp.sci | 2 +-
interface/src/scilab/macros/gf_plot_slice.sci | 2 +-
interface/src/scilab/macros/init_pde.sci | 3 +-
interface/src/scilab/sci_gateway/c/gfm_common.c | 6 +-
interface/src/scilab/sci_gateway/c/gfm_common.h | 4 +-
interface/src/scilab/sci_gateway/c/gfm_scilab.cpp | 4 +-
interface/src/scilab/sci_gateway/c/sci_cgne.c | 4 +-
interface/src/scilab/sci_gateway/c/sci_cgs.c | 4 +-
interface/src/scilab/sci_gateway/c/sci_gmres.c | 4 +-
interface/src/scilab/sci_gateway/c/sci_mgcr.c | 4 +-
interface/src/scilab/sci_gateway/c/sci_spchol.c | 6 +-
interface/src/scilab/sci_gateway/c/sci_spcholinc.c | 4 +-
interface/src/scilab/sci_gateway/c/sci_spchsolve.c | 4 +-
interface/src/scilab/sci_gateway/c/sci_splu.c | 4 +-
interface/src/scilab/sci_gateway/c/sci_spluinc.c | 4 +-
interface/src/scilab/sci_gateway/c/sci_splusolve.c | 4 +-
interface/tests/matlab/check_all.sh | 8 +-
src/Makefile.am | 29 +-
src/bgeot_ftool.cc | 13 +-
src/bgeot_geometric_trans.cc | 15 +-
src/bgeot_geotrans_inv.cc | 7 +-
src/bgeot_poly.cc | 23 +-
src/bgeot_torus.cc | 9 +-
src/dal_singleton.cc | 61 +-
src/dal_static_stored_objects.cc | 514 +-
src/getfem/bgeot_geometric_trans.h | 3 +
src/getfem/bgeot_geotrans_inv.h | 3 +-
src/getfem/bgeot_poly_composite.h | 15 +-
src/getfem/bgeot_small_vector.h | 4 +-
src/getfem/dal_naming_system.h | 9 +-
src/getfem/dal_singleton.h | 169 +-
src/getfem/dal_static_stored_objects.h | 41 +-
src/getfem/getfem_accumulated_distro.h | 223 +
src/getfem/getfem_assembling.h | 22 +
src/getfem/getfem_context.h | 2 +-
src/getfem/getfem_fem.h | 38 +-
src/getfem/getfem_generic_assembly.h | 12 +-
.../getfem_generic_assembly_compile_and_exec.h | 16 +-
src/getfem/getfem_generic_assembly_tree.h | 4 +-
src/getfem/getfem_im_list.h | 6072 ++++++++++----------
src/getfem/getfem_interpolation.h | 19 +-
.../c/gfm_common.h => src/getfem/getfem_locale.h | 37 +-
src/getfem/getfem_mesh_region.h | 128 +-
src/getfem/getfem_models.h | 42 +-
src/getfem/getfem_omp.h | 626 +-
src/getfem_assembling_tensors.cc | 10 +-
src/getfem_contact_and_friction_common.cc | 66 +-
src/getfem_contact_and_friction_large_sliding.cc | 2 +-
src/getfem_error_estimate.cc | 9 +-
src/getfem_generic_assembly_compile_and_exec.cc | 199 +-
...fem_generic_assembly_functions_and_operators.cc | 25 +-
src/getfem_generic_assembly_semantic.cc | 22 +-
src/getfem_generic_assembly_tree.cc | 741 +--
src/getfem_generic_assembly_workspace.cc | 23 +-
src/getfem_import.cc | 5 +-
src/getfem_locale.cc | 58 +
src/getfem_mesh_im_level_set.cc | 1 +
src/getfem_mesh_region.cc | 502 +-
src/getfem_models.cc | 373 +-
src/getfem_omp.cc | 397 +-
src/gmm/gmm_inoutput.h | 1 +
src/gmm/gmm_opt.h | 101 +-
src/gmm/gmm_real_part.h | 1 +
src/gmm/gmm_std.h | 75 +-
74 files changed, 5731 insertions(+), 5322 deletions(-)
diff --cc doc/sphinx/source/tutorial/thermo_coupling.rst
index d57573c,639ef5c..72ab759
--- a/doc/sphinx/source/tutorial/thermo_coupling.rst
+++ b/doc/sphinx/source/tutorial/thermo_coupling.rst
@@@ -115,13 -115,14 +115,14 @@@ Let us now make a detailed presentatio
Initialization
**************
-First, in C++, ones has to include a certain number of headers for the model
object, the generic assembly, the linear interface (Gmm++), the experimental
mesher and the export facilities. For Python, this is simpler, |gf| can be
imported globally (numpy has also to be imported). For Scilab, the library has
first to be loaded in the Scilab console (this is not described here) and for
Matlab, nothing is necessary, except a `gf_workspace('clear all')` which allows
to clear all |gf| variables.
+First, in C++, ones has to include a certain number of headers for the model
object, the generic assembly, the linear algebra interface (Gmm++), the
experimental mesher and the export facilities. For Python, this is simpler,
|gf| can be imported globally (numpy has also to be imported). For Scilab, the
library has first to be loaded in the Scilab console (this is not described
here) and for Matlab, nothing is necessary, except a `gf_workspace('clear
all')` which allows to clear all |gf| [...]
+ .. tabularcolumns:: |p{0.080\linewidth}|p{0.900\linewidth}|
========== ================================================
-**C++** .. code-block:: c++
+**C++** .. code-block:: c++
- #include "getfem/getfem_model_solvers.h"
+ #include "getfem/getfem_model_solvers.h"
#include "getfem/getfem_export.h"
#include "gmm/gmm.h"
#include "getfem/getfem_mesher.h"
@@@ -154,9 -155,10 +155,10 @@@ Parameters of the mode
Let us now define the different physical and numerical parameters of the
problem. For script languages (Python, Scilab and Matlab) there is no
differences.
+ .. tabularcolumns:: |p{0.080\linewidth}|p{0.900\linewidth}|
=========== ================================================
-**C++** .. code-block:: c++
+**C++** .. code-block:: c++
double epsilon = 1.; // Thickness of the plate (cm)
double E = 21E6; // Young Modulus (N/cm^2)
@@@ -199,11 -201,12 +201,12 @@@ Mesh generatio
|gf| has some limited meshing facilities which are described here. We are
going to use them. However, there is no guaranty of the quality and conformity
of the obtained mesh, so it is better to verify the mesh if you use |gf|
meshing facilities. You can also use external meshers (GiD or Gmsh for
instance) and import them (see :ref:`ud-load_save_mesh`).
-The geometry of the domain is supposed to be a rectangle with three circular
holes (see :ref:`tut-fig-meshthermo`). The geometry is described thanks to some
geometrical primitives and union/setminus operations (see
:file:`src/getfem/getfem)_mesher.h` file. In the following, `h` stands for the
mesh size and `2` is the degree of the mesh (this means that the transformation
is of degree two, we used curved edges).
+The geometry of the domain is supposed to be a rectangle with three circular
holes (see :ref:`tut-fig-meshthermo`). The geometry is described thanks to some
geometrical primitives and union/setminus operations (see
:file:`src/getfem/getfem_mesher.h` file). In the following, `h` stands for the
mesh size and `2` is the degree of the mesh (this means that the transformation
is of degree two, we used curved edges).
+ .. tabularcolumns:: |p{0.080\linewidth}|p{0.900\linewidth}|
==========
===========================================================================
-**C++** .. code-block:: c++
+**C++** .. code-block:: c++
getfem::mesh mesh;
getfem::pmesher_signed_distance
@@@ -263,9 -270,10 +270,10 @@@ Boundary selectio
Since we have different boundary conditions on the different parts of the
boundary, we have to number the different parts of the boundary (in the hole,
thermal and electrical insulation together with a stress free boundary
conditions are assumed). Thus, we have to select the element faces on the mesh
and define mesh regions (see :ref:`ud-mesh_regions`) 1, 2, 3, 4 to be the right
boundary, the left one, the top one and the bottom one respectively. These
boundary numbers will be used in t [...]
+ .. tabularcolumns:: |p{0.080\linewidth}|p{0.900\linewidth}|
==========
===========================================================================
-**C++** .. code-block:: c++
+**C++** .. code-block:: c++
getfem::mesh_region border_faces;
getfem::outer_faces_of_mesh(mesh, border_faces);
@@@ -310,8 -318,12 +318,12 @@@
mesh.region_subtract( LEFT_BOUND, HOLE_BOUND)
mesh.region_subtract( TOP_BOUND, HOLE_BOUND)
mesh.region_subtract(BOTTOM_BOUND, HOLE_BOUND)
- ----------
---------------------------------------------------------------------------
+ ==========
===========================================================================
+
+ .. tabularcolumns:: |p{0.080\linewidth}|p{0.900\linewidth}|
+
+ ==========
===========================================================================
-**Scilab** .. code-block:: matlab
+**Scilab** .. code-block:: matlab
fb1 = gf_mesh_get(mesh, 'outer faces in box', [1 1], [99 24]);
fb2 = gf_mesh_get(mesh, 'outer faces with direction', [ 1 0],
0.01);
@@@ -356,8 -368,10 +368,10 @@@ Mesh dra
In order to preview the mesh and to control its validity, the following
instructions can be used:
+ .. tabularcolumns:: |p{0.080\linewidth}|p{0.900\linewidth}|
+
==========
===========================================================================
-**C++** .. code-block:: c++
+**C++** .. code-block:: c++
getfem::vtk_export exp("mesh.vtk", false);
exp.exporting(mesh);
@@@ -411,9 -425,10 +425,10 @@@ The third finite element method is a di
The last thing to define is an integration method `mim`. There is no default
integration method in |gf| so this is mandatory to define an integration
method. Of course, the order of the integration method have to be chosen
sufficient to make a convenient integration of the selected finite element
method. Here, the square of `elements_degree` is sufficient.
+ .. tabularcolumns:: |p{0.080\linewidth}|p{0.900\linewidth}|
==========
===========================================================================
-**C++** .. code-block:: c++
+**C++** .. code-block:: c++
getfem::mesh_fem mfu(mesh, 2);
mfu.set_classical_finite_element(elements_degree);
@@@ -470,9 -485,10 +485,10 @@@ There are two versions of the model: th
Let us declare a real model with the three variables corresponding to the
three fields to be computed:
+ .. tabularcolumns:: |p{0.080\linewidth}|p{0.900\linewidth}|
==========
===========================================================================
-**C++** .. code-block:: c++
+**C++** .. code-block:: c++
getfem::model md;
md.add_fem_variable("u", mfu);
@@@ -523,9 -539,10 +539,10 @@@ there is no predefined brick and we us
The following program allows to take into account the whole elastic
deformation equation. Note the use of specific brick to prescribe the Dirichlet
condition on the left boundary. There is several option to prescribe a
Dirichlet condition (see :ref:`ud-model-Dirichlet`).
+ .. tabularcolumns:: |p{0.080\linewidth}|p{0.900\linewidth}|
==========
================================================================================================================
-**C++** .. code-block:: c++
+**C++** .. code-block:: c++
md.add_initialized_scalar_data("cmu", cmu);
md.add_initialized_scalar_data("clambdastar", clambdastar);
@@@ -588,8 -613,10 +613,10 @@@ Electric potential proble
Similarly, the following program take into account the electric potential
equation. Note the definition of the electrical conductivity :math:`\sigma`
and again the use of weak form language terms.
+ .. tabularcolumns:: |p{0.080\linewidth}|p{0.900\linewidth}|
+
==========
===========================================================================
-**C++** .. code-block:: c++
+**C++** .. code-block:: c++
std::string sigmaeps = "(eps/(rho_0*(1+alpha*(theta-T0))))";
md.add_initialized_scalar_data("eps", epsilon);
@@@ -642,8 -669,10 +669,10 @@@ Thermal proble
Now, the program to take into account the thermal problem:
+ .. tabularcolumns:: |p{0.080\linewidth}|p{0.900\linewidth}|
+
==========
===========================================================================
-**C++** .. code-block:: c++
+**C++** .. code-block:: c++
md.add_initialized_scalar_data("kaeps", kappa*epsilon);
getfem::add_generic_elliptic_brick(md, mim, "theta", "kaeps");
@@@ -695,8 -724,10 +724,10 @@@ Model solv
Once the model is correctly defined, we can simply solve it by:
+ .. tabularcolumns:: |p{0.080\linewidth}|p{0.900\linewidth}|
+
==========
===========================================================================
-**C++** .. code-block:: c++
+**C++** .. code-block:: c++
gmm::iteration iter(1E-9, 1, 100);
getfem::standard_solve(md, iter);
@@@ -722,8 -753,10 +753,10 @@@ Model solve with two step
Another option to solve the problem is to solve first the thermal and
electric potential problems. Indeed, in our model, the thermal and electric
potential do not depend on the deformation. Once the thermal and electric
potential problem, we then solve the deformation problem. This can be done as
follows:
+ .. tabularcolumns:: |p{0.080\linewidth}|p{0.900\linewidth}|
+
==========
===========================================================================
-**C++** .. code-block:: c++
+**C++** .. code-block:: c++
gmm::iteration iter(1E-9, 1, 100);
md.disable_variable("u");
@@@ -767,10 -800,12 +800,12 @@@
Export/visualization of the solution
************************************
-The finite element problem is now solved. We can plot the solution as
follows. Note that for the C++ and Python programs, it is necessary to use an
external external graphical post-processor. Note also that arbitrary quantities
can be post-processed using the generic interpolation (see
`ga_interpolation_Lagrange_fem` below). It is also possible to make complex
exports and slices (see :ref:`ud-export`).
+The finite element problem is now solved. We can plot the solution as
follows. Note that for the C++ and Python programs, it is necessary to use an
external graphical post-processor. Note also that arbitrary quantities can be
post-processed using the generic interpolation (see
`ga_interpolation_Lagrange_fem` below). It is also possible to make complex
exports and slices (see :ref:`ud-export`).
+ .. tabularcolumns:: |p{0.080\linewidth}|p{0.900\linewidth}|
+
==========
=====================================================================================================================================================
-**C++** .. code-block:: c++
+**C++** .. code-block:: c++
plain_vector U(mfu.nb_dof());
gmm::copy(md.real_variable("u"), U);
plain_vector V(mft.nb_dof());
gmm::copy(md.real_variable("V"), V);
@@@ -815,8 -850,12 +850,12 @@@
mft.export_to_vtk('temperature.vtk', mft, THETA,
'Temperature')
print ('mayavi2 -d temperature.vtk -f WarpScalar -m Surface')
mft.export_to_vtk('electric_potential.vtk', mft, V, 'Electric
potential')
- print ('mayavi2 -d electric_potential.vtk -f WarpScalar -m
Surface')
+ print ('mayavi2 -d electric_potential.vtk -f WarpScalar -m
Surface')
- ----------
-----------------------------------------------------------------------------------------------------------------------------------------------------
+ ==========
=====================================================================================================================================================
+
+ .. tabularcolumns:: |p{0.080\linewidth}|p{0.900\linewidth}|
+
+ ==========
=====================================================================================================================================================
**Scilab** .. code-block:: matlab
U = gf_model_get(md, 'variable', 'u');