Skip to content

Commit

Permalink
Merge pull request #7 from FluidNumerics/feature/multidimension_array
Browse files Browse the repository at this point in the history
[WIP] Feature/multidimension array - Rank 2 - Rank 4 support
  • Loading branch information
fluidnumerics-joe authored Nov 30, 2023
2 parents ffe61bb + d5c3ac5 commit 72e4ab5
Show file tree
Hide file tree
Showing 178 changed files with 10,967 additions and 3,123 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ jobs:
wget https://github.com/fortran-lang/fpm/releases/download/v0.9.0/fpm-0.9.0-linux-x86_64
chmod +x ./fpm-0.9.0-linux-x86_64 && mv ./fpm-0.9.0-linux-x86_64 fpm
./fpm install
./fpm test
./fpm run --example "*"
- name: Initialize coverage counters
Expand Down
29 changes: 29 additions & 0 deletions example/scalar_function_product.f90
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
program scalar_function_product

use FEQParse

implicit none
type(EquationParser) :: f
character(LEN=1),dimension(2) :: independentVars
character(LEN=2048) :: eqChar
real :: x(2)
real :: feval

! Specify the independent variables
independentVars = (/'x', 'y'/)

! Specify an equation string that we want to evaluate
eqChar = 'f = \cos( 2.0*pi*x )*\cos( 2.0*pi*y )'

! Create the EquationParser object
f = EquationParser(eqChar,independentVars)

! Evaluate the equation
x = 0.5
feval = f % evaluate(x)
print*, feval

! Clean up memory
call f % Destruct()

end program scalar_function_product
5 changes: 5 additions & 0 deletions fpm.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,8 @@ main = "array_with_scalar_eval.f90"
name = "scalar_with_scalar_eval"
source-dir = "example"
main = "scalar_with_scalar_eval.f90"

[[example]]
name = "scalar_function_product"
source-dir = "example"
main = "scalar_function_product.f90"
Loading

0 comments on commit 72e4ab5

Please sign in to comment.