Commit 40675c0f authored by Rémy Mozul's avatar Rémy Mozul

remove everything to avoid confusion with recent sources

parent 2184476c

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0)
if( CMAKE_MAJOR_VERSION EQUAL 2 )
if( CMAKE_MINOR_VERSION EQUAL 8 )
if( CMAKE_PATCH_VERSION LESS 3 )
message(WARNING "CMake version is inferior to 2.8.3, some features may not be well supported")
endif( CMAKE_PATCH_VERSION LESS 3 )
endif( CMAKE_MINOR_VERSION EQUAL 8 )
endif( CMAKE_MAJOR_VERSION EQUAL 2 )
# path to homemade/taken macros/finds
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/src/tools/cmake/modules ${CMAKE_MODULE_PATH})
# Force out-of-source build
include(OutOfSourcesBuild)
project(LMGC90_dev Fortran C CXX)
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)
add_subdirectory(src)
# These are information for the developper only: #
Reminder for the new versions:
------------------------------
To update a subtree directory :
```
$> git subtree pull --prefix=src --squash remote_name tag_number
```
To add a new subtree directory :
```
$> git remote add remote_name remote_url
$> git fetch remote_name
$> git subtree add --prefix=src --squash remote_name tag_or_branch_to_get
```
# 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: fe71abc29a7abe7fa7ffbd3eda79a4e9
tags: 645f666f9bcd5a90fca523b33c5a78b7
import math
from pylmgc90.pre import *
nb_particles = 10000
radius_min = 1.0
radius_max = 2.5
radii = granulo_Random(nb_particles, radius_min, radius_max)
lx = 150.
ly = 100.
[nb_laid_particles, coors] = depositInBox2D(radii,lx,ly)
mat = material(name='TDURx', materialType='RIGID', density=100.)
mod = model(name='rigid', physics='MECAx', element='Rxx2D', dimension=2)
# generate the triangles
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)
max_radius = max(radii)
mut = material(name='TDURx', materialType='RIGID', density=1000.)
# left wall : rough wall
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)
# right wall : not too rough 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)
# bottom wall : small wall (why not use a JONCx ?)
bottom = smoothWall( center=[0.5*lx, -radius_max], theta=0., l=lx + 2.*radius_max,
h=2.*radius_max, nb_polyg=12, model=mod, material=mut, color='WALLx')
bottom.imposeDrivenDof(component=[1,2,3], dofty='vlocy')
bodies.addAvatar(bottom)
try:
visuAvatars(bodies)
except:
pass
mats = materials()
mats.addMaterial(mat,mut)
svs = see_tables()
tacts = tact_behavs()
# interaction definition:
lplpl=tact_behav(name='iqsc0', law='IQS_CLB', fric=0.3)
tacts+=lplpl
svplpl = see_table(CorpsCandidat='RBDY2', candidat='POLYG', colorCandidat='BLUEx', behav=lplpl,
CorpsAntagoniste='RBDY2', antagoniste='POLYG', colorAntagoniste='BLUEx', alert=.1)
tacts+=svplpl
svdkpl = see_table(CorpsCandidat='RBDY2', candidat='DISKx', colorCandidat='BLUEx', behav=lplpl,
CorpsAntagoniste='RBDY2', antagoniste='POLYG', colorAntagoniste='WALLx', alert=.1)
svs+=svdkpl
# files writing
if not os.path.isdir('./DATBOX'):
os.mkdir('./DATBOX')
writeBodies(bodies,chemin='DATBOX/')
writeBulkBehav(mats,chemin='DATBOX/')
writeTactBehav(tacts,svs,chemin='DATBOX/')
writeDrvDof(bodies,chemin='DATBOX/')
writeDofIni(bodies,chemin='DATBOX/')
writeVlocRlocIni(chemin='DATBOX/')
post = postpro_commands()
writePostpro(commands=post, parts=bodies, path='DATBOX/')
import numpy
import math
from pylmgc90.pre import *
dim = 2
bodies = avatars()
mat = material(name='PLEXx',materialType='RIGID',density=2000.)
mod = model(name='rigid', physics='MECAx', element='Rxx2D', dimension=dim)
# bricks, half-brick, linteau and opening definition
brick = brick2D('brick', 1.e-1, 5.e-2)
half_brick = brick2D('half-brick', 5.e-2, 5.e-2)
linteau = brick2D('linteau', 3.e-1, 5.e-2)
ghost = brick2D('ghost', 2.e-1, 5.e-2)
# joint thickness
horizontal_joint_thickness = 0.001
vertical_joint_thickness = 0.001
# rows definitions
even_row = [half_brick, brick, brick, brick, brick, half_brick]
odd_row = [brick, brick, brick, brick, brick]
even_window_row = [half_brick, brick, ghost, brick, half_brick]
odd_window_row = [brick, half_brick, ghost, half_brick, brick]
linteau_row = [brick, linteau, brick]
# wall as a list of rows
wall = [even_row,
odd_row ,
even_row,
odd_row ,
even_window_row,
odd_window_row ,
even_window_row,
linteau_row ,
even_row ]
# wall building :
nb_bricks=0
x=0.
y=0.
for j in xrange(0, len(wall), 1):
row = wall[j]
if j % 2 == 0:
color='BLUEx'
else:
color='REDxx'
x=0.
for i in xrange(0, len(row), 1):
nb_bricks += 1
brick = row[i]
if i == 0:
y += 0.5*brick.ly
x += 0.5*brick.lx
if brick.name != 'ghost':
bodies += brick.rigidBrick(center=[x, y], model=mod, material=mat, color=color)
x += 0.5*brick.lx + vertical_joint_thickness
y += 0.5*brick.ly + horizontal_joint_thickness
## wall done... everything else (floor and other container)
mats = materials()
svs = see_tables()
tacts = tact_behavs()
mut = material(name='TDURx',materialType='RIGID',density=2500.)
mats.addMaterial(mat,mut)
floor = rigidJonc(axe1=3.e-1, axe2=2.5e-2, center=[2.5e-1, -2.5e-2],
model=mod, material=mut, color='WALLx')
floor.imposeDrivenDof(component=[1, 2, 3],dofty='vlocy')
bodies += floor
try:
visuAvatars(bodies)
except:
pass
# interactions management :
lplpl=tact_behav(name='iqsc0',law='IQS_CLB',fric=0.3)
tacts+=lplpl
lpljc=tact_behav(name='iqsc1',law='IQS_CLB',fric=0.5)
tacts+=lpljc
svbbbb = see_table(CorpsCandidat='RBDY2',candidat='POLYG', colorCandidat='BLEUx',behav=lplpl,
CorpsAntagoniste='RBDY2', antagoniste='POLYG',colorAntagoniste='BLEUx',alert=5.e-3)
svs+=svbbbb
svbrbr = see_table(CorpsCandidat='RBDY2',candidat='POLYG', colorCandidat='REDxx',behav=lplpl,
CorpsAntagoniste='RBDY2', antagoniste='POLYG',colorAntagoniste='REDxx',alert=5.e-3)
svs+=svbrbr
svbbbr = see_table(CorpsCandidat='RBDY2',candidat='POLYG', colorCandidat='BLEUx',behav=lplpl,
CorpsAntagoniste='RBDY2', antagoniste='POLYG',colorAntagoniste='REDxx',alert=5.e-3)
svs+=svbbbr
svpljc = see_table(CorpsCandidat='RBDY2',candidat='POLYG', colorCandidat='BLEUx',behav=lpljc,
CorpsAntagoniste='RBDY2', antagoniste='JONCx',colorAntagoniste='WALLx',alert=5.e-3)
svs+=svpljc
# file writing
if not os.path.isdir('./DATBOX'):
os.mkdir('./DATBOX')
writeBodies(bodies,chemin='DATBOX/')
writeBulkBehav(mats,chemin='DATBOX/')
writeTactBehav(tacts,svs,chemin='DATBOX/')
writeDrvDof(bodies,chemin='DATBOX/')
writeDofIni(bodies,chemin='DATBOX/')
writeVlocRlocIni(chemin='DATBOX/')
post = postpro_commands()
writePostpro(commands=post, parts=bodies, path='DATBOX/')
import numpy
import math
from pylmgc90.pre import *
dim = 2
# 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)
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')
# 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)
# copy column
bodies = avatars()
nb_columns = 3
for i in range(nb_columns):
new_columns = copy.deepcopy(column)
new_columns.translate(dx=i*2.*radius)
for body in new_columns:
bodies.addAvatar(body)
# adding floor and rotation sample
bodies.addAvatar(floor)
bodies.rotate(description='axis', alpha=-math.pi/6., axis=[0., 0., 1.], center=[1.,-0.05])
try:
visuAvatars(bodies)
except:
pass
# containers definitions:
mats = materials()
mats.addMaterial(mat,mut)
svs = see_tables()
tacts = tact_behavs()
# interaction definition:
ldkjc=tact_behav(name='iqsc0', law='IQS_CLB', fric=0.3)
tacts+=ldkjc
svdkjc = see_table(CorpsCandidat='RBDY2', candidat='DISKx', colorCandidat='BLUEx', behav=ldkjc,
CorpsAntagoniste='RBDY2', antagoniste='JONCx', colorAntagoniste='BLUEx', alert=.1)
svs+=svdkjc
svdkdk = see_table(CorpsCandidat='RBDY2', candidat='DISKx', colorCandidat='BLUEx', behav=ldkjc,
CorpsAntagoniste='RBDY2', antagoniste='DISKx', colorAntagoniste='BLUEx', alert=.1)
svs+=svdkdk
# files writing
if not os.path.isdir('./DATBOX'):
os.mkdir('./DATBOX')
writeBodies(bodies,chemin='DATBOX/')
writeBulkBehav(mats,chemin='DATBOX/')
writeTactBehav(tacts,svs,chemin='DATBOX/')
writeDrvDof(bodies,chemin='DATBOX/')
writeDofIni(bodies,chemin='DATBOX/')
writeVlocRlocIni(chemin='DATBOX/')
post = postpro_commands()
writePostpro(commands=post, parts=bodies, path='DATBOX/')
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Overview: module code &#8212; pylmgc90.pre 2017.rc1 documentation</title>
<link rel="stylesheet" href="../_static/classic.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '2017.rc1',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
</head>
<body role="document">
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">pylmgc90.pre 2017.rc1 documentation</a> &#187;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<h1>All modules for which code is available</h1>
<ul><li><a href="pylmgc90/pre/IO/evolution2File.html">pylmgc90.pre.IO.evolution2File</a></li>
<li><a href="pylmgc90/pre/avatar/avatar.html">pylmgc90.pre.avatar.avatar</a></li>
<li><a href="pylmgc90/pre/avatar/bulk/bulk.html">pylmgc90.pre.avatar.bulk.bulk</a></li>
<li><a href="pylmgc90/pre/avatar/bulks.html">pylmgc90.pre.avatar.bulks</a></li>
<li><a href="pylmgc90/pre/avatar/contactor/contactor.html">pylmgc90.pre.avatar.contactor.contactor</a></li>
<li><a href="pylmgc90/pre/avatar/contactors.html">pylmgc90.pre.avatar.contactors</a></li>
<li><a href="pylmgc90/pre/avatar/node/node.html">pylmgc90.pre.avatar.node.node</a></li>
<li><a href="pylmgc90/pre/avatar/nodes.html">pylmgc90.pre.avatar.nodes</a></li>
<li><a href="pylmgc90/pre/avatars.html">pylmgc90.pre.avatars</a></li>
<li><a href="pylmgc90/pre/build_avatar/brick.html">pylmgc90.pre.build_avatar.brick</a></li>
<li><a href="pylmgc90/pre/build_avatar/brick_wall.html">pylmgc90.pre.build_avatar.brick_wall</a></li>
<li><a href="pylmgc90/pre/build_avatar/extrusion.html">pylmgc90.pre.build_avatar.extrusion</a></li>
<li><a href="pylmgc90/pre/build_avatar/lattices2D.html">pylmgc90.pre.build_avatar.lattices2D</a></li>
<li><a href="pylmgc90/pre/build_avatar/lattices3D.html">pylmgc90.pre.build_avatar.lattices3D</a></li>
<li><a href="pylmgc90/pre/build_avatar/lecture.html">pylmgc90.pre.build_avatar.lecture</a></li>
<li><a href="pylmgc90/pre/build_avatar/mesh.html">pylmgc90.pre.build_avatar.mesh</a></li>
<li><a href="pylmgc90/pre/build_avatar/mesh2D.html">pylmgc90.pre.build_avatar.mesh2D</a></li>
<li><a href="pylmgc90/pre/build_avatar/mesh3D.html">pylmgc90.pre.build_avatar.mesh3D</a></li>
<li><a href="pylmgc90/pre/build_avatar/particles.html">pylmgc90.pre.build_avatar.particles</a></li>
<li><a href="pylmgc90/pre/build_avatar/tools/containers2D.html">pylmgc90.pre.build_avatar.tools.containers2D</a></li>
<li><a href="pylmgc90/pre/build_avatar/tools/containers3D.html">pylmgc90.pre.build_avatar.tools.containers3D</a></li>
<li><a href="pylmgc90/pre/build_avatar/tools/granulometry.html">pylmgc90.pre.build_avatar.tools.granulometry</a></li>
<li><a href="pylmgc90/pre/build_avatar/walls.html">pylmgc90.pre.build_avatar.walls</a></li>
<li><a href="pylmgc90/pre/bulk_behavs.html">pylmgc90.pre.bulk_behavs</a></li>
<li><a href="pylmgc90/pre/models.html">pylmgc90.pre.models</a></li>
<li><a href="pylmgc90/pre/shared/bulk_behav.html">pylmgc90.pre.shared.bulk_behav</a></li>
<li><a href="pylmgc90/pre/shared/model.html">pylmgc90.pre.shared.model</a></li>
<li><a href="pylmgc90/pre/shared/tact_behav.html">pylmgc90.pre.shared.tact_behav</a></li>
<li><a href="pylmgc90/pre/tact_behavs.html">pylmgc90.pre.tact_behavs</a></li>
<li><a href="pylmgc90/pre/viz/visuVtk.html">pylmgc90.pre.viz.visuVtk</a></li>
</ul>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
<div><input type="text" name="q" /></div>
<div><input type="submit" value="Go" /></div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">