Jacob Banks

Jacob Banks

1659766854

Gridap.jl: Grid-based Approximation of PDEs in Julia

In this tutorial, we'll learn about Gridap.jl: Grid-based approximation of partial differential equations (PDEs) in Julia. A new feature of Gridap.jl focusing on the solution of transient Partial Differential Equations (PDEs)

What

Gridap provides a set of tools for the grid-based approximation of partial differential equations (PDEs) written in the Julia programming language. The library currently supports linear and nonlinear PDE systems for scalar and vector fields, single and multi-field problems, conforming and nonconforming finite element (FE) discretizations, on structured and unstructured meshes of simplices and n-cubes. It also provides methods for time integration. Gridap is extensible and modular. One can implement new FE spaces, new reference elements, use external mesh generators, linear solvers, post-processing tools, etc. See, e.g., the list of available Gridap plugins.

Gridap has a very expressive API allowing one to solve complex PDEs with very few lines of code. The user can write the underlying weak form with a syntax almost 1:1 to the mathematical notation, and Gridap generates an efficient FE assembly loop automatically by leveraging the Julia JIT compiler. For instance, the weak form for an interior penalty DG method for the Poisson equation can be simply specified as:

a(u,v) =
  ∫( ∇(v)⋅∇(u) )*dΩ +
  ∫( (γ/h)*v*u - v*(n_Γ⋅∇(u)) - (n_Γ⋅∇(v))*u )*dΓ +
  ∫(
    (γ/h)*jump(v*n_Λ)⋅jump(u*n_Λ) -
    jump(v*n_Λ)⋅mean(∇(u)) -
    mean(∇(v))⋅jump(u*n_Λ)
    )*dΛ

l(v) =
  ∫( v*f )*dΩ +
  ∫( (γ/h)*v*u - (n_Γ⋅∇(v))*u )*dΓ

See the complete code here. As an example for multi-field PDEs, this is how the weak form for the Stokes equation with Neumann boundary conditions can be specified:

a((u,p),(v,q)) =
  ∫( ∇(v)⊙∇(u) - (∇⋅v)*p + q*(∇⋅u) )*dΩ

l((v,q)) =
  ∫( v⋅f + q*g )*dΩ +
  ∫( v⋅(n_Γ⋅∇u) - (n_Γ⋅v)*p )*dΓ

See the complete code here.

Documentation

  • STABLEDocumentation for the most recently tagged version of Gridap.jl.
  • DEVELDocumentation for the in-development version of Gridap.

Tutorials

A hands-on user-guide to the library is available as a set of tutorials. They are available as Jupyter notebooks and html pages.

Installation

Gridap is a registered package in the official Julia package registry. Thus, the installation of Gridap is straight forward using the Julia's package manager. Open the Julia REPL, type ] to enter package mode, and install as follows

pkg> add Gridap

Plugins

Examples

These are some popular PDEs solved with the Gridap library. Examples taken from the Gridap Tutorials.

Poisson equationLinear elasticityHyper-elasticityp-Laplacian
Poisson eq. with DGDarcy eq. with RTIncompressible Navier-StokesIsotropic damage

Known issues

Since Julia 1.6 ownwards we have noticed large first call latencies of Gridap.jl codes with the default compiler optimization level (i.e., -O2). In general, while developing code, but specially if you are noting high first call latencies, we recommend to run julia with the -O1 flag. For production runs use -O2 or -O3.

Gridap community

You can ask questions and interact with the Gridap community on the Julia Slack channel #gridap (see here how to join). or our gitter.

Contributing to Gridap

Gridap is a collaborative project open to contributions. If you want to contribute, please take into account:

  • Before opening a PR with a significant contribution, contact the project administrators, e.g., by writing a message in our gitter chat or by opening an issue describing what you are willing to implement. Wait for feed-back.
  • Carefully read and follow the instructions in the CONTRIBUTING.md file.
  • Carefully read and follow the instructions in the CODE_OF_CONDUCT.md file.
  • Open a PR with your contribution.

Want to help? We have a number of issues waiting for help. You can start contributing to the Gridap project by solving some of those issues.

How to cite Gridap

In order to give credit to the Gridap contributors, we simply ask you to cite the references below in any publication in which you have made use of the Gridap project. If you are using other Gridap sub-packages, please cite them as indicated in their repositories.

