Commit Graph

48 Commits

Author SHA1 Message Date
Jukka Aho 01f8d4afcd refactor: Remove Parameters.jl and TimerOutputs.jl usage
Changes:
- problems_elasticity.jl: Replaced Parameters.@with_kw and @unpack with manual code
- problems_heat.jl: Similar Parameters.jl removal
- solvers_modal.jl: Changed 'using Arpack' to 'import Arpack' (file commented out)

Added no-op @timeit macro in JuliaFEM.jl to replace TimerOutputs.

Result: Two fewer dependencies removed.
2025-11-08 14:33:51 +02:00
Jukka Aho f6f3b97c16 feat: Consolidate FEMSparse.jl into JuliaFEM
Consolidated FEMSparse package into src/sparse/:
- sparsematrixcsc.jl: AssemblerSparsityPattern for efficient assembly
- sparsevectordok.jl: Skipped (old Julia syntax, not used)

Changes:
- Removed 'import FEMSparse' from JuliaFEM.jl
- Updated problems_elasticity.jl: FEMSparse.AssemblerSparsityPattern → AssemblerSparsityPattern
- Fixed include paths in sparse/sparse.jl (relative, not absolute)

Modernization:
- Fixed sparsevectordok.jl type keyword → mutable struct
- Fixed AbstractSparseArray type parameter syntax
- Chose to skip sparsevectordok for now (old {T,V} syntax, unused)

Result:
-  JuliaFEM loads successfully
-  5 tests still passing (no regression)
-  Three vendor packages now consolidated: FEMBase, FEMBasis, FEMQuad, FEMSparse

