diff --git a/CMakeLists.txt b/CMakeLists.txt index 506077f661e03f90a369aeab810eaef4ebd334a2..80b5c4977045632621706897cded823eeb37d13d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,12 +16,30 @@ include(OutOfSourcesBuild) project(LMGC90_dev Fortran C CXX) -SET(LMGC90_MAJOR_VERSION 2) +SET(LMGC90_MAJOR_VERSION 3) SET(LMGC90_MINOR_VERSION 0) SET(LMGC90_PATCH_VERSION 0) MESSAGE(STATUS "You try to build LMGC90_dev") +# Try to find out if on ubuntu +# (does nothing if lsb_release executable does not exist) +find_program(LSB_RELEASE lsb_release) +execute_process(COMMAND ${LSB_RELEASE} -is + OUTPUT_VARIABLE LSB_RELEASE_ID_SHORT + OUTPUT_STRIP_TRAILING_WHITESPACE + ) +#message(STATUS "lsb_release : ${LSB_RELEASE_ID_SHORT}") + +# Get current year to help set version +include(GetCurrentYear) +TODAY(TODAY YEAR) + +# Set release candidate number (used in sphinx doc) +set(RC 1) +if( RC ) + set(RCWITHDOT ".rc${RC}") +endif( RC ) include(CTest) diff --git a/README.md b/README.md index cc862568624660098ce8ae00fd091a639db03c34..3eefe478046587ad3355086aaffcf16663125a59 100644 --- a/README.md +++ b/README.md @@ -17,345 +17,9 @@ To stay aware, you can subscribe to this mailing list by asking to: - Dubois Frédéric : frederic.dubois@umontpellier.fr - Rémy Mozul : remy.mozul@umontpellier.fr -# Organization +# How does it work -*lmgc90_user* directory is organized in several -subdirectories: +To obtain up to date informations on how to download/install/use, please check the +[wiki](https://git-xen.lmgc.univ-montp2.fr/lmgc90/lmgc90_user/wikis/home#how-does-it-work) - * *src* : the sources of LMGC90 software - * *examples* : the user examples working with the sources - * *manuals* : a list of manuals/documentation for the software in pdf format - * *docs* : the html documentation generated from the sources - -The software is originally designed for [Linux or MacOS](#linversion) - -For Windows user, jump to [Windows Version section](#winversion) - -# Linux and MacOS version - -# Versionning - -People contributing to the project can view up-to-date information -[here](https://git-xen.lmgc.univ-montp2.fr/lmgc90/lmgc90_user/tree/master) - -The versionning tool used is git. To have more information the workflow used -and how to use git check [there](https://git-xen.lmgc.univ-montp2.fr/lmgc90/lmgc90_user/wikis/LMGC90_user) - -With MacOS and Linux the installation and use of LMGC90 software is through -the use of the terminal. You must know how to open a terminal in a specific -directory and move through your directory tree. - -## Update - -To update to very last version from a terminal in current directory: - -``` -$> git pull origin master -``` - -To get as specific version, for example *2016* : - -``` -$> git pull origin 2016 -``` - -## Compilation - -### Pre-requisites - -To compile you need: - - * A Fortran compiler (GNU, Intel or PGI) - * Lapack library - * CMake - * Swig - * Python and Numpy - -For visualisation: - - * Python VTK module - * Paraview - -To build the sphinx documentation: - - * Latex distribution (with pdflatex utility) - * Sphinx and numpydoc - * Doxygen - * Graphviz - * dvipng - -To read some tutorials: - - * Jupyter - * iPython - - -### Ubuntu 12.04/14.04/16.04 Debian 7 - -To compile: - -``` -apt-get install cmake gcc g++ gfortran liblapack-dev swig python-dev python-numpy -``` - -To visualize: - -``` -apt-get install python-vtk paraview -``` - -To build the documentation: - -``` -apt-get install doxygen graphviz python-numpydoc texlive-latex-extra dvipng imagemagick -``` - -To read tutorials - -``` -apt-get install python-pip -pip install jupyter -``` - -### OpenSuse Leap 42.1 - -To compile: - -``` -zypper install cmake gcc gcc-c++ gcc-fortran lapack-devel swig python-devel python-numpy-devel -``` - -To visualize: - -``` -zypper install python-vtk paraview -``` - -Due to some problem one must add to the *.bashrc* file a line similar to: - -``` -export LD_LIBRARY_PATH=/usr/lib64/mpi/gcc/openmpi/lib64 -``` - -To build the documentation: - -``` -zypper install doxygen graphviz python-numpydoc texlive-dvipng ImageMagick -``` - -To read tutorials - -``` -zypper install python-pip -pip install jupyter -``` - -### CentOS 7 - -To compile: - -``` -yum install git cmake gcc gcc-c++ gcc-gfortran lapack-devel swig python-devel numpy -``` - -To visualize, some extra packages, not provided by the standard package repository, are -needed. Thus an extra repository must be added before installing the dependencies: - -``` -yum install epel-release -yum install vtk-python paraview -``` - -To build the documentation: - -``` -yum install doxygen graphviz tex-preview textlive-latex texlive-dvipng python-sphinx python-numpydoc ImageMagick -``` - -To read tutorials - -``` -yum install python-pip -pip install jupyter -``` - - -### Mac OS - -On MacOs using macports (beware of the second line, the *+ python27* goes with *vtk*): - -``` -port install gcc49 python27 py27-numpy swig-python cmake +gui -port install vtk +python27 -``` - -Then you need to set the compiler and python as the default on your system: - -``` -sudo port select gcc mp-gcc49 -sudo port select python python27 -``` - -To build the documentation: - -``` -doxygen graphviz py27-sphinx py27-numpydoc texlive-latex-extra dvipng ImageMagick -``` - -To read tutorials: - -``` -sudo port install py27-jupyter -``` - - -## Building - -You have several commands to run. If you are not familiar with the terminal and compilation in general -please read the output of each command carefully. And if an error occurs do not blindly run the next -commands, but try to correct it first. - -In the *lmgc90_user* directory run: - -```shell -mkdir build -cd build -cmake .. -make -``` - -Instead of cmake, one can use *ccmake* to change variable values on -the command line, or *cmake-gui* to use graphical interface. - -If you are only interested in rigid computations, some external libraries -can be disabled ; before the ```make``` command, run: - -``` -cmake . -DMATLIB_VERSION=none -DMUMPS_VERSION=none -``` - -If you want to re-build the documentation run : - -``` -make docs -``` - -It will build the sphinx documentation in: - - * docs/chipy/ - * docs/dev/ - * docs/Pre/ - -Where you should open the ```index.html``` file. - -The doxygen documentation of the the core of the software would be in ```src/Docs/html/index.html```. - - - -## Installing - -Our policy is to not mess with default system paths. So instead we advise to -use a environment variable to add to python the path to our build directory. -In general adding the following lines to your *.bashrc* (Linux) or *.profile* (MacOS) -file does the trick. Of course you have to replace *mybuildpath* by the path to -your own building directory. Basically it is what returns the command *pwd* when -ran in the same directory you ran the commands *cmake* and *make*. - -```shell -if [ -z ${PYTHONPATH} ]; then - export PYTHONPATH=mybuildpath -else - export PYTHONPATH=${PYTHONPATH}:mybuildpath -fi -``` - -## Getting started - -There are several examples in the directory *examples* -sorted by the type of simulation. - -A good entry point is the *Tutorials* directory where you -can find some **ipython notebooks** trying to introduce -step by step the use of the software. - -### Linux - -To read the notebooks, open a terminal there and run: - -```shell -jupyter notebook -``` - -### MacOS - -To read the notebooks, open a terminal there and run: - -```shell -jupyter-notebook-2.7 -``` - -Python being the interface language to the LMGC90 software, -[this introduction](https://www.python.org/about/gettingstarted/) -is recommended for those unfamiliar with the language or programming -in general. - - -# Windows version - -## Prerequisite - -The only pre-requisite to use LMGC90 on Windows is the Python distribution used. -A binary build is provided to work with the Anaconda python distribution -which can be downloaded from here: -* [32 bits](https://repo.continuum.io/archive/.winzip/Anaconda2-2.5.0-Windows-x86.zip) -* [64 bits](https://repo.continuum.io/archive/.winzip/Anaconda2-2.5.0-Windows-x86.zip) - -Once the file downloaded, unzip it and run the installer. - -To generate visualization files the **vtk** python module must be added. To do that -launch the `Anaconda Prompt` software and type: - -```shell -conda install vtk -``` - -To visualize the files the [Paraview](http://www.paraview.org/download) software -is also needed. - -## Getting the pre-compiled version - -Download the pre-compiled version of LMGC90 for Windows: -* [32 bits](https://mycore.core-cloud.net/public.php?service=files&t=9bb2e3561373c64a4855596873aa98bd) -* [64 bits](https://mycore.core-cloud.net/public.php?service=files&t=9525fc1c270aaddf7e8eae96214f4b49) - -Then create a directory *build* in your *lmgc90_user* directory and unzip -the download file there, it should create a `pylmgc90-xxxx-py27` (where `xxxx` -is to replaced by `i686` if you download the 32 bits version or `x86_64` if you -downloaded the 64 bits version). - -## Installation - -Start `Spyder` then click on the upper line `tools` and `PYTHONPATH manager`. -Then click `Add a path` on lower left corner and select the path to the directory -previously unzipped (that is in this README: *lmgc90_user/build/pylmgc90-xxxx-py27*). -Finally, so that the previous step is taken into account in your current -environment, you have to open a new console by clicking `Console` and then -`Open a new IPython console`. - -## Getting started - -There are several examples in the directory *examples* -sorted by the type of simulation. - -A good entry point is the *Tutorials* directory where you -can find some **ipython notebooks** trying to introduce -step by step the use of the software. - -To read the notebook run the `Jupyter Notebook` application -installed with Anaconda. - -Python being the interface language to the LMGC90 software, -[this introduction](https://www.python.org/about/gettingstarted/) -is recommended for those unfamiliar with the language or programming -in general. diff --git a/docs/Pre/.buildinfo b/docs/Pre/.buildinfo index d2e57160bb194e8f5e3b4d65324e9de69bae453d..7f78bbde4793983bf12d5bc81ec23da7c507dfe9 100644 --- a/docs/Pre/.buildinfo +++ b/docs/Pre/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 18d4cbd131087e90d4cf97685dfe9ec3 +config: fe71abc29a7abe7fa7ffbd3eda79a4e9 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/Pre/_downloads/philosophie.py b/docs/Pre/_downloads/philosophie.py index 3c0103f2ece2ce7eb9bd8b7bfbff828c3c0e6ae9..b64d1cf035051523c2ada3140f0cb8a07f059c06 100644 --- a/docs/Pre/_downloads/philosophie.py +++ b/docs/Pre/_downloads/philosophie.py @@ -5,32 +5,37 @@ from pylmgc90.pre import * dim = 2 -# disk creation -radius = 0.1 -disk = avatar(dimension=dim) -disk.addNode( node(coor=numpy.array([0.,0.1]),number=1) ) -disk.addBulk( rigid2d() ) -disk.defineGroups() -disk.addContactors(shape='DISKx',color='BLUEx',byrd=radius) - -# foundation creation -floor = avatar(dimension=dim) -floor.addNode( node(coor=numpy.array([0.,-0.05]),number=1) ) -floor.addBulk( rigid2d() ) -floor.defineGroups() -floor.addContactors(shape='JONCx',color='BLUEx',axe1=1.,axe2=0.05) - - # materials, model and groups definition mat = material(name='TDURx',materialType='RIGID',density=1000.) mut = material(name='MOUxx',materialType='RIGID',density=100.) mod = model(name='rigid', physics='MECAx', element='Rxx2D', dimension=dim) -disk.defineModel(model=mod) -disk.defineMaterial(material=mut) -disk.computeRigidProperties() -floor.defineModel(model=mod) -floor.defineMaterial(material=mat) -floor.computeRigidProperties() + +radius = 0.1 +disk = rigidDisk(r=radius, center=[0.,0.1], model=mod, material= mat, color='BLUEx') + +floor= rigidJonc(axe1=1., axe2=0.05, center=[0.,-0.05], model=mod, material=mat, color='BLUEx') + +## disk creation +#radius = 0.1 +#disk = avatar(dimension=dim) +#disk.addNode( node(coor=numpy.array([0.,0.1]),number=1) ) +#disk.addBulk( rigid2d() ) +#disk.defineGroups() +#disk.addContactors(shape='DISKx',color='BLUEx',byrd=radius) +# +## foundation creation +#floor = avatar(dimension=dim) +#floor.addNode( node(coor=numpy.array([0.,-0.05]),number=1) ) +#floor.addBulk( rigid2d() ) +#floor.defineGroups() +#floor.addContactors(shape='JONCx',color='BLUEx',axe1=1.,axe2=0.05) +# +#disk.defineModel(model=mod) +#disk.defineMaterial(material=mut) +#disk.computeRigidProperties() +#floor.defineModel(model=mod) +#floor.defineMaterial(material=mat) +#floor.computeRigidProperties() # boundary condition floor.imposeDrivenDof(component=[1,2,3],dofty='vlocy') diff --git a/docs/Pre/_modules/index.html b/docs/Pre/_modules/index.html index 011ac3895e1acf058f53b72329a2e46b336435cd..050abd3556a4ed9f707e893372b8b0f58f2dae56 100644 --- a/docs/Pre/_modules/index.html +++ b/docs/Pre/_modules/index.html @@ -6,7 +6,7 @@ - Overview: module code — pylmgc90.pre 2015.2 documentation + Overview: module code — pylmgc90.pre 2017.rc1 documentation @@ -14,16 +14,18 @@ - + + @@ -105,12 +107,12 @@
  • modules |
  • - + \ No newline at end of file diff --git a/docs/Pre/_modules/pylmgc90/pre/IO/evolution2File.html b/docs/Pre/_modules/pylmgc90/pre/IO/evolution2File.html index 859d23bafe1d249f88d6c15f33955344ea698e66..0192a39ce4fd0e7c22feb18d280cb2d313b8d385 100644 --- a/docs/Pre/_modules/pylmgc90/pre/IO/evolution2File.html +++ b/docs/Pre/_modules/pylmgc90/pre/IO/evolution2File.html @@ -6,7 +6,7 @@ - pylmgc90.pre.IO.evolution2File — pylmgc90.pre 2015.2 documentation + pylmgc90.pre.IO.evolution2File — pylmgc90.pre 2017.rc1 documentation @@ -14,17 +14,18 @@ - - + + @@ -49,7 +50,7 @@

    Source code for pylmgc90.pre.IO.evolution2File

     # module gerant l'ecriture du fichier d'evolution pour l'application des conditions limites
     import os
    -from pylmgc90.pre.utilities.error    import *
    +from pylmgc90.pre.utilities.error    import *
     
     
    [docs]def writeEvolution(f, instants, path='', name='evolution.dat'): """ @@ -68,13 +69,13 @@ """ # on verifie que la fonction donnee est bien appelable - if not callable(f): + if not callable(f): showError("given function is not callable!") # on ouvre le fichier d'evolution en ecriture fid = open(os.path.join(path,name), 'w') - print '\nDebut Ecriture du fichier \t:\t' + name + print '\nDebut Ecriture du fichier \t:\t' + name # on ecrit le couple t, f(t) pour chaque instant t for t in instants: @@ -83,7 +84,7 @@ # on ferme le fichier fid.close() - print 'Fin Ecriture du fichier \t:\t' + name
    + print 'Fin Ecriture du fichier \t:\t' + name
    @@ -114,13 +115,13 @@
  • modules |
  • - - + + \ No newline at end of file diff --git a/docs/Pre/_modules/pylmgc90/pre/avatar/avatar.html b/docs/Pre/_modules/pylmgc90/pre/avatar/avatar.html index 58c5fc1dc3a09bf62ffb782ddcca75627708e30f..668c30d5b7b9e8302a5af149381f373eb349d7eb 100644 --- a/docs/Pre/_modules/pylmgc90/pre/avatar/avatar.html +++ b/docs/Pre/_modules/pylmgc90/pre/avatar/avatar.html @@ -6,7 +6,7 @@ - pylmgc90.pre.avatar.avatar — pylmgc90.pre 2015.2 documentation + pylmgc90.pre.avatar.avatar — pylmgc90.pre 2017.rc1 documentation @@ -14,17 +14,18 @@ - - + + @@ -52,24 +53,24 @@ import math import copy -from nodes import * -from bulks import * -from bulk.rigid2d import * -from bulk.rigid3d import * -from bulk.element import * -from contactors import * -from groups import * -from group import group -from pylmgc90.pre.config.lmgc90dicts import * -from pylmgc90.pre.utilities.error import * +from nodes import * +from bulks import * +from bulk.rigid2d import * +from bulk.rigid3d import * +from bulk.element import * +from contactors import * +from groups import * +from group import group +from pylmgc90.pre.config.lmgc90dicts import * +from pylmgc90.pre.utilities.error import * # pour la verification des types (modele et materiau) -from pylmgc90.pre.shared.bulk_behav import material as class_material -from pylmgc90.pre.shared.model import model as class_model +from pylmgc90.pre.shared.bulk_behav import material as class_material +from pylmgc90.pre.shared.model import model as class_model -from contactor.contactorFactory import contactorFactory +from contactor.contactorFactory import contactorFactory -from pylmgc90.pre.build_avatar.mesh import mesh as class_mesh +from pylmgc90.pre.build_avatar.mesh import mesh as class_mesh ## @class avatar # attributs: \n @@ -81,7 +82,7 @@
    [docs]class avatar(): ## constructor - def __init__(self, dimension, number=None): + def __init__(self, dimension, number=None): """__init__(self, dimension, number=None): allow to define an avatar @@ -96,15 +97,15 @@ - number=None: index of the avatar (still present to ensure compatibility) """ # si l'utilisateur attribue un numero a l'avatar - if number != None: + if number != None: # on lui indique qu'il ne sera pas utilise showWarning('assign an index to an avatar is useless, and will be forbidden!') # le numero de l'avatar est inconnu pour l'instant et sera defini lors de son # ajout dans un container d'avatar (et eventuellement modifie, suite au passage dans # un nouveau container) - self.number = None + self.number = None - self.atype = None + self.atype = None # am : ajout de la notion de dimension, pour la gestion des mailles # si la dimension est impossible @@ -120,9 +121,9 @@ self.contactors = contactors() self.groups = groups() # - self.modelType = None - self.drvDof = False - self.iniDof = False + self.modelType = None + self.drvDof = False + self.iniDof = False ## add one node # @arg Noeud a node @@ -170,7 +171,7 @@ if self.dimension != 2: showError("Trying to assign a rigid 2D element to a 3D avatar!") - if self.atype is None: + if self.atype is None: self.atype = 'RBDY2' else: if self.atype=='MAILx': @@ -181,7 +182,7 @@ if self.dimension != 3: showError("Trying to assign a rigid 3D element to a 2D avatar!") - if self.atype is None: + if self.atype is None: self.atype = 'RBDY3' else: if self.atype=='MAILx': @@ -189,7 +190,7 @@ elif isinstance(Ele,element): - if self.atype is None: + if self.atype is None: self.atype = 'MAILx' else: if self.atype!='MAILx': @@ -273,11 +274,11 @@ # on cherche si on doit recalculer la position du centre d'inertie # on suppose initialement qu'il n'y a pas a la recalculer - comp_node = False + comp_node = False # si la position du centre d'inertie est nulle if numpy.allclose(self.nodes[1].coor, numpy.zeros(2, 'd'), atol=1e-6): # on indique qu'on va devoir la recalculer - comp_node = True + comp_node = True # si l'avatar ne porte qu'un seul contacteur if len(self.contactors) == 1: @@ -377,11 +378,11 @@ # on cherche si on doit recalculer la position du centre d'inertie # on suppose initialement qu'il n'y a pas a la recalculer - comp_node = False + comp_node = False # si la position du centre d'inertie est nulle if numpy.allclose(self.nodes[1].coor, numpy.zeros(3, 'd'), atol=1e-6): # on indique qu'on va devoir la recalculer - comp_node = True + comp_node = True # si l'avatar ne porte qu'un seul contacteur if len(self.contactors) == 1: @@ -452,7 +453,7 @@ I += tact.I # contribution de la distance a l'axe aux termes diagonaux - for i in xrange(0, 3): + for i in xrange(0, 3): d = numpy.array(tact.shift) d[i] = 0. I[i, i] += tact.volume*numpy.dot(d, d) @@ -473,9 +474,9 @@ # on initialise le nombre de termes au-dessus de la diagonale annulles nb=0 # pour chaque ligne - for i in xrange(0, 3): + for i in xrange(0, 3): # pour chaque terme au-dessus de la diagonale - for j in xrange(i + 1, 3): + for j in xrange(i + 1, 3): # si le terme extra-diagonal courant est negligeable devant le terme # diagonal courant if math.fabs(I[i, j]) < 1.e-14*math.fabs(I[i, i]): @@ -536,24 +537,24 @@ """ # on suppose initialement que tous les elements volumiques (ou surfaciques, en 2D) : # * portent un modele - all_bulks_have_a_model=True + all_bulks_have_a_model=True # * portent un materiau - all_bulks_have_a_material=False + all_bulks_have_a_material=False # pour chaque element de l'avatar for ele in self.bulks: # si l'element est suppose porter un modele et un materiau if ele.etype in dimension2geoElement[self.dimension]: # si l'element ne porte pas de modele - if ele.model == None: + if ele.model == None: # on indique que tous les elements ne portent pas un modele - all_bulks_have_a_model=False + all_bulks_have_a_model=False # on sort de la boucle break # si l'element ne porte pas de materiau - if ele.material == None: + if ele.material == None: # on indique que tous les elements ne portent pas un materiau - all_bulks_have_a_material=False + all_bulks_have_a_material=False # on sort de la boucle break @@ -567,7 +568,7 @@ # on parcours les elements du groupe courant for ele in self.groups[group].bulks: # si l'element est suppose porter un modele et n'en porte pas - if ele.etype in dimension2geoElement[self.dimension] and ele.model == None: + if ele.etype in dimension2geoElement[self.dimension] and ele.model == None: # on a trouve un groupe qui ne porte de modele # et on construit un message d'erreur pour prvenir l'utilisateur showError("bulks belonging to group \"" + group + "\" are not associated to any model!") @@ -582,7 +583,7 @@ # on parcours les elements du groupe courant for ele in self.groups[group].bulks: # si l'element est suppose porter un materiau et n'en porte pas - if ele.etype in dimension2geoElement[self.dimension] and ele.material == None: + if ele.etype in dimension2geoElement[self.dimension] and ele.material == None: # on a trouve un groupe qui ne porte de materiau # et on construit un message d'erreur pour prvenir l'utilisateur showError("bulks belonging to group \"" + group + "\" are not associated to any material!")
    @@ -814,7 +815,7 @@ # si le noeud n'a pas le bon nombre de coordonnees if coor_numpy.size != self.dimension: # on ne le trouvera pas - return None + return None # pour chaque noeud de l'avatar for nod in self.nodes: @@ -824,7 +825,7 @@ return nod.number # si on arrive ici, on n'a pas trouve le noeud - return None + return None # ## add a group # # @arg Group a group @@ -896,7 +897,7 @@ return (group in self.groups.keys()) ## setting model -
    [docs] def defineModel(self,group='all',model=None): +
    [docs] def defineModel(self,group='all',model=None): """defineModel(self,group='all',model=None) match a model (class model) or a set of models (class model) to a group @@ -934,7 +935,7 @@ # si un modele a deja ete affecte a une partie des elements de l'avatar # et que le modele qu'on s'apprete a affecter est d'un type different - if self.modelType != None and model.physics != self.modelType: + if self.modelType != None and model.physics != self.modelType: # on affiche un message d'erreur showError("Different types of models cannot be associated to the same avatar!") @@ -974,7 +975,7 @@ ## set the material of an element # -
    [docs] def defineMaterial(self,group='all',material=None): +
    [docs] def defineMaterial(self,group='all',material=None): """ defineMaterial(self,group='all',material=None) associate a material or a material container to the element @@ -1098,7 +1099,7 @@ # si on ne donne pas de poids pour placer le contacteur if 'weights' not in cles: # on affecte la vaeur None a l'option weights, pour activer le positionnement automatique des candidats aux noeuds - options['weights']=None + options['weights']=None # on initialise une liste vide list_ele = [] @@ -1150,7 +1151,7 @@ component = [component] # si l'avatar ne connait pas son type de modele - if self.modelType == None: + if self.modelType == None: # on affiche un message d'erreur showError("You must define the model of the considered avatar before impose driven dof!") @@ -1233,13 +1234,13 @@ form = "f(t) = [ct + amp*cos(omega*t + phi)]*sign(rampi + ramp*t)*min(|rampi + ramp*t|, 1)" # on affiche un message indiquant la forme de la fonction utilise pour la condition imposee - print "Info : la condition imposee (ddl : " + dofty + ", composantes : " + str(component) + ") sur les noeuds du groupe \"" + \ + print "Info : la condition imposee (ddl : " + dofty + ", composantes : " + str(component) + ") sur les noeuds du groupe \"" + \ group + "\" de l'avatar considere est de la forme : " + form - self.drvDof = True + self.drvDof = True for no in self.groups[group].nodes: - if no.dof == None: + if no.dof == None: showError("no dof defined. It's defined when you define a model.") no.imposeDrivenDof(component,description, ct,amp,omega,phi,rampi, @@ -1263,7 +1264,7 @@ component = [component] # si l'avatar ne connait pas son type de modele - if self.modelType == None: + if self.modelType == None: # on affiche un message d'erreur showError("You must define the model of the considered avatar before impose driven dof!") @@ -1289,7 +1290,7 @@ # pour chaque noeud du groupe for no in self.groups[group].nodes: # si le noeud courant ne porte pas d'objet dof - if no.dof == None: + if no.dof == None: # on affiche un message d'erreur showError("no dof defined. It's defined when you define a model.") @@ -1348,10 +1349,10 @@ ## ici, on est sur que tout est bon # on indique que l'avatar porte une condition initiale sur certains noeuds - self.iniDof = True + self.iniDof = True for no in self.groups[group].nodes: - if no.dof == None: + if no.dof == None: showError("no dof defined. It's defined when you define a model.") no.imposeInitValue(component,value)
    @@ -1434,13 +1435,13 @@ for ele in self.groups[super_group].bulks: # on supppose initialement que l'element fait partie du nouveau groupe # i.e. s'appuie sur un ensemble de noeud inclus dans l'ensemble de noeuds du nouveau groupe - in_new=True + in_new=True # pour chaque noeud de la connectivite de l'element for num in ele.connectivity: # si le noeud courant ne fait pas partie du nouveau groupe if not num in new_numbers: # on indique que l'element ne saurait faire partie du nouveau groupe - in_new=False + in_new=False # on sort de la boucle break @@ -1536,13 +1537,13 @@
  • modules |
  • - - + +
    \ No newline at end of file diff --git a/docs/Pre/_modules/pylmgc90/pre/avatar/bulk/bulk.html b/docs/Pre/_modules/pylmgc90/pre/avatar/bulk/bulk.html index fe2ee0ef9cb1e60b649f4a228f77fa050ef60229..63efbff6eb903370c12ef48073711001ad85b82f 100644 --- a/docs/Pre/_modules/pylmgc90/pre/avatar/bulk/bulk.html +++ b/docs/Pre/_modules/pylmgc90/pre/avatar/bulk/bulk.html @@ -6,7 +6,7 @@ - pylmgc90.pre.avatar.bulk.bulk — pylmgc90.pre 2015.2 documentation + pylmgc90.pre.avatar.bulk.bulk — pylmgc90.pre 2017.rc1 documentation @@ -14,17 +14,18 @@ - - + + @@ -49,13 +50,13 @@

    Source code for pylmgc90.pre.avatar.bulk.bulk

     import sys
     
    -from pylmgc90.pre.shared.bulk_behav import *
    -from pylmgc90.pre.shared.model import *
    +from pylmgc90.pre.shared.bulk_behav import *
    +from pylmgc90.pre.shared.model import *
     import numpy
     
    -from pylmgc90.pre.config.lmgc90dicts import *
    +from pylmgc90.pre.config.lmgc90dicts import *
     
    -from pylmgc90.pre.utilities.error    import *
    +from pylmgc90.pre.utilities.error    import *
     
     
     ## @class bulk
    @@ -63,7 +64,7 @@
     # description 
     
    [docs]class bulk(): - def __init__(self, elem_dim, connectivity, physicalEntity='1', geometricalEntity='1', number=None, nbNodes=None): + def __init__(self, elem_dim, connectivity, physicalEntity='1', geometricalEntity='1', number=None, nbNodes=None): """ __init__(self, elem_dim, connectivity, physicalEntity='1', geometricalEntity='1', number=None, nbNodes=None) this function initializes a new bulk @@ -93,14 +94,14 @@ # le numero du bulk est inconnu pour l'instant et sera defini lors de son # ajout a un avatar - self.number = None + self.number = None #fd necessaire pour garder le lien avec le maillage de depart self.originalnumber=number # si l'utilisateur a donne un nombre de noeuds - if nbNodes != None: + if nbNodes != None: # on lui indique que c'est inutile showWarning("assign a number of nodes to an element is useless since its can be computed from the connectivity!") @@ -125,8 +126,8 @@ self.geometricalEntity = geometricalEntity # on initialise a vide le modele et le materiau portes par l'element - self.model = None - self.material = None + self.model = None + self.material = None ## @brief define material of the bulk # @@ -136,7 +137,7 @@ 'mat' is either a string or a of the class 'material' """ # si aucun modele n'est associe a l'element - if self.model == None: + if self.model == None: # on lance une excpetion raise ValueError("Cannot add material to the bulk") @@ -276,13 +277,13 @@
  • modules |
  • - - + +
    \ No newline at end of file diff --git a/docs/Pre/_modules/pylmgc90/pre/avatar/bulks.html b/docs/Pre/_modules/pylmgc90/pre/avatar/bulks.html index 46a0fd4aaba69a7a4b93df5e7f274ee9929b0bc9..ba273e7b0f1c5bea96588071d2e695946e87fc12 100644 --- a/docs/Pre/_modules/pylmgc90/pre/avatar/bulks.html +++ b/docs/Pre/_modules/pylmgc90/pre/avatar/bulks.html @@ -6,7 +6,7 @@ - pylmgc90.pre.avatar.bulks — pylmgc90.pre 2015.2 documentation + pylmgc90.pre.avatar.bulks — pylmgc90.pre 2017.rc1 documentation @@ -14,17 +14,18 @@ - - + + @@ -47,10 +48,10 @@

    Source code for pylmgc90.pre.avatar.bulks

    -from pylmgc90.pre.utilities.container import *
    +from pylmgc90.pre.utilities.container import *
     
    -from bulk.bulk import *
    -from groups import *
    +from bulk.bulk import *
    +from groups import *
     
     ## @class bulks(sequence_container)
     # bulk iterator
    @@ -106,13 +107,13 @@
             
  • modules |
  • - - + +
    \ No newline at end of file diff --git a/docs/Pre/_modules/pylmgc90/pre/avatar/contactor/contactor.html b/docs/Pre/_modules/pylmgc90/pre/avatar/contactor/contactor.html index dcaf4d679c423b23292e468796563d4928404577..88f2caf52d954dd96e5a220a9e25b0dc180ba64b 100644 --- a/docs/Pre/_modules/pylmgc90/pre/avatar/contactor/contactor.html +++ b/docs/Pre/_modules/pylmgc90/pre/avatar/contactor/contactor.html @@ -6,7 +6,7 @@ - pylmgc90.pre.avatar.contactor.contactor — pylmgc90.pre 2015.2 documentation + pylmgc90.pre.avatar.contactor.contactor — pylmgc90.pre 2017.rc1 documentation @@ -14,17 +14,18 @@ - - + + @@ -50,10 +51,10 @@ import numpy import copy -from pylmgc90.pre.config.lmgc90dicts import * +from pylmgc90.pre.config.lmgc90dicts import * -from pylmgc90.pre.avatar.bulks import * -from pylmgc90.pre.avatar.bulk.bulk import * +from pylmgc90.pre.avatar.bulks import * +from pylmgc90.pre.avatar.bulk.bulk import * ## @class contactor # @@ -77,7 +78,7 @@ ## @brief default constructor # - def __init__(self, elements, shape, color, number=None): + def __init__(self, elements, shape, color, number=None): """__init__(self, elements, shape, color, number=None) allow to define a contactor @@ -114,7 +115,7 @@ element_type=first_element.etype # pour chaque autre element de la liste - for i in xrange(1, len(elements)): + for i in xrange(1, len(elements)): ele = elements[i] # si ce n'est pas un element if not isinstance(ele, bulk): @@ -133,7 +134,7 @@ if not shape in geo2contactor[element_type]: # on construit un message d'erreur msg='Incompatible element (%s) and contactor type (%s)\n' %(element_type, shape) - if number != None: + if number != None: msg+='for contactor :%s' % str(number) # on l'affiche showError(msg) @@ -153,13 +154,13 @@ # si tout est bon, on cree le contacteur # si l'utilisateur attribue un numero au contacteur - if number != None: + if number != None: # on lui indique qu'il ne sera pas utilise showWarning('assigning an index to a contactor is useless') # le numero du contacteur est inconnu pour l'instant et sera defini lors de son # ajout a un avatar - self.number = None + self.number = None # on stocke la liste d'elements sur laquelle repose le contacteur self.elements = elements @@ -255,13 +256,13 @@
  • modules |
  • - - + +
    \ No newline at end of file diff --git a/docs/Pre/_modules/pylmgc90/pre/avatar/contactors.html b/docs/Pre/_modules/pylmgc90/pre/avatar/contactors.html index 09b65b11f867d1fbfbec3313a59aa9c546a742f2..de15b23e0c26721c4fa78d1993bf162ebbc1b4fb 100644 --- a/docs/Pre/_modules/pylmgc90/pre/avatar/contactors.html +++ b/docs/Pre/_modules/pylmgc90/pre/avatar/contactors.html @@ -6,7 +6,7 @@ - pylmgc90.pre.avatar.contactors — pylmgc90.pre 2015.2 documentation + pylmgc90.pre.avatar.contactors — pylmgc90.pre 2017.rc1 documentation @@ -14,17 +14,18 @@ - - + + @@ -47,9 +48,9 @@

    Source code for pylmgc90.pre.avatar.contactors

    -from pylmgc90.pre.utilities.container import *
    +from pylmgc90.pre.utilities.container import *
     
    -from contactor.contactor import *
    +from contactor.contactor import *
     
     ## @class contactors(sequence_container)
     # contactor iterator
    @@ -111,13 +112,13 @@
             
  • modules |
  • - - + +
    \ No newline at end of file diff --git a/docs/Pre/_modules/pylmgc90/pre/avatar/node/node.html b/docs/Pre/_modules/pylmgc90/pre/avatar/node/node.html index efca067dc8f25746a2602e3655f154bdc3ee5c6f..6cd40b166485bd6842d4cb0c2f1442b7c2c8d25a 100644 --- a/docs/Pre/_modules/pylmgc90/pre/avatar/node/node.html +++ b/docs/Pre/_modules/pylmgc90/pre/avatar/node/node.html @@ -6,7 +6,7 @@ - pylmgc90.pre.avatar.node.node — pylmgc90.pre 2015.2 documentation + pylmgc90.pre.avatar.node.node — pylmgc90.pre 2017.rc1 documentation @@ -14,17 +14,18 @@ - - + + @@ -52,16 +53,16 @@ import numpy -from pylmgc90.pre.config.lmgc90dicts import * +from pylmgc90.pre.config.lmgc90dicts import * import sys import numpy -from pylmgc90.pre.models import * -from pylmgc90.pre.shared.model import * -from dof import * +from pylmgc90.pre.models import * +from pylmgc90.pre.shared.model import * +from dof import * -from pylmgc90.pre.utilities.error import * +from pylmgc90.pre.utilities.error import * @@ -86,27 +87,27 @@ """ ## node constructor # - def __init__(self,coor=None,number=0): + def __init__(self,coor=None,number=0): """ __init__(self,coor=None,number=0): initialize a node entity. coor an array defining the corrdinates """ self.number = number - if coor is None: + if coor is None: self.coor = [] else : self.coor = coor self.ntype = dimensionTypeNode[coor.shape[0]] - self.dof = None + self.dof = None # necessaire pour garder le lien avec le maillage de depart if number != 0: self.originalnumber=number else: - self.originalnumber=None + self.originalnumber=None if not self.checkType(): msg = 'instanciating node: uncompatible type/dimension ' @@ -125,21 +126,21 @@ def defineDof(self,mod): if not isinstance(mod,model): - print "\tTo define a model on a node an entity 'model' is needed " + print "\tTo define a model on a node an entity 'model' is needed " sys.exit(1) - if self.dof == None: + if self.dof == None: self.dof = dof(nbdof=mod.nbdof) else: if self.dof.nbdof != mod.nbdof: - print '\t A node belonging to two elements has different number of dof from one to the other' + print '\t A node belonging to two elements has different number of dof from one to the other' sys.exit(1) ## impose dofs def imposeDrivenDof(self,composantes,description='predefined',ct=0.,amp=0.,omega=0., phi=0.,rampi=0.,ramp=0.,evolutionFile='unknown',dofty='unknown'): - if self.dof != None: + if self.dof != None: self.dof.imposeDrivenDof(composantes,description,ct,amp,omega,phi,rampi,ramp,evolutionFile,dofty) else: msg='Cannot impose dof on node %s' % self.number @@ -148,13 +149,13 @@ # relache des ddls def relaxDrivenDof(self,composantes): # si une condition limite (ou initiale) a ete imposee - if self.dof != None: + if self.dof != None: # on relcahe les conditions limites concernant les composantes # passees en argument self.dof.relaxDrivenDof(composantes) def imposeInitValue(self,composantes,values): - if self.dof != None: + if self.dof != None: self.dof.imposeInitValue(composantes,values) ## \brief return a node with anonynous shape @@ -165,7 +166,7 @@ ## \brief check type and size consistency def checkType(self): - res = True + res = True dim = -1 for key in dimensionTypeNode: if self.ntype in dimensionTypeNode[key]: @@ -174,7 +175,7 @@ msg = '[checkType] unknown node type ' + self.ntype showError(msg) if dim != self.coor.size : - res = False + res = False return res ## @brief tranlate the node @@ -253,13 +254,13 @@
  • modules |
  • - - + +
    \ No newline at end of file diff --git a/docs/Pre/_modules/pylmgc90/pre/avatar/nodes.html b/docs/Pre/_modules/pylmgc90/pre/avatar/nodes.html index 853d4d7484112e810db8867b6a7be229affb07fa..f2ce529e6b50cc6d23e4658340e73b61ee8516e8 100644 --- a/docs/Pre/_modules/pylmgc90/pre/avatar/nodes.html +++ b/docs/Pre/_modules/pylmgc90/pre/avatar/nodes.html @@ -6,7 +6,7 @@ - pylmgc90.pre.avatar.nodes — pylmgc90.pre 2015.2 documentation + pylmgc90.pre.avatar.nodes — pylmgc90.pre 2017.rc1 documentation @@ -14,17 +14,18 @@ - - + + @@ -47,9 +48,9 @@

    Source code for pylmgc90.pre.avatar.nodes

    -from pylmgc90.pre.utilities.container import *
    +from pylmgc90.pre.utilities.container import *
     
    -from node.node import *
    +from node.node import *
     
     ## @class nodes(mapping_container)
     #  node iterator
    @@ -103,13 +104,13 @@
             
  • modules |
  • - - + +
    \ No newline at end of file diff --git a/docs/Pre/_modules/pylmgc90/pre/avatars.html b/docs/Pre/_modules/pylmgc90/pre/avatars.html index aa8e5ac620a1d75ee138e014e744d089fd2bea49..07a67d4c8ad832ee63f8f66ad870883754931475 100644 --- a/docs/Pre/_modules/pylmgc90/pre/avatars.html +++ b/docs/Pre/_modules/pylmgc90/pre/avatars.html @@ -6,7 +6,7 @@ - pylmgc90.pre.avatars — pylmgc90.pre 2015.2 documentation + pylmgc90.pre.avatars — pylmgc90.pre 2017.rc1 documentation @@ -14,17 +14,18 @@ - - + + @@ -48,9 +49,9 @@

    Source code for pylmgc90.pre.avatars

     import numpy
    -from utilities.container import *
    +from utilities.container import *
     
    -from avatar.avatar import *
    +from avatar.avatar import *
     
     ## @class avatars : avatar list
     
    [docs]class avatars(sequence_container): @@ -227,13 +228,13 @@
  • modules |
  • - - + +
    \ No newline at end of file diff --git a/docs/Pre/_modules/pylmgc90/pre/build_avatar/brick.html b/docs/Pre/_modules/pylmgc90/pre/build_avatar/brick.html index ced1c4b225116b95b69be2d0d9d81b30a873e593..7ee170a25715cb8f58080ea2dbd4983a6557d711 100644 --- a/docs/Pre/_modules/pylmgc90/pre/build_avatar/brick.html +++ b/docs/Pre/_modules/pylmgc90/pre/build_avatar/brick.html @@ -6,7 +6,7 @@ - pylmgc90.pre.build_avatar.brick — pylmgc90.pre 2015.2 documentation + pylmgc90.pre.build_avatar.brick — pylmgc90.pre 2017.rc1 documentation @@ -14,17 +14,18 @@ - - + + @@ -52,11 +53,11 @@ import numpy import math -from pylmgc90.pre.avatar.bulk.rigid2d import * -from pylmgc90.pre.avatar.bulk.element import * +from pylmgc90.pre.avatar.bulk.rigid2d import * +from pylmgc90.pre.avatar.bulk.element import * # macros pour generer des maillages de rectangles (2D) -from mesh2D import * +from mesh2D import * # classe brique 2D
    [docs]class brick2D(): @@ -90,7 +91,7 @@ self.ly=ly # hauteur # creation d'une brique rigide -
    [docs] def rigidBrick(self, center, model, material, color='BLEUx', number=None): +
    [docs] def rigidBrick(self, center, model, material, color='BLEUx', number=None): '''rigidBrick(self, center, model, material, color='BLEUx', number=None): this function build and returns a rigid brick @@ -147,8 +148,8 @@ # creation d'une brique deformable
    [docs] def deformableBrick(self, center, material, model, mesh_type='4T3', - nb_elem_x=1, nb_elem_y=1, apabh=None, apabv=None, apabhc=0.25, apabvc=0.25, - colors=['HORIx', 'VERTx', 'HORIx', 'VERTx'], number=None): + nb_elem_x=1, nb_elem_y=1, apabh=None, apabv=None, apabhc=0.25, apabvc=0.25, + colors=['HORIx', 'VERTx', 'HORIx', 'VERTx'], number=None): '''deformableBrick(self, center, material, model, number, mesh_type='4T3', nb_elem_x=1, nb_elem_y=1, apabh=None, apabv=None, apabhc=0.25, apabvc=0.25, colors=['HORIx', 'VERTx', 'HORIx', 'VERTx']): @@ -233,7 +234,7 @@ # creation d'une brique deformable, explosee
    [docs] def explodedDeformableBrick(self, center, material, model, mesh_type='4T3', - nb_elem_x=1, nb_elem_y=1, apabh=None, apabv=None, apabhc=0.25, apabvc=0.25, + nb_elem_x=1, nb_elem_y=1, apabh=None, apabv=None, apabhc=0.25, apabvc=0.25, colors=['HORIx', 'VERTx', 'HORIx', 'VERTx'], color='BLEUx', shift=0): '''explodedDeformableBrick(self, center, material, model, mesh_type='4T3', nb_elem_x=1, nb_elem_y=1, apabh=None, apabv=None, apabhc=0.25, apabvc=0.25, @@ -504,7 +505,7 @@ # on recupere l'indice du noeud ayant les coordonnees donnees index=body.findNode(coor) # s'il n'esiste pas - if index == None: + if index == None: # on affiche un warning showWarning("no node in this avatar have the searched coordinates") # on quitte la fonction @@ -568,13 +569,13 @@
  • modules |
  • - - + +
    \ No newline at end of file diff --git a/docs/Pre/_modules/pylmgc90/pre/build_avatar/brick_wall.html b/docs/Pre/_modules/pylmgc90/pre/build_avatar/brick_wall.html index a74036a231efb806467189090a4797e4015e8b57..59bc5095511b96a5c2333ef99f669eb412bb8f87 100644 --- a/docs/Pre/_modules/pylmgc90/pre/build_avatar/brick_wall.html +++ b/docs/Pre/_modules/pylmgc90/pre/build_avatar/brick_wall.html @@ -6,7 +6,7 @@ - pylmgc90.pre.build_avatar.brick_wall — pylmgc90.pre 2015.2 documentation + pylmgc90.pre.build_avatar.brick_wall — pylmgc90.pre 2017.rc1 documentation @@ -14,17 +14,18 @@ - - + + @@ -49,9 +50,9 @@

    Source code for pylmgc90.pre.build_avatar.brick_wall

     # module definissant des classes "murs de brique"
     import sys
    -from pylmgc90.pre.avatars import *
    -from brick_row import *
    -from pylmgc90.pre.utilities.error    import *
    +from pylmgc90.pre.avatars import *
    +from brick_row import *
    +from pylmgc90.pre.utilities.error    import *
     
     # classe definissant un mur construit avec un apareil type paneresse generique, i.e. la classe fournit
     # toutes les fonctions pour donner ou calculer le nombre de rangees, la hauteur du mur, la taille du joint
    @@ -95,12 +96,12 @@
              showError("unknown disposition!")
     
           # la valeurs des autres attributs ne sont pas encore connus
    -      self.nb_rows = None           # le nombre de rangees de briques
    -      self.height = None            # la hauteur du mur (briques + joints)
    -      self.joint_thickness = None # l'epaisseur du joint entre deux rangees, superposees
    +      self.nb_rows = None           # le nombre de rangees de briques
    +      self.height = None            # la hauteur du mur (briques + joints)
    +      self.joint_thickness = None # l'epaisseur du joint entre deux rangees, superposees
     
    -      self.even_row = None          # objet rangee de brique, d'indice pair
    -      self.odd_row = None           # objet rangee de brique, d'indice impair
    +      self.even_row = None          # objet rangee de brique, d'indice pair
    +      self.odd_row = None           # objet rangee de brique, d'indice impair
     
        # donnee de la hauteur du mur, en nombre de briques
        # N.B.: le nombre de briques doit etre entier
    @@ -205,7 +206,7 @@
           """
     
           # si les donnees requises sont absentes
    -      if self.nb_rows == None or self.joint_thickness == None:
    +      if self.nb_rows == None or self.joint_thickness == None:
              # on affcihe un avertissement
              showWarning("data is missing to compute the wall height")
              # et on quitte la fonction
    @@ -227,7 +228,7 @@
           """
     
           # si les donnees requises sont absentes
    -      if self.nb_rows == None or self.height == None:
    +      if self.nb_rows == None or self.height == None:
              # on affiche un avertissement
              showWarning("data is missing to compute joint thickness")
              # et on quitte la fonction
    @@ -290,7 +291,7 @@
           """
     
           # si les donnees requises sont absentes
    -      if self.height == None or self.joint_thickness == None:
    +      if self.height == None or self.joint_thickness == None:
              # on affiche un avertissement
              showWarning("data is missing to compute the required number of rows")
              # et on quitte la fonction
    @@ -467,7 +468,7 @@
           """ 
      
           # si une des rangees n'est pas definie
    -      if self.even_row == None or self.odd_row == None:
    +      if self.even_row == None or self.odd_row == None:
              # la premiere rangee de briques n'a pas ete donnee et ne peut donc dire la longueur du mur
              showError("wall length is undefined, since the row in undefined")
     
    @@ -486,7 +487,7 @@
           """ 
      
           # si une des rangees n'est pas definie
    -      if self.even_row == None or self.odd_row == None:
    +      if self.even_row == None or self.odd_row == None:
              # la premiere rangee de briques n'a pas ete donnee et ne peut donc dire la longueur du mur
              showError("wall thickness is undefined, since the row in undefined")
     
    @@ -536,7 +537,7 @@
           """
     
           # on appelle le constructeur de la classe mere
    -      paneresse_generic.__init__(self, brick_ref, disposition)
    +      paneresse_generic.__init__(self, brick_ref, disposition)
     
        # pose le mur de briques sous la forme de corps rigides (modele, materiau, couleurs), par rapport a une origine donnee 0
        # le parement exterieur se trouve dans le plan xOz, et les briques sont posees suivant l'axe Ox
    @@ -566,7 +567,7 @@
           bodies=avatars()
     
           # s'il manque des donnees 
    -      if self.height == None or self.nb_rows == None or self.joint_thickness == None:
    +      if self.height == None or self.nb_rows == None or self.joint_thickness == None:
              # on affiche un avertissement
              showWarning("the wall can't be built since data are missing, an empty container is returned")
              # on sort de la fonction en renvoyant un container vide
    @@ -579,7 +580,7 @@
           z = origin[2] + self.joint_thickness
     
           # pour chaque rangee de brique
    -      for i in xrange(0, self.nb_rows):
    +      for i in xrange(0, self.nb_rows):
              # on choisit la rangee de brique a poser, en fonction de la parite de l'indice
              if i % 2 == 0:
                 # cas pair
    @@ -631,7 +632,7 @@
           bodies=avatars()
     
           # s'il manque des donnees 
    -      if self.height == None or self.nb_rows == None or self.joint_thickness == None:
    +      if self.height == None or self.nb_rows == None or self.joint_thickness == None:
              # on affiche un avertissement
              showWarning("the wall can't be built since data are missing, an empty container is returned")
              # on sort de la fonction en renvoyant un container vide
    @@ -644,7 +645,7 @@
           z = origin[2] + self.joint_thickness
     
           # pour chaque rangee de brique
    -      for i in xrange(0, self.nb_rows):
    +      for i in xrange(0, self.nb_rows):
              # on choisit la rangee de brique a poser, en fonction de la parite de l'indice
              if i % 2 == 0:
                 # cas pair
    @@ -688,7 +689,7 @@
              showError("this disposition is incompatible with this kind of wall")
     
           # on appelle le constructeur de la classe mere
    -      paneresse_generic.__init__(self, brick_ref, disposition)
    +      paneresse_generic.__init__(self, brick_ref, disposition)
     
        # pose le mur de briques sous la forme de corps rigides (modele, materiau, couleurs), par rapport a une origine donnee 0
        # le parement exterieur se trouve dans le plan xOz, et les briques sont posees suivant l'axe Ox
    @@ -718,7 +719,7 @@
           bodies=avatars()
     
           # s'il manque des donnees 
    -      if self.height == None or self.nb_rows == None or self.joint_thickness == None:
    +      if self.height == None or self.nb_rows == None or self.joint_thickness == None:
              # on affiche un avertissement
              showWarning("the wall can't be built since data are missing, an empty container is returned")
              # on sort de la fonction en renvoyant un container vide
    @@ -731,7 +732,7 @@
           z = origin[2] + self.joint_thickness
     
           # pour chaque rangee de brique
    -      for i in xrange(0, self.nb_rows):
    +      for i in xrange(0, self.nb_rows):
              # on choisit dans quel ordre poser les briques, en fonction de la parite de l'indice
              if i % 2 == 0:
                 # cas pair
    @@ -788,13 +789,13 @@
             
  • modules |
  • - - + +
    \ No newline at end of file diff --git a/docs/Pre/_modules/pylmgc90/pre/build_avatar/extrusion.html b/docs/Pre/_modules/pylmgc90/pre/build_avatar/extrusion.html index ebe587a09825e292ba238b1e255429d81038e4df..f2f10630adbdeb0d8dddfd67a7ce0842f195e8f0 100644 --- a/docs/Pre/_modules/pylmgc90/pre/build_avatar/extrusion.html +++ b/docs/Pre/_modules/pylmgc90/pre/build_avatar/extrusion.html @@ -6,7 +6,7 @@ - pylmgc90.pre.build_avatar.extrusion — pylmgc90.pre 2015.2 documentation + pylmgc90.pre.build_avatar.extrusion — pylmgc90.pre 2017.rc1 documentation @@ -14,17 +14,18 @@ - - + + @@ -54,15 +55,15 @@ import math import copy -from pylmgc90.pre.avatar.avatar import * -from pylmgc90.pre.avatar.bulk.rigid3d import * -from pylmgc90.pre.avatars import * -from pylmgc90.pre.utilities.error import * +from pylmgc90.pre.avatar.avatar import * +from pylmgc90.pre.avatar.bulk.rigid3d import * +from pylmgc90.pre.avatars import * +from pylmgc90.pre.utilities.error import * -from mesh import * +from mesh import * # fonction qui extrude un rigide 2D (defini dans le plan xOy), suivant l'axe Oz -
    [docs]def extrudeRigid(body2D, model3D, depth, factor=1.e0, extrudedDisk='Sphere', number=None): +
    [docs]def extrudeRigid(body2D, model3D, depth, factor=1.e0, extrudedDisk='Sphere', number=None): '''extrudeRigid(body2D, model3D, depth, factor=1.e0, number=None): this function builds a 3D rigid body by extruding a given 2D rigid avatar and returns @@ -112,17 +113,17 @@ is_cluster = len(body2D.contactors) > 1 # on determine si le coprs possede (au moins) un contacteur polygone - has_polygon = False + has_polygon = False for contactor in body2D.contactors: if contactor.shape == 'POLYG': - has_polygon = True + has_polygon = True break # on determine si le corps est un jonc (i.e. possede un contacteur jonc) - is_jonc = False + is_jonc = False for contactor in body2D.contactors: if contactor.shape == 'JONCx': - is_jonc = True + is_jonc = True break # si le corps est un cluster ou contient un polygone @@ -184,7 +185,7 @@ # fonction qui extrude un ensemble de corps rigides 2D et place # les corps extrudes dans le plan xOz -
    [docs]def extrudeRigids(bodies2D, model3D, depth, factor=1.e0, extrudedDisk='Sphere', number=None): +
    [docs]def extrudeRigids(bodies2D, model3D, depth, factor=1.e0, extrudedDisk='Sphere', number=None): '''extrudeRigids(bodies2D, model3D, depth, factor=1.e0, number=None): this function extrudes each avatar in a given avatar container and returns @@ -277,12 +278,12 @@ continue #check if connect is to be permuted... - perm = False + perm = False if elem_size == 3 or elem_size == 4: normal = numpy.cross(vol_mesh.nodes[e.connectivity[1]].coor-vol_mesh.nodes[e.connectivity[0]].coor, vol_mesh.nodes[e.connectivity[elem_size-1]].coor-vol_mesh.nodes[e.connectivity[0]].coor) if normal[2]*lz < 0: - perm = True + perm = True new_c = copy.deepcopy(e.connectivity) if perm: @@ -340,13 +341,13 @@
  • modules |
  • - - + +
    \ No newline at end of file diff --git a/docs/Pre/_modules/pylmgc90/pre/build_avatar/lattices2D.html b/docs/Pre/_modules/pylmgc90/pre/build_avatar/lattices2D.html index 15fd2b1a48a53afb7135f7ba2c490b2b6a6c428d..bb24a816b7f1f59cc9c2fc69c316e7b660688cf1 100644 --- a/docs/Pre/_modules/pylmgc90/pre/build_avatar/lattices2D.html +++ b/docs/Pre/_modules/pylmgc90/pre/build_avatar/lattices2D.html @@ -6,7 +6,7 @@ - pylmgc90.pre.build_avatar.lattices2D — pylmgc90.pre 2015.2 documentation + pylmgc90.pre.build_avatar.lattices2D — pylmgc90.pre 2017.rc1 documentation @@ -14,17 +14,18 @@ - - + + @@ -52,7 +53,7 @@ import sys import numpy import math -from pylmgc90.pre.utilities.error import * +from pylmgc90.pre.utilities.error import * # fonction qui genere une liste de coordonnees sur un reseau carre # parametres : @@ -104,8 +105,8 @@ # on initialise le vecteur qui va recevoir les coordonnees coor = numpy.zeros(2*nb_ele*nb_layer, 'd') # on construit la liste de positions - for j in xrange(0, nb_layer, 1): - for i in xrange(0, nb_ele, 1): + for j in xrange(0, nb_layer, 1): + for i in xrange(0, nb_ele, 1): # abscisse du point courant coor[2*(j*nb_ele + i)] = x0 + (i + 0.5)*l # ordonnee du point courant @@ -153,10 +154,10 @@ # on en deduit le nombre de points sur le reseau if nb_layer % 2 == 0: # si le nombre de couches est pair - nb_points = nb_layer/2*(nb_ele_odd + nb_ele_even) + nb_points = nb_layer//2*(nb_ele_odd + nb_ele_even) else: # si le nombre de couches est impair - nb_points = ((nb_layer - 1)/2 + 1)*nb_ele_odd + (nb_layer - 1)/2*nb_ele_even + nb_points = ((nb_layer - 1)//2 + 1)*nb_ele_odd + (nb_layer - 1)//2*nb_ele_even # on renvoie le nombre de points dans le reseau return nb_points @@ -245,10 +246,10 @@ # on en deduit le nombre de points sur le reseau if nb_layer % 2 == 0: # si le nombre de couches est pair - nb_points = nb_layer/2*(nb_ele_odd + nb_ele_even) + nb_points = nb_layer//2*(nb_ele_odd + nb_ele_even) else: # si le nombre de couches est impair - nb_points = ((nb_layer - 1)/2 + 1)*nb_ele_odd + (nb_layer - 1)/2*nb_ele_even + nb_points = ((nb_layer - 1)//2 + 1)*nb_ele_odd + (nb_layer - 1)//2*nb_ele_even # on initialise le vecteur qui va recevoir les coordonnees coor = numpy.zeros(2*nb_points , 'd') @@ -259,10 +260,10 @@ # on stocke la valeur de sin(pi/3)=sqrt(3)/2 sin_pi_3=0.5*math.sqrt(3) # pour chaque couche - for j in xrange(0, nb_layer, 1): + for j in xrange(0, nb_layer, 1): if (j + 1) % 2 == 0: # cas d'une couche paire # on calcule les doordonnees pour cette couche - for i in xrange(0, nb_ele_even, 1): + for i in xrange(0, nb_ele_even, 1): # abscisse du point courant coor[nb_deposited + 2*i] = x0_even + i*l # ordonnee du point courant @@ -271,7 +272,7 @@ nb_deposited += 2*nb_ele_even else: # cas d'une couche impaire # on calcule les doordonnees pour cette couche - for i in xrange(0, nb_ele_odd, 1): + for i in xrange(0, nb_ele_odd, 1): # abscisse du point courant coor[nb_deposited + 2*i] = x0_odd + i*l # ordonnee du point courant @@ -313,13 +314,13 @@
  • modules |
  • - - + +
    \ No newline at end of file diff --git a/docs/Pre/_modules/pylmgc90/pre/build_avatar/lattices3D.html b/docs/Pre/_modules/pylmgc90/pre/build_avatar/lattices3D.html index 2c7e1801bcf83b87222743b91bfa3bb6722460d5..0eea2864c77a40377a88b05cd7e968be637708dc 100644 --- a/docs/Pre/_modules/pylmgc90/pre/build_avatar/lattices3D.html +++ b/docs/Pre/_modules/pylmgc90/pre/build_avatar/lattices3D.html @@ -6,7 +6,7 @@ - pylmgc90.pre.build_avatar.lattices3D — pylmgc90.pre 2015.2 documentation + pylmgc90.pre.build_avatar.lattices3D — pylmgc90.pre 2017.rc1 documentation @@ -14,17 +14,18 @@ - - + + @@ -109,9 +110,9 @@ # on initialise le vecteur qui va recevoir les coordonnees coor = numpy.zeros(3*nb_ele_x*nb_ele_y*nb_layer, 'd') # on construit la liste de positions - for k in xrange(0, nb_layer, 1): - for j in xrange(0, nb_ele_y, 1): - for i in xrange(0, nb_ele_x, 1): + for k in xrange(0, nb_layer, 1): + for j in xrange(0, nb_ele_y, 1): + for i in xrange(0, nb_ele_x, 1): # abscisse du point courant coor[3*(k*nb_ele_y*nb_ele_x + j*nb_ele_x + i)] = x0 + (i + 0.5)*l # ordonnee du point courant @@ -152,13 +153,13 @@
  • modules |
  • - - + +
    \ No newline at end of file diff --git a/docs/Pre/_modules/pylmgc90/pre/build_avatar/lecture.html b/docs/Pre/_modules/pylmgc90/pre/build_avatar/lecture.html index ec8a30f47315ee82a6ef7159d270cb5650368492..0e06a7a9dc58d9fcd884187396ec72cd4b36ed7b 100644 --- a/docs/Pre/_modules/pylmgc90/pre/build_avatar/lecture.html +++ b/docs/Pre/_modules/pylmgc90/pre/build_avatar/lecture.html @@ -6,7 +6,7 @@ - pylmgc90.pre.build_avatar.lecture — pylmgc90.pre 2015.2 documentation + pylmgc90.pre.build_avatar.lecture — pylmgc90.pre 2017.rc1 documentation @@ -14,17 +14,18 @@ - - + + @@ -73,19 +74,19 @@ import os,string,sys -from pylmgc90.pre.config.readMeshFormat import * -from pylmgc90.pre.config.lmgc90dicts import * +from pylmgc90.pre.config.readMeshFormat import * +from pylmgc90.pre.config.lmgc90dicts import * -from pylmgc90.pre.avatar.nodes import * -from pylmgc90.pre.avatar.node.node import * -from pylmgc90.pre.avatar.bulks import * -from pylmgc90.pre.avatar.bulk.element import * -from mesh import * -from pylmgc90.pre.utilities.error import * +from pylmgc90.pre.avatar.nodes import * +from pylmgc90.pre.avatar.node.node import * +from pylmgc90.pre.avatar.bulks import * +from pylmgc90.pre.avatar.bulk.element import * +from mesh import * +from pylmgc90.pre.utilities.error import * ## routine de lecture du fichier maillage #@todo gerer l'extension med -
    [docs]def lecture(name, dim, keep_elements=None, scale_factor=None, incomplete_elements=True): +
    [docs]def lecture(name, dim, keep_elements=None, scale_factor=None, incomplete_elements=True): """lecture(name, dim): this function builds sets of nodes and elements by reading a file @@ -117,7 +118,7 @@ """ # filtre sur le type d'elements - if keep_elements is None: + if keep_elements is None: keep_elements=[] else: # on recupere la liste des elements geometriques @@ -173,7 +174,7 @@ read_mesh = readVtu(name, dim, keep_elements) # si on a donne un facteur d'echelle - if scale_factor != None: + if scale_factor != None: # pour chaque noeud du maillage lu for nod in read_mesh.nodes: # on met a l'echelle les coordonnees @@ -548,17 +549,17 @@ num = 0 # on initialise le type d'element de la liste d'elements courante a vide - type_ele=None + type_ele=None # on initialise le type d'element corespondant, dans la nomencalture de LMGC90 - type_ele_lmgc=None + type_ele_lmgc=None # on initialise a vide le dictionnaire qui associe l'identifiant d'un element a l'objet bulk qui lui # corespond ele_id2bulk = {} # on indique que le nom du groupe n'a pas encore ete lu - is_read=False + is_read=False # on initialise le nom du groupe courant a vide - group_name=None + group_name=None # pour chaque ligne du fichier for ligne in mesh_file: @@ -622,7 +623,7 @@ # si on est toujours sur la ligne declarant le nouveau groupe if res[0] == 'GROUP_MA': # on indique que le nom du groupe n'a pas encore ete lu - is_read=False + is_read=False # on passe a la ligne suivante continue # sinon, si on a pas encore lu le nom du groupe @@ -630,7 +631,7 @@ # on le stocke group_name=res[0] # on indique que le nom de groupe a ete lu - is_read=True + is_read=True # on passe a la ligne suivante continue # sinon, @@ -653,7 +654,7 @@ # si on est toujours sur la ligne declarant le nouveau groupe if res[0] == 'GROUP_NO': # on indique que le nom du groupe n'a pas encore ete lu - is_read=False + is_read=False # on passe a la ligne suivante continue # sinon, si on a pas encore lu le nom du groupe @@ -661,7 +662,7 @@ # on le stocke group_name=res[0] # on indique que le nom de groupe a ete lu - is_read=True + is_read=True # on passe a la ligne suivante continue # sinon, @@ -736,7 +737,7 @@ # on charge les entites physiques et geometriques par un array nomme PhysicalGroup PhysicalGroup = datavtu.GetCellData().GetArray('PhysicalGroup') - if PhysicalGroup == None : + if PhysicalGroup == None : showWarning('No physical groups defined on this mesh!') # pour chaque element du maillage vtu @@ -751,7 +752,7 @@ elif vtkid in vtkElementVolume: elem_dim = 3 else: - print int(datavtu.GetCell(i).GetNumberOfPoints()) + print int(datavtu.GetCell(i).GetNumberOfPoints()) showError("[lecture::readVtu] : unknown vtk element type: "+vtkid) # filtre des elements non interressant @@ -773,7 +774,7 @@ conn[10], conn[9], conn[12], conn[14], conn[13]] conn = conn_PRI15 - if PhysicalGroup <> None : + if PhysicalGroup <> None : # on construit les entites physiques et geometriques par un array nomme PhysicalGroup pE = str(int(PhysicalGroup.GetValue(i))) gE = str(int(PhysicalGroup.GetValue(i))) @@ -828,13 +829,13 @@
  • modules |
  • - - + +
    \ No newline at end of file diff --git a/docs/Pre/_modules/pylmgc90/pre/build_avatar/mesh.html b/docs/Pre/_modules/pylmgc90/pre/build_avatar/mesh.html index 9893f00eb185f434f381b34367ef6a0052e2a8b0..2411809cc9b06cacae9ecc7622ec8c8ac5b4da0f 100644 --- a/docs/Pre/_modules/pylmgc90/pre/build_avatar/mesh.html +++ b/docs/Pre/_modules/pylmgc90/pre/build_avatar/mesh.html @@ -6,7 +6,7 @@ - pylmgc90.pre.build_avatar.mesh — pylmgc90.pre 2015.2 documentation + pylmgc90.pre.build_avatar.mesh — pylmgc90.pre 2017.rc1 documentation @@ -14,17 +14,18 @@ - - + + @@ -49,12 +50,12 @@

    Source code for pylmgc90.pre.build_avatar.mesh

     # module definissant une classe permettant de manipuler un maillage 2D ou 3D
     import sys
    -import numpy as np
    +import numpy as np
     import copy
    -from pylmgc90.pre.avatar.bulks import *
    -from pylmgc90.pre.avatar.nodes import *
    -from pylmgc90.pre.avatar.bulk.element import *
    -from pylmgc90.pre.utilities.error    import *
    +from pylmgc90.pre.avatar.bulks import *
    +from pylmgc90.pre.avatar.nodes import *
    +from pylmgc90.pre.avatar.bulk.element import *
    +from pylmgc90.pre.utilities.error    import *
     
     # classe maillage
     
    [docs]class mesh(): @@ -123,7 +124,7 @@ # pour chaque element for bulk in self.bulks: # pour chaque noeud de la table de connectivite on cree une entree - for i in xrange(0, len(bulk.connectivity)): + for i in xrange(0, len(bulk.connectivity)): if not busynodes.has_key(bulk.connectivity[i]): busynodes[bulk.connectivity[i]]=1 @@ -188,7 +189,7 @@ # pour chaque element for bulk in self.bulks: # pour chaque noeud de la table de connectivite - for i in xrange(0, len(bulk.connectivity)): + for i in xrange(0, len(bulk.connectivity)): # le numero du noeud devient son rang bulk.connectivity[i]=ranks[bulk.connectivity[i]]
    @@ -259,7 +260,7 @@ return entity2subMesh
    # fonction qui separe les differents maillages lus dans un meme fichier -
    [docs] def separateMeshes(self, dim, entity_type="geometricalEntity", keep_all_elements=True): +
    [docs] def separateMeshes(self, dim, entity_type="geometricalEntity", keep_all_elements=True): """separateMeshes(self, dim, entity_type="geometricalEntity"): this function separates several meshes, stored in a single one (read from a mesh), @@ -287,11 +288,11 @@ # on delcare le dictionnaire utilise pour associer un maillage a chaque entite entity2mesh={} - print "Meshes separating:" + print "Meshes separating:" # tri des elements de la dimension choisie (surfacique ou volumique) suivant le type d'entite # choisi (geometrique ou physique) - print " * Elements sorting" + print " * Elements sorting" # on declare la liste utilisee pour stocker les clefs du dictionnaire precedent known_entities=[] @@ -313,7 +314,7 @@ known_entities.sort() # tri des noeuds, a partir des elements tries - print " * Nodes sorting" + print " * Nodes sorting" # on declare le dictionnaire utilise pour associer l'ensemble des numeros de noeuds a une entite entity2node_numbers={} @@ -337,7 +338,7 @@ # si tous les elements doivent etre tries if keep_all_elements: # on trie des elements restants a partir des noeuds tries - print " * Remaining elements sorting" + print " * Remaining elements sorting" # construction d'une map donnant la liste des entites associees a un noeud @@ -378,15 +379,15 @@ # pour chaque entite associee au premier noeud de l'element for entity in node_number2entities[first_num]: # on suppose que l'element est associe a l'entite courante - is_associated=True + is_associated=True # pour chaque noeud de la connectivite de l'element courant, autre que le premier - for i in xrange(1, len(connectivity)): + for i in xrange(1, len(connectivity)): # on recupere le numero du noeud courant num=connectivity[i] # si le noeud courant n'est associe a aucune entite if not num in known_node_numbers: # l'element ne pourra etre associe a aucune entite - is_associated=False + is_associated=False # on affiche un warning et on passe au suivant showWarning("current element cannot be associated to any entity!") # on sort de la boucle @@ -394,7 +395,7 @@ # si l'entite courante n'est pas dans la liste des entites associees au numero de noeud courant if not entity in node_number2entities[num]: # l'element courant ne peut etre associe a l'entite courante - is_associated=False + is_associated=False # on sort de la boucle break # si l'element courant est associe a l'entite courante @@ -442,7 +443,7 @@ return normal
    -
    [docs] def extrudePhysicalEntity(self, pE, length, reverse=False): +
    [docs] def extrudePhysicalEntity(self, pE, length, reverse=False): """ Extrude an external layer of mesh. @@ -553,13 +554,13 @@
  • modules |
  • - - + +
    \ No newline at end of file diff --git a/docs/Pre/_modules/pylmgc90/pre/build_avatar/mesh2D.html b/docs/Pre/_modules/pylmgc90/pre/build_avatar/mesh2D.html index be1ddeedde8b67dc8c6ffdf263799977a102b76d..0ca8468d9c82728d1437a1fa5537f536cb8cacd6 100644 --- a/docs/Pre/_modules/pylmgc90/pre/build_avatar/mesh2D.html +++ b/docs/Pre/_modules/pylmgc90/pre/build_avatar/mesh2D.html @@ -6,7 +6,7 @@ - pylmgc90.pre.build_avatar.mesh2D — pylmgc90.pre 2015.2 documentation + pylmgc90.pre.build_avatar.mesh2D — pylmgc90.pre 2017.rc1 documentation @@ -14,17 +14,18 @@ - - + + @@ -50,27 +51,27 @@ # module qui fournit des macros pour construire et/ou manipuler des maillages 2D import numpy -from pylmgc90.pre.avatar.avatar import * -from pylmgc90.pre.avatar.bulk.element import * -from pylmgc90.pre.avatar.contactor.contactor import * -from pylmgc90.pre.avatar.group.group import * -from pylmgc90.pre.avatars import * -from mesh import * -from pylmgc90.pre.utilities.error import * +from pylmgc90.pre.avatar.avatar import * +from pylmgc90.pre.avatar.bulk.element import * +from pylmgc90.pre.avatar.contactor.contactor import * +from pylmgc90.pre.avatar.group.group import * +from pylmgc90.pre.avatars import * +from mesh import * +from pylmgc90.pre.utilities.error import * # import du module permettant de savoir si on pourra importer les pre_tools -from pylmgc90.pre.utilities.check_compiled_modules import * +from pylmgc90.pre.utilities.check_compiled_modules import * -from pylmgc90.pre.avatar.contactor.contactorFactory import contactorFactory +from pylmgc90.pre.avatar.contactor.contactorFactory import contactorFactory # si on peut essayer d'importer le module pre_tools sans tout faire planter if import_lmgc90(): # on essaye try: - from pylmgc90.chipy import lmgc90 + from pylmgc90.chipy import lmgc90 except ImportError: - print 'Unable to import wrapped part of the 2D mesh generator module!' - print 'You must build 2D meshes using an external tool' + print 'Unable to import wrapped part of the 2D mesh generator module!' + print 'You must build 2D meshes using an external tool' except: raise @@ -88,7 +89,7 @@ # - material : materiau # - model : modele # - number : numero du corps -
    [docs]def buildMesh2D(mesh_type, x0, y0, lx, ly, nb_elem_x, nb_elem_y, vertices=None, number=None): +
    [docs]def buildMesh2D(mesh_type, x0, y0, lx, ly, nb_elem_x, nb_elem_y, vertices=None, number=None): '''buildMesh2D=buildMesh2D(mesh_type, x0, y0, lx, ly, nb_elem_x, nb_elem_y, vertices=None, number=None): this function meshes a given rectangle, and returns the generated mesh @@ -175,7 +176,7 @@ # table de connectivite des elements volumiques a 0 beg_conn = 0 # pour chaque element - for i in xrange(0, len(nb_node_per_ele_vol), 1): + for i in xrange(0, len(nb_node_per_ele_vol), 1): # on recupere la connectivite de l'element, sous la forme d'une liste conn=conn_vol[beg_conn:beg_conn + nb_node_per_ele_vol[i]].tolist() @@ -208,7 +209,7 @@ beg_conn = beg_conn + nb_node_per_ele_vol[i] # pour chaque noeud - for i in xrange(0, len(nodes)/2, 1): + for i in xrange(0, len(nodes)//2, 1): # on ajoute le noeud au maillage surfacic_mesh.addNode( node( coor=nodes[2*i: 2*(i + 1)], number=i + 1) ) @@ -252,9 +253,9 @@ #for ele in body.bulks: for ele in surfacic_mesh.bulks: # pour chaque noeud de l'element - for ic in xrange(0, ele.nbNodes, 1): + for ic in xrange(0, ele.nbNodes, 1): # si l'element est un Q8 - if ele.etype == 'Q8xxx' and ic >= ele.nbNodes/2: + if ele.etype == 'Q8xxx' and ic >= ele.nbNodes//2: # on laisse tomber les noeuds aux centres des lignes continue # on recupere le numero du noeud @@ -263,7 +264,7 @@ # l'element if ele.etype == 'Q8xxx': # cas particulier du Q8 # on recupere le noeud sommet suivant - j = ele.connectivity[(ic + 1) % (ele.nbNodes/2)] + j = ele.connectivity[(ic + 1) % (ele.nbNodes//2)] else: # cas general j = ele.connectivity[(ic + 1) % ele.nbNodes] # (i, j) definit une arete de l'element courant @@ -272,7 +273,7 @@ # cette arete # on indique qu'on ne l'a pas encore trouve - is_found = None + is_found = None # pour chaque element ajdacent au noeud i for adj_ele in l_node2ele[i - 1]: # si on a trouve l'element adjacent @@ -346,7 +347,7 @@ # * cas particulier du Q8 : une ligne a trois noeuds if ele.etype == 'Q8xxx': # on recupere le numero nu noeud au centre de l'arete - k = ele.connectivity[(ic + (ele.nbNodes/2)) % ele.nbNodes] + k = ele.connectivity[(ic + (ele.nbNodes//2)) % ele.nbNodes] # ATTENTION: on conserve le sens trigonometrique de la # description de la connectivite des Q8, pour definir la # ligne a trois noeuds @@ -364,7 +365,7 @@ return surfacic_mesh
    # fonction qui eclate un objet maille -
    [docs]def explodeMeshedAvatar2D(body, nbPoints=2, color='BLEUx', w=None, color_dict=None): +
    [docs]def explodeMeshedAvatar2D(body, nbPoints=2, color='BLEUx', w=None, color_dict=None): '''bodies=explodeMeshedAvatar2D(body, nbPoints=2, color='BLEUx', w=None): this function "explodes" a given 2D meshed avatar, i.e. gets a meshed avatar and returns a @@ -491,7 +492,7 @@ continue # pour chaque noeud de l'element - for ic in xrange(0, ele.nbNodes, 1): + for ic in xrange(0, ele.nbNodes, 1): # on recupere le numero du noeud i = ele.connectivity[ic] # et le numeor du noeud suivant, dans la table de connectivite de @@ -503,8 +504,8 @@ # cette arete # on indique qu'on ne l'a pas encore trouve - is_found = None - found_ele = None + is_found = None + found_ele = None # pour chaque element ajdacent au noeud i for adj_ele in l_node2ele[i - 1]: # si on a trouve l'element adjacent @@ -591,7 +592,7 @@ # on recupere le nouveau corps associe a l'element courant new_body = bodies[ele2bodyIndex[ele.number]] # on definit un objet pour recevoir l'element ligne associe - found_line = None + found_line = None # pour chaque element for ele_surf in body.bulks: # si l'element n'est pas une ligne @@ -606,7 +607,7 @@ break # si l'element ligne associe existe - if found_line != None: + if found_line != None: # on cree l'element ligne a ajouter au corps # ATTENTION : la connectivite d'une ligne supportant un # contacteur est definie dans le sens anti-trigonometrique @@ -634,7 +635,7 @@ return bodies
    # fonction qui prend un maillage 2D et l'eclate en rigides (polygones) -
    [docs]def rigidsFromMesh2D(surfacic_mesh, model, material, color='BLEUx', reverse=False, shrink=0.): +
    [docs]def rigidsFromMesh2D(surfacic_mesh, model, material, color='BLEUx', reverse=False, shrink=0.): """rigidsFromMesh2D(surfacic_mesh, model, material, color='BLEUx', reverse=False, shrink=0.): this function build a set of rigids from a 2D mesh, each rigid @@ -734,7 +735,7 @@ return bodies
    # fonction qui prend un maillage 2D et cree un corps rigide comme un cluster de polygones (chaque maille devenant un contacteur) -
    [docs]def rigidFromMesh2D(surfacic_mesh, model, material, color='BLEUx', reverse=False): +
    [docs]def rigidFromMesh2D(surfacic_mesh, model, material, color='BLEUx', reverse=False): """rigidFromMesh2D(surfacic_mesh, model, material, color='BLEUx', reverse=False): this function build a rigid from a 2D mesh, each contactor @@ -867,7 +868,7 @@ # si l'element est un triangle if bulk.etype == 'T3xxx': # ca pourrait etre T6xxx aussi ... # on suppose que tous les bords sont sur le contour - is_free_face[bulk.number]=[True, True, True] + is_free_face[bulk.number]=[True, True, True] # on recupere les numeros des noeuds du tetraedre i1=bulk.connectivity[0] @@ -895,14 +896,14 @@ # si le bord 0 {i1, i2} fait partie de l'adjacent if i2 in adj_bulk.connectivity : # on vire - is_free_face[bulk.number][0]=False + is_free_face[bulk.number][0]=False # on incremente le nombre de bords de l'ele qui n'appartiennent pas au contour nb_non_free_faces[bulk.number] += 1 # si le bord 2 {i3,i1} fait partie de l'adjacent if i3 in adj_bulk.connectivity: # on vire - is_free_face[bulk.number][2]=False + is_free_face[bulk.number][2]=False # on incremente le nombre de bords de l'ele qui n'appartiennent pas au contour nb_non_free_faces[bulk.number] += 1 @@ -920,14 +921,14 @@ # si le bord 1 {i2, i3} fait partie de l'adjacent if i3 in adj_bulk.connectivity: # on vire - is_free_face[bulk.number][1]=False + is_free_face[bulk.number][1]=False # on incremente le nombre de bords de l'ele qui n'appartiennent pas au contour nb_non_free_faces[bulk.number] += 1 elif bulk.etype == 'Q4xxx': # on suppose que tous les bords sont sur le contour - is_free_face[bulk.number]=[True]*4 + is_free_face[bulk.number]=[True]*4 # on recupere les numeros des noeuds i1=bulk.connectivity[0] i2=bulk.connectivity[1] @@ -948,14 +949,14 @@ # si le bord 0 {i1, i2} fait partie de l'adjacent if i2 in adj_bulk.connectivity: # on vire - is_free_face[bulk.number][0]=False + is_free_face[bulk.number][0]=False # on incremente le nombre de bords de l'ele qui n'appartiennent pas au contour nb_non_free_faces[bulk.number] += 1 # si le bord 3 {i4, i1} fait partie de l'adjacent if i4 in adj_bulk.connectivity : # on vire - is_free_face[bulk.number][3]=False + is_free_face[bulk.number][3]=False # on incremente le nombre de bords de l'ele qui n'appartiennent pas au contour nb_non_free_faces[bulk.number] += 1 @@ -974,14 +975,14 @@ # si le bord 1 {i2, i3} fait partie de l'adjacent if i2 in adj_bulk.connectivity : # on vire - is_free_face[bulk.number][1]=False + is_free_face[bulk.number][1]=False # on incremente le nombre de bords de l'ele qui n'appartiennent pas au contour nb_non_free_faces[bulk.number] += 1 # si le bord 2 {i3, i4} fait partie de l'adjacent courant if i4 in adj_bulk.connectivity: # on vire - is_free_face[bulk.number][2]=False + is_free_face[bulk.number][2]=False # on incremente le nombre de bords de l'ele qui n'appartiennent pas au contour nb_non_free_faces[bulk.number] += 1 @@ -1024,7 +1025,7 @@ # on passe a l'element suivant continue - for i in xrange(0, len(is_free_face[bulk.number])): + for i in xrange(0, len(is_free_face[bulk.number])): # si la face courante est libre if is_free_face[bulk.number][i]: ###print bulk.number,bulk.etype,nbn,' bord ',i,(i+1)%nbn @@ -1082,13 +1083,13 @@
  • modules |
  • - - + +
    \ No newline at end of file diff --git a/docs/Pre/_modules/pylmgc90/pre/build_avatar/mesh3D.html b/docs/Pre/_modules/pylmgc90/pre/build_avatar/mesh3D.html index 062603233a5b8c4e859e2e4404781aeb538e3dc1..9dd52794aea9de4cc7d75b56a84557514a87194a 100644 --- a/docs/Pre/_modules/pylmgc90/pre/build_avatar/mesh3D.html +++ b/docs/Pre/_modules/pylmgc90/pre/build_avatar/mesh3D.html @@ -6,7 +6,7 @@ - pylmgc90.pre.build_avatar.mesh3D — pylmgc90.pre 2015.2 documentation + pylmgc90.pre.build_avatar.mesh3D — pylmgc90.pre 2017.rc1 documentation @@ -14,17 +14,18 @@ - - + + @@ -53,25 +54,25 @@ import numpy import math import copy -from pylmgc90.pre.avatar.avatar import * -from pylmgc90.pre.avatar.bulk.element import * -from pylmgc90.pre.avatar.bulk.rigid3d import * -from pylmgc90.pre.avatar.contactor.rigid_properties_3D import computeVolumeInertiaMesh -from mesh import * -from pylmgc90.pre.utilities.error import * +from pylmgc90.pre.avatar.avatar import * +from pylmgc90.pre.avatar.bulk.element import * +from pylmgc90.pre.avatar.bulk.rigid3d import * +from pylmgc90.pre.avatar.contactor.rigid_properties_3D import computeVolumeInertiaMesh +from mesh import * +from pylmgc90.pre.utilities.error import * # import du module permettant de savoir si on pourra importer les pre_tools -from pylmgc90.pre.utilities.check_compiled_modules import * +from pylmgc90.pre.utilities.check_compiled_modules import * # si on peut essayer d'importer le module pre_tools sans tout faire planter if import_lmgc90(): # on essaye try: - from pylmgc90.chipy import lmgc90 + from pylmgc90.chipy import lmgc90 except ImportError: - print 'Unable to import wrapped part surafcic mesh handling module!' - print 'You will not be able to build polyhedron from surfacic meshes' + print 'Unable to import wrapped part surafcic mesh handling module!' + print 'You will not be able to build polyhedron from surfacic meshes' except: raise @@ -159,7 +160,7 @@ # si l'element est un tetraedre if bulk.etype == 'TE4xx': # on suppose que les quatre faces du tetraedre sont sur la surface libre - is_free_face[bulk.number]=[True, True, True, True] + is_free_face[bulk.number]=[True, True, True, True] # on recupere les numeros des noeuds du tetraedre i1=bulk.connectivity[0] i2=bulk.connectivity[1] @@ -182,19 +183,19 @@ # si la face {i1, i2, i3} fait partie du prisme adjacent courant if i2 in adj_bulk.connectivity and i3 in adj_bulk.connectivity: # on indique que la premiere face du tetraedre courant n'appartient pas a la surface libre - is_free_face[bulk.number][0]=False + is_free_face[bulk.number][0]=False # on incremente le nombre de faces du tetraedre courant qui n'appartiennent pas a la surface libre nb_non_free_faces[bulk.number] += 1 # si la face {i1, i2, i4} fait partie du tetraedre adjacent courant if i2 in adj_bulk.connectivity and i4 in adj_bulk.connectivity: # on indique que la deuxieme face du tetraedre courant n'appartient pas a la surface libre - is_free_face[bulk.number][1]=False + is_free_face[bulk.number][1]=False # on incremente le nombre de faces du tetraedre courant qui n'appartiennent pas a la surface libre nb_non_free_faces[bulk.number] += 1 # si la face {i1, i3, i4} fait partie du tetraedre adjacent courant if i3 in adj_bulk.connectivity and i4 in adj_bulk.connectivity: # on indique que la quatrieme face du tetraedre courant n'appartient pas a la surface libre - is_free_face[bulk.number][3]=False + is_free_face[bulk.number][3]=False # on incremente le nombre de faces du tetraedre courant qui n'appartiennent pas a la surface libre nb_non_free_faces[bulk.number] += 1 @@ -213,7 +214,7 @@ # si la face {i4, i2, i3} fait partie du tetraedre adjacent courant if i2 in adj_bulk.connectivity and i3 in adj_bulk.connectivity: # on indique que la troisieme face du tetraedre courant n'appartient pas a la surface libre - is_free_face[bulk.number][2]=False + is_free_face[bulk.number][2]=False # on incremente le nombre de faces du tetraedre courant qui n'appartiennent pas a la surface libre nb_non_free_faces[bulk.number] += 1 @@ -221,7 +222,7 @@ # on suppose que les faces sont sur la surface libre (ce commentaire est reellement debile) # par contre on ne test qu'avec d'autres pri6 !! - is_free_face[bulk.number]=[True]*5 + is_free_face[bulk.number]=[True]*5 # on recupere les numeros des noeuds i1=bulk.connectivity[0] i2=bulk.connectivity[1] @@ -250,19 +251,19 @@ # si la face {i1, i2, i5, i4} fait partie de l'adjacent if i2 in adj_bulk.connectivity and i5 in adj_bulk.connectivity and i4 in adj_bulk.connectivity: # on la vire - is_free_face[bulk.number][1]=False + is_free_face[bulk.number][1]=False # on incremente le nombre de faces qui n'appartiennent pas a la surface libre nb_non_free_faces[bulk.number] += 1 # si la face {i1, i3, i2} fait partie de l'adjacent if i2 in adj_bulk.connectivity and i3 in adj_bulk.connectivity: # on la vire - is_free_face[bulk.number][3]=False + is_free_face[bulk.number][3]=False # on incremente le nombre de faces qui n'appartiennent pas a la surface libre nb_non_free_faces[bulk.number] += 1 # si la face {i1, i4, i6, i3} fait partie de l'adjacent if i4 in adj_bulk.connectivity and i6 in adj_bulk.connectivity and i3 in adj_bulk.connectivity: # on la vire - is_free_face[bulk.number][4]=False + is_free_face[bulk.number][4]=False # on incremente le nombre de faces qui n'appartiennent pas a la surface libre nb_non_free_faces[bulk.number] += 1 @@ -279,13 +280,13 @@ # si la face {i4, i5, i6} fait partie de l'adjacent if i4 in adj_bulk.connectivity and i5 in adj_bulk.connectivity: # on la vire - is_free_face[bulk.number][0]=False + is_free_face[bulk.number][0]=False # on incremente le nombre de faces qui n'appartiennent pas a la surface libre nb_non_free_faces[bulk.number] += 1 # si la face {i2, i3, i6, i5} fait partie de l'adjacent courant if i2 in adj_bulk.connectivity and i3 in adj_bulk.connectivity and i5 in adj_bulk.connectivity: # on la vire - is_free_face[bulk.number][2]=False + is_free_face[bulk.number][2]=False # on incremente le nombre de faces qui n'appartiennent pas a la surface libre nb_non_free_faces[bulk.number] += 1 @@ -319,7 +320,7 @@ # on passe a l'element suivant continue # pour chaque face du tetraedre - for i in xrange(0, 4): + for i in xrange(0, 4): # si la face courante est libre if is_free_face[bulk.number][i]: # on recupere la connectivite de la face @@ -334,7 +335,7 @@ # on passe a l'element suivant continue # pour chaque face du tetraedre - for i in xrange(0, 5): + for i in xrange(0, 5): # si la face courante est libre if is_free_face[bulk.number][i]: if (i == 0 or i == 3): @@ -431,13 +432,13 @@ # pour chaque element adjacent au premier noeud de l'element courant (dans la surface libre) for free_bulk in l_node2ele[connectivity[0]]: # on suppose que l'element de la surface libre courant corespond a l'element surfacique courant - is_found=True + is_found=True # pour chaque noeud de l'element de la surface libre courant for num in free_bulk.connectivity: # si le numero de noeud courant n'est pas support de l'element surfacique courant if not num in connectivity: # l'element de la surface libre courant ne peut pas corespondre a l'element surfacique courant - is_found=False + is_found=False # on sort de la boucle break # si l'element de la surface libre courant est associe a l'element surfacique courant @@ -1319,13 +1320,13 @@
  • modules |
  • - - + +
    \ No newline at end of file diff --git a/docs/Pre/_modules/pylmgc90/pre/build_avatar/particles.html b/docs/Pre/_modules/pylmgc90/pre/build_avatar/particles.html index 9c6857b49997f4109259bfca5bfbaa7a08a3b158..7df5b2604e7621c15162cb099f60ffe60bea0854 100644 --- a/docs/Pre/_modules/pylmgc90/pre/build_avatar/particles.html +++ b/docs/Pre/_modules/pylmgc90/pre/build_avatar/particles.html @@ -6,7 +6,7 @@ - pylmgc90.pre.build_avatar.particles — pylmgc90.pre 2015.2 documentation + pylmgc90.pre.build_avatar.particles — pylmgc90.pre 2017.rc1 documentation @@ -14,17 +14,18 @@ - - + + @@ -53,14 +54,14 @@ import random import numpy import math -from pylmgc90.pre.avatar.avatar import * -from pylmgc90.pre.avatar.bulk.rigid2d import * -from pylmgc90.pre.avatar.bulk.rigid3d import * -from pylmgc90.pre.avatar.bulk.element import * -from mesh import * -from pylmgc90.pre.utilities.error import * - -
    [docs]def rigidDisk(r, center, model, material, color='BLEUx', number=None, is_Hollow=False, is_Pneum=False): +from pylmgc90.pre.avatar.avatar import * +from pylmgc90.pre.avatar.bulk.rigid2d import * +from pylmgc90.pre.avatar.bulk.rigid3d import * +from pylmgc90.pre.avatar.bulk.element import * +from mesh import * +from pylmgc90.pre.utilities.error import * + +
    [docs]def rigidDisk(r, center, model, material, color='BLEUx', number=None, is_Hollow=False, is_Pneum=False): ''' usage: @@ -104,7 +105,7 @@ return body
    -
    [docs]def rigidSphere(r, center, model, material, color='BLEUx', number=None): +
    [docs]def rigidSphere(r, center, model, material, color='BLEUx', number=None): ''' usage: @@ -136,7 +137,7 @@ return body
    -
    [docs]def rigidCylinder(r, h, center, model, material, color='BLEUx', number=None, is_Hollow=False): +
    [docs]def rigidCylinder(r, h, center, model, material, color='BLEUx', number=None, is_Hollow=False): ''' usage: @@ -174,7 +175,7 @@ return body
    -
    [docs]def rigidJonc(axe1, axe2, center, model, material, color='BLEUx', number=None): +
    [docs]def rigidJonc(axe1, axe2, center, model, material, color='BLEUx', number=None): ''' usage: @@ -207,7 +208,7 @@ return body
    -
    [docs]def rigidPlan(axe1, axe2, axe3, center, model, material, color='BLEUx', number=None): +
    [docs]def rigidPlan(axe1, axe2, axe3, center, model, material, color='BLEUx', number=None): ''' usage: @@ -243,7 +244,7 @@ return body
    -
    [docs]def rigidCluster(r, center, nb_disk, model, material, color='BLEUx', number=None): +
    [docs]def rigidCluster(r, center, nb_disk, model, material, color='BLEUx', number=None): ''' usage: @@ -274,7 +275,7 @@ # definition de la liste des contacteurs du cluster : # on calcule le rayon d'un contacteur disque r_disk = r*math.sin(math.pi/nb_disk)/(1. + math.sin(math.pi/nb_disk)) - for i in xrange(0, nb_disk, 1): + for i in xrange(0, nb_disk, 1): # on calcule la position de son centre par rapport au centre d'inertie x_disk = (r_disk - r)*math.cos(2.*math.pi*i/nb_disk) y_disk = (r_disk - r)*math.sin(2.*math.pi*i/nb_disk) @@ -284,7 +285,7 @@ return body
    -
    [docs]def rigidPolygon( model, material, center, theta=0., color='BLEUx', generation_type='regular', nb_vertices=0, vertices=None, radius=1., number=None): +
    [docs]def rigidPolygon( model, material, center, theta=0., color='BLEUx', generation_type='regular', nb_vertices=0, vertices=None, radius=1., number=None): ''' usage: @@ -338,7 +339,7 @@ # on cree une matrice de double a la bonne taille vertices = numpy.zeros([nb_vertices, 2], 'd') # on calcule les positions des sommets par rapport au centre d'inertie - for i in xrange(0, nb_vertices, 1): + for i in xrange(0, nb_vertices, 1): vertices[i, 0] = radius*math.cos(2.*math.pi*i/float(nb_vertices)) vertices[i, 1] = radius*math.sin(2.*math.pi*i/float(nb_vertices)) @@ -354,7 +355,7 @@ nb_vertices=vertices.shape[0] nvertices = numpy.zeros([2*nb_vertices, 2], 'd') inv=0 - for i in xrange(0, nb_vertices): + for i in xrange(0, nb_vertices): j=(i+1) % nb_vertices #print 'cote ',i,' de ',i,' a ',j xb = vertices[i,:] @@ -362,11 +363,11 @@ v = vertices[j,:] - xb #print inv nvertices[inv,:]=xb + 0.1*v - print nvertices[inv,0],nvertices[inv,1] + print nvertices[inv,0],nvertices[inv,1] inv+=1 #print inv nvertices[inv,:]=xb + 0.9*v - print nvertices[inv,0],nvertices[inv,1] + print nvertices[inv,0],nvertices[inv,1] inv+=1 # ajout de son contacteur au polygone @@ -387,7 +388,7 @@ return body
    [docs]def rigidPolyhedron(model, material, center=numpy.zeros(3), color='BLEUx', generation_type='regular', - nb_vertices=0, vertices=None, faces=None, radius=1., tol=0., number=None, seed=None): + nb_vertices=0, vertices=None, faces=None, radius=1., tol=0., number=None, seed=None): ''' usage: @@ -507,7 +508,7 @@ # on renvoie le corps genere return body
    -
    [docs]def deformableParticle2D(r, center, type_part, model, material, color='BLEUx', number=None): +
    [docs]def deformableParticle2D(r, center, type_part, model, material, color='BLEUx', number=None): """ usage: @@ -806,7 +807,7 @@ #################################################################################### # EXOTIC PURPOSE # -
    [docs]def rigidDiscreteDisk(r, center, model, material, color='BLEUx', number=None): +
    [docs]def rigidDiscreteDisk(r, center, model, material, color='BLEUx', number=None): '''body=rigidDiscreteDisk(r, center, model, material, color='BLEUx', number=None): this function builds a rigid cluster of diskx contained in a disk and returns the generated body @@ -960,7 +961,7 @@ # variables optionnelles # - theta : rotation du disque autour de son centre d'inertie # - color : couleur du polygone -
    [docs]def rigidOvoidPolygon(ra, rb, nb_vertices, center, model, material, theta=0., color='BLEUx', number=None): +
    [docs]def rigidOvoidPolygon(ra, rb, nb_vertices, center, model, material, theta=0., color='BLEUx', number=None): ''' usage : @@ -994,7 +995,7 @@ # definition du contacteur pour le polygone : vertices = numpy.zeros([nb_vertices, 2], 'd') # on caclule les positions des sommets par rapport au centre d'inertie - for i in xrange(0, nb_vertices, 1): + for i in xrange(0, nb_vertices, 1): vertices[i, 0] = ra*math.cos(2.*math.pi*i/float(nb_vertices)) vertices[i, 1] = rb*math.sin(2.*math.pi*i/float(nb_vertices)) body.addContactors(shape='POLYG', color=color, nb_vertices=nb_vertices, vertices=vertices) @@ -1022,7 +1023,7 @@ try: - from scipy.spatial import Delaunay, ConvexHull + from scipy.spatial import Delaunay, ConvexHull chu = ConvexHull(vertices) ver = vertices[chu.vertices] @@ -1090,14 +1091,14 @@ # adding new points # but storing unused vertices v_to_remove = [] - for i_vert in xrange(4,vertices.shape[0]): + for i_vert in xrange(4,vertices.shape[0]): new_faces = [] new_normals = [] potential_edges = [] - print i_vert, normals - for i_face in xrange(len(faces)): + print i_vert, normals + for i_face in xrange(len(faces)): # if the new point is not seen by the face: store edges, otherwise store the face if numpy.dot( normals[i_face], vertices[faces[i_face][0]-1,:]-vertices[i_vert,:] ) < 0: potential_edges.append( [faces[i_face][0], faces[i_face][1] ] ) @@ -1152,7 +1153,7 @@ return faces, vertices -def getRandomPolyhedronVertices(nb_vertices, radius, tol, seed=None): +def getRandomPolyhedronVertices(nb_vertices, radius, tol, seed=None): """ vertices = getRandomPolyhedronVertices(nb_vertices, radius, tol, s=None) Generate randomly disposed vertices on a sphere @@ -1168,7 +1169,7 @@ - seed=None : seed to use to control the randomness """ - if seed is not None : numpy.random.seed(s) + if seed is not None : numpy.random.seed(s) vertices = numpy.random.rand(nb_vertices, 3) vertices[:,0] = radius @@ -1185,8 +1186,8 @@ # looking for points to close from others to_remove = [] - for i in xrange(nb_vertices): - for j in xrange(i+1,nb_vertices): + for i in xrange(nb_vertices): + for j in xrange(i+1,nb_vertices): n = numpy.linalg.norm(vertices[i,:]) - numpy.linalg.norm(vertices[j,:]) if abs(n) < tol: to_remove.append(i) @@ -1196,7 +1197,7 @@ count = 0 new_new_vertices = numpy.zeros([nb_vertices-len(to_remove),3]) - for i in xrange(nb_vertices): + for i in xrange(nb_vertices): if i in to_remove: count += 1 continue @@ -1291,7 +1292,7 @@ # trying to find spherical resolution to match the desired number of vertices - x = int(math.floor(math.sqrt(nb_vertices/2))) + x = int(math.floor(math.sqrt(nb_vertices//2))) # if number of vertices fall into platon polyhedron: if 2*x*x+2 in [4,6,8,12,20]: @@ -1324,7 +1325,7 @@ return vertices ######################################################################################################## -def MOS2Polygon(ra, rb, center, model, material, theta=0., number=None): +def MOS2Polygon(ra, rb, center, model, material, theta=0., number=None): ''' usage: @@ -1439,13 +1440,13 @@
  • modules |
  • - - + +
    \ No newline at end of file diff --git a/docs/Pre/_modules/pylmgc90/pre/build_avatar/tools/containers2D.html b/docs/Pre/_modules/pylmgc90/pre/build_avatar/tools/containers2D.html index baf33ebb041f688fb5071b9eb217d34ff3b4394f..ab7a9f78d02f84bf6339aea31e633f6fd82ed126 100644 --- a/docs/Pre/_modules/pylmgc90/pre/build_avatar/tools/containers2D.html +++ b/docs/Pre/_modules/pylmgc90/pre/build_avatar/tools/containers2D.html @@ -6,7 +6,7 @@ - pylmgc90.pre.build_avatar.tools.containers2D — pylmgc90.pre 2015.2 documentation + pylmgc90.pre.build_avatar.tools.containers2D — pylmgc90.pre 2017.rc1 documentation @@ -14,17 +14,18 @@ - - + + @@ -50,7 +51,7 @@ # module fournissant des macros de depot dans des conteneurs predifnis # import du module permettant de savoir si on pourra importer les pre_tools -from pylmgc90.pre.utilities.check_compiled_modules import * +from pylmgc90.pre.utilities.check_compiled_modules import * # import des des wrappers des anciens pre-processeurs pour les milieux granualaires @@ -58,7 +59,7 @@ if import_lmgc90(): # on essaye try: - from pylmgc90.chipy import lmgc90 + from pylmgc90.chipy import lmgc90 except: raise @@ -68,7 +69,7 @@ # ATTENTION : radii peut etret modifie suite a l'appel a ces fonctions! # fonction qui depose les particules dans une boite rectangulaire -
    [docs]def depositInBox2D(radii, lx, ly, deposited_radii=None, deposited_coor=None): +
    [docs]def depositInBox2D(radii, lx, ly, deposited_radii=None, deposited_coor=None): '''[nb_remaining_particles, coor]=depositInBox2D(radii, lx, ly, deposited_radii=None, deposited_coor=None): this function deposits circular particles in a box @@ -105,7 +106,7 @@ # on depose les grains sous gravite # si on a donne une liste de particules deja presentes dans la boite - if (deposited_radii != None and deposited_coor != None): + if (deposited_radii != None and deposited_coor != None): # on utilise la methode qui en tient compte coor=lmgc90.deposit2D_GravityAndBigParticles(radii, lx, deposited_radii, deposited_coor, 2*nb_particles) @@ -127,7 +128,7 @@ return [nb_remaining_particles, coor]
    # fonction qui depose les particules dans un dique -
    [docs]def depositInDisk2D(radii, r, deposited_radii=None, deposited_coor=None): +
    [docs]def depositInDisk2D(radii, r, deposited_radii=None, deposited_coor=None): '''[nb_remaining_particles, coor]=depositInDisk2D(radii, r, deposited_radii=None, deposited_coor=None): this function deposits circular particles in a circular container @@ -157,7 +158,7 @@ # on realise un depot sous gravite, dans une boite de largueur 2.*r # si on a donne une liste de particules deja presentes dans la boite - if (deposited_radii != None and deposited_coor != None): + if (deposited_radii != None and deposited_coor != None): # on utilise la methode qui en tient compte coor=lmgc90.deposit2D_GravityAndBigParticles(radii, 2.*r, deposited_radii, deposited_coor, 2*nb_particles) @@ -168,7 +169,7 @@ # on definit un contour circulaire, de rayon r et centre en [r, r] slope_coor=numpy.zeros(160, 'd') - for i in xrange(0, 80, 1): + for i in xrange(0, 80, 1): slope_coor[2*i]=r + r*math.cos(math.pi*(1. - i*0.025)) slope_coor[2*i + 1]=r + r*math.sin(math.pi*(1. - i*0.025)) # on enleve les grains hors du contour @@ -180,7 +181,7 @@ # fonction qui depose les particules dans un "cylindre", pour un cisaillement # de Couette -
    [docs]def depositInCouette2D(radii, rint, rext, deposited_radii=None, deposited_coor=None): +
    [docs]def depositInCouette2D(radii, rint, rext, deposited_radii=None, deposited_coor=None): '''[nb_remaining_particles, coor]=depositInCouetteD(radii, rint, rext, deposited_radii=None, deposited_coor=None): this function deposits circular particles in container designed for a Couette shear @@ -217,7 +218,7 @@ big_radii=numpy.array([rint]) big_coor=numpy.array([rext, rext]) # si on a donne une liste de grosses particules a ajouter au depot - if (deposited_radii != None and deposited_coor != None): + if (deposited_radii != None and deposited_coor != None): # on les ajoute big_radii=numpy.concatenate( (big_radii, deposited_radii) ) big_coor=numpy.concatenate( (big_coor, deposited_coor) ) @@ -228,7 +229,7 @@ # N.B.: on definit dans un container legerement plus petit, pour eliminer les # les interpentrations avec le cylindre exterieur slope_coor=numpy.zeros(162, 'd') - for i in xrange(0, 81, 1): + for i in xrange(0, 81, 1): slope_coor[2*i]=rext + (rext - radius_max)*math.cos(math.pi*(1. - i*0.025)) slope_coor[2*i + 1]=rext + (rext - radius_max)*math.sin(math.pi*(1. - i*0.025)) @@ -240,7 +241,7 @@ return [nb_remaining_particles, coor]
    # fonction qui depose les particules de sorte a remplir un demi-tambour -
    [docs]def depositInDrum2D(radii, r, deposited_radii=None, deposited_coor=None): +
    [docs]def depositInDrum2D(radii, r, deposited_radii=None, deposited_coor=None): '''[nb_remaining_particles, coor]=depositInDrum2D(radii, deposited_radii=None, deposited_coor=None): this function deposits circular particles in the lower half part of a drum @@ -276,7 +277,7 @@ # on realise un depot sous gravite, dans une boite de largueur 2.*r # si on a donne une liste de particules deja presentes dans la boite - if (deposited_radii != None and deposited_coor != None): + if (deposited_radii != None and deposited_coor != None): # on utilise la methode qui en tient compte coor=lmgc90.deposit2D_GravityAndBigParticles(radii, 2.*r, deposited_radii, deposited_coor, 2*nb_particles) @@ -294,7 +295,7 @@ # - un demi-cercle pour decrire le fond du demi-tambour # N.B.: on definit dans un container legerement plus petit, pour eliminer les # les interpentrations avec la paroi - for i in xrange(0, 41, 1): + for i in xrange(0, 41, 1): slope_coor[2*(i + 1)]=r + (r - radius_max)*math.cos(math.pi*i*0.025) slope_coor[2*(i + 1) + 1]=r - (r - radius_max)*math.sin(math.pi*i*0.025) @@ -334,13 +335,13 @@
  • modules |
  • - - + +
    \ No newline at end of file diff --git a/docs/Pre/_modules/pylmgc90/pre/build_avatar/tools/containers3D.html b/docs/Pre/_modules/pylmgc90/pre/build_avatar/tools/containers3D.html index 95b10220f9706009ef1d150fef038f5d646dc2ee..3b25d5b9f9b0faeb0e637a921a8d4de7baa304e3 100644 --- a/docs/Pre/_modules/pylmgc90/pre/build_avatar/tools/containers3D.html +++ b/docs/Pre/_modules/pylmgc90/pre/build_avatar/tools/containers3D.html @@ -6,7 +6,7 @@ - pylmgc90.pre.build_avatar.tools.containers3D — pylmgc90.pre 2015.2 documentation + pylmgc90.pre.build_avatar.tools.containers3D — pylmgc90.pre 2017.rc1 documentation @@ -14,17 +14,18 @@ - - + + @@ -50,7 +51,7 @@ # module fournissant des macros de depot dans des conteneurs predifnis # import du module permettant de savoir si on pourra importer les pre_tools -from pylmgc90.pre.utilities.check_compiled_modules import * +from pylmgc90.pre.utilities.check_compiled_modules import * # import des des wrappers des anciens pre-processeurs pour les milieux granualaires @@ -58,12 +59,12 @@ if import_lmgc90(): # on essaye try: - from pylmgc90.chipy import lmgc90 + from pylmgc90.chipy import lmgc90 except: raise # fonction qui depose les particules dans une boite paralepipedique -
    [docs]def depositInBox3D(radii, lx, ly, lz, deposited_radii=None, deposited_coor=None, seed=None): +
    [docs]def depositInBox3D(radii, lx, ly, lz, deposited_radii=None, deposited_coor=None, seed=None): '''[nb_remaining_particles, coor]=depositInBox3D(radii, lx, ly, lz, deposited_radii=None, deposited_coor=None): this function deposits spherical particles in a box @@ -97,15 +98,15 @@ # on depose les grains sous gravite dans la boite : # l'appel varie en fonction de la presence ou non de particules deja deposees - if deposited_radii == None and deposited_coor == None: # cas sans particules - if seed is not None: + if deposited_radii == None and deposited_coor == None: # cas sans particules + if seed is not None: nb_comp_particles, coor=lmgc90.deposit3D_Box(radii, lx, ly, lz, 3*nb_particles, seed) else: nb_comp_particles, coor=lmgc90.deposit3D_Box(radii, lx, ly, lz, 3*nb_particles) - elif deposited_radii != None and deposited_coor != None: # cas avec particules + elif deposited_radii != None and deposited_coor != None: # cas avec particules # deja deposees - if seed is not None: + if seed is not None: nb_comp_particles, coor=lmgc90.deposit3D_HeterogeneousBox(radii, lx, ly, lz, deposited_radii, deposited_coor, @@ -124,7 +125,7 @@ return [nb_comp_particles, coor]
    # fonction qui depose les particules dans une boite cylindrique -
    [docs]def depositInCylinder3D(radii, R, lz, deposited_radii=None, deposited_coor=None, seed=None): +
    [docs]def depositInCylinder3D(radii, R, lz, deposited_radii=None, deposited_coor=None, seed=None): '''[nb_remaining_particles, coor]=depositInCylinder3D(radii, R, lz, deposited_radii=None, deposited_coor=None, seed=None): this function deposits spherical particles in a cylinder @@ -156,15 +157,15 @@ nb_particles=len(radii) # on depose les grains sous gravite dans le cylindre : # l'appel varie en fonction de la presence ou non de particules deja deposees - if deposited_radii == None and deposited_coor == None: # cas sans particules - if seed is not None: + if deposited_radii == None and deposited_coor == None: # cas sans particules + if seed is not None: nb_comp_particles, coor=lmgc90.deposit3D_Cylinder(radii, R, lz, 3*nb_particles, seed) else: nb_comp_particles, coor=lmgc90.deposit3D_Cylinder(radii, R, lz, 3*nb_particles) - elif deposited_radii != None and deposited_coor != None: # cas avec particules + elif deposited_radii != None and deposited_coor != None: # cas avec particules # deja deposees - if seed is not None: + if seed is not None: nb_comp_particles, coor=lmgc90.deposit3D_HeterogeneousCylinder(radii, R, lz, deposited_radii, deposited_coor, @@ -182,7 +183,7 @@ return [nb_comp_particles, coor]
    # fonction qui depose les particules dans une boite spherique -
    [docs]def depositInSphere3D(radii, R, center, deposited_radii=None, deposited_coor=None, seed=None): +
    [docs]def depositInSphere3D(radii, R, center, deposited_radii=None, deposited_coor=None, seed=None): '''[nb_remaining_particles, coor]=depositInSphere3D(radii, R, center, deposited_radii=None, deposited_coor=None, seed=None): this function deposits spherical particles in a cylinder @@ -215,15 +216,15 @@ # on depose les grains sous gravite dans la sphere : # l'appel varie en fonction de la presence ou non de particules deja deposees - if deposited_radii == None and deposited_coor == None: # cas sans particules - if seed is not None: + if deposited_radii == None and deposited_coor == None: # cas sans particules + if seed is not None: nb_comp_particles, coor=lmgc90.deposit3D_Sphere(radii, R, center, 3*nb_particles, seed) else: nb_comp_particles, coor=lmgc90.deposit3D_Sphere(radii, R, center, 3*nb_particles) - elif deposited_radii != None and deposited_coor != None: # cas avec particules + elif deposited_radii != None and deposited_coor != None: # cas avec particules # deja deposees - if seed is not None: + if seed is not None: nb_comp_particles, coor=lmgc90.deposit3D_HeterogeneousSphere(radii, R, center, deposited_radii, deposited_coor, @@ -271,13 +272,13 @@
  • modules |
  • - - + +
    \ No newline at end of file diff --git a/docs/Pre/_modules/pylmgc90/pre/build_avatar/tools/granulometry.html b/docs/Pre/_modules/pylmgc90/pre/build_avatar/tools/granulometry.html index 7380fde02275a3adcf914cbf8724215f61eab26a..36928e298a36ccc612a0efb4eb32438052ba8362 100644 --- a/docs/Pre/_modules/pylmgc90/pre/build_avatar/tools/granulometry.html +++ b/docs/Pre/_modules/pylmgc90/pre/build_avatar/tools/granulometry.html @@ -6,7 +6,7 @@ - pylmgc90.pre.build_avatar.tools.granulometry — pylmgc90.pre 2015.2 documentation + pylmgc90.pre.build_avatar.tools.granulometry — pylmgc90.pre 2017.rc1 documentation @@ -14,17 +14,18 @@ - - + + @@ -60,36 +61,36 @@ assert radius > 0., "radius must be greater than 0." return numpy.ones(nb,numpy.float_)*radius
    -
    [docs]def granulo_Random(nb, r_min, r_max, seed=None): +
    [docs]def granulo_Random(nb, r_min, r_max, seed=None): """Generates a list of radii bewteen r_min and r_max following a uniform distribution in number""" assert r_min <= r_max, "r_min must be inferior to r_max" assert r_min > 0., "r_min must be greater than 0." - if seed is not None: numpy.random.seed(seed) + if seed is not None: numpy.random.seed(seed) return numpy.random.uniform(r_min,r_max, nb)
    -
    [docs]def granulo_Uniform(nb, r_min, r_max, seed=None): +
    [docs]def granulo_Uniform(nb, r_min, r_max, seed=None): """Generates a list of radii between r_min and r_max following a uniform distribution in surface""" assert r_min <= r_max, "r_min must be inferior to r_max" assert r_min > 0., "r_min must be greater than 0." - if seed is not None: numpy.random.seed(seed) + if seed is not None: numpy.random.seed(seed) return r_max*r_min/( r_min + r_max - numpy.random.uniform(r_min,r_max,nb) )
    -
    [docs]def granulo_TwoSizesNumber(nb, r_min, r_max, p_min, seed=None): +
    [docs]def granulo_TwoSizesNumber(nb, r_min, r_max, p_min, seed=None): """Generates a granulometry composed of two radii, r_min and r_max. The distribution is binomial in number""" assert r_min <= r_max, "r_min must be inferior to r_max" assert r_min > 0., "r_min must be greater than 0." - if seed is not None: numpy.random.seed(seed) + if seed is not None: numpy.random.seed(seed) #a = numpy.random.binomial(1,p_min,[nb]) #g = numpy.vectorize(lambda x: r_min if x==1 else r_max, [numpy.float_]) @@ -98,7 +99,7 @@ g = numpy.where(g < p_min, r_min, r_max) return g
    -
    [docs]def granulo_TwoSizesVolume(nb, r_min, r_max, p_min, seed=None): +
    [docs]def granulo_TwoSizesVolume(nb, r_min, r_max, p_min, seed=None): """Generates a granulometry composed of two radii, r_min and r_max. The distribution is binomial in surface""" @@ -113,7 +114,7 @@ return numpy.loadtxt(name,'d')
    -def granulo_BetaDistribution(r_min, r_max, nb_t, vol, a, b, seed=None): +def granulo_BetaDistribution(r_min, r_max, nb_t, vol, a, b, seed=None): """Generates a granulometry curve between r_min and r_max in a volume vol using a Beta function split in nb_t slices. a and b parameters are driving the shape of the distribution. @@ -123,7 +124,7 @@ assert r_min <= r_max, "r_min must be inferior to r_max" assert r_min > 0., "r_min must be greater than 0." - if seed is not None: numpy.random.seed(seed) + if seed is not None: numpy.random.seed(seed) R3 = 3.*vol/(4.*math.pi) dr = (r_max-r_min) / nb_t @@ -131,7 +132,7 @@ beta_old = 0. g = [] gr = numpy.array([],numpy.float_) - for i in xrange(1,nb_t+1): + for i in xrange(1,nb_t+1): beta = scipy.special.betainc(a,b,i*1./nb_t) @@ -147,7 +148,7 @@ numpy.random.shuffle(gr) return gr -if __name__ == "__main__": +if __name__ == "__main__": import time nb = 100000 @@ -161,38 +162,38 @@ t1 = time.time() mono = granulo_Monodisperse(nb,ra) - print time.time()-t1 + print time.time()-t1 assert numpy.all(mono == ra) t1 = time.time() rand = granulo_Random(nb,ra,rb) - print time.time()-t1 + print time.time()-t1 t1 = time.time() unif = granulo_Uniform(nb,ra,rb) - print time.time()-t1 + print time.time()-t1 t1 = time.time() twos = granulo_TwoSizesNumber(nb,ra,rb,pm) - print time.time()-t1 + print time.time()-t1 t1 = time.time() twov = granulo_TwoSizesVolume(nb,ra,rb,pm) - print time.time()-t1 + print time.time()-t1 numpy.savetxt(fname,twov) t1 = time.time() read = granulo_ReadFromFile(fname) - print time.time()-t1 + print time.time()-t1 assert numpy.all(twov==read) t1 = time.time() ra=4.e-3; rb=1.e-2; V=1.e-3; a=b=1;nb_t=10 beta = granulo_BetaThing(ra,rb,nb_t,V,a,b) - print time.time()-t1 + print time.time()-t1 try: - import matplotlib.pyplot as plt + import matplotlib.pyplot as plt plt.figure(1) @@ -200,7 +201,7 @@ plt.plot(mono) dist = [rand, unif, twos, twov, read] - if beta != None : + if beta != None : dist.append(beta) for i, d in enumerate(dist): @@ -240,13 +241,13 @@
  • modules |
  • - - + +
    \ No newline at end of file diff --git a/docs/Pre/_modules/pylmgc90/pre/build_avatar/walls.html b/docs/Pre/_modules/pylmgc90/pre/build_avatar/walls.html index 0141c3839a7a15b09e9e702677cb2cf8696bffd7..cb5f8b3fc6a07eda07ded997bcd5f593461f9514 100644 --- a/docs/Pre/_modules/pylmgc90/pre/build_avatar/walls.html +++ b/docs/Pre/_modules/pylmgc90/pre/build_avatar/walls.html @@ -6,7 +6,7 @@ - pylmgc90.pre.build_avatar.walls — pylmgc90.pre 2015.2 documentation + pylmgc90.pre.build_avatar.walls — pylmgc90.pre 2017.rc1 documentation @@ -14,17 +14,18 @@ - - + + @@ -52,15 +53,15 @@ import numpy import math -from pylmgc90.pre.avatar.avatar import * -from pylmgc90.pre.avatar.bulk.rigid2d import * +from pylmgc90.pre.avatar.avatar import * +from pylmgc90.pre.avatar.bulk.rigid2d import * # import du module qui calcule les coordonnees de points sur un reseau 2D, pour contruire des parois rugueuses 3D -from lattices2D import * -from tools.granulometry import * +from lattices2D import * +from tools.granulometry import * # import du module permettant de savoir si on pourra importer les pre_tools -from pylmgc90.pre.utilities.check_compiled_modules import * +from pylmgc90.pre.utilities.check_compiled_modules import * # import des fonctions pour tirer les particules suivant une granulo donnee @@ -68,7 +69,7 @@ if import_lmgc90(): # on essaye try: - from pylmgc90.chipy import lmgc90 + from pylmgc90.chipy import lmgc90 except: raise @@ -84,7 +85,7 @@ # - theta : rotation du mur autour de son centre d'inertie # - nb_vertex : si nb_vertex >= 3 les particules sont des polygones reguliers a nb_vertex cotes, # - color : couleur d'un disque -
    [docs]def roughWall(center, l, r, model, material, theta=0., color='WALLx', nb_vertex=0, number=None): +
    [docs]def roughWall(center, l, r, model, material, theta=0., color='WALLx', nb_vertex=0, number=None): '''body=roughWall(center, l, r, model, material, theta=0., color='WALLx', nb_vertex=0, number=None): this function builds a 2D rough wall: it returns a body made of a cluster of disks or polygons @@ -134,7 +135,7 @@ # on en pose un au milieu body.addContactors(shape='DISKx', color=color, byrd=r, shift=[0., 0.]) # on pose les autres contacteurs autour - for i in xrange(1, nb_disk/2 + 1, 1): + for i in xrange(1, nb_disk//2 + 1, 1): # disque de gauche body.addContactors(shape='DISKx', color=color, byrd=r, shift=[-2*i*r, 0.]) # disque de droite @@ -142,7 +143,7 @@ # sinon else: # on pose les contacteurs de part et d'autre du centre d'inertie - for i in xrange(0, nb_disk/2, 1): + for i in xrange(0, nb_disk//2, 1): # disque de gauche body.addContactors(shape='DISKx', color=color, byrd=r, shift=[-(2*i + 1)*r, 0.]) # disque de droite @@ -157,7 +158,7 @@ # definition du contacteur pour le polygone : vertices = numpy.zeros([nb_vertex, 2], 'd') - for i in xrange(0, nb_vertex, 1): + for i in xrange(0, nb_vertex, 1): vertices[i, 0] = r*math.cos(2.*math.pi*i/float(nb_vertex)) vertices[i, 1] = r*math.sin(2.*math.pi*i/float(nb_vertex)) @@ -167,7 +168,7 @@ # on en pose un au milieu body.addContactors(shape='POLYG', color=color, nb_vertices=nb_vertex, vertices=vertices) # on pose les autres contacteurs autour - for i in xrange(1, nb_polyg/2 + 1, 1): + for i in xrange(1, nb_polyg//2 + 1, 1): # polygone de gauche # on decalre le tableau qui va servir a stocker les coordonnees des sommets du contacteur polygone @@ -192,7 +193,7 @@ # sinon else: # on pose les contacteurs de part et d'autre du centre d'inertie - for i in xrange(0, nb_polyg/2, 1): + for i in xrange(0, nb_polyg//2, 1): # polygone de gauche # on decalre le tableau qui va servir a stocker les coordonnees des sommets du contacteur polygone @@ -237,7 +238,7 @@ # - theta : rotation du mur autour de son centre d'inertie # - nb_vertex : si nb_vertex >= 3 les particules sont des polygones reguliers a nb_vertex cotes, # - color : couleur d'un disque -
    [docs]def fineWall(center, l, r, model, material, theta=0., color='WALLx', nb_vertex=0, number=None): +
    [docs]def fineWall(center, l, r, model, material, theta=0., color='WALLx', nb_vertex=0, number=None): '''body=roughWall(center, l, r, model, material, theta=0., color='WALLx', nb_vertex=0, number=None): this function builds a 2D not too rough wall: it returns a body made of a cluster @@ -286,7 +287,7 @@ # on en pose un au milieu body.addContactors(shape='DISKx', color=color, byrd=r, shift=[0., 0.]) # on pose les autres contacteurs autour - for i in xrange(1, nb_disk/2 + 1, 1): + for i in xrange(1, nb_disk//2 + 1, 1): # disque de gauche body.addContactors(shape='DISKx', color=color, byrd=r, shift=[-2*i*r, 0.]) body.addContactors(shape='DISKx', color=color, byrd=r, shift=[-(2*i - 1)*r, 0.]) @@ -304,7 +305,7 @@ # definition du contacteur pour le polygone : vertices = numpy.zeros([nb_vertex, 2], 'd') - for i in xrange(0, nb_vertex, 1): + for i in xrange(0, nb_vertex, 1): vertices[i, 0] = r*math.cos(2.*math.pi*i/float(nb_vertex)) vertices[i, 1] = r*math.sin(2.*math.pi*i/float(nb_vertex)) @@ -312,7 +313,7 @@ # on en pose un au milieu body.addContactors(shape='POLYG', color=color, nb_vertices=nb_vertex, vertices=vertices) # on pose les autres contacteurs autour - for i in xrange(1, nb_polyg/2 + 1, 1): + for i in xrange(1, nb_polyg//2 + 1, 1): # polygone de gauche # on decalre le tableau qui va servir a stocker les coordonnees des sommets du contacteur polygone @@ -379,7 +380,7 @@ # variables optionnelles # - theta : rotation du mur autour de son centre d'inertie # - color : couleur d'un disque -
    [docs]def smoothWall(center, l, h, nb_polyg, model, material, theta=0., color='WALLx', number=None): +
    [docs]def smoothWall(center, l, h, nb_polyg, model, material, theta=0., color='WALLx', number=None): '''body=RoughWall(center, l, h, nb_polyg, model, material, theta=0., color='WALLx', number=None): this function builds a 2D smooth wall: it returns a body made of a cluster of rectangular polygons @@ -443,7 +444,7 @@ vertices=vertices) # on pose les autres briques autour - for i in xrange(1, nb_polyg/2 + 1, 1): + for i in xrange(1, nb_polyg//2 + 1, 1): # brique de gauche # on cree une matrice a la bonne taille @@ -484,7 +485,7 @@ # sinon else: # on pose les contacteurs de part et d'autre du centre d'inertie - for i in xrange(0, nb_polyg/2, 1): + for i in xrange(0, nb_polyg//2, 1): # brique de gauche # on cree une matrice a la bonne taille @@ -549,7 +550,7 @@ # - color : couleur d'un disque # - nb_vertex: nombre de sommet; si inf a 3 alors disque # -
    [docs]def granuloRoughWall(center, l, rmin, rmax, model, material, theta=0., color='WALLx', nb_vertex=0, seed=None): +
    [docs]def granuloRoughWall(center, l, rmin, rmax, model, material, theta=0., color='WALLx', nb_vertex=0, seed=None): '''body=granuloRoughWall(center, l, rmin, rmax, model, material, theta=0., color='WALLx', nb_vertex=0, seed=None): this function builds a 2D rough wall: it returns a body made of a cluster @@ -646,7 +647,7 @@ # courant vertices = numpy.zeros([nb_vertex, 2], 'd') # pour chaque sommet du polygone - for j in xrange(0, nb_vertex, 1): + for j in xrange(0, nb_vertex, 1): # on calcule l'abscisse du sommet courant vertices[j, 0] = radii[i]*math.cos(2.*math.pi*j/float(nb_vertex)) + xshift # on calcule l'ordonnee du sommet courant @@ -708,12 +709,12 @@ # on calcule la taille de la boite englobante de ce reseau [bx, by]=sizeBoundingBoxTriangularLattice2D(nb_ele=nb_ele, nb_layer=nb_layer, l=2.*r, orientation=orientation) - print "lx=", lx - print "ly=", ly - print "nb_ele=", nb_ele - print "nb_layer=", nb_layer - print "bx=", bx - print "by=", by + print "lx=", lx + print "ly=", ly + print "nb_ele=", nb_ele + print "nb_layer=", nb_layer + print "bx=", bx + print "by=", by # on calcule les coordonnees des points du reseau 2D, en poisitionnant son centre en (0, 0) coor=triangularLattice2D(nb_ele=nb_ele, nb_layer=nb_layer, l=2.*r, x0=-0.5*bx, y0=-0.5*by, orientation=orientation) @@ -741,7 +742,7 @@ return body
    # fonction qui contruit une paroi rugueuse 3D -
    [docs]def granuloRoughWall3D(center, lx, ly, rmin, rmax, model, material, color='WALLx', seed=None): +
    [docs]def granuloRoughWall3D(center, lx, ly, rmin, rmax, model, material, color='WALLx', seed=None): '''body=granuloRoughWall3D(center, l, rmin, rmax, model, material, color='WALLx', seed=None): this function builds a 3D rough wall using the same granulometry than the sample: @@ -803,7 +804,7 @@ # The Dallas team: Rudy/jr : 27.02.2013 # Double paroi polygones/carres pour eviter que les particules ne s'echapent a travers les polygones -def granuloDoubleRoughWall(center, l, rmin, rmax, model, material, theta=0., color='WALLx', nb_vertices=0, seed=None): +def granuloDoubleRoughWall(center, l, rmin, rmax, model, material, theta=0., color='WALLx', nb_vertices=0, seed=None): '''body=granuloRoughWall(center, l, rmin, rmax, model, material, theta=0., color='WALLx', nb_verices=0, seed=None): this function builds a 2D rough wall: it returns a body made of a cluster @@ -884,7 +885,7 @@ vertices_2 = numpy.zeros([nb_vertices_2, 2], 'd') - for j in xrange(0, nb_vertices_2, 1): + for j in xrange(0, nb_vertices_2, 1): # on calcule l'abscisse du sommet courant vertices_2[j, 0] = rmax*math.cos(2.*math.pi*j/float(nb_vertices_2)+(math.pi/4)) + xshift_2 # on calcule l'ordonnee du sommet courant @@ -935,7 +936,7 @@ vertices_2 = numpy.zeros([nb_vertices_2, 2], 'd') # pour chaque sommet du polygone - for j in xrange(0, nb_vertices, 1): + for j in xrange(0, nb_vertices, 1): # on calcule l'abscisse du sommet courant vertices[j, 0] = radii[i]*math.cos(2.*math.pi*j/float(nb_vertices)) + xshift # on calcule l'ordonnee du sommet courant @@ -998,13 +999,13 @@
  • modules |
  • - - + +
    \ No newline at end of file diff --git a/docs/Pre/_modules/pylmgc90/pre/bulk_behavs.html b/docs/Pre/_modules/pylmgc90/pre/bulk_behavs.html index 10167348996a4fe2083f2b2f485140fe67b4967d..3bdeb49c8d7ac8432577d30a72e50e47a20c5f61 100644 --- a/docs/Pre/_modules/pylmgc90/pre/bulk_behavs.html +++ b/docs/Pre/_modules/pylmgc90/pre/bulk_behavs.html @@ -6,7 +6,7 @@ - pylmgc90.pre.bulk_behavs — pylmgc90.pre 2015.2 documentation + pylmgc90.pre.bulk_behavs — pylmgc90.pre 2017.rc1 documentation @@ -14,17 +14,18 @@ - - + + @@ -47,8 +48,8 @@

    Source code for pylmgc90.pre.bulk_behavs

    -from utilities.container import *
    -from shared import bulk_behav
    +from utilities.container import *
    +from shared import bulk_behav
     
     
    [docs]class materials(mapping_container): """ class materials: @@ -114,13 +115,13 @@
  • modules |
  • - - + +
    \ No newline at end of file diff --git a/docs/Pre/_modules/pylmgc90/pre/models.html b/docs/Pre/_modules/pylmgc90/pre/models.html index 67935de25ac566dc49656908c819fa2928fdc3e3..597c205cf9a1ee7bba5c1da6e54ebaf06544df5d 100644 --- a/docs/Pre/_modules/pylmgc90/pre/models.html +++ b/docs/Pre/_modules/pylmgc90/pre/models.html @@ -6,7 +6,7 @@ - pylmgc90.pre.models — pylmgc90.pre 2015.2 documentation + pylmgc90.pre.models — pylmgc90.pre 2017.rc1 documentation @@ -14,17 +14,18 @@ - - + + @@ -47,8 +48,8 @@

    Source code for pylmgc90.pre.models

    -from utilities.container import *
    -from shared import model
    +from utilities.container import *
    +from shared import model
     
     ##############################################################################
     #
    @@ -144,9 +145,9 @@
            # pour chaque modele du conteneur
            for mod in self:
               # si le type de modele n'est pas dans la liste
    -          if mod.type not in listype:
    +          if mod.physics not in listype:
                  # on l'ajoute a la liste
    -             listype.append(mod.type)
    +             listype.append(mod.physics)
               # sinon
               else:
                  # on affiche un message pour prevenir l'utilisateur
    @@ -223,13 +224,13 @@
             
  • modules |
  • - - + +
    \ No newline at end of file diff --git a/docs/Pre/_modules/pylmgc90/pre/shared/bulk_behav.html b/docs/Pre/_modules/pylmgc90/pre/shared/bulk_behav.html index 7ee3b06ffc67f24d0147a8855e9f998c3351e9f8..2f608697c66a94a29703652b05d5cac77fbf6607 100644 --- a/docs/Pre/_modules/pylmgc90/pre/shared/bulk_behav.html +++ b/docs/Pre/_modules/pylmgc90/pre/shared/bulk_behav.html @@ -6,7 +6,7 @@ - pylmgc90.pre.shared.bulk_behav — pylmgc90.pre 2015.2 documentation + pylmgc90.pre.shared.bulk_behav — pylmgc90.pre 2017.rc1 documentation @@ -14,17 +14,18 @@ - - + + @@ -51,9 +52,9 @@ import sys import numpy -from pylmgc90.pre.utilities.error import * +from pylmgc90.pre.utilities.error import * -from pylmgc90.pre.config.lmgc90dicts import * +from pylmgc90.pre.config.lmgc90dicts import *
    [docs]class material(): """class material() @@ -101,7 +102,7 @@ # on initialise les variables utlisees pour verifier la coherence des matrices d'un modele # discret - dim_matrix=None # dimension de la premiere matrice + dim_matrix=None # dimension de la premiere matrice # pour chaque option for cle in args.keys(): @@ -143,7 +144,7 @@ # on affiche un message d'erreur showError("l'option \"" + cle + "\" doit etre un vecteur a trois composantes (en 3D, ou deux en 2D)!") # si la matrice est la premiere rencontree - if dim_matrix == None: + if dim_matrix == None: # on stocke sa dimension dim_matrix = numpy.size(args[cle]) # sinon, si la mtrice courante n'a pas la meme dimension que la premiere @@ -212,7 +213,7 @@ # sinon, on cherche l'arbre fils qui contient cette valeur dans sa racine # on indique qu'on ne l'a pas encore trouve - found_child = None + found_child = None # pour chaque arbre fils de l'arbre for child in tree.childs: # si le fils courant contient la valeur cherchee @@ -222,7 +223,7 @@ # on quitte la boucle break # si on a trouve l'arbre qui contient la valeur - if found_child != None: + if found_child != None: # on continue la verification en descendant dans par cet arbre self._check(found_child, "value") # sinon, @@ -287,13 +288,13 @@
  • modules |
  • - - + +
    \ No newline at end of file diff --git a/docs/Pre/_modules/pylmgc90/pre/shared/model.html b/docs/Pre/_modules/pylmgc90/pre/shared/model.html index e21021554cf8efe08d47fb5504ad0b4e573a9969..7b0fdb7f9c30084049df64028359ec6b746d1307 100644 --- a/docs/Pre/_modules/pylmgc90/pre/shared/model.html +++ b/docs/Pre/_modules/pylmgc90/pre/shared/model.html @@ -6,7 +6,7 @@ - pylmgc90.pre.shared.model — pylmgc90.pre 2015.2 documentation + pylmgc90.pre.shared.model — pylmgc90.pre 2017.rc1 documentation @@ -14,17 +14,18 @@ - - + + @@ -48,9 +49,9 @@

    Source code for pylmgc90.pre.shared.model

     import sys
    -from pylmgc90.pre.utilities.error    import *
    +from pylmgc90.pre.utilities.error    import *
     
    -from pylmgc90.pre.config.lmgc90dicts import *
    +from pylmgc90.pre.config.lmgc90dicts import *
     #from avatar.node.dof import *
     
     ##############################################################################
    @@ -69,8 +70,8 @@
         """
         
         ## @todo 'nom' a changer en 'name' (en fait verifier l'anglais partout)
    -    def __init__(self, name, physics, element, dimension=None, external_fields=None, external_vfields=None, external_vsizes=None, 
    -                 user_model_name=None, **kargs):
    +    def __init__(self, name, physics, element, dimension=None, external_fields=None, external_vfields=None, external_vsizes=None, 
    +                 user_model_name=None, **kargs):
             """__init__(self, name, physics, element, dimension=None, external_fields=None, external_vfields=None, external_vsizes=None, user_model_name=None, **kargs)
     
             allow to define a model
    @@ -98,7 +99,7 @@
             # ascendante
             
             # si l'utilisateur n'a pas donne la dimension du modele
    -        if dimension == None:
    +        if dimension == None:
                # on affiche un message d'erreur
                showError("you must choose the spatial dimension, by setting the variable \"dimension\"!\n")
     
    @@ -252,7 +253,7 @@
               self.external_vsizes  = []
     
             # si on a donne un nom de modele utilisateur
    -        if user_model_name != None:
    +        if user_model_name != None:
                # on verifie son integrite
     
                # si le champ le nom de modele utilisateur n'est pas une chaine
    @@ -388,7 +389,7 @@
                # sinon, on cherche l'arbre fils qui contient cette valeur dans sa racine
     
                # on indique qu'on ne l'a pas encore trouve
    -           found_child = None
    +           found_child = None
                # pour chaque arbre fils de l'arbre
                for child in tree.childs:
                   # si le fils courant contient la valeur cherchee
    @@ -398,7 +399,7 @@
                      # on quitte la boucle
                      break
                # si on a trouve l'arbre qui contient la valeur
    -           if found_child != None:
    +           if found_child != None:
                   # on continue la verification en descendant dans par cet arbre
                   self._check(found_child, "value")
                # sinon,
    @@ -447,7 +448,7 @@
     #  Test pour le fichier 'models.py'
     #
         
    -if __name__=='__main__':
    +if __name__=='__main__':
         momo=models()
         mt=model('T3DNX','THERx','T3xxx',capaStorage='lump_')
         mm=model('M3DNL','MECAx','T3xxx',kinematic='small',anisotropy='iso__')
    @@ -485,13 +486,13 @@
             
  • modules |
  • - - + +
    \ No newline at end of file diff --git a/docs/Pre/_modules/pylmgc90/pre/shared/tact_behav.html b/docs/Pre/_modules/pylmgc90/pre/shared/tact_behav.html index 19a74131220bad77fc29eda4c60f89289054e8f3..c9486cd7ab707e3629ed8a6674b4565ec9e5d7f7 100644 --- a/docs/Pre/_modules/pylmgc90/pre/shared/tact_behav.html +++ b/docs/Pre/_modules/pylmgc90/pre/shared/tact_behav.html @@ -6,7 +6,7 @@ - pylmgc90.pre.shared.tact_behav — pylmgc90.pre 2015.2 documentation + pylmgc90.pre.shared.tact_behav — pylmgc90.pre 2017.rc1 documentation @@ -14,17 +14,18 @@ - - + + @@ -47,12 +48,12 @@

    Source code for pylmgc90.pre.shared.tact_behav

    -from string import *
    +from string import *
     import sys
     
    -from pylmgc90.pre.utilities.error    import *
    +from pylmgc90.pre.utilities.error    import *
     
    -from pylmgc90.pre.config.lmgc90dicts import *
    +from pylmgc90.pre.config.lmgc90dicts import *
     
     
     
    [docs]class see_table(): @@ -65,7 +66,7 @@ - __init__: constructor """ def __init__(self, CorpsCandidat, candidat, colorCandidat, behav, - CorpsAntagoniste, antagoniste, colorAntagoniste, alert, halo=None, name=None): + CorpsAntagoniste, antagoniste, colorAntagoniste, alert, halo=None, name=None): """ __init__(self, CorpsCandidat, candidat, colorCandidat, behav, CorpsAntagoniste, antagoniste, colorAntagoniste, alert, halo=None, name=None): @@ -93,7 +94,7 @@ - name=None: name of the see table (still present to ensure compatibility) """ # si l'utilisateur attribue un nom a la table de visibilite - if name != None: + if name != None: # on lui indique qu'il ne sera pas utilise shwoWarning('assign a name to a see table is useless, and will be forbidden!') @@ -320,7 +321,7 @@ showError("la distance d'alerte doit etre une valeur reelle!") # * le halo (ou seconde distance d'alerte optionnelle) # si le halo n'a pas ete defini - if halo == None: + if halo == None: # on le stocke tel quel self.halo = halo # sinon, @@ -422,18 +423,18 @@ # Pour verifier que dt soit positif, une division par cn est necessaire. # On verifie donc que cn soit different de zero test = kargs["cn"] > 0 - if test == False: + if test == False: msg = "cn doit etre strictement positif" showError(msg) # Pour verifier que dt soit positif, une division par ct est necessaire. # On verifie donc que ct soit different de zero test = kargs["ct"] > 0 - if test == False: + if test == False: msg = "ct doit etre strictement positif" showError(msg) #On verifie que la valeur de w donne un dt positif test = kargs["w"]>=0.25 * kargs["smax"] * kargs["smax"] * (1./kargs["cn"] + 1./kargs["ct"] ) - if test == False: + if test == False: msg = "Incompatibilite des parametres\nw doit etre supperieur a 0.25 * smax * smax * ( 1/cn + 1/ct )" showError(msg)
    @@ -467,13 +468,13 @@
  • modules |
  • - - + +
    \ No newline at end of file diff --git a/docs/Pre/_modules/pylmgc90/pre/tact_behavs.html b/docs/Pre/_modules/pylmgc90/pre/tact_behavs.html index 1735d9ec816ee4ca0e50c766b2bcf70b97324bb5..678e99a60c2d1a2bbf0e9ae431a04f2f38b118a5 100644 --- a/docs/Pre/_modules/pylmgc90/pre/tact_behavs.html +++ b/docs/Pre/_modules/pylmgc90/pre/tact_behavs.html @@ -6,7 +6,7 @@ - pylmgc90.pre.tact_behavs — pylmgc90.pre 2015.2 documentation + pylmgc90.pre.tact_behavs — pylmgc90.pre 2017.rc1 documentation @@ -14,17 +14,18 @@ - - + + @@ -47,9 +48,9 @@

    Source code for pylmgc90.pre.tact_behavs

    -from utilities.container import *
    +from utilities.container import *
     
    -from shared.tact_behav import *
    +from shared.tact_behav import *
     
     
    [docs]class see_tables(sequence_container): """classe see_tables derive de 'sequence_container' @@ -112,13 +113,13 @@
  • modules |
  • - - + +
    \ No newline at end of file diff --git a/docs/Pre/_modules/pylmgc90/pre/viz/visuVtk.html b/docs/Pre/_modules/pylmgc90/pre/viz/visuVtk.html index d3b5493791d2dc7bdae4ba33416e73bacb7f8cf1..9f273e96a40cf97e1e5fbaff89968fe47f280401 100644 --- a/docs/Pre/_modules/pylmgc90/pre/viz/visuVtk.html +++ b/docs/Pre/_modules/pylmgc90/pre/viz/visuVtk.html @@ -6,7 +6,7 @@ - pylmgc90.pre.viz.visuVtk — pylmgc90.pre 2015.2 documentation + pylmgc90.pre.viz.visuVtk — pylmgc90.pre 2017.rc1 documentation @@ -14,17 +14,18 @@ - - + + @@ -50,9 +51,9 @@ import math import numpy -from vtkContactor import * +from vtkContactor import * -wedgeMap = list(xrange(15)) +wedgeMap = list(xrange(15)) wedgeMap[1] = 2; wedgeMap[2] = 1 wedgeMap[4] = 5; wedgeMap[5] = 4 wedgeMap[6] = 8; wedgeMap[8] = 6 @@ -92,7 +93,7 @@ # putting elements in vtk for ele in avatar.bulks: - obj = None + obj = None if ele.etype == 'Q4xxx': obj = vtk.vtkQuad() elif ele.etype == 'Q8xxx': @@ -118,14 +119,14 @@ elif ele.etype == 'TE4xx': obj = vtk.vtkTetra() else: - print '[getVtkObjectsFromAvatar] unable to draw element of type : ', ele.etype + print '[getVtkObjectsFromAvatar] unable to draw element of type : ', ele.etype - if obj != None: + if obj != None: if ele.etype == 'PRI6x' or ele.etype == 'PRI15': - for k in xrange(len(ele.connectivity)): + for k in xrange(len(ele.connectivity)): obj.GetPointIds().SetId(k, ele.connectivity[wedgeMap[k]]-1) else: - for k in xrange(len(ele.connectivity)): + for k in xrange(len(ele.connectivity)): obj.GetPointIds().SetId(k, ele.connectivity[k]-1) grid.InsertNextCell(obj.GetCellType(),obj.GetPointIds()) @@ -146,7 +147,7 @@ obj = eval("getVtkObjectFrom"+contactor.shape+"(contactor, coor, frame)") vtk_objs.append(obj) else: - print 'WARNING: Unable to create vtk object of contactor type: ', contactor.shape, \ + print 'WARNING: Unable to create vtk object of contactor type: ', contactor.shape, \ 'for avatar number: ', avatar.number return vtk_objs @@ -213,7 +214,7 @@ ren.AddActor(edge_actor) -
    [docs]def visuAvatars(cont,with_axis=False): +
    [docs]def visuAvatars(cont,with_axis=False): """visuAvatars(cont): Create a visualization window of a container of avatars using vtk. @@ -224,7 +225,7 @@ - with_axis (optional) : (boolean) add normalized axis to visualization """ - import pylmgc90.pre.config as config + import pylmgc90.pre.config as config import vtk # In novisu mode, don't popup any window @@ -291,13 +292,13 @@
  • modules |
  • - - + +
    \ No newline at end of file diff --git a/docs/Pre/_sources/classes.txt b/docs/Pre/_sources/classes.txt deleted file mode 100644 index e930bec740036d97ce80eba6dd487eeba18a3116..0000000000000000000000000000000000000000 --- a/docs/Pre/_sources/classes.txt +++ /dev/null @@ -1,246 +0,0 @@ - -.. automodule:: pylmgc90.pre -.. py:currentmodule:: pylmgc90.pre - -pre module's docstrings -============================ - -Basic functions ---------------- - -Model -""""" - -.. autoclass:: model - :members: - -.. autoclass:: models - :members: - -Material -"""""""" - -.. autoclass:: material - :members: - -.. autoclass:: materials - :members: - - -Avatar -"""""" - -.. autoclass:: avatar - :members: - -.. autoclass:: avatars - :members: - -Node -"""" - -.. autoclass:: node - :members: - -.. autoclass:: nodes - :members: - -Bulk -"""" - -.. autoclass:: bulk - :members: - -.. autoclass:: bulks - :members: - -Contactor -""""""""" - -.. autoclass:: contactor - :members: - -.. autoclass:: contactors - :members: - -Interaction -""""""""""" - -.. autoclass:: tact_behav - :members: - -.. autoclass:: tact_behavs - :members: - -Visibility table -"""""""""""""""" -.. autoclass:: see_table - :members: - -.. autoclass:: see_tables - :members: - - -Granular functions ------------------- - -Granulometry generation -""""""""""""""""""""""" -.. autofunction:: pylmgc90.pre.granulo_Monodisperse - -.. autofunction:: pylmgc90.pre.granulo_Random - -.. autofunction:: pylmgc90.pre.granulo_Uniform - -.. autofunction:: pylmgc90.pre.granulo_TwoSizesNumber - -.. autofunction:: pylmgc90.pre.granulo_TwoSizesVolume - -.. autofunction:: pylmgc90.pre.granulo_ReadFromFile - -Deposit -""""""" - -.. autofunction:: pylmgc90.pre.depositInBox2D - -.. autofunction:: pylmgc90.pre.depositInDisk2D - -.. autofunction:: pylmgc90.pre.depositInCouette2D - -.. autofunction:: pylmgc90.pre.depositInDrum2D - -.. autofunction:: pylmgc90.pre.depositInBox3D - -.. autofunction:: pylmgc90.pre.depositInCylinder3D - -.. autofunction:: pylmgc90.pre.depositInSphere3D - -.. autofunction:: pylmgc90.pre.squareLattice2D - -.. autofunction:: pylmgc90.pre.triangularLattice2D - -.. autofunction:: pylmgc90.pre.cubicLattice3D - -Particle generation -""""""""""""""""""" - -.. autofunction:: pylmgc90.pre.rigidDisk - -.. autofunction:: pylmgc90.pre.rigidCluster - -.. autofunction:: pylmgc90.pre.rigidDiscreteDisk - -.. autofunction:: pylmgc90.pre.rigidJonc - -.. autofunction:: pylmgc90.pre.rigidPolygon - -.. autofunction:: rigidOvoidPolygon - -.. autofunction:: pylmgc90.pre.deformableParticle2D - -.. autofunction:: pylmgc90.pre.rigidSphere - -.. autofunction:: pylmgc90.pre.rigidPlan - -.. autofunction:: pylmgc90.pre.rigidCylinder - -.. autofunction:: pylmgc90.pre.rigidPolyhedron - -Wall generation -""""""""""""""" - -.. autofunction:: pylmgc90.pre.roughWall - -.. autofunction:: pylmgc90.pre.fineWall - -.. autofunction:: pylmgc90.pre.smoothWall - -.. autofunction:: pylmgc90.pre.granuloRoughWall - -.. autofunction:: pylmgc90.pre.roughWall3D - -.. autofunction:: pylmgc90.pre.granuloRoughWall3D - -Masonry -------- - -Bricks -"""""" - -.. autoclass:: pylmgc90.pre.brick2D - :members: - -.. autoclass:: pylmgc90.pre.brick3D - :members: - -Walls -""""" - -.. autoclass:: pylmgc90.pre.paneresse_simple - :members: - -.. autoclass:: pylmgc90.pre.paneresse_double - :members: - -Mesh manipulation ------------------ - -mesh creation -""""""""""""" - -.. autofunction:: pylmgc90.pre.lecture - -.. autofunction:: pylmgc90.pre.buildMesh2D - -.. autofunction:: pylmgc90.pre.buildMeshH8 - -mesh class -"""""""""" - -.. autoclass:: pylmgc90.pre.mesh - :members: - -mesh manipulation -""""""""""""""""" - -.. autofunction:: pylmgc90.pre.extractFreeSurface - -.. autofunction:: pylmgc90.pre.reorientSurfacicElements - -mesh to avatar(s) -""""""""""""""""" - -.. autofunction:: pylmgc90.pre.buildMeshedAvatar - -.. autofunction:: pylmgc90.pre.rigidFromMesh2D - -.. autofunction:: pylmgc90.pre.rigidsFromMesh2D - -.. autofunction:: pylmgc90.pre.explodeMeshedAvatar2D - -.. autofunction:: pylmgc90.pre.volumicMeshToRigid3D - -.. autofunction:: pylmgc90.pre.surfacicMeshToRigid3D - -.. autofunction:: pylmgc90.pre.surfacicMeshesToRigid3D - - -Miscellaneous -------------- - -Display -""""""" -.. autofunction:: pylmgc90.pre.visuAvatars - -Evolution -""""""""" -.. autofunction:: pylmgc90.pre.writeEvolution - - -Extrusion -""""""""" - -.. autofunction:: pylmgc90.pre.extrudeRigid - -.. autofunction:: pylmgc90.pre.extrudeRigids - diff --git a/docs/Pre/_sources/granular.txt b/docs/Pre/_sources/granular.txt deleted file mode 100644 index ae95f14b33ca53f35aa39b71e35878fede3b7320..0000000000000000000000000000000000000000 --- a/docs/Pre/_sources/granular.txt +++ /dev/null @@ -1,218 +0,0 @@ - -.. py:currentmodule:: pylmgc90.pre - -Granular material -================= - -This part is dedicated to the generation of granular material samples. On the whole the definition of a granular sample -is separeted in three steps: - -1. generation of a list of boundary radii according to a known granulometry -2. positioning of grains with the generated boundary radii according to a deposit method -3. creation of the real sample of particles - -In the following sections are presented what functions are available within the current version of LMGC90's preprocessor -for each of these step. Many examples using these functions are -available in the examples of *LMGC90*. - -List of radii -------------- - -A list of radii following a given granulometry is generated. -The available functions are: - -* :py:func:`granulo_Monodisperse` - -* :py:func:`granulo_Random` - -* :py:func:`granulo_Uniform` - -* :py:func:`granulo_TwoSizesNumber` - -* :py:func:`granulo_TwoSizesVolume` - -* :py:func:`granulo_ReadFromFile` - -**Example:** - -Let's say we want to generate a sample of particules which each radius is randomly chosen between two radii. -This is done thank to:: - - nb_particles = 10000 - radius_min = 1.0 - radius_max = 2.5 - radii = granulo_Random(nb_particles, radius_min, radius_max) - -Deposit -------- - -Once the list of bounded radii is obtained, the next step is to determine -where to put grains in space. This is the role of the deposit functions -which takes the list of radii as input and give a list of coordinates -as output. -There are two kinds of deposit function available: loose deposit on a -lattice or dense deposit: - -* 2D - - * :py:func:`squareLattice2D` - - * :py:func:`triangularLattice2D` - - * :py:func:`depositInBox2D` - - * :py:func:`depositInDisk2D` - - * :py:func:`depositInCouette2D` - - * :py:func:`depositInDrum2D` - - - * 3D - - - * :py:func:`cubicLattice3D` - - * :py:func:`depositInBox3D` - - * :py:func:`depositInCylinder3D` - - * :py:func:`depositInSphere3D` - -Dense deposit of particles are performed minimizing a potential. In -our case it is the gravity potential which is minimized. - -**Warning:** if the number of particles laid is inferior to the number of input radii, the -granulometry may be changed on the output. - -**Warning:** to avoid interpenetration between particles, a shrink based on the size of particles is used. - -**Example:** - -Using the ``radii`` variable generated in previous example, let us deposit it in 2-dimensionnal box:: - - lx = 150. - ly = 100. - [nb_laid_particles, coors] = depositInBox2D(radii,lx,ly) - - -Particle generation -------------------- - -| Last step is to generate the :py:class:`avatar` corresponding to each particle. -| Several simple particle types can be automatically generated: - -* 2D: - - * :py:func:`rigidDisk` - - * :py:func:`rigidCluster` - - * :py:func:`rigidDiscreteDisk` - - * :py:func:`rigidJonc` - - * :py:func:`rigidPolygon` - - * :py:func:`rigidOvoidPolygon` - - * :py:func:`deformableParticle2D` - -* 3D - - * :py:func:`rigidSphere` - - * :py:func:`rigidPlan` - - * :py:func:`rigidCylinder` - - * :py:func:`rigidPolyhedron` - - - - - -**Example:** - -.. image:: figs/deposit.* - :height: 150px - :align: right - :alt: deposit of triangles - -Finally the container of avatar must be filled:: - - mat = material(name='TDURx', materialType='RIGID', density=100.) - mod = model(name='rigid', physics='MECAx', element='Rxx2D', dimension=2) - bodies = avatars() - nb_vertices = 3 - for i in range(nb_laid_particles): - body = rigidPolygon(radius=radii[i], center=coors[2*i:2*i+2], nb_vertices=nb_vertices, model=mod, material=mat, color='BLUEx') - bodies.addAvatar(body) - -Wall generation ---------------- - -Even if in most case straight plans are used to define the wall of a box, -it is sometimes desired to have a rough wall like a cluster of disks/spheres. -Here are the functions to create such a wall in a single line: - -* 2D - - * :py:func:`roughWall` - - * :py:func:`fineWall` - - * :py:func:`smoothWall` - - * :py:func:`granuloRoughWall` - -* 3D - - * :py:func:`roughWall3D` - - * :py:func:`granuloRoughWall3D` - - -**Example:** - -.. image:: figs/deposit_with_l.* - :height: 150px - :align: right - :alt: deposit of triangles with left wall - -To complete our example let's create three walls for the box using the three first functions -just to illustrate the differences between them. First the left wall:: - - max_radius = max(radii) - mut = material(name='TDURx', materialType='RIGID', density=1000.) - left = roughWall( center=[-radius_max, 0.5*ly], theta=-0.5*math.pi, l=ly + 2.*radius_max, - r=radius_max, model=mod, material=mut, color='WALLx') - left.imposeDrivenDof(component=[1,2,3], dofty='vlocy') - bodies.addAvatar(left) - - -.. image:: figs/deposit_with_lr.* - :height: 150px - :align: right - :alt: deposit of triangles with left and right walls - -Then the right wall:: - - right = fineWall( center=[lx+radius_max, 0.5*ly], theta= 0.5*math.pi, l=ly + 2.*radius_max, - r=radius_max, model=mod, material=mut, color='WALLx') - right.imposeDrivenDof(component=[1,2,3], dofty='vlocy') - bodies.addAvatar(right) - -.. image:: figs/deposit_with_lrb.* - :height: 150px - :align: right - :alt: deposit of triangles with left, right and bottom walls - -And finally the bottom of the box:: - - bottom = smoothWall( center=[0.5*lx, -radius_max], theta=0., l=lx + 2.*radius_max, - h=radius_max, nb_polyg=12, model=mod, material=mut, color='WALLx') - bottom.imposeDrivenDof(component=[1,2,3], dofty='vlocy') - bodies.addAvatar(bottom) - -See :download:`this file` for the complete generation script. diff --git a/docs/Pre/_sources/index.txt b/docs/Pre/_sources/index.txt deleted file mode 100644 index 0e2f966960468231976f8852eabe5488a3423f46..0000000000000000000000000000000000000000 --- a/docs/Pre/_sources/index.txt +++ /dev/null @@ -1,63 +0,0 @@ -.. lmgc_pre documentation master file, created by - sphinx-quickstart on Thu Apr 5 08:43:17 2012. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - -LMGC90 pre-processor documentation -================================== - -Fundamentals: -------------- - -.. toctree:: - :maxdepth: 1 - - philosophie - material - model - interaction - visibility - post - -Dedicated tools: ----------------- - -.. toctree:: - :maxdepth: 1 - - granular - masonry - mesh - -Miscellaneous: --------------- - -.. toctree:: - :maxdepth: 1 - - miscellaneous - classes - -lmgc_pre is a Python module dedicated to the generation of LMGC90's input files. This module provides -basic functionnalities allowing to define body, material, model, visibility table and contact laws -in a self-content way. Furthermore anybody can write its own pre-processing functions according to his/her -needs if they are not provided yet. - -The high level pre-processing functions are categorized in three domains: granular, masonry and mesh manipulation. -Of course any functionnality filed under any category can be used or combined in any other context. - -First section details how to generate and manipulate a single avatar. -Granular section is dedicated on how to generate collection of -particles with a given granulometry and deposit container. The second -part is dedicated to 2D/3D masonry. The third part details how to read -meshes from file and manipulate them. Miscellaneous part gathers -information on utilities available in so many different cases that -they do not belong to any category. - -Indices and tables -================== - -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` - diff --git a/docs/Pre/_sources/interaction.txt b/docs/Pre/_sources/interaction.txt deleted file mode 100644 index 19e1415ebc1e81601b249634e0e0be28c0bca742..0000000000000000000000000000000000000000 --- a/docs/Pre/_sources/interaction.txt +++ /dev/null @@ -1,233 +0,0 @@ -.. py:currentmodule:: pylmgc90.pre - -Interaction model and parameters definition -=========================================== - -One needs to define a tact_behav object with :py:func:`tact_behav` which corresponds to an -interaction model with its parameters. - -Meaning of the parameters: - -* friction: either constant *fric* or *stfr* static and *dyfr* - dynamic friction -* restitution (newton): *rstn* normal, *rstt* tangential -* cohesion: *cohn* normal, *coht* tangential (unused with wet model) -* CZM parameters: - - * *cn* normal stiffness (pure mode I) - * *ct* tangential stiffness (pure mode II) - * *smax* critical stress (with mixity it is pure mode I) - * *w* fracture energy (with mixity it is pure mode I) - * *d* plastic displacement for TH (d=smax/cn means triangle) - * *du* rupture displacement for ABP - * *phi* ratio between micro and macro fracture energy - * *p* constant pressure in a broken CZM - -Furthermore some interaction have some internal variables (not managed -by the user) which needs a careful use of (StockRloc(), -UpdateTactBehav(), RecupRloc()). - - -Here is a list of existing models with the expected parameters: - -RIGID/RIGID : -------------- - -* IQS_CLB: fric (:math:`\mu`). - - :math:`g = \max(0, g_{\star}) + h \Vln`. - -.. math:: - g \geq 0; \;\; \Rln \geq 0; \;\; g \cdot \Rln = 0 - - \parallel \Rlt \parallel \leqslant \mu \Rln - \left \lbrace - \begin{array}{l} \parallel \Rlt \parallel < \mu \Rln \Rightarrow \Vlt = 0 \\ - \parallel \Rlt \parallel = \mu \Rln \Rightarrow \exists \alpha \geqslant 0, \Vlt = -\alpha \Rlt - \end{array} - \right . - -* IQS_CLB_g0: fric (:math:`\mu`). - - :math:`g = \max(0, g_{\star}-g_0) + h \Vln` with :math:`g_0` the gap computed at - the first step and stored an internal variable. - -.. math:: - g \geq 0; \;\; \Rln \geq 0; \;\; g \cdot \Rln = 0 - - \parallel \Rlt \parallel \leqslant \mu \Rln - \left \lbrace - \begin{array}{l} \parallel \Rlt \parallel < \mu \Rln \Rightarrow \Vlt = 0 \\ - \parallel \Rlt \parallel = \mu \Rln \Rightarrow \exists \alpha \geqslant 0, \Vlt = -\alpha \Rlt - \end{array} - \right . - -* IQS_DS_CLB: dyfr (:math:`\mu_d`), stfr (:math:`\mu_s`) - be carefull - :math:`\mu_d \leq \mu_s`. - - :math:`g = \max(0, g_{\star}) + h \Vln`. - If status_begin = stick :math:`\mu=\mu_s` else :math:`\mu=\mu_d` - -.. math:: - g \geq 0; \;\; \Rln \geq 0; \;\; g \cdot \Rln = 0 - - \parallel \Rlt \parallel \leqslant \mu \Rln - \left \lbrace - \begin{array}{l} \parallel \Rlt \parallel < \mu \Rln \Rightarrow \Vlt = 0 \\ - \parallel \Rlt \parallel = \mu \Rln \Rightarrow \exists \alpha \geqslant 0, \Vlt = -\alpha \Rlt - \end{array} - \right . - -* IQS_WET_DS_CLB: cohn (:math:`\Rln^{coh}`), coht (not used), Wthk - (:math:`g^{coh}`), dyfr (:math:`\mu_d`), stfr - (:math:`\mu_s`). - - :math:`g = \max(0, g_{\star}) + h \Vln`. - If status_begin = stick :math:`\mu=\mu_s` else :math:`\mu=\mu_d` - - if :math:`g_{\star} \le g^{coh}` - - .. math:: - - g \geq 0; \;\; \Rln + \Rln^{coh} \geq 0; \;\; g \cdot (\Rln + \Rln^{coh}) = 0 - - \parallel \Rlt \parallel \leqslant \mu (\Rln + \Rln^{coh}) - \left \lbrace - \begin{array}{l} \parallel \Rlt \parallel < \mu (\Rln + \Rln^{coh}) \Rightarrow \Vlt = 0 \\ - \parallel \Rlt \parallel = \mu (\Rln + \Rln^{coh}) \Rightarrow \exists \alpha \geqslant 0, \Vlt = -\alpha \Rlt - \end{array} - \right . - - else - - .. math:: - - g \geq 0; \;\; \Rln \geq 0; \;\; g \cdot \Rln = 0 - - \parallel \Rlt \parallel \leqslant \mu \Rln - \left \lbrace - \begin{array}{l} \parallel \Rlt \parallel < \mu \Rln \Rightarrow \Vlt = 0 \\ - \parallel \Rlt \parallel = \mu \Rln \Rightarrow \exists \alpha \geqslant 0, \Vlt = -\alpha \Rlt - \end{array} - \right . - - -* IQS_MOHR_DS_CLB: cohn (:math:`\sigma_n^{coh}`), coht - (:math:`\sigma_t^{coh}`), dyfr (:math:`\mu_d`), stfr (:math:`\mu_s`). - - :math:`g = \max(0, g_{\star}) + h \Vln`. :math:`\Rln^{coh}=S \sigma_n^{coh}`. - :math:`\Rlt^{coh}=S \sigma_t^{coh}`. :math:`S`, the contact surface, - is computed during contact detection. - If status_begin = stick :math:`\mu=\mu_s` else :math:`\mu=\mu_d` - - if cohesive - - .. math:: - - g \geq 0; \;\; \Rln+ \Rln^{coh} \geq 0; \;\; g \cdot (\Rln + \Rln^{coh}) = 0 - - \parallel \Rlt + \Rlt^{coh} \parallel \leqslant \mu (\Rln + \Rln^{coh}) - \left \lbrace - \begin{array}{l} \parallel \Rlt + \Rlt^{coh} \parallel < \mu (\Rln + \Rln^{coh}) \Rightarrow \Vlt = 0 \\ - \parallel \Rlt + \Rlt^{coh} \parallel = \mu (\Rln + \Rln^{coh}) \Rightarrow \exists \alpha \geqslant 0, \Vlt = -\alpha \Rlt - \end{array} - \right . - - else - - .. math:: - - g \geq 0; \;\; \Rln \geq 0; \;\; g \cdot \Rln = 0 - - \parallel \Rlt \parallel \leqslant \mu \Rln - \left \lbrace - \begin{array}{l} \parallel \Rlt \parallel < \mu \Rln \Rightarrow \Vlt = 0 \\ - \parallel \Rlt \parallel = \mu \Rln \Rightarrow \exists \alpha \geqslant 0, \Vlt = -\alpha \Rlt - \end{array} - \right . - - - - -* IQS_MAC_CZM: dyfr (:math:`\mu=\mu_d`), stfr (:math:`\mu=\mu_s`), cn, ct , b, w. - - :math:`g = \max(0, g_{\star}) + h \Vln`. :math:`\Rln^{coh}=S \sigma_n^{coh}`. - :math:`\Rlt^{coh}=S \sigma_t^{coh}`. :math:`S`, the contact surface, - is computed during contact detection. - - :math:`\sigma_n^{coh} = \beta^2 cn \lbrack\mid u \mid \rbrack \cdot - n` and :math:`\sigma_t^{coh} = \beta^2 ct \lbrack\mid u \mid - \rbrack \cdot (I - n \times n)` - - :math:`f(\beta)=0` - -.. math:: - - g \geq 0; \;\; \Rln+ \Rln^{coh} \geq 0; \;\; g \cdot (\Rln + \Rln^{coh}) = 0 - - \parallel \Rlt + \Rlt^{coh} \parallel \leqslant \mu (\Rln + \Rln^{coh}) - \left \lbrace - \begin{array}{l} \parallel \Rlt + \Rlt^{coh} \parallel < \mu (\Rln + \Rln^{coh}) \Rightarrow \Vlt = 0 \\ - \parallel \Rlt + \Rlt^{coh} \parallel = \mu (\Rln + \Rln^{coh}) \Rightarrow \exists \alpha \geqslant 0, \Vlt = -\alpha \Rlt - \end{array} - \right . - - -* IQS_MAL_CZM: dyfr, stfr, cn, ct, smax, w - -* IQS_TH_CZM: dyfr, stfr, cn, ct, p, p0, smax, w , d - -* IQS_ABP_CZM: dyfr, stfr, cn, ct, p, smax, w , du, phi - -* RST_CLB: rstn (:math:`e_n`), rstt (:math:`e_t`), fric (:math:`\mu`). - :math:`\tVln=\Vln+e_n\Vln{}_{,begin}` and :math:`\tVlt=\Vlt+e_n\Vlt{}_{,begin}` - - if :math:`g_{\star} \leq 0` - - .. math:: - \tVln \geq 0; \;\; \Rln \geq 0; \;\; \tVln \cdot \Rln = 0 - - \parallel \Rlt \parallel \leqslant \mu \Rln - \left \lbrace - \begin{array}{l} \parallel \Rlt \parallel < \mu \Rln \Rightarrow \tVlt = 0 \\ - \parallel \Rlt \parallel = \mu \Rln \Rightarrow \exists \alpha \geqslant 0, \tVlt = -\alpha \Rlt - \end{array} - \right . - - else - - .. math:: - \Rln = 0 \mbox{ and }\Rlt = 0 - -any/DEFORMABLE : ----------------- - -* GAP_SGR_CLB: fric -* GAP_SGR_CLB_g0: fric -* GAP_MOHR_DS_CLB: cohn, coht, dyfr, stfr -* VEL_SGR_CLB: fric -* MAC_CZM: dyfr, stfr, cn, ct, b, w -* MAL_CZM: dyfr, stfr, cn, ct, smax, w -* MP_CZM: dyfr, stfr, cn, ct, p, p0, w -* MSMP_CZM: dyfr, stfr, cn, ct, beta0, w -* MP3_CZM: dyfr, stfr, cn, ct, p, p0, smax, w -* TH_CZM: dyfr, stfr, cn, ct, p, p0, smax, w , d -* ABP_CZM: dyfr, stfr, cn, ct, p, smax, w , du, phi - -POINT/POINT: ------------- - -* ELASTIC_WIRE: stiffness, prestrain -* BRITTLE_ELASTIC_WIRE': stiffness, prestrain, Fmax -* ELASTIC_ROD: stiffness, prestrain - -any/any: --------- - -* COUPLED_DOF: -* NORMAL_COUPLED_DOF: -* ELASTIC_REPELL_CLB: stiffness, fric - -**Example:** :: - - csas=tact_behav(name='gapc0', law='MAC_CZM', dyfr=0., stfr=0., cn=4.e+14, ct=3.e+14, b=0., w=60.) diff --git a/docs/Pre/_sources/masonry.txt b/docs/Pre/_sources/masonry.txt deleted file mode 100644 index f13b0d53f634cc794220c5a09c56f21a1623182c..0000000000000000000000000000000000000000 --- a/docs/Pre/_sources/masonry.txt +++ /dev/null @@ -1,103 +0,0 @@ - -.. automodule:: pylmgc90.pre -.. py:currentmodule:: pylmgc90.pre - -Masonry -======= - -This section details the pre-processing functions dedicated to masonry structures. -Here are provided two types of function, those generating bricks, and those using -the bricks to generate a wall. After that is up to the user to put together the -walls so that they fit. - -Brick generation ----------------- - -Two classes have been designed for brick creation: :py:class:`brick2D`, and :py:class:`brick3D`. -The only inputs for these class are a name and the sizes of the brick. -But the brick object is not an avatar yet, it merely defined its geometry. -To obtain usable avatar(s), one of the three following methods is to be used for 2D bricks: - -* for a rigid avatar: :py:class:`brick2D.rigidBrick` -* for a deformable avatar: :py:class:`brick2D.deformableBrick` -* for a deformable avatars (each element being on) :py:class:`brick2D.explodedDeformableBrick` - -Concerning the obtained deformable avatars, each brick has ``CLxxx`` contactors on the -lower and right sides and ``ALpxx`` on the upper and left sides. - -To obtain 3D rigids either the :py:class:`brick3D.rigidBrick` method is available in 3D -bricks, or the :ref:`extrusion functions` can be used on the avatar(s) -generated with the 2D bricks. - -**Example:** - -Creation of 2D brick:: - - dim = 2 - - lx = 0.1 - ly = 0.05 - brick = brick2D('std_brick', lx, ly) - -.. image:: figs/row.* - :height: 150px - :align: right - :alt: a row of 12 2D bricks - -Creation of a row of rigid bricks:: - - nb_bricks = 12 - bodies = avatars() - mat = material(name='PLEXx',type='RIGID',density=2000.) - mod = model(name='rigid', type='MECAx', element='Rxx2D', dimension=dim) - - for i in xrange(nb_bricks): - bodies += brick.rigidBrick(center=[i*lx, ly/2.], model=mod, material=mat, color='BLUEx') - - -Wall generation ---------------- - -The :py:class:`paneresse_simple` and :py:class:`paneresse_double` classes -allow to automatically generate simple walls without openings with regular -rigid bricks. The appealing side of these classes is that all the troubles -due to the "harpage" is taken care of automatically. The only things left -is to write the visibility tables. - -Otherwise the governing idea of wall generation is to define several brick -objects. Make a list of bricks to make a row and a list of rows to make a -wall. Then the avatars which defined the wall are built through nested loops -in a similar way than in previous example. - -**Example:** - -.. image:: figs/wall.* - :height: 150px - :align: right - :alt: a "paneresse simple" wall - -Generation of a 3D wall of rigid bricks in "paneresse simple" configuration:: - - dim = 3 - mat = material(name='PLEXx',materialType='RIGID',density=2000.) - mod = model(name='rigid', physics='MECAx', element='Rxx3D', dimension=dim) - - simple_brick = brick3D(name='brique simple', lx=0.22, ly=0.11, lz=0.06) - wall = paneresse_simple(brick_ref=simple_brick, disposition="paneresse") - - wall.setFirstRowByLength(first_brick_type="1/2", length=2.3, joint_thickness=0.01) - wall.setNumberOfRows(10.) - wall.setJointThicknessBetweenRows(0.01) - wall.computeHeight() - - bodies = wall.buildRigidWall(origin=[0., 0., 0.], model=mod, material=mat, colors=['BLUEx', 'REDxx']) - - -For the generation of 2D wall or rigid bricks with different bricks and openings, -see :download:`this` complete example. - -.. image:: figs/masonry.* - :height: 150px - :align: center - :alt: a wall with openings - diff --git a/docs/Pre/_sources/material.txt b/docs/Pre/_sources/material.txt deleted file mode 100644 index 69d816549f0c3d99c6358fc4976b1d5c82d31f09..0000000000000000000000000000000000000000 --- a/docs/Pre/_sources/material.txt +++ /dev/null @@ -1,91 +0,0 @@ - -.. py:currentmodule:: pylmgc90.pre - -Material definition -=================== - -A material is defined using :py:class:`material`. It consists in a -name ( 5 characters), a type and a list of parameters which depends on -the type. - - -RIGID type: ------------ - -only density is necessary :: - - tdur = material(name='TDURx', materialType='RIGID', density=1000.) - - -ELAS type: ----------- - -elastic material :: - - ma1 = material(name='steel', materialType='ELAS', density=0.25e+4, - elas='standard', young=0.1e+15, nu=0.2, anisotropy='isotropic') - - -ELAS_DILA type: ---------------- - -elastic material :: - - ma1 = material(name='steel', materialType='ELAS_DILA', density=0.25e+4, - elas='standard', young=0.1e+15, nu=0.2, anisotropy='isotropic', - dilatation=1e-5, T_ref_meca=20. ) - - -VISCO_ELAS type: ----------------- - -visco elastic material :: - - steel = material(name='steel', materialType='VISCO_ELAS', density=8.93e3, - elas='standard', anisotropy='isotropic', young=1.17e11, nu=0.35, - viscous_model='KelvinVoigt', viscous_young=1.17e9, viscous_nu=0.35) - - -ELAS_PLAS type: ---------------- - -visco elasto plastic material :: - - steel = material(name='steel', materialType='ELAS_PLAS', density=8.93e3, - elas='standard', anisotropy='isotropic', young=1.17e11, nu=0.35, - critere='Von-Mises', isoh='linear', iso_hard=4.e8, isoh_coeff=1e8, cinh='none', visc='none') - - -THERMO_ELAS type: ------------------ - -thermo elastic material :: - - mat = material(name='steel', materialType='THERMO_ELAS', density=1.0, - elas='standard', young=0.0, nu=0.0, anisotropy='isotropic', dilatation = 0.0, - T_ref_meca = 0.0, conductivity='field', specific_capacity='field') - - -PORO_ELAS type: ---------------- - -poro elastic material :: - - mat = material(name='steel', materialType='PORO_ELAS', density=1.0, - elas='standard', young=0.0, nu=0.0, anisotropy='isotropic', - hydro_cpl = 0.0, conductivity='field', specific_capacity='field') - -DISCRETE type: --------------- - -give explicitely the matrices of a 1D element :: - - mat = material(name=mat_name, materialType='DISCRETE', masses=[0., 0., 0.], - stiffnesses=[kx, ky, kz], viscosities=[0., 0., 0.]) - -USER_MAT type: --------------- - -It is possible to give a MatLib material file :: - - acier = material(name='steel', materialType='USER_MAT', density=0., file_mat='elas.mat') diff --git a/docs/Pre/_sources/mesh.txt b/docs/Pre/_sources/mesh.txt deleted file mode 100644 index d4d13cba9dc9dc2ec5ac6e74cccfc0e881202b09..0000000000000000000000000000000000000000 --- a/docs/Pre/_sources/mesh.txt +++ /dev/null @@ -1,219 +0,0 @@ - -.. py:currentmodule:: pylmgc90.pre - -Mesh -==== - -This section presents functions dedicated to creation -or manipulation of meshes to produce avatars (rigid or deformable). -The :py:class:`mesh` class allows to define a mesh object in the lightest way: nodes, connectivity -and possibly the groups elements belongs to. -In 3D only a volumic mesh can become a deformable or rigid avatar whereas -a surfacic mesh can only be used to generate a rigid avatar. -In 2D a mesh may define a deformable or a rigid avatar. - -Hand made mesh --------------- - -Again it is possible to define a mesh by hand using the class constructor -and the basic methods as explained in :ref:`avatar-definition` -section. But this solution is not usable to generate big meshes. - -Basic example :: - - m = mesh(dimension=2) - m.addNode( node(numpy.array([0.,0.]), number=1) ) - m.addNode( node(numpy.array([1.,0.]), number=2) ) - m.addNode( node(numpy.array([0.,1.]), number=3) ) - m.addNode( node(numpy.array([1.,1.]), number=4) ) - m.addBulk( element('Q4xxx', [1,2,4,3], physicalEntity='1quad') ) - -Available geometrical elements are: - - * 1D : Point, S2xxx, S3xxx, - * 2D : Point, S2xxx, S3xxx, T3xxx, Q4xxx, T6xxx, Q8xxx, Q9xxx, - * 3D : Point, S2xxx, S3xxx, T3xxx, Q4xxx, T6xxx, Q8xxx, Q9xxx, - H8xxx, H20xx, TE4xx, TE10x, PRI6x, PRI15 - - - .. c'est des elements physiques - .. * 'Rxx2D','Rxx3D', - .. * 'SPRG2','SPRG3','Beam','Cable','S2xth', - .. * 'Q4xxx','Q4P0x','Q44xx', - .. * 'T3xxx','DKTxx','T33xx', - .. * 'Q8xxx','Q8Rxx','Q84xx', - .. * 'Q9xxx', - .. * 'T6xxx','T63xx', - .. * 'TE4xx','TE4lx','TE44x', - .. * 'TE10x','TE104', - .. * 'H8xxx','H88xx','SHB8x', - .. * 'H20xx','H20Rx','H208x','SHB20', - .. * 'PRI6x','SHB6x', - .. * 'PRI15','SHB15' - -Remember that rigid2d() and rigid3d() allow to define *rigid* -element. It is equivalent to :: - - element( type='Point', connectivity=[1], physicalEntity='1') - - -Built-in Generation -------------------- - -For the specific case of 2D rectangular mesh, the :py:func:`buildMesh2D` function can -be used and for the case of 3D paralleloid mesh :py:func:`buildMeshH8` -also. - -**Example:** - -Generating a simple rectangular mesh:: - - my_mesh = buildMesh2D('Q4', x0=0.025, y0=0.05, lx=0.10, ly=0.05, nb_elem_x=10, nb_elem_y=5) - - -Importing a mesh ----------------- - -The most efficient way to generate a mesh is to use a meshing software like -`gmsh `_ . To this end the :py:func:`lecture` -function allow to read a file with gmsh format. In this way any kind of mesh -may be put in a mesh object. - -**Example:** :: - - dim=2 - mesh = lecture('block.msh',dim) - -Mesh to avatar --------------- - -Creating an avatar from a mesh is possible using: - -* deformable 2D/3D - - :py:func:`buildMeshedAvatar` - - **Example:** :: - - mesh_cube = lecture('gmsh/cube_t4.msh', dim) - cube=buildMeshedAvatar(mesh=mesh_cube, model=m3Dl, material=stone) - cube.addContactors(group='102', shape='ASpxx', color='BLEUx') - cube.imposeDrivenDof(group='105' , component=[1, 2, 3], dofty='vlocy') - - **Remarks:** - - It exists various strategies for contactors: - - * 2D - - :: - - # candidates at nodes - addContactors(group='xx', type='CSxxx', color='BLEUx') - # candidates on edges - addContactors(group='xx', type='CSxxx', color='BLEUx', weight=[0.25,0.75]) - # antagonist - addContactors(group='yy', type='ASpxx', color='REDxx') - - - * 3D - - :: - - # candidates at nodes - addContactors(group='xx',type='CSpxx',color='REDxx') - # candidates on faces ( quadrature=0 - constant, quadrature=1 - linear, quadrature=2 - quadratic pressure) - addContactors(group='xx',type='CSpxx',color='REDxx',quadrature=1) - # antagoniste - addContactors(group='yy', type='ASpxx', color='BLEUx') - -* rigid 2D - - :py:func:`rigidFromMesh2D` - -* rigid 3D - - * :py:func:`volumicMeshToRigid3D` - * :py:func:`surfacicMeshToRigid3D` - - **Example:** :: - - body_donut = volumicMeshToRigid3D(volumic_mesh=mesh_donut, model=mod, material=tdur, color='BLEUx') - -For the rigid avatar, the mesh is used to define the boundary of the corresponding polygons/polyhedra. - -The deformable avatars inherit the group of the original mesh, -allowing to define the desired boundary conditions and to add the contactors on them. - - -Sometimes, it is wanted to explode the continuous mesh in a collection -of avatars -(if one wants to use cohezive zone model for example). The -function allowing to obtain a container of avatars are: - -* :py:func:`explodeMeshedAvatar2D` -* :py:func:`rigidsFromMesh2D` - - -Extracting a mesh from meshes ------------------------------ - -Eventually a mesh loaded from a file may contain several parts which -correspond to different avatars. Using :py:func:`mesh.separateMeshes` it -is possible to separate the meshes. - -**Example:** :: - - dim=3 - complete_mesh = lecture(name='gmsh/3_briques.msh', dim=dim) - entity2mesh=complete_mesh.separateMeshes(dim=dim, entity_type="geometricalEntity", keep_all_elements=False) - for volumic_mesh in entity2mesh.values(): - body = volumicMeshToRigid3D(volumic_mesh=volumic_mesh, model=mod, material=pdur, color='BLEUx') - bodies.addAvatar(body) - -The output when separting meshes is a dictionary. - -By the way it is possible to directly separate a surfacic mesh in -avatars using :py:func:`surfacicMeshesToRigid3D` - -Managing groups ---------------- -Groups are necessary to define model, material, contactors, boundary -condition, etc. - -When defining material and models with :py:func:`buildMeshedAvatar` one -implicitely assumes that all the elements have the same group and -usually uses -default group *all*. However it is possible to define several -material and model: :: - - my_mesh = lecture('Mesh.msh', dim) - my_mesh.rankRenumbering() - body = avatar(number=1, dimension=dim) - body.addBulks(my_mesh.bulks) - body.addNodes(my_mesh.nodes) - body.defineGroups() - body.defineModel(model=modPorous, group = '11') - body.defineMaterial(material=matBiot, group = '11') - body.defineModel(model=modFluid, group = '12') - body.defineMaterial(material=matStokes, group = '12') - - -Applying boundary condition without group ------------------------------------------ - -predicates and so on :: - - def p(x): - return abs(x[0] - 0.0016) < 5.e-4 - - body.addGroupUsingPredicate(name='relax', predicate=p, super_group='12') - body.imposeDrivenDof(group='relax', component=1, dofty='vlocy') - -Miscellaneous -------------- - -other use of :py:func:`avatar.addContactors` :: - - outil.addContactors(group='11',shape='ALpxx',color='BLUEx',reverse='yes') - diff --git a/docs/Pre/_sources/miscellaneous.txt b/docs/Pre/_sources/miscellaneous.txt deleted file mode 100644 index f95c75ceba53c270e96fcfd4ec5b9a6438f73818..0000000000000000000000000000000000000000 --- a/docs/Pre/_sources/miscellaneous.txt +++ /dev/null @@ -1,57 +0,0 @@ -.. py:currentmodule:: pylmgc90.pre - - -Miscellaneous -============= - -Here are gathered some functions which do not really fit in any previous categories, but -remain usefull. - -Displaying avatars ------------------- - -Using :py:func:`visuAvatars` it is possible to see a preview of the -sample stored in an avatars object. - - - -Building an evolution file --------------------------- - -In order to apply non trivial loads it mays be necessary to generate -an *evolution* file. It uses :py:func:`writeEvolution` function. - -**Example:** :: - - t0=0.5 - t1 =1. - f =100. - - def imposedForce(t): - # 0 until t0 - if t <= t0: - return 0. - # linear growing between [t0, t1] - elif t > t0 and t <= t1: - return -f*(t-t0)/(t1-t0) - # constant value afterward - else: - return -f - - writeEvolution(f=imposedForce, instants=numpy.linspace(0., 2*t1, 1000) ,path='DATBOX/', name='force.dat') - - -.. _extrusions: - -Extrusion ---------- - -It is possible to extrude existing 2D rigid avatars in 3D. There are two functions, one to extrude -only one avatar: :py:func:`extrudeRigid` and another one to extrude a whole container of avatars: -:py:func:`extrudeRigids`. The rule of contactors' extrusion is: - -* Polygons (POLYG) become polyhedra (POLYR) -* Disks (DISKx) become spheres (SPHER) or cylinders (CYLND), at choice -* Hollow diskx (xKSID) become hollow cylinders (CNLYC) -* JONCx become plans (PLANx) - diff --git a/docs/Pre/_sources/model.txt b/docs/Pre/_sources/model.txt deleted file mode 100644 index 8be969e406b28d318c946d0236cc06820b0bfdb0..0000000000000000000000000000000000000000 --- a/docs/Pre/_sources/model.txt +++ /dev/null @@ -1,124 +0,0 @@ - -.. py:currentmodule:: pylmgc90.pre - -Model definition -================ - -Mainly with the :py:class:`model` - -Rigid: ------- - -Available elements: - - * Point : Rxx2D - * Point : Rxx3D - -Available options: **None** - -Example :: - - mod = model(name='rigid', physics='MECAx', element='Rxx2D', dimension=dim) - - - -Mechanical (MECAx) : --------------------- - -Available elements (I: isoparametric, B: bar, D: discrete, S: SHB) : - - * S2xxx : SPRNG (D), BARxx (B) - * T3xxx : T3xxx (I), DKTxx - * T6xxx : T6xxx (I) - * Q4xxx : Q4xxx (I), Q4P0x (I) - * Q8xxx : Q8xxx (I), Q8Rxx (I) - * TE4xx : TE4xx (I), TE4lx (I) - * TE10x : TE10x (I) - * H8xxx : H8xxx (I) - * H20xx : H20xx (I), H20Rx (I) - * PRI6x : PRI6x (I), SHB6x (S) - * PRI15 : PRI15 (I) - -Available options: - - * kinematic : 'small','large', - * formulation : 'UpdtL','TotaL' - * mass_storage : 'lump_','coher' - * material : 'elas_', 'elasd', 'neoh_', 'hyper', 'hyp_d', 'J2iso', 'J2mix', 'kvisc' - * anisotropy : 'iso__', 'ortho' - * external_model : 'yes__', 'no___' - * discrete : 'yes__', 'no___' - * external_fields : list of string - * external_vfields : list of string - -Example :: - - mod = model(name='Q4MLx', physics='MECAx', element='Q4xxx', - dimension=2, external_model='yes__', kinematic='small', - material='elas_', anisotropy='iso__', mass_storage='lump_') - -Thermal (THERx) : ------------------ - -Available elements (I: isoparametric, B: bar): - - * S2xxx : S2xth (B) - * T3xxx : T3xxx (I) - * T6xxx : T6xxx (I) - * Q4xxx : Q4xxx (I) - * Q8xxx : Q8xxx (I), Q8Rxx (I) - * TE4xx : TE4xx (I) - * TE10x : TE10x (I) - * H8xxx : H8xxx (I) - * H20xx : H20xx (I), H20Rx (I) - - -Available options: - - * capacity_storage : 'lump_', 'coher' - * formulation : 'class', 'stdvf', 'linvf' - * external_model : 'yes__', 'no___' - * convection_type : 'supg_','cente' - * external_fields : list of string - * external_vfields : list of string - -Example :: - - Model_Thermique = model(name='DIFFU', physics='THERx', element='T3xxx', - dimension = dimension, external_model='no___', capacity_storage='lump_', - formulation = 'class', external_fields = ['COCO','SPHV']) - -Porous (POROx) : ----------------- - -Available elements: - - * T3xxx : T33xx - * T6xxx : T63xx - * Q4xxx : Q44xx - * Q8xxx : Q84xx - * TE4xx : TE44x - * TE10x : TE104 - * H8xxx :H88xx - * H20xx :H208x - -Available options: - - * kinematic : 'small', 'large' - * formulation : 'UpdtL', 'TotaL' - * mass_storage : 'lump_', 'coher' - * material : 'elas_', 'elasd', 'neoh_', 'hyper', 'hyp_d', 'J2iso', 'J2mix', 'kvisc' - * anisotropy : 'iso__', 'ortho' - * external_model : 'yes__', 'no___' - * capacity_storage : 'lump_', 'coher' - * convection_type : 'supg_', 'char_','center' - * physical_type: 'fluid', 'solid' - * external_fields : list of string - * external_vfields : list of string - -Example :: - - Porous_model = model(name='toto_', physics='POROx', element='Q84xx', dimension = dim, - external_model='no___', kinematic='small', material='elas_',anisotropy='iso__', - mass_storage='coher', physical_type = 'solid', capacity_storage='lump_', - convection_type = 'supg_') diff --git a/docs/Pre/_sources/philosophie.txt b/docs/Pre/_sources/philosophie.txt deleted file mode 100644 index 10ccdf8a65b241400eac72d981e86933b0f3e605..0000000000000000000000000000000000000000 --- a/docs/Pre/_sources/philosophie.txt +++ /dev/null @@ -1,184 +0,0 @@ -.. py:currentmodule:: pylmgc90.pre - - -Philosophy -========== - -The point of the preprocessor is the generation of a simulation -case. It allows to define an avatar of a body (a numerical model) in a self -content way so that LMGC90's software will have all needed data to -simulate its behaviour. Furthermore, within the -preprocessor it is possible to copy, translate or rotate any avatar or container of avatars. - -.. _model-and-material-example: - -Model and Material definition ------------------------------ - -Models are necessary to define which physics is considered. Material -contains physical parameters necessary to simulate a model. - -**Example:** :: - - mod = model(name='rigid', physics='MECAx', element='Rxx2D', dimension=2) - mat = material(name='TDURx', materialType='RIGID', density=1000.) - mut = material(name='TMOUx', materialType='RIGID', density=100.) - -.. _avatar-definition: - -Avatar definition ------------------ - -An :py:class:`avatar` is first defined by its geometrical discretization: - -* a set of nodes: center of inertia for a rigid body, nodes of the mesh for a meshed body (see :py:class:`node`), -* a list of geometrical elements connected to nodes. A rigid model is defined - by only one element attached to its only node (center of inertia). - -**Example:** :: - - disk = avatar(dimension=2) - no = node(coor=numpy.array([0.,0.1]),number=1) ) - disk.addNode( no ) - disk.addBulk( rigid2d() ) - -Once the nodes and elements are defined for an avatar, **groups** of element must be defined. There is always at least -one group called 'all' which contained all the elements. This notion of group is inherited from the mesh manipulation -and appears for rigid avatars for consistency's sake. Thus the :py:class:`avatar.defineGroups` method should always -be called. - -Modeling properties are then defined: - -* list of bulk elements: element with a given material and a model (see :py:class:`bulk`), -* list of contactors: a basic shape attached to some geometrical - element such as the center of gravity for a rigid object or a patch - of linear/surfacic elements for a deformable one (see - :py:class:`contactor`), -* initial or driven values of degrees of freedom may be defined. - -**Example:** - -.. image:: figs/disk.* - :height: 150px - :align: right - :alt: disk and wall - -Disk creation:: - - import numpy - radius = 0.1 - disk = avatar(dimension=2) - disk.addNode( node(coor=numpy.array([0.,0.1]),number=1) ) - disk.addBulk( rigid2d() ) - disk.defineGroups() - disk.defineModel(model=mod) - disk.defineMaterial(material=mut) - disk.addContactors(shape='DISKx', color='BLUEx', byrd=radius) - disk.computeRigidProperties() - -Foundation creation:: - - floor = avatar(dimension=2) - floor.addNode( node(coor=numpy.array([0.,-0.05]),number=1) ) - floor.addBulk( rigid2d() ) - floor.defineGroups() - floor.defineModel(model=mod) - floor.defineMaterial(material=mat) - floor.addContactors(shape='JONCx', color='BLUEx', axe1=1., axe2=0.05) - floor.computeRigidProperties() - -Floor boundary condition:: - - floor.imposeDrivenDof(component=[1,2,3],dofty='vlocy') - - -Note that for rigids (as other models), the -:py:class:`avatar.defineGroups` method must be called in order to be -able to add model, material, contactors, etc. - -When a rigid body defined without giving precision on volume or -inertia, a call to :py:class:`avatar.computeRigidProperties` is also -necessary once the model and material are defined. - -Some basic features, like imposing initial or driven values of degrees of freedom, can be applied to a set of -nodes thanks to their group name. To impose initial values to degrees of freeedom of an avatar use: :py:class:`avatar.imposeInitValue`. -To impose driven degrees of freedom of an avatar use: :py:class:`avatar.imposeDrivenDof` - - -Containers ----------- - -Since several model, material, avatar, etc need to be defined some storage mechanism are necessary. -Instead of using Python list of objects pre-lmgc built-in containers -are defined. Available containers are: :py:class:`models`, :py:class:`materials`, :py:class:`avatars`. -Some containers are also hidden in an avatar: :py:class:`nodes`, :py:class:`bulks` and :py:class:`contactors`. - -**Example:** :: - - mods = models() - mods.addModel(mod) - # - mats = materials() - mats+=mat - mats.addMaterial(mut) - # - bodies = avatars() - bodies.addAvatar(disk) - bodies+=floor - - -Basic operations ----------------- - -The methods :py:class:`avatar.translate` and :py:class:`avatar.rotate` allow to translate and -rotate respectively an avatar. To duplicate an avatar, be sure to use deep copy and not shallow copy. - -The translation and rotation can be applied to a whole container of :py:class:`avatars`. - -**Example:** - -.. image:: figs/column.* - :height: 150px - :align: right - :alt: column of disks and wall - -Column creation:: - - import copy - nb_disks = 10 - column = avatars() - for i in range(nb_disks): - new_disk = copy.deepcopy(disk) - new_disk.translate(dy=i*2.*radius) - column.addAvatar(new_disk) - -.. image:: figs/heap.* - :height: 150px - :align: right - :alt: columns of disks and wall - -Columns creation and adding to avatar container:: - - bodies = avatars() - nb_columns = 3 - for i in range(nb_columns): - new_column = copy.deepcopy(column) - new_column.translate(dx=i*2.*radius) - for body in new_column: - bodies.addAvatar(body) - -.. image:: figs/turned_heap.* - :height: 150px - :align: right - :alt: turned columns of disks and wall - -Adding floor an rotating it:: - - bodies.addAvatar(floor) - bodies.rotate(description='axis', center=numpy.array([1.,-0.05]), axis=[0.,0.,1.], alpha=-math.pi/6.) - - -See :download:`this file` for the complete generation script. -The example shows how to generate a simple 2D rigid case. This small set of functions allows a lot -of things already. But it becomes boring to always have to redefine some common behaviours when generating -a lot of samples. That is why some common operations are already implemented using those basic features. diff --git a/docs/Pre/_sources/post.txt b/docs/Pre/_sources/post.txt deleted file mode 100644 index 81630fcbc2585177b6062747a3d8f08ea1235221..0000000000000000000000000000000000000000 --- a/docs/Pre/_sources/post.txt +++ /dev/null @@ -1,49 +0,0 @@ - -Managing POSTPRO -================ - -Postpro commands available in pre: - - * NEW MECAx SETS : mecax_sets - * Fint EVOLUTION : - * Dep EVOLUTION : - * NEW RIGID SETS : rigid_sets - * BODY TRACKING : rigid_set - * TORQUE EVOLUTION : rigid_set - * SOLVER INFORMATIONS : - * VIOLATION EVOLUTION : - * KINETIC ENERGY : - * COORDINATION NUMBER : - * CLxxx ANALYSIS : CLxxx_sets - * DOUBLET TORQUE EVOLUTION : doublets - * QUASI SLIDING CONTACT : r8 - * CONTACT FORCE DISTRIBUTION : i4 - - -**Example:** :: - - post = postpro_commands() - # creating a deformable set - mecax_set = [(body_deformable_brick, "coin")] - deformable_brick_set = postpro_command(name='NEW MECAx SETS', mecax_sets=[mecax_set]) - post.addCommand(deformable_brick_set) - - # following mean displacement and force of deformable sets - deformable_brick_disp = postpro_command(name='Dep EVOLUTION', step=1) - post.addCommand(deformable_brick_disp) - deformable_brick_fint = postpro_command(name='Fint EVOLUTION', step=1) - post.addCommand(deformable_brick_fint) - - # following displacement and force on a rigid object : - rigid_brick_disp = postpro_command(name='BODY TRACKING', step=1, rigid_set=[body_rigid_brick]) - post.addCommand(rigid_brick_disp) - rigid_brick_torque = postpro_command(name='TORQUE EVOLUTION', step=1, rigid_set=[body_rigid_brick]) - post.addCommand(rigid_brick_torque) - # - floor_dte=postpro_command(name='DOUBLET TORQUE EVOLUTION', step=1,doublets=[(up,down)]) - post.addCommand(floor_dte) - # - my_command=postpro_command(name='SOLVER INFORMATIONS', step=1) - post.addCommand(my_command) - # - writePostpro(commands=post, parts=bodies, path='DATBOX/') diff --git a/docs/Pre/_sources/visibility.txt b/docs/Pre/_sources/visibility.txt deleted file mode 100644 index 4ca92c5e47327be7eac1b177e7c2a0645cfef7e6..0000000000000000000000000000000000000000 --- a/docs/Pre/_sources/visibility.txt +++ /dev/null @@ -1,22 +0,0 @@ -.. py:currentmodule:: pylmgc90.pre - -Visibility table definition -=========================== - -A *visibility_table* object created by :py:class:`see_table` is necessary to perform interaction detection. -It allows to relate two sets, Candidate Body/Contactor/Color and Antagoniste Body/Contactor/Color, -to an interaction behavior model/material. - -*behav* may be a *tact_behav* object or a *string*. - -Only contact with gap lower than alert distance are kept. - -Halo is given to reduce neighbor detection when using meshed surface. - - -**Example:** :: - - vt = see_table(CorpsCandidat='MAILx', candidat='CLxxx', colorCandidat='BLEUx', - CorpsAntagoniste='MAILx', antagoniste='ALpxx', colorAntagoniste='BLEUx', - behav=lcsas, alert=0.01, halo=0.05) - diff --git a/docs/Pre/_static/basic.css b/docs/Pre/_static/basic.css index 2b513f0c9643dcd7e671013a2507badf2efb3040..7ed0e58edb31c235c086d98790de21cabd63f3ec 100644 --- a/docs/Pre/_static/basic.css +++ b/docs/Pre/_static/basic.css @@ -122,6 +122,8 @@ ul.keywordmatches li.goodmatch a { table.contentstable { width: 90%; + margin-left: auto; + margin-right: auto; } table.contentstable p.biglink { @@ -149,9 +151,14 @@ table.indextable td { vertical-align: top; } -table.indextable dl, table.indextable dd { +table.indextable ul { margin-top: 0; margin-bottom: 0; + list-style-type: none; +} + +table.indextable > tbody > tr > td > ul { + padding-left: 0em; } table.indextable tr.pcap { @@ -183,6 +190,13 @@ div.genindex-jumpbox { padding: 0.4em; } +/* -- domain module index --------------------------------------------------- */ + +table.modindextable td { + padding: 2px; + border-collapse: collapse; +} + /* -- general body styles --------------------------------------------------- */ div.body p, div.body dd, div.body li, div.body blockquote { @@ -217,10 +231,6 @@ div.body td { text-align: left; } -.field-list ul { - padding-left: 1em; -} - .first { margin-top: 0 !important; } @@ -337,10 +347,6 @@ table.docutils td, table.docutils th { border-bottom: 1px solid #aaa; } -table.field-list td, table.field-list th { - border: 0 !important; -} - table.footnote td, table.footnote th { border: 0 !important; } @@ -377,6 +383,20 @@ div.figure p.caption span.caption-number { div.figure p.caption span.caption-text { } +/* -- field list styles ----------------------------------------------------- */ + +table.field-list td, table.field-list th { + border: 0 !important; +} + +.field-list ul { + margin: 0; + padding-left: 1em; +} + +.field-list p { + margin: 0; +} /* -- other body styles ----------------------------------------------------- */ @@ -427,15 +447,6 @@ dl.glossary dt { font-size: 1.1em; } -.field-list ul { - margin: 0; - padding-left: 1em; -} - -.field-list p { - margin: 0; -} - .optional { font-size: 1.3em; } @@ -494,6 +505,13 @@ pre { overflow-y: hidden; /* fixes display issues on Chrome browsers */ } +span.pre { + -moz-hyphens: none; + -ms-hyphens: none; + -webkit-hyphens: none; + hyphens: none; +} + td.linenos pre { padding: 5px 0px; border: 0; @@ -585,6 +603,16 @@ span.eqno { float: right; } +span.eqno a.headerlink { + position: relative; + left: 0px; + z-index: 1; +} + +div.math:hover a.headerlink { + visibility: visible; +} + /* -- printout stylesheet --------------------------------------------------- */ @media print { diff --git a/docs/Pre/_static/classic.css b/docs/Pre/_static/classic.css index d98894b3f666966797bc7444b3c43bfcfa4e1bc1..20db95e22ef2dfd0f02a85f75b658ccdf3f37a71 100644 --- a/docs/Pre/_static/classic.css +++ b/docs/Pre/_static/classic.css @@ -1,8 +1,8 @@ /* - * default.css_t + * classic.css_t * ~~~~~~~~~~~~~ * - * Sphinx stylesheet -- default theme. + * Sphinx stylesheet -- classic theme. * * :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. diff --git a/docs/Pre/_static/comment-bright.png b/docs/Pre/_static/comment-bright.png index 551517b8c83b76f734ff791f847829a760ad1903..15e27edb12ac25701ac0ac21b97b52bb4e45415e 100644 Binary files a/docs/Pre/_static/comment-bright.png and b/docs/Pre/_static/comment-bright.png differ diff --git a/docs/Pre/_static/comment-close.png b/docs/Pre/_static/comment-close.png index 09b54be46da3f0d4a5061da289dc91d8a2cdbc9c..4d91bcf57de866a901a89a2a68c0f36af1114841 100644 Binary files a/docs/Pre/_static/comment-close.png and b/docs/Pre/_static/comment-close.png differ diff --git a/docs/Pre/_static/comment.png b/docs/Pre/_static/comment.png index 92feb52b8824c6b0f59b658b1196c61de9162a95..dfbc0cbd512bdeefcb1984c99d8e577efb77f006 100644 Binary files a/docs/Pre/_static/comment.png and b/docs/Pre/_static/comment.png differ diff --git a/docs/Pre/_static/down-pressed.png b/docs/Pre/_static/down-pressed.png index 7c30d004b71b32bb2fc06b3bd4dc8278baab0946..5756c8cad8854722893dc70b9eb4bb0400343a39 100644 Binary files a/docs/Pre/_static/down-pressed.png and b/docs/Pre/_static/down-pressed.png differ diff --git a/docs/Pre/_static/down.png b/docs/Pre/_static/down.png index f48098a43b0c36342db9e1a9a7372e79b2484a59..1b3bdad2ceffae91cee61b32f3295f9bbe646e48 100644 Binary files a/docs/Pre/_static/down.png and b/docs/Pre/_static/down.png differ diff --git a/docs/Pre/_static/file.png b/docs/Pre/_static/file.png index 254c60bfbe2715ae2edca48ebccfd074deb8031d..a858a410e4faa62ce324d814e4b816fff83a6fb3 100644 Binary files a/docs/Pre/_static/file.png and b/docs/Pre/_static/file.png differ diff --git a/docs/Pre/_static/jquery.js b/docs/Pre/_static/jquery.js index ab28a24729b320bffd3d2f60302af949db39ab85..f6a6a99e60ee9a5ce4d0922a3a82c6d81c1db7f2 100644 --- a/docs/Pre/_static/jquery.js +++ b/docs/Pre/_static/jquery.js @@ -1,4 +1,4 @@ -/*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ -!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.1",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b=a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="
    ",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h; -if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthh;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML="
    a",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function ab(){return!0}function bb(){return!1}function cb(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h]","i"),hb=/^\s+/,ib=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,jb=/<([\w:]+)/,kb=/\s*$/g,rb={option:[1,""],legend:[1,"
    ","
    "],area:[1,"",""],param:[1,"",""],thead:[1,"","
    "],tr:[2,"","
    "],col:[2,"","
    "],td:[3,"","
    "],_default:k.htmlSerialize?[0,"",""]:[1,"X
    ","
    "]},sb=db(y),tb=sb.appendChild(y.createElement("div"));rb.optgroup=rb.option,rb.tbody=rb.tfoot=rb.colgroup=rb.caption=rb.thead,rb.th=rb.td;function ub(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ub(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function vb(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wb(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xb(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function yb(a){var b=pb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function zb(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Ab(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Bb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xb(b).text=a.text,yb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!gb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(tb.innerHTML=a.outerHTML,tb.removeChild(f=tb.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ub(f),h=ub(a),g=0;null!=(e=h[g]);++g)d[g]&&Bb(e,d[g]);if(b)if(c)for(h=h||ub(a),d=d||ub(f),g=0;null!=(e=h[g]);g++)Ab(e,d[g]);else Ab(a,f);return d=ub(f,"script"),d.length>0&&zb(d,!i&&ub(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=db(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(lb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(jb.exec(f)||["",""])[1].toLowerCase(),l=rb[i]||rb._default,h.innerHTML=l[1]+f.replace(ib,"<$1>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&hb.test(f)&&p.push(b.createTextNode(hb.exec(f)[0])),!k.tbody){f="table"!==i||kb.test(f)?""!==l[1]||kb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ub(p,"input"),vb),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ub(o.appendChild(f),"script"),g&&zb(h),c)){e=0;while(f=h[e++])ob.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ub(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&zb(ub(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ub(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fb,""):void 0;if(!("string"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ib,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ub(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&nb.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ub(i,"script"),xb),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ub(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,yb),j=0;f>j;j++)d=g[j],ob.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qb,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Cb,Db={};function Eb(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fb(a){var b=y,c=Db[a];return c||(c=Eb(a,b),"none"!==c&&c||(Cb=(Cb||m("