@article{Badia2020,
  doi = {10.21105/joss.02520},
  url = {https://doi.org/10.21105/joss.02520},
  year = {2020},
  publisher = {The Open Journal},
  volume = {5},
  number = {52},
  pages = {2520},
  author = {Santiago Badia and Francesc Verdugo},
  title = {Gridap: An extensible Finite Element toolbox in Julia},
  journal = {Journal of Open Source Software}
}

@article{Verdugo2022,
  doi = {10.1016/j.cpc.2022.108341},
  url = {https://doi.org/10.1016/j.cpc.2022.108341},
  year = {2022},
  month = jul,
  publisher = {Elsevier {BV}},
  volume = {276},
  pages = {108341},
  author = {Francesc Verdugo and Santiago Badia},
  title = {The software design of Gridap: A Finite Element package based on the Julia {JIT} compiler},
  journal = {Computer Physics Communications}
}

Download Details: 
Author: gridap
Source Code: https://github.com/gridap/Gridap.jl 
License: MIT
#julia

What is GEEK

Buddha Community

Gridap.jl: Grid-based Approximation of PDEs in Julia
Jacob Banks

Jacob Banks

1659766854

Gridap.jl: Grid-based Approximation of PDEs in Julia

In this tutorial, we'll learn about Gridap.jl: Grid-based approximation of partial differential equations (PDEs) in Julia. A new feature of Gridap.jl focusing on the solution of transient Partial Differential Equations (PDEs)

What

Gridap provides a set of tools for the grid-based approximation of partial differential equations (PDEs) written in the Julia programming language. The library currently supports linear and nonlinear PDE systems for scalar and vector fields, single and multi-field problems, conforming and nonconforming finite element (FE) discretizations, on structured and unstructured meshes of simplices and n-cubes. It also provides methods for time integration. Gridap is extensible and modular. One can implement new FE spaces, new reference elements, use external mesh generators, linear solvers, post-processing tools, etc. See, e.g., the list of available Gridap plugins.

Gridap has a very expressive API allowing one to solve complex PDEs with very few lines of code. The user can write the underlying weak form with a syntax almost 1:1 to the mathematical notation, and Gridap generates an efficient FE assembly loop automatically by leveraging the Julia JIT compiler. For instance, the weak form for an interior penalty DG method for the Poisson equation can be simply specified as:

a(u,v) =
  ∫( ∇(v)⋅∇(u) )*dΩ +
  ∫( (γ/h)*v*u - v*(n_Γ⋅∇(u)) - (n_Γ⋅∇(v))*u )*dΓ +
  ∫(
    (γ/h)*jump(v*n_Λ)⋅jump(u*n_Λ) -
    jump(v*n_Λ)⋅mean(∇(u)) -
    mean(∇(v))⋅jump(u*n_Λ)
    )*dΛ

l(v) =
  ∫( v*f )*dΩ +
  ∫( (γ/h)*v*u - (n_Γ⋅∇(v))*u )*dΓ

See the complete code here. As an example for multi-field PDEs, this is how the weak form for the Stokes equation with Neumann boundary conditions can be specified:

a((u,p),(v,q)) =
  ∫( ∇(v)⊙∇(u) - (∇⋅v)*p + q*(∇⋅u) )*dΩ

l((v,q)) =
  ∫( v⋅f + q*g )*dΩ +
  ∫( v⋅(n_Γ⋅∇u) - (n_Γ⋅v)*p )*dΓ

See the complete code here.

Documentation

  • STABLEDocumentation for the most recently tagged version of Gridap.jl.
  • DEVELDocumentation for the in-development version of Gridap.

Tutorials

A hands-on user-guide to the library is available as a set of tutorials. They are available as Jupyter notebooks and html pages.

Installation

Gridap is a registered package in the official Julia package registry. Thus, the installation of Gridap is straight forward using the Julia's package manager. Open the Julia REPL, type ] to enter package mode, and install as follows

pkg> add Gridap

Plugins

Examples

These are some popular PDEs solved with the Gridap library. Examples taken from the Gridap Tutorials.

Poisson equationLinear elasticityHyper-elasticityp-Laplacian
Poisson eq. with DGDarcy eq. with RTIncompressible Navier-StokesIsotropic damage

Known issues

Since Julia 1.6 ownwards we have noticed large first call latencies of Gridap.jl codes with the default compiler optimization level (i.e., -O2). In general, while developing code, but specially if you are noting high first call latencies, we recommend to run julia with the -O1 flag. For production runs use -O2 or -O3.

Gridap community

You can ask questions and interact with the Gridap community on the Julia Slack channel #gridap (see here how to join). or our gitter.

Contributing to Gridap

Gridap is a collaborative project open to contributions. If you want to contribute, please take into account:

  • Before opening a PR with a significant contribution, contact the project administrators, e.g., by writing a message in our gitter chat or by opening an issue describing what you are willing to implement. Wait for feed-back.
  • Carefully read and follow the instructions in the CONTRIBUTING.md file.
  • Carefully read and follow the instructions in the CODE_OF_CONDUCT.md file.
  • Open a PR with your contribution.

Want to help? We have a number of issues waiting for help. You can start contributing to the Gridap project by solving some of those issues.

How to cite Gridap

In order to give credit to the Gridap contributors, we simply ask you to cite the references below in any publication in which you have made use of the Gridap project. If you are using other Gridap sub-packages, please cite them as indicated in their repositories.

@article{Badia2020,
  doi = {10.21105/joss.02520},
  url = {https://doi.org/10.21105/joss.02520},
  year = {2020},
  publisher = {The Open Journal},
  volume = {5},
  number = {52},
  pages = {2520},
  author = {Santiago Badia and Francesc Verdugo},
  title = {Gridap: An extensible Finite Element toolbox in Julia},
  journal = {Journal of Open Source Software}
}

@article{Verdugo2022,
  doi = {10.1016/j.cpc.2022.108341},
  url = {https://doi.org/10.1016/j.cpc.2022.108341},
  year = {2022},
  month = jul,
  publisher = {Elsevier {BV}},
  volume = {276},
  pages = {108341},
  author = {Francesc Verdugo and Santiago Badia},
  title = {The software design of Gridap: A Finite Element package based on the Julia {JIT} compiler},
  journal = {Computer Physics Communications}
}

Download Details: 
Author: gridap
Source Code: https://github.com/gridap/Gridap.jl 
License: MIT
#julia

Grid-based Approximation of Partial Differential Equations in Julia

What

Gridap provides a set of tools for the grid-based approximation of partial differential equations (PDEs) written in the Julia programming language. The library currently supports linear and nonlinear PDE systems for scalar and vector fields, single and multi-field problems, conforming and nonconforming finite element (FE) discretizations, on structured and unstructured meshes of simplices and n-cubes. Gridap is extensible and modular. One can implement new FE spaces, new reference elements, use external mesh generators, linear solvers, post-processing tools, etc. See, e.g., the list of available Gridap plugins.

Gridap has a very expressive API allowing one to solve complex PDEs with very few lines of code. The user can write the underlying weak form with a syntax almost 1:1 to the mathematical notation, and Gridap generates an efficient FE assembly loop automatically by leveraging the Julia JIT compiler. For instance, the weak form for an interior penalty DG method for the Poisson equation can be simply specified as:

a(u,v) =
  ∫( ∇(v)⋅∇(u) )*dΩ +
  ∫( (γ/h)*v*u - v*(n_Γ⋅∇(u)) - (n_Γ⋅∇(v))*u )*dΓ +
  ∫(
    (γ/h)*jump(v*n_Λ)⋅jump(u*n_Λ) -
    jump(v*n_Λ)⋅mean(∇(u)) -
    mean(∇(v))⋅jump(u*n_Λ)
    )*dΛ

l(v) =
  ∫( v*f )*dΩ +
  ∫( (γ/h)*v*u - (n_Γ⋅∇(v))*u )*dΓ

See the complete code here. As an example for multi-field PDEs, this is how the weak form for the Stokes equation with Neumann boundary conditions can be specified:

a((u,p),(v,q)) =
  ∫( ∇(v)⊙∇(u) - (∇⋅v)*p + q*(∇⋅u) )*dΩ

l((v,q)) =
  ∫( v⋅f + q*g )*dΩ +
  ∫( v⋅(n_Γ⋅∇u) - (n_Γ⋅v)*p )*dΓ

See the complete code here.

Documentation

  • STABLEDocumentation for the most recently tagged version of Gridap.jl.
  • DEVELDocumentation for the in-development version of Gridap.

Tutorials

A hands-on user-guide to the library is available as a set of tutorials. They are available as Jupyter notebooks and html pages.

Installation

Gridap is a registered package in the official Julia package registry. Thus, the installation of Gridap is straight forward using the Julia's package manager. Open the Julia REPL, type ] to enter package mode, and install as follows

pkg> add Gridap

Plugins

Examples

These are some popular PDEs solved with the Gridap library. Examples taken from the Gridap Tutorials.

Poisson equationLinear elasticityHyper-elasticityp-Laplacian
Poisson eq. with DGDarcy eq. with RTIncompressible Navier-StokesIsotropic damage

Gridap community

You can ask questions and interact with the Gridap community on the Julia Slack channel #gridap (see here how to join). or our gitter.

Contributing to Gridap

Gridap is a collaborative project open to contributions. If you want to contribute, please take into account:

  • Before opening a PR with a significant contribution, contact the project administrators, e.g., by writing a message in our gitter chat or by opening an issue describing what you are willing to implement. Wait for feed-back.
  • Carefully read and follow the instructions in the CONTRIBUTING.md file.
  • Carefully read and follow the instructions in the CODE_OF_CONDUCT.md file.
  • Open a PR with your contribution.

Want to help? We have a number of issues waiting for help. You can start contributing to the Gridap project by solving some of those issues.

How to cite Gridap

In order to give credit to the Gridap contributors, we simply ask you to cite the reference below in any publication in which you have made use of Gridap packages:

@article{Badia2020,
  doi = {10.21105/joss.02520},
  url = {https://doi.org/10.21105/joss.02520},
  year = {2020},
  publisher = {The Open Journal},
  volume = {5},
  number = {52},
  pages = {2520},
  author = {Santiago Badia and Francesc Verdugo},
  title = {Gridap: An extensible Finite Element toolbox in Julia},
  journal = {Journal of Open Source Software}
}

Download Details:
Author: gridap
The Demo/Documentation: View The Demo/Documentation
Download Link: Download The Source Code
Official Website: https://github.com/gridap/Gridap.jl 
License: MIT
 

#julia #programming #developer

Perftests.jl: Base perftests for Julia

Perftests

A redo of the main Julia test/perf directory. Retooled to use Benchmarks.jl, this repository will spit out a bunch of .csv files into the test/results-$COMMIT directory (Where $COMMIT is the commit hash of the version of Julia you are running) and display small summary statistics as it does so.

To run a specific group of tests, use run_perf_groups(). For example, to run and output the .csv files for the kernel and simd performance tests, one would write:

using Perftests
run_perf_groups(["kernel", "simd"])

Test organization

Tests are organized foremost by group, then name, then variant. Not all tests are required to have variants, but they fit into a natural hierarchy when running the same test across multiple element types, for example. The resultant .csv files are named $group-$name-$variant.csv, for ease of access.

Test environment

Information about the test environment (the commit hash of this repository used to create the results, the word size of the running machine, the number of CPU cores, etc...) is saved in the env.csv file put into the results-$COMMIT directory when testing.


Download Details:

Author: Staticfloat
Source Code: https://github.com/staticfloat/Perftests.jl 
License: View license

#julia #base 

Dimers.jl: A Julia Package for Sampling The Dimer Model on A Grid

Dimers

Dimers is a package for simulating the dimer model on a 2D rectangular grid, using an algorithm of Kenyon, Propp, and Wilson. Dimers also provides support for loop erased random walks and Wilson's algorithm on an arbitrary graph.

showgraphics(drawgraph(dimersample(20)))

Dimer sample

We can also compute the height function associated with the dimer sample:

dimerheight(dimersample(20))
11x11 Array{Int64,2}:
  0   1   0   1   0  1   0   1   0   1   0
 -1  -2  -1  -2  -1  2  -1  -2  -1  -2  -1
  0  -3  -4  -3   0  1   0   1   0  -3   0
 -1  -2  -1  -2  -1  2  -1  -2  -1  -2  -1
  0  -3   0   1   0  1   0   1   0   1   0
 -1  -2  -1   2  -1  2  -1  -2  -1   2  -1
  0   1   0   1   0  1   0   1   0   1   0
 -1  -2  -1   2  -1  2   3   2  -1  -2  -1
  0   1   0   1   0  1   0   1   0   1   0
 -1   2   3   2   3  2   3   2   3   2  -1
  0   1   0   1   0  1   0   1   0   1   0

Wilson takes a graph as its first argument and an array of true/false values specifying the roots.

showgraphics(drawgraph(Wilson(G,[[true];[false for i=1:length(G.vertices)-1]])))

UST sample

LERW(G,v0,roots) samples a loop-erased random walk on the graph G starting from the vertex whose index in G.vertices is v0 stopped upon hitting one of the vertices v for which roots[v] is true.

import Graphs
n = 100
G = Graphs.adjlist((Int64,Int64),is_directed=false)

for i=1:n
    for j=1:n
        Graphs.add_vertex!(G,(i,j))
    end
end

roots = Bool[v[1] == 1 || v[1] == n || v[2] == 1 || v[2] == n  for v in
G.vertices];

v0 = find(x->x==(div(n,2),div(n,2)),G.vertices)[1]

lerw = LERW(gridgraph(n),v0,roots)
for i=1:length(lerw)-1
    add_edge!(G,lerw[i],lerw[i+1])
end

showgraphics(drawgraph(G))

Loop-erased random walk sample

Download Details:

Author: sswatson
Source Code: https://github.com/sswatson/Dimers.jl 
License: View license

#julia #grid 

Crypto Like

Crypto Like

1606874142

What is Base Protocol (BASE) | What is BASE token

Base Protocol (BASE) is a token whose price is pegged to the total market cap of all cryptocurrencies at a ratio of 1:1 trillion. BASE allows traders to speculate on the entire crypto industry with one token. The Base Protocol is built on the Ethereum blockchain, integrates a (Chainlink) oracle, and is launching on ((Uniswap)

As cryptocurrency enthusiasts, we’re sometimes divided on which digital assets to buy — bullish on certain projects and bearish on others.

But we all agree on one thing, which is that the overall cryptocurrency industry will achieve long-term growth and future adoption.

The Base Protocol makes it possible to invest with this consensus. BASE allows traders to speculate on the entire industry with one token.

Image for post

The Base Protocol is the world’s first and only tokenized cryptocurrency market tracker. By holding BASE tokens, users can get exposure to the performance of the entire cryptocurrency market. Unlike the index trackers currently operating in the traditional markets, there is no entry or exit fee or brokerage charges.

Index funds have consistently outperformed actively managed mutual funds. Until the launch of BASE, there was no real cryptocurrency market tracker that tracked the performance of the entire digital asset market. BASE will be useful for institutional investors and traders to diversify and hedge their crypto portfolios. BASE will also help new and existing retail investors to take out the guesswork and get exposed to the growth of all current and future digital assets entering the market.

The BASE token’s underlying protocol creates several additional use cases in DeFi, trading, venture capital, hedge funds and many other business sectors.

The Base Protocol mission is simple — to make it easy for everyone to benefit from the performance of the entire cryptocurrency market in a secure, decentralized and future-proof way.

Why BASE?

It’s no doubt that a crypto industry ETF would be a valuable product for investors. But it is very challenging to create such a product through traditional means, as it would be almost impossible to manage portfolio ownership of 5,000+ assets. How would the portfolio manager weigh ownership of each asset as market cap dominance changes? How would they account for newly entering/exiting assets? Who would take on all the associated transaction and custodial fees? There are also various legal limitations that restrict the formation of such an instrument in many countries — and even if it could be formed, it would be a highly centralized product.

By simply pegging price to the total market capitalization of all cryptocurrencies, the Base Protocol cuts through all of these problems. BASE gives holders the same function as a traditional industry ETF without all of the centralized challenges that make such an ETF impossible.

BASE will offer new value for investors in the cryptocurrency ecosystem through an elegantly simple protocol — so valuable and so simple that you might be asking yourself:

How has this not been done before?

The answer is that it wasn’t possible until recently. This project couldn’t be achieved without a robust decentralized blockchain, proven oracle integrations, and new developments in the DeFi space. We founded the Base Protocol to build on these innovations and create BASE; one tokenized asset that represents speculation on all cryptocurrencies.

Vision

We’ve seen that there are many individuals who want to invest in cryptocurrencies, but don’t necessarily understand how they work. While the overview for each different crypto asset can be difficult to understand for a new user, the pitch for BASE is simple: it’s the way to invest in all of those crypto assets simultaneously. In this way, the Base Protocol can become an instrumental force in driving new adoption in the blockchain space.

We’ve also noticed that institutional investors have been introducing cryptocurrency investments to their portfolios. These institutions typically invest at a high level with great diversification covering multiple industries. Their cryptocurrency holdings are usually composed of just Bitcoin, or some handful mix of “blue chip” digital assets. By holding BASE, these institutions will gain exposure to the entire cryptocurrency industry — an objectively more diversified alternative.

In the same way that Bitcoin is the household name of cryptocurrencies, the Base Protocol aims to become the household name for general cryptocurrency investing. BASE’s vision is to become the primary channel of investment for new/existing cryptocurrency traders and institutional investors.

Would you like to earn token right now! ☞ CLICK HERE

Looking for more information…

☞ Website
☞ Explorer
☞ Source Code
☞ Social Channel
Message Board
☞ Coinmarketcap

Create an Account and Trade NOW

Bittrex
Poloniex
Binance

Thank for visiting and reading this article! I’m highly appreciate your actions! Please share if you liked it!

#blockchain #bitcoin #crypto #base protocol #base