Coder Social home page Coder Social logo

easifem / base Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 2.0 23.06 MB

Expandable And Scalable Infrastructure for Finite Element Methods, EASIFEM, is [Modern Fortran](https://fortran-lang.org) framework for solving partial differential equations (PDEs) using finite element methods. EASIFEM "eases" the efforts to develop scientific programs in Fortran.

Home Page: https://www.easifem.com

License: Other

C++ 7.14% CMake 1.34% Assembly 0.37% Shell 0.06% NASL 0.12% C 5.69% Python 0.08% Fortran 77.67% HTML 6.95% Pascal 0.58%
fortran2018 fem fortran geomechanics simulation soil-science finite-element-methods finite-element-analysis multi-phase-flow linear-algebra

base's Issues

Orthogonal polynomials

Shape Functions and Gauss Quadratures

Gauss-Quadrature and Shape-function rules.

Reference:

[  3%] Building CXX object CMakeFiles/shared.dir/Numeric/Numeric.cpp.o
[  4%] Building CXX object CMakeFiles/shared.dir/Numeric/fullMatrix.cpp.o
[  4%] Building CXX object CMakeFiles/shared.dir/Numeric/BasisFactory.cpp.o
[  4%] Building CXX object CMakeFiles/shared.dir/Numeric/FuncSpaceData.cpp.o
[  4%] Building CXX object CMakeFiles/shared.dir/Numeric/discreteFrechetDistance.cpp.o
[  4%] Building CXX object CMakeFiles/shared.dir/Numeric/miniBasis.cpp.o
[  4%] Building CXX object CMakeFiles/shared.dir/Numeric/nodalBasis.cpp.o
[  5%] Building CXX object CMakeFiles/shared.dir/Numeric/polynomialBasis.cpp.o
[  5%] Building CXX object CMakeFiles/shared.dir/Numeric/incompleteBasis.cpp.o
[  5%] Building CXX object CMakeFiles/shared.dir/Numeric/pyramidalBasis.cpp.o
[  5%] Building CXX object CMakeFiles/shared.dir/Numeric/BergotBasis.cpp.o
[  5%] Building CXX object CMakeFiles/shared.dir/Numeric/orthogonalBasis.cpp.o
[  5%] Building CXX object CMakeFiles/shared.dir/Numeric/bezierBasis.cpp.o
[  5%] Building CXX object CMakeFiles/shared.dir/Numeric/JacobianBasis.cpp.o
[  6%] Building CXX object CMakeFiles/shared.dir/Numeric/CondNumBasis.cpp.o
[  6%] Building CXX object CMakeFiles/shared.dir/Numeric/pointsGenerators.cpp.o
[  6%] Building CXX object CMakeFiles/shared.dir/Numeric/InnerVertexPlacement.cpp.o
[  6%] Building CXX object CMakeFiles/shared.dir/Numeric/ElementType.cpp.o
[  6%] Building CXX object CMakeFiles/shared.dir/Numeric/GaussIntegration.cpp.o
[  6%] Building CXX object CMakeFiles/shared.dir/Numeric/GaussQuadratureLin.cpp.o
[  6%] Building CXX object CMakeFiles/shared.dir/Numeric/GaussQuadratureTri.cpp.o
[  7%] Building CXX object CMakeFiles/shared.dir/Numeric/GaussQuadratureQuad.cpp.o
[  7%] Building CXX object CMakeFiles/shared.dir/Numeric/GaussQuadratureTet.cpp.o
[  7%] Building CXX object CMakeFiles/shared.dir/Numeric/GaussQuadratureHex.cpp.o
[  7%] Building CXX object CMakeFiles/shared.dir/Numeric/GaussQuadraturePri.cpp.o
[  7%] Building CXX object CMakeFiles/shared.dir/Numeric/GaussQuadraturePyr.cpp.o
[  7%] Building CXX object CMakeFiles/shared.dir/Numeric/GaussLegendreSimplex.cpp.o
[  7%] Building CXX object CMakeFiles/shared.dir/Numeric/GaussJacobi1D.cpp.o
[  8%] Building CXX object CMakeFiles/shared.dir/Numeric/HilbertCurve.cpp.o
[  8%] Building CXX object CMakeFiles/shared.dir/Numeric/robustPredicates.cpp.o
[  8%] Building CXX object CMakeFiles/shared.dir/Numeric/decasteljau.cpp.o
[  8%] Building CXX object CMakeFiles/shared.dir/Numeric/mathEvaluator.cpp.o
[  8%] Building CXX object CMakeFiles/shared.dir/Numeric/Iso.cpp.o
[  8%] Building CXX object CMakeFiles/shared.dir/Numeric/approximationError.cpp.o
[  8%] Building CXX object CMakeFiles/shared.dir/Numeric/ConjugateGradients.cpp.o
[  9%] Building CXX object CMakeFiles/shared.dir/Numeric/OrthogonalPoly.cpp.o
[  9%] Building CXX object CMakeFiles/shared.dir/Numeric/HierarchicalBasisH1.cpp.o
[  9%] Building CXX object CMakeFiles/shared.dir/Numeric/HierarchicalBasisH1Quad.cpp.o
[  9%] Building CXX object CMakeFiles/shared.dir/Numeric/HierarchicalBasisH1Tria.cpp.o
[  9%] Building CXX object CMakeFiles/shared.dir/Numeric/HierarchicalBasisH1Line.cpp.o
[  9%] Building CXX object CMakeFiles/shared.dir/Numeric/HierarchicalBasisH1Brick.cpp.o
[ 10%] Building CXX object CMakeFiles/shared.dir/Numeric/HierarchicalBasisH1Tetra.cpp.o
[ 10%] Building CXX object CMakeFiles/shared.dir/Numeric/HierarchicalBasisH1Pri.cpp.o
[ 10%] Building CXX object CMakeFiles/shared.dir/Numeric/HierarchicalBasisH1Point.cpp.o
[ 10%] Building CXX object CMakeFiles/shared.dir/Numeric/HierarchicalBasis.cpp.o
[ 10%] Building CXX object CMakeFiles/shared.dir/Numeric/HierarchicalBasisHcurl.cpp.o
[ 10%] Building CXX object CMakeFiles/shared.dir/Numeric/HierarchicalBasisHcurlQuad.cpp.o
[ 10%] Building CXX object CMakeFiles/shared.dir/Numeric/HierarchicalBasisHcurlBrick.cpp.o
[ 11%] Building CXX object CMakeFiles/shared.dir/Numeric/HierarchicalBasisHcurlTria.cpp.o
[ 11%] Building CXX object CMakeFiles/shared.dir/Numeric/HierarchicalBasisHcurlTetra.cpp.o
[ 11%] Building CXX object CMakeFiles/shared.dir/Numeric/HierarchicalBasisHcurlPri.cpp.o
[ 11%] Building CXX object CMakeFiles/shared.dir/Numeric/HierarchicalBasisHcurlLine.cpp.o
[ 11%] Building CXX object CMakeFiles/shared.dir/Numeric/curvature.cpp.o

Regards
Vikas

ElemshapeData

We need to change the data-structure a bit.

Current:

- dNdXi = (I, i, ips)
- dNdXt = (I, i, ips)
- dNTdt = (I, a, ips)
- dNTdXt = (I, a, i, ips)

Proposal:

- dNdXi = (i,I,ips)
- dNdXt = (i,I,ips)
- dNTdt = (I,a,ips)
- dNTdXt = (i,I,a,ips)

Regards
Vikas

๐ŸŒน NINJA ๐Ÿƒ CMAKE ๐ŸŒท Warning

CMake with Ninja Generator produces following ๐Ÿž Warnings ๐Ÿข in System_Method.f90 files.

- Build files have been written to: /home/vikassharma/temp/easifem-base/build
[3/103] Building Fortran object CMakeFiles/easifemBase.dir/src/modules/System/src/System_Method.f90.o
/home/vikassharma/Dropbox/easifem-base/src/modules/System/src/System_Method.f90:5056:24:

 5056 | !!       write (*, FMT="('Device ID(hex/decimal):',      &
      |                        1
Warning: missing terminating " character
/home/vikassharma/Dropbox/easifem-base/src/modules/System/src/System_Method.f90:5057:32:

 5057 | !!       & T30, Z0,'h/',I0,'d')") buff(1),buff(1)
      |                                1
Warning: missing terminating " character
/home/vikassharma/Dropbox/easifem-base/src/modules/System/src/System_Method.f90:5058:24:

 5058 | !!       write (*, FMT="('Inode number:',                &
      |                        1
Warning: missing terminating " character
/home/vikassharma/Dropbox/easifem-base/src/modules/System/src/System_Method.f90:5059:20:

 5059 | !!       & T30, I0)") buff(2)
      |                    1
Warning: missing terminating " character
/home/vikassharma/Dropbox/easifem-base/src/modules/System/src/System_Method.f90:5060:24:

 5060 | !!       write (*, FMT="('File mode (octal):',           &
      |                        1
Warning: missing terminating " character
/home/vikassharma/Dropbox/easifem-base/src/modules/System/src/System_Method.f90:5061:21:

 5061 | !!       & T30, O19)") buff(3)
      |                     1
Warning: missing terminating " character
/home/vikassharma/Dropbox/easifem-base/src/modules/System/src/System_Method.f90:5062:24:

 5062 | !!       write (*, FMT="('Number of links:',             &
      |                        1
Warning: missing terminating " character
/home/vikassharma/Dropbox/easifem-base/src/modules/System/src/System_Method.f90:5063:20:

 5063 | !!       & T30, I0)") buff(4)
      |                    1
Warning: missing terminating " character
/home/vikassharma/Dropbox/easifem-base/src/modules/System/src/System_Method.f90:5064:24:

 5064 | !!       write (*, FMT="('Owner''s uid/username:',       &
      |                        1
Warning: missing terminating " character
/home/vikassharma/Dropbox/easifem-base/src/modules/System/src/System_Method.f90:5065:26:

 5065 | !!       & T30, I0,1x, A)") buff(5), system_getpwuid(buff(5))
      |                          1
Warning: missing terminating " character
/home/vikassharma/Dropbox/easifem-base/src/modules/System/src/System_Method.f90:5066:24:

 5066 | !!       write (*, FMT="('Owner''s gid/group:',          &
      |                        1
Warning: missing terminating " character
/home/vikassharma/Dropbox/easifem-base/src/modules/System/src/System_Method.f90:5067:26:

 5067 | !!       & T30, I0,1x, A)") buff(6), system_getgrgid(buff(6))
      |                          1
Warning: missing terminating " character
/home/vikassharma/Dropbox/easifem-base/src/modules/System/src/System_Method.f90:5068:24:

 5068 | !!       write (*, FMT="('Device where located:',        &
      |                        1
Warning: missing terminating " character
/home/vikassharma/Dropbox/easifem-base/src/modules/System/src/System_Method.f90:5069:20:

 5069 | !!       & T30, I0)") buff(7)
      |                    1
Warning: missing terminating " character
/home/vikassharma/Dropbox/easifem-base/src/modules/System/src/System_Method.f90:5070:24:

 5070 | !!       write (*, FMT="('File size(bytes):',            &
      |                        1
Warning: missing terminating " character
/home/vikassharma/Dropbox/easifem-base/src/modules/System/src/System_Method.f90:5071:20:

 5071 | !!       & T30, I0)") buff(8)
      |                    1
Warning: missing terminating " character
/home/vikassharma/Dropbox/easifem-base/src/modules/System/src/System_Method.f90:5072:24:

 5072 | !!       write (*, FMT="('Last access time:',            &
      |                        1
Warning: missing terminating " character
/home/vikassharma/Dropbox/easifem-base/src/modules/System/src/System_Method.f90:5073:26:

 5073 | !!       & T30, I0,1x, A)") buff(9), fmtdate(u2d(int(buff(9))),fmt_date)
      |                          1
Warning: missing terminating " character
/home/vikassharma/Dropbox/easifem-base/src/modules/System/src/System_Method.f90:5074:24:

 5074 | !!       write (*, FMT="('Last modification time:',      &
      |                        1
Warning: missing terminating " character
/home/vikassharma/Dropbox/easifem-base/src/modules/System/src/System_Method.f90:5075:26:

 5075 | !!       & T30, I0,1x, A)") buff(10),fmtdate(u2d(int(buff(10))),fmt_date)
      |                          1
Warning: missing terminating " character
/home/vikassharma/Dropbox/easifem-base/src/modules/System/src/System_Method.f90:5076:24:

 5076 | !!       write (*, FMT="('Last status change time:',     &
      |                        1
Warning: missing terminating " character
/home/vikassharma/Dropbox/easifem-base/src/modules/System/src/System_Method.f90:5077:26:

 5077 | !!       & T30, I0,1x, A)") buff(11),fmtdate(u2d(int(buff(11))),fmt_date)
      |                          1
Warning: missing terminating " character
/home/vikassharma/Dropbox/easifem-base/src/modules/System/src/System_Method.f90:5078:24:

 5078 | !!       write (*, FMT="('Preferred block size(bytes):', &
      |                        1
Warning: missing terminating " character
/home/vikassharma/Dropbox/easifem-base/src/modules/System/src/System_Method.f90:5079:20:

 5079 | !!       & T30, I0)") buff(12)
      |                    1
Warning: missing terminating " character
/home/vikassharma/Dropbox/easifem-base/src/modules/System/src/System_Method.f90:5080:24:

 5080 | !!       write (*, FMT="('No. of blocks allocated:',     &
      |                        1
Warning: missing terminating " character
/home/vikassharma/Dropbox/easifem-base/src/modules/System/src/System_Method.f90:5081:20:

 5081 | !!       & T30, I0)") buff(13)
      |                    1
Warning: missing terminating " character
/home/vikassharma/Dropbox/easifem-base/src/modules/System/src/System_Method.f90:5252:75:

 5252 | ! represent the locations, in the two strings, from which we start once we've observed it.
      |                                                                           1
Warning: missing terminating ' character
/home/vikassharma/Dropbox/easifem-base/src/modules/System/src/System_Method.f90:5279:61:

 5279 |                   return                         ! "x" doesn't match "*y*"
      |                                                             1
Warning: missing terminating ' character
/home/vikassharma/Dropbox/easifem-base/src/modules/System/src/System_Method.f90:5286:34:

 5286 |          ! Got a non-match. If we've set our bookmarks, back up to one or both of them and retry.
      |                                  1
Warning: missing terminating ' character
/home/vikassharma/Dropbox/easifem-base/src/modules/System/src/System_Method.f90:5292:21:

 5292 |                ! Don't go this far back again.
      |                     1
Warning: missing terminating ' character
/home/vikassharma/Dropbox/easifem-base/src/modules/System/src/System_Method.f90:5308:62:

 5308 |          return                                  ! "xy" doesn't match "x"
      |                                                              1
Warning: missing terminating ' character
/home/vikassharma/Dropbox/easifem-base/src/modules/System/src/System_Method.f90:5324:61:

 5324 |          return                                  ! "x" doesn't match "xy"

Implement DGELSY

Implement DGELSY in the GE_Lapack_Method

DGELSY computes the minimum-norm solution to a real linear least
squares problem:
minimize || A * X - B ||
using a complete orthogonal factorization of A. A is an M-by-N
matrix which may be rank-deficient.

Several right hand side vectors b and solution vectors x can be
handled in a single call; they are stored as the columns of the
M-by-NRHS right hand side matrix B and the N-by-NRHS solution
matrix X.

The routine first computes a QR factorization with column pivoting:
A * P = Q * [ R11 R12 ]
[ 0 R22 ]
with R11 defined as the largest leading submatrix whose estimated
condition number is less than 1/RCOND. The order of R11, RANK,
is the effective rank of A.

Then, R22 is considered to be negligible, and R12 is annihilated
by orthogonal transformations from the right, arriving at the
complete orthogonal factorization:
A * P = Q * [ T11 0 ] * Z
[ 0 0 ]
The minimum-norm solution is then
X = P * ZT [ inv(T11)*Q1T*B ]
[ 0 ]
where Q1 consists of the first RANK columns of Q.

This routine is basically identical to the original xGELSX except
three differences:
o The call to the subroutine xGEQPF has been substituted by the
the call to the subroutine xGEQP3. This subroutine is a Blas-3
version of the QR factorization with column pivoting.
o Matrix B (the right hand side) is updated with Blas-3.
o The permutation of matrix B (the right hand side) is faster and
more simple.

Updates in Reference Element

Element quality method

  • Point
  • Line
  • Triangle
  • Quadrangle
  • Tetrahedron
  • Hexahedron
  • Prism
  • Pyramid

Reference Coordinate

  • Point
  • Line
  • Triangle
  • Quadrangle
  • Tetrahedron
  • Hexahedron
  • Prism
  • Pyramid

You should move the following functions to the utility module

  • EquidistanceLIP_Triangle
  • EquidistanceLIP_Line
  • EquidistanceLIP_Quadrangle
  • EquidistanceLIP_Tetrahedron

Higher order elements

  • Point
  • Line
  • Triangle
  • Quadrangle
  • Tetrahedron
  • Hexahedron
  • Prism
  • Pyramid

Quadrangle

MODULE PROCEDURE Initiate_ref_Quadrangle
REAL(DFP) :: unit_xij(2, 4), biunit_xij(2, 4)
CALL DEALLOCATE (obj)

obj%topology(5) = ReferenceTopology([1, 2], Line2)
obj%topology(6) = ReferenceTopology([2, 3], Line2)
obj%topology(7) = ReferenceTopology([3, 4], Line2)
obj%topology(8) = ReferenceTopology([4, 1], Line2)

END PROCEDURE Initiate_ref_Quadrangle

The order of edges is not correct. It should be (1,2), (4,3), (1,4) and (2,3).

Similar thing happen in higher order element

  aintvec = [1, 2] .append.arange(5_I4B, 3_I4B + order)
  obj%topology(NNS + 1) = ReferenceTopology(aintvec, Linename(order=order))

  aintvec = [2, 3] .append.arange( &
                                  & 3_I4B + order + 1, &
                                  & 3_I4B + order + order - 1_I4B)
  obj%topology(NNS + 2) = ReferenceTopology(aintvec, Linename(order=order))

  aintvec = [3, 4] .append.arange(&
                                  & 2_I4B + 2_I4B * order + 1, &
                                  & 2_I4B + 2_I4B * order + order - 1_I4B)
  obj%topology(NNS + 3) = ReferenceTopology(aintvec, Linename(order=order))

  aintvec = [4, 1] .append.arange( &
                            & 1_I4B + 3_I4B * order + 1,  &
                            & 1_I4B + 3_I4B * order + order - 1_I4B)

ROWCAT and COLCAT OPERATOR

Add .ROWCAT. and .COLCAT. Operator

MAT = V .COLCAT. V
MAT = V .ROWCAT. V
MAT = M .ROWCAT. V
MAT = M .COLCAT. V
MAT= M .ROWCAT. M
MAT = M .COLCAT. M

Regards
Vikas

DOF

Simplified DOF_Set1, DOF_Set2...

ElemshapeData Grad, Div, Curl, Interpol operator

We want to use FEVariable to its maximum potential.

let a,b,c... be the FEVariables then.
Let obj be ElemshapeData_, or STElemshapeData_, or vector of STElemshapeData_

a = grad(obj, b)
a = div(obj, b)
a = curl(obj, b)
a = interpol(obj, b)
a = grad2(obj, b)

we want to describe these expressions.

Regards
Vikas

BLAS support RealMatrix and RealVector

BLAS support for RealMatrix and RealVector.

Implement following methods:

  • AXPY
  • SCAL
  • COPY
  • ASUM
  • SWAP
  • XPAY
  • AXPYZ
  • PMUL
  • PDIV
  • SETALL
  • ABS
  • RECIPROCAL
  • SHIFT
  • DOT_PRODUCT
  • NORM1
  • NORM2
  • NORMi
  • SUM

Display Method

Display of vectors

I would like to propose following enhancements in Display_Method.f90

Display of ARRAYS on the screen needs to be improved.

  • Currently we use full option to force display of full content.
  • If the unitNo is not equal to stdout, stderr then we always print full content
  • However, if we are displaying on the screen then by default few entries are printed, head and tail, in case vector is very long.
  • Print alternative colored rows and columns.
  • In the case of matrices, also add option to print headers and columns on the screen.

Regards
Vikas

Installation

Currently when we run bash install.sh, it does works fine for

apt_update
apt_upgrade
welcome
check_requirements
install_requirements

However, it kind of fails at

download_easifemrc

This needs to be changed ASAP.

CSR MATRIX + ARPACK

Add support to find out the Eigenvectors and Eigenvalues of sparse matrix.
To this end use ARPACK library.
The library is here
https://www.caam.rice.edu/software/ARPACK/

  • Symmetric matrix smallest eigenvalue
  • Symmetric matrix largest eigenvalue
  • Symmetric matrix smallest eigenvalue and eigenvector
  • Symmetric matrix largest eigenvalue and eigenvector
  • Generalized eigenvalue problem
  • Eigenvalue and eigenvectors of generalized matrix

About ARPACK:

ARPACK is a collection of Fortran77 subroutines designed to solve large scale eigenvalue problems.

  • The package is designed to compute a few eigenvalues and corresponding eigenvectors of a general n by n matrix A.
  • ARPACK software is capable of solving large scale symmetric, nonsymmetric, and generalized eigenproblems from significant application areas.
  • For many standard problems, a matrix factorization is not required. Only the action of the matrix on a vector is needed.

You can download the software from here : https://www.caam.rice.edu/software/ARPACK/download.html

Regards
Vikas

Remove FPL dependency

I have to remove the dependency on the FPL module.
Implement it in Base.
Change the settings.

Regards
Vikas

FEVariable

FEVariable turns out to be an efficient and handy data structure...
It can reduce the number of line in kernel development.

Following modifications are necessary, for enhancing the efficiency of [[FEVariable_]]

  • We need a single vector of real
  • When we set the value in the object, we will store the shape of the data. Also, we will convert multidimension array into a vector.
  • When we use get method then we will use reshape for changing the shape.

Regards
Vikas

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.