Commit Graph

923 Commits

Author SHA1 Message Date
Jukka Aho 08055ecd21 add *.mem and *.cov to .gitignore 2017-08-14 20:41:16 +03:00
Jukka Aho 5357ed88c8 Set up entry point for element assembly
From here we can preallocate matrices to improve efficiency of code.
2017-08-14 18:26:37 +03:00
Jukka Aho b6b0bc3f55 Change coords field type from Point to Tuple
Change to Tuple, Array is allocating memory.
2017-08-14 17:10:02 +03:00
Jukka Aho 681d53ee9a Separate problems_elasticity.jl
Have separate file problems_elasticity_2d.jl for plane stress, plane
strain, axisymmetric etc. problems.
2017-08-13 22:49:05 +03:00
Jukka Aho 4939f49760 Remove obsolete code from heat assembly
Postprocess-function is deprecated and not used anywhere.
2017-08-13 22:45:11 +03:00
Jukka Aho d88dc8742e Remove needless stuff from postprocess_utils.jl
Not needed in core code.
2017-08-13 22:28:13 +03:00
Jukka Aho b87952ae14 Add another loop to assembly procedure
Yet another loop, but this way we can preallocate matrices when
constructiong local matrices of elements with same dimensions (which is
the case in practice)
2017-08-13 22:16:53 +03:00
Jukka Aho a11fafc25b use TimerOutsputs to measure performance 2017-08-13 14:37:44 +03:00
Jukka Aho 4d0dbc44a5 add simple usage example 2017-08-05 15:07:56 +03:00
Jukka Aho 6893ec3fa8 basic doc + @autodoc functions 2017-08-05 15:07:56 +03:00
Jukka Aho 96714acc18 Add new method to set properties for problem
```
update!(body.properties, "a" => "b", "c" => "d")
```

Usage example is shown in
`test_elasticity_2d_linear_with_surface_load.jl`.
2017-08-05 14:42:13 +03:00
Jukka Aho 0f0c49da62 Cleanup of obsolete files
A lot of old files from old documentation systems etc. is in package.
These are now removed or moved. Old notebooks are in docs/tutorials.
This PR closes issue #124.
2017-08-05 12:08:46 +03:00
Jukka Aho 3d3e9bb441 Calculate shape functions using FEMBasis.jl
A lot of code is moved to FEMBasis.jl regarding
calculating basis / shape functions of finite elements.

