aasdfasdf

This commit is contained in:
Jukka Aho
2015-06-26 19:40:36 +03:00
20 changed files with 399 additions and 1008 deletions
File diff suppressed because one or more lines are too long
+40 -2
View File
@@ -1,3 +1,41 @@
[FEATURES / TODO](https://github.com/ovainola/JuliaFEM/blob/master/docs/features.md)
# JuliaFEM
Use `git mv` to move files in repository to make file tracking work properly.
[![Join the chat at https://gitter.im/JuliaFEM/JuliaFEM](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/JuliaFEM/JuliaFEM?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
Build Status: [![Build Status](https://travis-ci.org/JuliaFEM/JuliaFEM.jl.svg?branch=master)](https://travis-ci.org/JuliaFEM/JuliaFEM.jl)
Code Coverage: [![Coverage Status](https://coveralls.io/repos/JuliaFEM/JuliaFEM.jl/badge.svg?branch=master)](https://coveralls.io/r/JuliaFEM/JuliaFEM.jl?branch=master)
http://juliafem.readthedocs.org/en/latest/
The JuliaFEM project develops open-source software for reliable, scalable, distributed Finite Element Method.
The JuliaFEM software library is a framework that allows for the distributed processing of large Finite Element Models across clusters of computers using simple programming models. It is designed to scale up from single servers to thousands of machines, each offering local computation and storage. The basic design principle is: everything is nonlinear. All physics models are nonlinear from which the linearization are made as a special cases.
JuliaFEM current status: project planning
Initial road map for JuliaFEM:
version | number of degree of freedom | number of cores
----------|-----------------------------------------|----------------------
1.0 | 100 000 000 | 1 000
2.0 | 1 000 000 000 | 10 000
3.0 | 10 000 000 000 | 100 000
We strongly believe in the test driven development as well as building on top of previous work. Thus all the new code in this project should be 100% tested. Also other people have wisdom in style as well:
[The Zen of Python](https://www.python.org/dev/peps/pep-0020/)
```
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Errors should never pass silently.
```
Interested in participating? Please start by reading [CONTRIBUTING.md](https://github.com/JuliaFEM/JuliaFEM/blob/master/CONTRIBUTING.md).
Contributors: see [contributors](https://github.com/JuliaFEM/JuliaFEM/blob/master/contributors)
+154
View File
@@ -0,0 +1,154 @@
# JuliaFEM.elasticity_solver
## Internal
---
<a id="method__assemble.1" class="lexicon_definition"></a>
#### assemble!(fe, eldofs_, I, V) [¶](#method__assemble.1)
Assemble global RHS to I,V ready for sparse format
Parameters
----------
fe : local vector
eldofs_ : Array
degrees of freedom
I,V : Arrays for sparse matrix
Notes
-----
eldofs can also be node ids for convenience. In that case dimension
is calculated and eldofs are "extended" to problem dimension.
*source:*
[JuliaFEM/src/elasticity_solver.jl:171](https://github.com/JuliaFEM/JuliaFEM.jl/tree/92c5e6c15a1ffaea4c153cba2af3a62ba3b42ebe/src/elasticity_solver.jl#L171)
---
<a id="method__assemble.2" class="lexicon_definition"></a>
#### assemble!(ke, eldofs_, I, J, V) [¶](#method__assemble.2)
Assemble global stiffness matrix to I,J,V ready for sparse format
Parameters
----------
ke : local matrix
eldofs_ : Array
degrees of freedom
I,J,V : Arrays for sparse matrix
Notes
-----
eldofs can also be node ids for convenience. In that case dimension
is calculated and eldofs are "extended" to problem dimension.
*source:*
[JuliaFEM/src/elasticity_solver.jl:130](https://github.com/JuliaFEM/JuliaFEM.jl/tree/92c5e6c15a1ffaea4c153cba2af3a62ba3b42ebe/src/elasticity_solver.jl#L130)
---
<a id="method__calc_local_matrices.1" class="lexicon_definition"></a>
#### calc_local_matrices!(X, u, R, Kt, N, dNdchi, lambda_, mu_, ipoints, iweights) [¶](#method__calc_local_matrices.1)
Calculate local tangent stiffness matrix and residual force vector R = T - F
*source:*
[JuliaFEM/src/elasticity_solver.jl:68](https://github.com/JuliaFEM/JuliaFEM.jl/tree/92c5e6c15a1ffaea4c153cba2af3a62ba3b42ebe/src/elasticity_solver.jl#L68)
---
<a id="method__eliminate_boundary_conditions.1" class="lexicon_definition"></a>
#### eliminate_boundary_conditions(dirichletbc, I, J, V) [¶](#method__eliminate_boundary_conditions.1)
Eliminate Dirichlet boundary conditions from matrix
Parameters
----------
dirichletbc : array [dim x nnodes]
I, J, V : sparse matrix arrays
Returns
-------
I, J, V : boundary conditions removed
Notes
-----
pros:
- matrix assembly remains positive definite
cons:
- maybe inefficient because of extra sparse matrix operations. (It's hard to remove stuff from sparse matrix.)
- if u != 0 in dirichlet boundary requires extra care
Raises
------
Exception, if displacement boundary conditions given, i.e.
DX=2 for some node, for example.
*source:*
[JuliaFEM/src/elasticity_solver.jl:218](https://github.com/JuliaFEM/JuliaFEM.jl/tree/92c5e6c15a1ffaea4c153cba2af3a62ba3b42ebe/src/elasticity_solver.jl#L218)
---
<a id="method__eliminate_boundary_conditions.2" class="lexicon_definition"></a>
#### eliminate_boundary_conditions(dirichletbc, I, V) [¶](#method__eliminate_boundary_conditions.2)
Eliminate Dirichlet boundary conditions from vector
Parameters
----------
dirichletbc : array [dim x nnodes]
I, V : sparse vector arrays
Returns
-------
I, V : boundary conditions removed
Notes
-----
pros:
- matrix assembly remains positive definite
cons:
- maybe inefficient because of extra sparse matrix operations. (It's hard to remove stuff from sparse matrix.)
- if u != 0 in dirichlet boundary requires extra care
Raises
------
Exception, if displacement boundary conditions given, i.e.
DX=2 for some node, for example.
*source:*
[JuliaFEM/src/elasticity_solver.jl:257](https://github.com/JuliaFEM/JuliaFEM.jl/tree/92c5e6c15a1ffaea4c153cba2af3a62ba3b42ebe/src/elasticity_solver.jl#L257)
---
<a id="method__interpolate.1" class="lexicon_definition"></a>
#### interpolate{T<:Real}(field::Array{T<:Real, 1}, basis::Function, ip) [¶](#method__interpolate.1)
Interpolate field variable using basis functions f for point ip.
This function tries to be as general as possible and allows interpolating
lot of different fields.
Parameters
----------
field :: Array{Number, dim}
Field variable
basis :: Function
Basis functions
ip :: Array{Number, 1}
Point to interpolate
*source:*
[JuliaFEM/src/elasticity_solver.jl:30](https://github.com/JuliaFEM/JuliaFEM.jl/tree/92c5e6c15a1ffaea4c153cba2af3a62ba3b42ebe/src/elasticity_solver.jl#L30)
---
<a id="method__solve_elasticity_increment.1" class="lexicon_definition"></a>
#### solve_elasticity_increment!(X, u, du, elmap, nodalloads, dirichletbc, lambda, mu, N, dNdchi, ipoints, iweights) [¶](#method__solve_elasticity_increment.1)
Solve one increment of elasticity problem
*source:*
[JuliaFEM/src/elasticity_solver.jl:278](https://github.com/JuliaFEM/JuliaFEM.jl/tree/92c5e6c15a1ffaea4c153cba2af3a62ba3b42ebe/src/elasticity_solver.jl#L278)
+104
View File
@@ -0,0 +1,104 @@
# JuliaFEM
## Exported
---
<a id="method__add_elements.1" class="lexicon_definition"></a>
#### add_elements(model, elements) [¶](#method__add_elements.1)
Add new elements to model.
Parameters
----------
list of dicts, dict = {element_type => elcode, elids => [node ids..]}
Examples
--------
Create two tet4 element and add them:
>>> m = new_model()
>>> const TET4 = 0x6
>>> el1 = Dict("element_type" => TET4, "node_ids" => [1, 2, 3, 4])
>>> el2 = Dict("element_type" => TET4, "node_ids" => [4, 3, 2, 1])
In dict key means element id
>>> elements = Dict(1 => el1, 2 => el2)
>>> add_elements(m, elements)
*source:*
[JuliaFEM/src/JuliaFEM.jl:102](https://github.com/JuliaFEM/JuliaFEM.jl/tree/92c5e6c15a1ffaea4c153cba2af3a62ba3b42ebe/src/JuliaFEM.jl#L102)
---
<a id="method__get_elements.1" class="lexicon_definition"></a>
#### get_elements(model, element_ids) [¶](#method__get_elements.1)
Get subset of elements from model.
Parameters
----------
element_ids : list of ints
Element id numbers
Returns
-------
Dict
{element_type = XXX, node_ids = [a, b, c, d, e, ..., n]}
*source:*
[JuliaFEM/src/JuliaFEM.jl:126](https://github.com/JuliaFEM/JuliaFEM.jl/tree/92c5e6c15a1ffaea4c153cba2af3a62ba3b42ebe/src/JuliaFEM.jl#L126)
---
<a id="method__get_field.1" class="lexicon_definition"></a>
#### get_field(field_type, field_name) [¶](#method__get_field.1)
Get field from model.
Parameters
----------
field_type : Dict()
Target topology (model.model, model.nodes, model.elements,
model.element_nodes, model.element_gauss
field_name : str
Field name
create_if_doesnt_exist : bool, optional
If field doesn't exists, create one and return empty field
Raises
------
Error, if field not found and create_if_doesnt_exist == false
*source:*
[JuliaFEM/src/JuliaFEM.jl:67](https://github.com/JuliaFEM/JuliaFEM.jl/tree/92c5e6c15a1ffaea4c153cba2af3a62ba3b42ebe/src/JuliaFEM.jl#L67)
---
<a id="method__new_model.1" class="lexicon_definition"></a>
#### new_model() [¶](#method__new_model.1)
Initialize empty model.
Parameters
----------
None
Returns
-------
New model struct
*source:*
[JuliaFEM/src/JuliaFEM.jl:41](https://github.com/JuliaFEM/JuliaFEM.jl/tree/92c5e6c15a1ffaea4c153cba2af3a62ba3b42ebe/src/JuliaFEM.jl#L41)
---
<a id="type__model.1" class="lexicon_definition"></a>
#### JuliaFEM.Model [¶](#type__model.1)
Basic model
*source:*
[JuliaFEM/src/JuliaFEM.jl:19](https://github.com/JuliaFEM/JuliaFEM.jl/tree/92c5e6c15a1ffaea4c153cba2af3a62ba3b42ebe/src/JuliaFEM.jl#L19)
+2
View File
@@ -0,0 +1,2 @@
Files in this directory are generated using the `build.jl` script. Make
all changes to the originating docstrings/files rather than these ones.
+2
View File
@@ -0,0 +1,2 @@
Files in this directory are generated using the `build.jl` script. Make
all changes to the originating docstrings/files rather than these ones.
-1
View File
@@ -1 +0,0 @@
+43
View File
@@ -0,0 +1,43 @@
# API-INDEX
## MODULE: JuliaFEM
---
## Methods [Exported]
[add_elements(model, elements)](JuliaFEM.md#method__add_elements.1) Add new elements to model.
[get_elements(model, element_ids)](JuliaFEM.md#method__get_elements.1) Get subset of elements from model.
[get_field(field_type, field_name)](JuliaFEM.md#method__get_field.1) Get field from model.
[new_model()](JuliaFEM.md#method__new_model.1) Initialize empty model.
---
## Types [Exported]
[JuliaFEM.Model](JuliaFEM.md#type__model.1) Basic model
## MODULE: JuliaFEM.elasticity_solver
---
## Methods [Internal]
[assemble!(fe, eldofs_, I, V)](JuliaFEM.elasticity_solver.md#method__assemble.1) Assemble global RHS to I,V ready for sparse format
[assemble!(ke, eldofs_, I, J, V)](JuliaFEM.elasticity_solver.md#method__assemble.2) Assemble global stiffness matrix to I,J,V ready for sparse format
[calc_local_matrices!(X, u, R, Kt, N, dNdchi, lambda_, mu_, ipoints, iweights)](JuliaFEM.elasticity_solver.md#method__calc_local_matrices.1) Calculate local tangent stiffness matrix and residual force vector R = T - F
[eliminate_boundary_conditions(dirichletbc, I, J, V)](JuliaFEM.elasticity_solver.md#method__eliminate_boundary_conditions.1) Eliminate Dirichlet boundary conditions from matrix
[eliminate_boundary_conditions(dirichletbc, I, V)](JuliaFEM.elasticity_solver.md#method__eliminate_boundary_conditions.2) Eliminate Dirichlet boundary conditions from vector
[interpolate{T<:Real}(field::Array{T<:Real, 1}, basis::Function, ip)](JuliaFEM.elasticity_solver.md#method__interpolate.1) Interpolate field variable using basis functions f for point ip.
[solve_elasticity_increment!(X, u, du, elmap, nodalloads, dirichletbc, lambda, mu, N, dNdchi, ipoints, iweights)](JuliaFEM.elasticity_solver.md#method__solve_elasticity_increment.1) Solve one increment of elasticity problem
+7 -1
View File
@@ -3,6 +3,12 @@ using Docile, Lexicon, JuliaFEM
const api_directory = "api"
const modules = [JuliaFEM, JuliaFEM.elasticity_solver]
main_folder = dirname(dirname(@__FILE__))
this_folder = dirname(@__FILE__)
file_ = "README.md"
run(`cp $main_folder/$file_ $this_folder`)
cd(dirname(@__FILE__)) do
# Generate and save the contents of docstrings as markdown files.
index = Index()
@@ -12,7 +18,7 @@ cd(dirname(@__FILE__)) do
save(joinpath(api_directory, "index.md"), index; md_subheader = :category)
# Add a reminder not to edit the generated files.
open(joinpath(api_directory, "README_new.md"), "w") do f
open(joinpath(api_directory, "README.md"), "w") do f
print(f, """
Files in this directory are generated using the `build.jl` script. Make
all changes to the originating docstrings/files rather than these ones.
-15
View File
@@ -1,15 +0,0 @@
import os
import sys
import re
import juliadoc
extensions = ['sphinx.ext.mathjax',
'juliadoc.julia',
'juliadoc.jldoctest',
'juliadoc.jlhelp']
master_doc = 'index'
html_theme_path = [juliadoc.get_theme_dir()]
html_sidebars = juliadoc.default_sidebars()
-29
View File
@@ -1,29 +0,0 @@
===============
FEATURES / TODO
===============
- Parallel design
- Sparse matrices
- Discontinuous Galerkin?
- 100% Tested
- Automatic coverage (Travis CI)
- Doctest examples and tutorials
- Intuitive to use
- Marketing
- Engineering porn
- Field functions
- Multiphysics platform
- Elasticity
- Thermal implemented
- Transient and steady solvers
- Implicit dynamics
- Nonlinearities
- Geometrical
- Material
- Contact
- Mortar
- Modular design
- E.g. contact formulation can be altered by user
- Mesh and results format, Xdmf?
- No scalars but field variables, e.g. no constant 210GPa for steel, we interpolate variable from nodes.
- (Constant is a special case of field variable).
-1
View File
@@ -1 +0,0 @@
-e git+https://github.com/JuliaLang/JuliaDoc.git#egg=JuliaDoc