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]