* add FEMBasis to REQUIRE
* remove obsolete files
* remove obsolete test files
* make integration point iterable
* loosen type definitions
* get length of element rather from basis than connectivity
* calculate midpoint of reference element
* wrong input argument to eval_basis! fixed
2017-08-05 12:03:05 +03:00
Tony Kelman 4038c2f0ce Use @__DIR__ instead of Pkg.dir
this allows installing and loading the package from elsewhere
2017-08-05 12:02:00 +03:00
Jukka Aho b7880906ee separate optomechanical experiments to own package 2017-08-04 22:29:25 +03:00
Jukka Aho cfba8b62f0 add package dependency AsterReader.jl 2017-08-03 21:06:55 +03:00
Jukka Aho ce9b028d26 add package dependency FEMQuad.jl 2017-08-03 20:29:19 +03:00
Jukka Aho 724196b4a4 AbaqusReader.jl tagged, added to REQUIRE 2017-08-02 01:30:32 +03:00
Jukka Aho 648bbe2a40 use AsterReader.jl (#136)
Functions used to read Code Aster file format are now in separate package AsterReader.jl
2017-07-29 13:57:27 +03:00
Jukka Aho cbc85ee665 Move Abaqus-related functions to own file (#137) 2017-07-29 10:51:19 +03:00
Jukka Aho e46c0a1ad4 Use FEMQuad.jl to calculate quadrature rules for elements (#134) 2017-07-23 18:42:04 +03:00
Vlad Stoian ef0897f4b2 Change README link to new CONTRIBUTING.rst (#132) 2017-07-22 17:24:10 +03:00
Jukka Aho e13d6482ce Use PkgTestSuite for CI (#131)
This standardizes the CI process between JuliaFEM packages
2017-07-21 16:28:03 +03:00
Jukka Aho 2af7e0e1bb move cloning of AbaqusReader.jl from .travis to build/deps.jl (#130) 2017-07-21 15:57:46 +03:00
Jukka Aho e97f9b070a REQUIRE: change julia 0.5 -> 0.6 (#129) 2017-07-21 11:08:17 +03:00
Jukka Aho a666bb4bd8 Use package AbaqusReader.jl (#127)
Source code related to read and parse ABAQUS .inp files is now living in
it's own repository `AbaqusReader.jl` and in this commit we cleanup the
same files from this repository.

- add AbaqusReader to .travis.yml because it's not registered package yet
- initialize Mesh from AbaqusReader.jl dict
- remove ABAQUS tests and files moved to AbaqusReader.jl
- remove references to old module Abaqus
- move ABAQUS code to preprocess.jl (what is left)
- close issue #122
- close issue #55
2017-07-21 00:40:52 +03:00
Jukka Aho 9ad66be08b Make code 0.6 compatible (#128)
* running v0.6 conversion code proposed by @ovainola in #108.
* change travis so that build is done using 0.6
* documentation is build from 0.6
* fix most of deprecation warnings
* fix test to pass 0.6
2017-07-20 20:46:57 +03:00
Jukka Aho e185b3cccb Deploy documentation from 0.5 build 2017-07-20 17:17:12 +03:00
Jukka Aho 49b9642e6a Measure testing time for each test file separately (#126)
Uses TimerOutputs.
2017-07-20 17:11:37 +03:00
Jukka Aho 5e3a0c644e add CheckHeader and CheckTabs (#125)
* add `CheckHeader.jl` and `CheckTabs.jl` to `travis.yml`
* fix tab -> 4 spaces
2017-07-20 17:10:15 +03:00
Tony Kelman b1641579f2 use version number instead of release in .travis.yml (#109)
release will change over time, but your REQUIRE file says this
package supports julia 0.5 so it should continue to be tested
2017-07-20 16:04:21 +03:00
Jukka Aho 436bf119b2 Set up documentation + lint (#121)
- remove some automatically generated stuff not should even be in
repository
- set up lint + Documents.jl in same way it is defined in freshly started projects
- add lint + doctest to after_success so that build pass, these needs to be fixed later
- build is failing on nightly (0.7) but it's ok for release (0.5.2)
- Documenter.jl supports doctests, so this closes least #23
- build system is now on Travis-CI completely, so this closes also #68
2017-07-19 07:34:38 +03:00
Jukka Aho 9a8b3b94b7 Merge pull request #112 from JuliaFEM/fix/aster_preprocess
Reading Code Aster med mesh properly
2017-05-30 11:34:34 +07:00
Jukka Aho c0bf19687a Reading Code Aster med mesh properly
- MED file actually supports multiple element sets or node sets for
  single element/node. This is now implemented.
- Minor cleanup of code, etc..
- Fixes issue #111.
2017-05-30 06:26:12 +03:00
Jukka Aho 4a857f4f62 Merge pull request #110 from AndiMD/Pyr5
Pyr5 element implemented.
2017-05-29 12:03:39 +07:00
Andreas Dörfler d50f5fadf0 Add Pyr5 elements, including med support and tests 2017-05-28 00:45:19 +02:00
Jukka Aho 2e5f68d2f6 Merge pull request #106 from JuliaFEM/feature/TimerOutputs.jl
Use TimerOutputs.jl to measure time and memory performance
2017-04-11 21:05:54 +07:00
Jukka Aho 5327459ba4 Use TimerOUtputs.jl to measure time and memory performance
- Added TimerOutputs.jl to REQUIRE file
- JuliaFEM has now TimerOutput handle `to` and function `print_statistics()` to get summary of time and memory usage
- TimerOutputs is used in LinearSolver at the moment and tested in file `test_elasticity_2d_linear_with_surface_load.jl`
2017-04-11 10:39:18 +03:00
Jukka Aho b3f0531746 Add postprocessing features (#100)
* refactored code for solvers.

* Added elementary tests for least-squares fitting of strain and stress fields

* A more realistic postprocess + Xdmf writing test

* removed debug keyword argument from test

* Rewrite update_xdmf!

New function to update Xdmf file no longer takes Solver object but
xdmf, problem, time and fields to write, for example

julia> update_xdmf!(xdmf, problem, 0.0, ["displacement", "temperature"])

All problems are written separately and put together into one
SpatialCollection, allowing to have more structured Xdmf and making
it easier to write complicated field configurations. Support for Xdmf
API 3.0 added.

* Support for Tensor6 field writing

* moved update_xdmf! to io.jl

* Removed some empty files

* Not use old Postprocessor, obsolete code.

* Not use old XDMF (obsolete code). Fixed test.

* removed some postprocessing to pass test, maybe we should drop abaqus.jl from code as obsolete

* add function get_temporal_collection back, it's used by update_xdmf of modal solver

* postprocess of boundary problems also

* added test for contact pressure. dl+quad test output was written in wrong file, fixed.

* postprocess for contact pressure

* contact pressure postprocess

* with boundary problems always store also the primary unknown field

* Change "reaction force" -> "lambda"

* testing postprocess of reaction force also

* sign convention
2017-03-21 08:36:18 +02:00
Jukka Aho a0d18568ce Contact algorithms testing & develpoment (#95)
* contact 3d patch test, standard lagrange, small sliding, linear tet4 elements

* tet4 dual basis contact patch test pass

* contact 3d patch test, standard lagrange, small sliding, linear tet4 elements

* tet4 dual basis contact patch test pass

* Patch test for linear elements standard lagrange / dual lagrange pass now

* Patch test for quadratic contact surfaces for standard + dual basis pass

* refactoring

* renamed files

* Improvements to preprocess scripts

* convert several elements to node sets in one command

* possibility to find particular node from mesh filtered by node set

* 2d small sliding contact patch test, linear elements

* Added backward compatibility

* 2d contact algorithms pass patch tests

* test data for 2d contacts

* no common models in different tests. testing generalized alpha stabilization

* Preprocess tests

* moved tests from test_preprocess_aster_reader.jl to test_preprocess.jl

* generalized-alpha time integration, alpha=0.0 by default

* Improvements to logging

* JuliaFEM.jl: can set environment variable to one of logging levels: OFF, CRITICAL, ERROR, WARNING, INFO, DEBUG

* problems_contact_2d_autodiff.jl: do not loop over nodes if logging level != DEBUG
2017-03-02 08:43:58 +02:00
Jukka Aho 28e09f0305 Merge pull request #94 from JuliaFEM/feature/preprocess
Improvements to preprocess scripts
2017-02-27 09:24:49 +02:00
Jukka Aho 93b520fa2c Added backward compatibility 2017-02-27 08:27:08 +02:00
Jukka Aho 3fafcf243e Improvements to preprocess scripts
* convert several elements to node sets in one command

* possibility to find particular node from mesh filtered by node set
2017-02-27 07:34:04 +02:00
Jukka Aho f275ce3767 Bug/mortar discretization (#88)
* new mortar segmentation tests which are failing

* test_problems_mortar_3d.jl: first test (Tet4) pass

* solvers.jl: diagonal of A is now properly filled, if that option is used. Another option is to remove zero rows from matrix system, which is on by default

* problems_mortar.jl: added new function diagnose_interface to calculate quantities from interface hopefully revealing bugs in calculation

* problems_mortar_3d.jl: added docstring for check_orientation! and removed flooding debug messages not helping to debug anything

* solvers.jl: Another way to solve Ax = b

* Refactored code to make implementation of Tri6 assemble! easier

* Patch test with linear Tet4 elements and quadratic Tet10 elements pass

When using quadratic elements, in polygon clipping algorithm element is divided to linear sub-elements as proposed in [Puso2008]. Interpolation of Lagrange multiplier space is done using quadratic shape functions.

References
----------

[Puso2008] Puso, Michael A., T. A. Laursen, and Jerome Solberg. "A segment-to-segment mortar contact method for quadratic elements and large deformations." Computer Methods in Applied Mechanics and Engineering 197.6 (2008): 555-566.

* increased coverage by adding diagnose_interface

* test using dual basis, failing for unknown reason

* Fixed dual basis construction for Mortar/Tet4

The coefficient matrix Ae for one particular slave element e is the result performing numerical integration on *all* integration cells associated with this element [Popp2013]. Ae cannot be calculated "cell-wise" like it was done before. Now patch test will pass also using `interface.properties.dual_basis = true` option. Partially integrated slave elements are supported as well.

References
----------

[Popp2013] Popp, Alexander, et al. "Improved robustness and consistency of 3D contact algorithms based on a dual mortar approach." Computer Methods in Applied Mechanics and Engineering 264 (2013): 67-80.

* Minor modifications to preprocess.jl

- removed two functions which are unimplemented (but maybe planned in future)
- added function create_node_set_from_element_set!, which can be used, like name suggests, to create a node set from nodes belonging to some set of elements.

* solvers.jl: now prints a list of overconstrained nodes which can be easily copy-pasted to problem.assembly.removed_dofs list to solver overconstrained situation manually

* Increase code coverage

Added a new test which tests dual basis 3d mortar + adjust option when using Tet4 in elasticity problem.

* Tet10 + Dual basis still failing, others are working

* mortar 3d low level tests

* linear surface element projection tests pass

* Introduced basis transform constant alpha

Tet10 + dual basis patch test still failing, but single element low level routine tests gives expected results with alpha=0.2

* added new integration rule FPG12 for triangular elements

* added drop_tolerance option to remove very small values from constraint matrices

* Introduced a basis transform matrix T

Constructing bi-orthogonal basis for quadratic surfaces is ill-conditioned. By doing a basis transform N' = N*T for slave side displacement vector it's possible to construct a bi-orthogonal basis in a same way than with linear elements. Setting alpha=0.2 ensures that quadratic basis functions are strictly positive in practical cases.

* fix 3d clipping test routine, accepts only 3d vertices

* dropped number of integration poitns from 12 to 7 in quadratic mortar surfaces intrestingly gives more accurate results, maybe something numerical error in FPG12 integration rule..?

* added two displacement patch tests + output writing for all cases

* %s/Int64/Int/g

* Changed test data location

* Fine tuning of logging levels
2017-02-25 18:40:14 +02:00
Jukka Aho a5c093c1d6 Merge pull request #92 from JuliaFEM/solvers
solvers.jl: Another way to solve Ax = b
2017-02-25 08:25:30 +02:00
Jukka Aho f3995ee445 solvers.jl: Another way to solve Ax = b
Conflicts:
	src/solvers.jl
2017-02-25 08:02:41 +02:00
Jukka Aho f3378d1d30 Merge pull request #91 from JuliaFEM/bug/solution_vector_dimension
[bugfix] maximum dimension problem is miscalculated
2017-02-25 07:40:13 +02:00
Jukka Aho b238f38d61 bugfix: maximum dimension of problem was miscalculated nnodes*dim, correct way is max_node_id*dim, this was causing bugs when node ids is not starting from 1 2017-02-25 07:18:51 +02:00
Jukka Aho 6f23e94a52 problems_mortar_3d.jl: rename function contains to approx_in (#86)
* problems_mortar_3d.jl: rename function contains to approx_in

See issue #85. `contains` is now renamed to `approx_in`. I also
switched argument order, so this function is now called in a same
way function `in()`. Usage example:

    julia> P = Vector[[1.0, 1.0], [2.0, 2.0]]
    2-element Array{Array{T,1},1}:
     [1.0,1.0]
     [2.0,2.0]

    julia> q = [1.0, 1.0] + eps(Float64)
    2-element Array{Float64,1}:
     1.0
     1.0

    julia> in(q, P)
    false

    julia> approx_in(q, P)
    true

Also added docstring and usage example.

* Removed `importall base` from code
2017-02-01 10:42:31 +02:00
Jukka Aho 0ca7efd631 Testing/code coverage (#83)
Change the code coverage to green. 

* removed duplicate code

* Removed unused code

* removed unmaintained code

* DCTI + DVTI refactored

* discrete fields refactored and tested

* fields are now tested quite well.

* Removed obsolete code not used anywhere

* Element descriptions to common dictionary

* size in global const dictionary also

* Added coverage to sparse tools and removed couple unused functions

* get nonzero rows from SparseMatrixCSC

* bugfix: extending element basis now working and tested

* Removed two unused functions from elements.jl

* removed useless function

* Useless conversion

* remove elasticity assembly using ForwardDiff because it's not used anywhere'

* Added basic testing for NURBS. Fixed bug in NSolid interpolation.

* removed unused functions

* Removed some debug stuff

* renamed file

* removed field assembly posthook, i think not good idea at all

* test for nnz(K) == 0 and automatic determination of dofs

* Testing that solver is throwing error if having problems with boundary assembly

* Removed some unused options. Refactoring.

* Moved solver non-related code to elements.jl

* Removed custom exception (no need)

* unneeded postprocess code

* More tests for NURBS elements.

* Removed unfinished .mail parser

* proper use of Logging package

* also read results

* renamed test file

* create_surface_elements accepts surface name in String now

* bugfix: remove zero rows from constraint matrix after manually removing dofs from some boundary assemblies.

* New test, displacement 3d patch test

* skip displacement field in surface element splitting if not defined

* test element splitting and linear surface elements, fails.

* Bugfix: Xdmf, not XDMF

* removed nonworking tests, requires bugfix

* abaqus_read_results is not working -> bug
2017-01-30 12:28:33 +02:00