Remaining vendor packages: AbaqusReader, AsterReader, HeatTransfer, FEMBeam, Mortar packages
2025-11-08 11:08:10 +02:00
Jukka Aho bc65dab2fc fix: Resolve merge conflicts and remove incomplete parallel assembly
- Remove incomplete parallel assembly code from 2019 (Issue #250)
- Parallel assembly referenced non-existent problem.assemble_parallel field
- Resolve merge conflict markers from master branch
- Code formatting: standardize spacing around operators and type annotations
- Simplify to serial assembly with comment noting parallel needs refactor

Package still loads and core tests pass.
2025-11-08 08:44:30 +02:00
Jukka Aho 4ceb353314 Merge branch 'master' of github.com:JuliaFEM/JuliaFEM.jl 2019-11-26 15:30:42 +07:00
Jukka Aho d781b00da1 Merge branch 'master' into kc/local_buffer 2019-11-26 15:29:02 +07:00
Jukka Aho 9dc794101c Give meaningful error message when assembling continuum elasticity problem fails
Sometimes user may have the wrong kind of elements in element set when
assembling 3d continuum problem. This could happen for example in
situations, where mesher is giving also segment elements. They may have
some use in certain situations, but currently we don't support them.
When assembly is failing for this reasons, we give a meaningful error
message:

[ Info: It looks that you are trying to assemble elements of type Seg3
to 3d continuum problem. However, they are not supported yet. To filter
out elements from a element set, try `filter(element->!isa(element,
Element{Seg3}), elements)`
ERROR: LoadError: Tried to assemble unsupported elements of type Seg3 to
3d continuum problem.

This commit closes issue #211.
2019-10-27 12:50:11 +02:00
Jukka Aho 6903041db7 Merge pull request #225 from JuliaFEM/KristofferC-patch-2
Improve performance in elasticity by moving out the computation of X from the integration point loop.

Before:
```
 12.576967 seconds (37.65 M allocations: 1.852 GiB, 11.65% gc time)
```

After:
```
 11.251927 seconds (35.27 M allocations: 1.692 GiB, 11.27% gc time)
```

2 million allocations less.
2019-04-08 18:44:59 +03:00
Kristoffer Carlsson 2aca9f0d0c alloc improvements 2018-12-03 15:20:06 -05:00
Kristoffer Carlsson 09c355b916 make backwards compatible 2018-11-29 17:40:55 -05:00
Kristoffer Carlsson ee7532a749 updates 2018-11-19 07:44:56 -05:00
Kristoffer Carlsson 3c67c9c2c9 single threaded 2018-11-15 12:26:17 -05:00
Kristoffer Carlsson 25866860ab wip 2018-11-08 14:27:44 -05:00
Kristoffer Carlsson 58f9fb05be improve performance in elasticity by moving out computation of X from intergration point loop 2018-11-02 13:47:57 -04:00
Kristoffer Carlsson 64c6ff8ad5 improve performance in elasticity 2018-11-02 13:38:15 -04:00
Kristoffer Carlsson 32ac97f4b1 keep working on csc assembly 2018-10-28 20:40:55 -04:00
Kristoffer Carlsson cd22d1a571 use buffer and call assemble for one elements, also some tweaks for using sparsity pattern in FEMBase.jl 2018-10-19 17:35:30 -04:00
Kristoffer Carlsson 2394725a61 Elasticity: add a local buffer struct to preallocate things needed in the assembly loop 2018-10-02 16:00:02 -04:00
Jukka Aho a5a2c43dd8 Fix deprecation warnings
* Add docstrings
* Refactor code
* Module level docstring giving an example
2018-09-06 13:34:26 +03:00
femtocleaner[bot] 33c8657f56 Fix deprecations (#206) 2018-07-05 11:21:10 +03:00
Jukka Aho eb600c940e Drop Logging.jl (#205)
Julia 0.7 is having improved logging capabilities, we can drop
Logging.jl.
2018-07-04 22:59:32 +03:00
Jukka Aho 923aad6f7c Calculate displacement gradient using FEMBasis 2017-08-20 14:49:42 +03:00
Jukka Aho 675f787c9a Preallocate matrices in Elasticity problem
Now style is to assemble all same kind/dimension elements at same time
in one function call, so it's possible to allocate all necessary
matrices only one time.
2017-08-18 23:27:26 +03:00
Jukka Aho ef66a8f74b Assemble several elements at a time
Now assemble! takes a vector of elements as input. This makes it
possible to preallocate memory for common matrices making code super
fast.
2017-08-17 17:49:39 +03:00
Jukka Aho 1505205dcd use FEMBasis / BasisInfo structure
Calculate basic element info using BasisInfo
2017-08-14 21:20:44 +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 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 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
Andreas Dörfler d50f5fadf0 Add Pyr5 elements, including med support and tests 2017-05-28 00:45:19 +02: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 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
Jukka Aho ebf9162903 fixed function call for ideal_plasticity! to get correct arguments. 2017-01-09 13:36:08 +02:00
ovainola 762acf5e10 Removing vonmises.jl includes (#74)
* Removing vonmises.jl includes

Removing all vonmises.jl includes, since file is no longer
to be found in the repository. Vonmises.jl had definitions
for elasticplastic material models, but those definitions
have been moved to problems_elasticity.jl/problems_elasticplastic.jl
files.

fix #73
2017-01-06 12:26:29 +02:00
Jukka Aho a4671f1ebd added wedge15 element + integration rules 2016-11-30 16:18:57 +02:00
Jukka Aho 95200a81e1 fixed deprecation warnings for 0.5 2016-11-13 13:24:08 +02:00
Olli Väinölä c3bc708f01 Ideal plasticity converged, both 2D and 3D 2016-10-28 15:46:04 +03:00
Olli 739c0cedc8 fixed 3d, since there is no dev field anymore 2016-10-09 14:51:06 +03:00
Olli 35a2ac28ec added parameters to ip & element fields 2016-10-09 13:52:21 +03:00
Olli e0ca5811db 3d formulation still not converging 2016-10-04 08:27:54 +03:00
Olli 662eaf2638 Added 3D formulation, no convergence yet 2016-10-03 08:47:20 +03:00
Olli 206db3a2b3 Changed functions forms 2016-10-02 18:43:34 +03:00
Olli d055875e94 initial dev for ideal plastic material 2016-10-02 17:34:05 +03:00
Jukka Aho ea65cb94be new style dict field, xdmf improvements 2016-08-04 13:15:19 +03:00
Jukka Aho 1bd1ec9fa9 postprocessing utility 2016-07-14 12:43:41 +03:00
Jukka Aho fb510e29df analytical tests, hollow sphere and radial displacement + longitudinal vibration of rod (modal analysis) 2016-07-10 23:35:17 +03:00
Jukka Aho c935725d3a julia v0.5 compatibility. test -> testing. new elements tri7 and wedge6. abaqus inp reading. more integration rules. 2016-07-10 04:26:21 +03:00
Jukka Aho 4c45618330 fixed a lot of deprectionwarning issues with 0.5 2016-07-04 03:29:24 +03:00
Jukka Aho 757ba2b3d9 all tests pass now 2016-07-03 21:16:03 +03:00
Jukka Aho eec6db657d renamed files to have some sort of structure 2016-07-03 05:19:37 +03:00