the nurbs and geopdes packages€¦ · 1 the nurbs package: b-splines and nurbs b-splines and...

44
The NURBS and GeoPDEs packages Octave software for research on IGA Rafael V´ azquez IMATI ‘Enrico Magenes’, Pavia Consiglio Nazionale delle Ricerche R. V´ azquez (IMATI-CNR Italy) The NURBS and GeoPDEs packages OctConf 2015, Darmstadt 1 / 24

Upload: others

Post on 16-Jul-2020

33 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: The NURBS and GeoPDEs packages€¦ · 1 The NURBS package: B-splines and NURBS B-splines and NURBS: mathematical de nitions Functions and examples 2 The GeoPDEs package: isogeometric

The NURBS and GeoPDEs packagesOctave software for research on IGA

Rafael Vazquez

IMATI ‘Enrico Magenes’, Pavia

Consiglio Nazionale delle Ricerche

R. Vazquez (IMATI-CNR Italy) The NURBS and GeoPDEs packages OctConf 2015, Darmstadt 1 / 24

Page 2: The NURBS and GeoPDEs packages€¦ · 1 The NURBS package: B-splines and NURBS B-splines and NURBS: mathematical de nitions Functions and examples 2 The GeoPDEs package: isogeometric

Motivation

In 2008/2009 in Pavia we started to work in isogeometric analysis withinthe GeoPDEs project. Software development was one of the objectives.

Starting point: different codes, different problems, different developers.

First goal: a uniform implementation of the different codes.

Second goal: it should be clear and easy to use, for didactic purposes,and for new researchers coming into the research group.

The result were two Octave packages: the NURBS package, for geometryconstruction and manipulation, and GeoPDEs, for isogeometric methods.

R. Vazquez (IMATI-CNR Italy) The NURBS and GeoPDEs packages OctConf 2015, Darmstadt 2 / 24

Page 3: The NURBS and GeoPDEs packages€¦ · 1 The NURBS package: B-splines and NURBS B-splines and NURBS: mathematical de nitions Functions and examples 2 The GeoPDEs package: isogeometric

1 The NURBS package: B-splines and NURBSB-splines and NURBS: mathematical definitionsFunctions and examples

2 The GeoPDEs package: isogeometric analysisIsogeometric analysis: definitionThe development of GeoPDEsSome examples

R. Vazquez (IMATI-CNR Italy) The NURBS and GeoPDEs packages OctConf 2015, Darmstadt 3 / 24

Page 4: The NURBS and GeoPDEs packages€¦ · 1 The NURBS package: B-splines and NURBS B-splines and NURBS: mathematical de nitions Functions and examples 2 The GeoPDEs package: isogeometric

1 The NURBS package: B-splines and NURBSB-splines and NURBS: mathematical definitionsFunctions and examples

2 The GeoPDEs package: isogeometric analysisIsogeometric analysis: definitionThe development of GeoPDEsSome examples

R. Vazquez (IMATI-CNR Italy) The NURBS and GeoPDEs packages OctConf 2015, Darmstadt 4 / 24

Page 5: The NURBS and GeoPDEs packages€¦ · 1 The NURBS package: B-splines and NURBS B-splines and NURBS: mathematical de nitions Functions and examples 2 The GeoPDEs package: isogeometric

Non Uniform Rational B-Splines (NURBS)

NURBS (non-uniform rational B-splines) are probably the most commonlyused CAD technology for engineering design.

6/18/12

3

- control points - knots

0

1

2

3

4

5

Further h-refined Curve

0.5 1.5

2.5

3.5

4.5

0.25

0.75 1.25

1.75

2.25

2.75 3.25

3.75

4.25

4.75

Quadratic basis

- control points - knots

0

1

2 3

4 5

Linear interpolation of control points yields the control polygon

Quadratic basis

- control points - knots

0

1

2 3

4 5

Cubic p-refined Curve

Cubic basis

- control points - knots

0

1

2 3

4 5

Quartic p-refined Curve

Quartic basis

Non-Uniform Rational B-Splines

•  NURBS are the most commonly used computer aided geometric design (CAGD) technology in engineering

Circle from 3D Piecewise Quadratic Curves

Cw (ξ)

C(ξ)

NURBS are a generalization of B-splines.

R. Vazquez (IMATI-CNR Italy) The NURBS and GeoPDEs packages OctConf 2015, Darmstadt 5 / 24

Page 6: The NURBS and GeoPDEs packages€¦ · 1 The NURBS package: B-splines and NURBS B-splines and NURBS: mathematical de nitions Functions and examples 2 The GeoPDEs package: isogeometric

B-splines: definition

Given an ordered knot vector ξ1 ≤ . . . ≤ ξn+p+1,

define the n B-splines of degree p by the recursion formula

Ni ,0(ζ) =

1 if ξi ≤ ζ ≤ ξi+1

0 otherwise

Ni ,p(ζ) =ζ − ξiξi+p − ξi

Ni ,p−1(ζ) +ξi+p+1 − ζξi+p+1 − ξi+1

Ni+1,p−1(ζ)

0 1 2 3 4 5 60

0.5

1

0 1 2 3 4 5 60

0.5

1

0 1 2 3 4 5 60

0.5

1

Degree 0

0 1 2 3 4 5 60

0.5

1

0 1 2 3 4 5 60

0.5

1

0 1 2 3 4 5 60

0.5

1

Degree 1

R. Vazquez (IMATI-CNR Italy) The NURBS and GeoPDEs packages OctConf 2015, Darmstadt 6 / 24

Page 7: The NURBS and GeoPDEs packages€¦ · 1 The NURBS package: B-splines and NURBS B-splines and NURBS: mathematical de nitions Functions and examples 2 The GeoPDEs package: isogeometric

B-splines: definition

Given an ordered knot vector ξ1 ≤ . . . ≤ ξn+p+1,

define the n B-splines of degree p by the recursion formula

Ni ,0(ζ) =

1 if ξi ≤ ζ ≤ ξi+1

0 otherwise

Ni ,p(ζ) =ζ − ξiξi+p − ξi

Ni ,p−1(ζ) +ξi+p+1 − ζξi+p+1 − ξi+1

Ni+1,p−1(ζ)

0 1 2 3 4 5 60

0.5

1

0 1 2 3 4 5 60

0.5

1

0 1 2 3 4 5 60

0.5

1

Degree 0

0 1 2 3 4 5 60

0.5

1

0 1 2 3 4 5 60

0.5

1

0 1 2 3 4 5 60

0.5

1

Degree 1R. Vazquez (IMATI-CNR Italy) The NURBS and GeoPDEs packages OctConf 2015, Darmstadt 6 / 24

Page 8: The NURBS and GeoPDEs packages€¦ · 1 The NURBS package: B-splines and NURBS B-splines and NURBS: mathematical de nitions Functions and examples 2 The GeoPDEs package: isogeometric

B-splines: definition

Given an ordered knot vector ξ1 ≤ . . . ≤ ξn+p+1,

define the n B-splines of degree p by the recursion formula

Ni ,0(ζ) =

1 if ξi ≤ ζ ≤ ξi+1

0 otherwise

Ni ,p(ζ) =ζ − ξiξi+p − ξi

Ni ,p−1(ζ) +ξi+p+1 − ζξi+p+1 − ξi+1

Ni+1,p−1(ζ)

0 1 2 3 4 5 60

0.5

1

0 1 2 3 4 5 60

0.5

1

0 1 2 3 4 5 60

0.5

1

Degree 2

0 1 2 3 4 5 60

0.5

1

0 1 2 3 4 5 60

0.5

1

0 1 2 3 4 5 60

0.5

1

Degree 3R. Vazquez (IMATI-CNR Italy) The NURBS and GeoPDEs packages OctConf 2015, Darmstadt 6 / 24

Page 9: The NURBS and GeoPDEs packages€¦ · 1 The NURBS package: B-splines and NURBS B-splines and NURBS: mathematical de nitions Functions and examples 2 The GeoPDEs package: isogeometric

B-splines: the basis functions

0,0,0,0 1 2,2 3 4 5,5,5 6 7 8,8,8,80

0.5

1

B-spline basis functions have the following properties:

They are non-negative and form a partition of unity.

Locally linearly independent on each knot span (ξi , ξi+1)

The function Ni ,p is supported in the interval [ξi , ξi+p+1].

Piecewise polynomials of degree p, and regularity at most p − 1.

The regularity at ξi is controlled by the knot multiplicity.

R. Vazquez (IMATI-CNR Italy) The NURBS and GeoPDEs packages OctConf 2015, Darmstadt 7 / 24

Page 10: The NURBS and GeoPDEs packages€¦ · 1 The NURBS package: B-splines and NURBS B-splines and NURBS: mathematical de nitions Functions and examples 2 The GeoPDEs package: isogeometric

B-spline curves: definition

0 0.2 0.4 0.6 0.8 1

A B-spline curve in Rd is defined as a linear combination of B-splines:

F(ζ) =n∑

i=1

CiNi ,p(ζ)

To define the parametrization F we only need:

The basis functions Ni ,p, given by the knot vector.

The control points Ci ∈ Rd .

R. Vazquez (IMATI-CNR Italy) The NURBS and GeoPDEs packages OctConf 2015, Darmstadt 8 / 24

Page 11: The NURBS and GeoPDEs packages€¦ · 1 The NURBS package: B-splines and NURBS B-splines and NURBS: mathematical de nitions Functions and examples 2 The GeoPDEs package: isogeometric

NURBS curves: definition

NURBS are rational B-splines, used to represent conic sections.

−3−2

−10

12

3

−2

0

2

0

1

2

3

F(t) NURBS curve

Fw

(t)spline curve

−3−2

−10

12

3

−2

0

2

0

1

2

3

Cw

i

wiC

i

NURBS in Rd are projections of B-splines in Rd+1.

In practice, a weight wi is associated to each B-spline function, to obtainthe NURBS basis functions and the control points.

The NURBS curve is determined by: degree, knot vector, control pointsand weights.

R. Vazquez (IMATI-CNR Italy) The NURBS and GeoPDEs packages OctConf 2015, Darmstadt 9 / 24

Page 12: The NURBS and GeoPDEs packages€¦ · 1 The NURBS package: B-splines and NURBS B-splines and NURBS: mathematical de nitions Functions and examples 2 The GeoPDEs package: isogeometric

Tensor product surfaces: B-splines

B-splines and NURBS surfaces are defined by tensor product.

00.5

1

00.5

10

0.5

1

00.5

1

00.5

10

0.5

1

00.5

1

00.5

10

0.5

1

00.5

1

00.5

10

0.5

1

00.5

1

00.5

10

0.5

1

00.5

1

00.5

10

0.5

1

00.5

1

00.5

10

0.5

00.5

1

00.5

10

0.5

00.5

1

00.5

10

0.5

00.5

1

00.5

10

0.5

1

00.5

1

00.5

10

0.5

1

00.5

1

00.5

10

0.5

00.5

1

00.5

10

0.5

1

00.5

1

00.5

10

0.5

00.5

1

00.5

10

0.5

1

00.5

1

00.5

10

0.5

1

00.5

1

00.5

10

0.5

00.5

1

00.5

10

0.5

00.5

1

00.5

10

0.5

00.5

1

00.5

10

0.5

1

00.5

1

00.5

10

0.5

1

00.5

1

00.5

10

0.5

1

00.5

1

00.5

10

0.5

1

00.5

1

00.5

10

0.5

1

00.5

1

00.5

10

0.5

1

A control point Ci ∈ Rd is associated to each basis function to define F:

F(ζ) =∑

i

CiNi,p(ζ)

The control points define the control net.

With a similar idea, one can define B-spline and NURBS volumes.

R. Vazquez (IMATI-CNR Italy) The NURBS and GeoPDEs packages OctConf 2015, Darmstadt 10 / 24

Page 13: The NURBS and GeoPDEs packages€¦ · 1 The NURBS package: B-splines and NURBS B-splines and NURBS: mathematical de nitions Functions and examples 2 The GeoPDEs package: isogeometric

Tensor product surfaces: B-splines

B-splines and NURBS surfaces are defined by tensor product.

A control point Ci ∈ Rd is associated to each basis function to define F:

F(ζ) =∑

i

CiNi,p(ζ)

The control points define the control net.

With a similar idea, one can define B-spline and NURBS volumes.

R. Vazquez (IMATI-CNR Italy) The NURBS and GeoPDEs packages OctConf 2015, Darmstadt 10 / 24

Page 14: The NURBS and GeoPDEs packages€¦ · 1 The NURBS package: B-splines and NURBS B-splines and NURBS: mathematical de nitions Functions and examples 2 The GeoPDEs package: isogeometric

The NURBS package

The package is intended to work with NURBS geometries.

Based on the NURBS toolbox, developed by M. Spink in 2000.

From 2009, extended and maintained by Carlo de Falco and myself.

Supports curves, surfaces and (simple) volumes.

Geometry manipulation: rotation, extrusion, revolution...

It also serves for basis function evaluation (B-splines and NURBS).

Most of the algorithms come from The NURBS book.

Some technical info:

The package is part of the octave-forge project.

All the functions are well documented, including several examples.

Several tests included, but still some are missing (27 of 68 functions).

The package contains 11 oct-files.

http://octave.sourceforge.net/nurbs/

R. Vazquez (IMATI-CNR Italy) The NURBS and GeoPDEs packages OctConf 2015, Darmstadt 11 / 24

Page 15: The NURBS and GeoPDEs packages€¦ · 1 The NURBS package: B-splines and NURBS B-splines and NURBS: mathematical de nitions Functions and examples 2 The GeoPDEs package: isogeometric

The NURBS package

The package is intended to work with NURBS geometries.

Based on the NURBS toolbox, developed by M. Spink in 2000.

From 2009, extended and maintained by Carlo de Falco and myself.

Supports curves, surfaces and (simple) volumes.

Geometry manipulation: rotation, extrusion, revolution...

It also serves for basis function evaluation (B-splines and NURBS).

Most of the algorithms come from The NURBS book.

Some technical info:

The package is part of the octave-forge project.

All the functions are well documented, including several examples.

Several tests included, but still some are missing (27 of 68 functions).

The package contains 11 oct-files.

http://octave.sourceforge.net/nurbs/

R. Vazquez (IMATI-CNR Italy) The NURBS and GeoPDEs packages OctConf 2015, Darmstadt 11 / 24

Page 16: The NURBS and GeoPDEs packages€¦ · 1 The NURBS package: B-splines and NURBS B-splines and NURBS: mathematical de nitions Functions and examples 2 The GeoPDEs package: isogeometric

NURBS curves: definition in the NURBS package

The construction and manipulation of NURBS geometries is based on astructure with the following fields:

number: the number of control points.

coefs: control points coordinates (for NURBS also the weights).

order: the degree plus one.

knots: the knot vector in each direction.

NURBS geometries can be constructed “by hand” with the functionnrbmak, giving the knot vector and the control points.

c r v = nrbmak ( coe f s , knt ) ;

The package contains several functions to define simple geometries:nrbline , nrbrect , nrbcirc , nrbcylind .

R. Vazquez (IMATI-CNR Italy) The NURBS and GeoPDEs packages OctConf 2015, Darmstadt 12 / 24

Page 17: The NURBS and GeoPDEs packages€¦ · 1 The NURBS package: B-splines and NURBS B-splines and NURBS: mathematical de nitions Functions and examples 2 The GeoPDEs package: isogeometric

NURBS curves: definition in the NURBS package

The construction and manipulation of NURBS geometries is based on astructure with the following fields:

number: the number of control points.

coefs: control points coordinates (for NURBS also the weights).

order: the degree plus one.

knots: the knot vector in each direction.

NURBS geometries can be constructed “by hand” with the functionnrbmak, giving the knot vector and the control points.

c r v = nrbmak ( coe f s , knt ) ;

The package contains several functions to define simple geometries:nrbline , nrbrect , nrbcirc , nrbcylind .

R. Vazquez (IMATI-CNR Italy) The NURBS and GeoPDEs packages OctConf 2015, Darmstadt 12 / 24

Page 18: The NURBS and GeoPDEs packages€¦ · 1 The NURBS package: B-splines and NURBS B-splines and NURBS: mathematical de nitions Functions and examples 2 The GeoPDEs package: isogeometric

Examples of functions in the package

Functions to plot: nrbkntplot, nrbctrlplot

Revolution and extrusion: nrbrevolve , nrbextrude

Affine transformations: nrbtform

Extract the boundaries of a NURBS: nrbextract

R. Vazquez (IMATI-CNR Italy) The NURBS and GeoPDEs packages OctConf 2015, Darmstadt 13 / 24

Page 19: The NURBS and GeoPDEs packages€¦ · 1 The NURBS package: B-splines and NURBS B-splines and NURBS: mathematical de nitions Functions and examples 2 The GeoPDEs package: isogeometric

Examples of functions in the package

Functions to plot: nrbkntplot, nrbctrlplot

Revolution and extrusion: nrbrevolve , nrbextrude

Affine transformations: nrbtform

Extract the boundaries of a NURBS: nrbextract

R. Vazquez (IMATI-CNR Italy) The NURBS and GeoPDEs packages OctConf 2015, Darmstadt 13 / 24

Page 20: The NURBS and GeoPDEs packages€¦ · 1 The NURBS package: B-splines and NURBS B-splines and NURBS: mathematical de nitions Functions and examples 2 The GeoPDEs package: isogeometric

Examples of functions in the package

Functions to plot: nrbkntplot, nrbctrlplot

Revolution and extrusion: nrbrevolve , nrbextrude

Affine transformations: nrbtform

Extract the boundaries of a NURBS: nrbextract

R. Vazquez (IMATI-CNR Italy) The NURBS and GeoPDEs packages OctConf 2015, Darmstadt 13 / 24

Page 21: The NURBS and GeoPDEs packages€¦ · 1 The NURBS package: B-splines and NURBS B-splines and NURBS: mathematical de nitions Functions and examples 2 The GeoPDEs package: isogeometric

Examples of functions in the package

Functions to plot: nrbkntplot, nrbctrlplot

Revolution and extrusion: nrbrevolve , nrbextrude

Affine transformations: nrbtform

Extract the boundaries of a NURBS: nrbextract

R. Vazquez (IMATI-CNR Italy) The NURBS and GeoPDEs packages OctConf 2015, Darmstadt 13 / 24

Page 22: The NURBS and GeoPDEs packages€¦ · 1 The NURBS package: B-splines and NURBS B-splines and NURBS: mathematical de nitions Functions and examples 2 The GeoPDEs package: isogeometric

Some doubts and work to do

Add more tests.

Compatibility with the splines package?

The package is not intended to be a CAD software. But it would beso nice to move the control points in the figure...

R. Vazquez (IMATI-CNR Italy) The NURBS and GeoPDEs packages OctConf 2015, Darmstadt 14 / 24

Page 23: The NURBS and GeoPDEs packages€¦ · 1 The NURBS package: B-splines and NURBS B-splines and NURBS: mathematical de nitions Functions and examples 2 The GeoPDEs package: isogeometric

1 The NURBS package: B-splines and NURBSB-splines and NURBS: mathematical definitionsFunctions and examples

2 The GeoPDEs package: isogeometric analysisIsogeometric analysis: definitionThe development of GeoPDEsSome examples

R. Vazquez (IMATI-CNR Italy) The NURBS and GeoPDEs packages OctConf 2015, Darmstadt 15 / 24

Page 24: The NURBS and GeoPDEs packages€¦ · 1 The NURBS package: B-splines and NURBS B-splines and NURBS: mathematical de nitions Functions and examples 2 The GeoPDEs package: isogeometric

Isogeometric Analysis: overview

Isogeometric Analysis (IGA) is a method for discretization of partialdifferential equations, similar to the finite element method (FEM).

The idea is to run the simulation directly on a NURBS geometry,approximating the solution also with NURBS (or splines) functions.

It is having a big impact in computational engineering, especially incomputational mechanics.

Compared to FEM, the method provides:

Higher continuity of basis functions.

Easier mesh generation and refinement.

R. Vazquez (IMATI-CNR Italy) The NURBS and GeoPDEs packages OctConf 2015, Darmstadt 16 / 24

Page 25: The NURBS and GeoPDEs packages€¦ · 1 The NURBS package: B-splines and NURBS B-splines and NURBS: mathematical de nitions Functions and examples 2 The GeoPDEs package: isogeometric

Isogeometric Analysis: overview

Isogeometric Analysis (IGA) is a method for discretization of partialdifferential equations, similar to the finite element method (FEM).

The idea is to run the simulation directly on a NURBS geometry,approximating the solution also with NURBS (or splines) functions.

It is having a big impact in computational engineering, especially incomputational mechanics.

Compared to FEM, the method provides:

Higher continuity of basis functions.

Easier mesh generation and refinement.

R. Vazquez (IMATI-CNR Italy) The NURBS and GeoPDEs packages OctConf 2015, Darmstadt 16 / 24

Page 26: The NURBS and GeoPDEs packages€¦ · 1 The NURBS package: B-splines and NURBS B-splines and NURBS: mathematical de nitions Functions and examples 2 The GeoPDEs package: isogeometric

The concept of IGAHughes, Cottrell, Bazilevs (2005)

Reference domain Ω = (0, 1)d , and physical domain Ω = F(Ω).

F−−−−→

We want to solve numerically a certain problem in the NURBS domain Ω.

In Ω we take the space of NURBS functions, Vh := spanRi ,p.

Isoparametric paradigm: in Ω we define Vh := spanvi := Ri ,p F−1.

Once the space is defined, everything is similar to FEM: numericalintegration, assembly of the global matrices, solution of the linear system...

R. Vazquez (IMATI-CNR Italy) The NURBS and GeoPDEs packages OctConf 2015, Darmstadt 17 / 24

Page 27: The NURBS and GeoPDEs packages€¦ · 1 The NURBS package: B-splines and NURBS B-splines and NURBS: mathematical de nitions Functions and examples 2 The GeoPDEs package: isogeometric

The concept of IGAHughes, Cottrell, Bazilevs (2005)

Reference domain Ω = (0, 1)d , and physical domain Ω = F(Ω).

F−−−−→

We want to solve numerically a certain problem in the NURBS domain Ω.

In Ω we take the space of NURBS functions, Vh := spanRi ,p.

Isoparametric paradigm: in Ω we define Vh := spanvi := Ri ,p F−1.

Once the space is defined, everything is similar to FEM: numericalintegration, assembly of the global matrices, solution of the linear system...

R. Vazquez (IMATI-CNR Italy) The NURBS and GeoPDEs packages OctConf 2015, Darmstadt 17 / 24

Page 28: The NURBS and GeoPDEs packages€¦ · 1 The NURBS package: B-splines and NURBS B-splines and NURBS: mathematical de nitions Functions and examples 2 The GeoPDEs package: isogeometric

The concept of IGAHughes, Cottrell, Bazilevs (2005)

Reference domain Ω = (0, 1)d , and physical domain Ω = F(Ω).

F−−−−→

We want to solve numerically a certain problem in the NURBS domain Ω.

In Ω we take the space of NURBS functions, Vh := spanRi ,p.

Isoparametric paradigm: in Ω we define Vh := spanvi := Ri ,p F−1.

Once the space is defined, everything is similar to FEM: numericalintegration, assembly of the global matrices, solution of the linear system...

R. Vazquez (IMATI-CNR Italy) The NURBS and GeoPDEs packages OctConf 2015, Darmstadt 17 / 24

Page 29: The NURBS and GeoPDEs packages€¦ · 1 The NURBS package: B-splines and NURBS B-splines and NURBS: mathematical de nitions Functions and examples 2 The GeoPDEs package: isogeometric

The concept of IGAHughes, Cottrell, Bazilevs (2005)

Reference domain Ω = (0, 1)d , and physical domain Ω = F(Ω).

F−−−−→

We want to solve numerically a certain problem in the NURBS domain Ω.

In Ω we take the space of NURBS functions, Vh := spanRi ,p.

Isoparametric paradigm: in Ω we define Vh := spanvi := Ri ,p F−1.

Once the space is defined, everything is similar to FEM: numericalintegration, assembly of the global matrices, solution of the linear system...

R. Vazquez (IMATI-CNR Italy) The NURBS and GeoPDEs packages OctConf 2015, Darmstadt 17 / 24

Page 30: The NURBS and GeoPDEs packages€¦ · 1 The NURBS package: B-splines and NURBS B-splines and NURBS: mathematical de nitions Functions and examples 2 The GeoPDEs package: isogeometric

Refinement in IGA

The coarsest mesh is given by the parametrization F of the geometry.

Coarsest mesh: geometry description

RiN0i=1

F−−−−→

vi = Ri F−1N0i=1

A better approximation is obtained by refining the space, either taking afiner mesh (h-refinement) or raising the degree (p-refinement).

The geometry Ω and the parametrization F remain fixed after refinement.

Since the mesh is structured, refinement is very easy.

R. Vazquez (IMATI-CNR Italy) The NURBS and GeoPDEs packages OctConf 2015, Darmstadt 18 / 24

Page 31: The NURBS and GeoPDEs packages€¦ · 1 The NURBS package: B-splines and NURBS B-splines and NURBS: mathematical de nitions Functions and examples 2 The GeoPDEs package: isogeometric

Refinement in IGA

The coarsest mesh is given by the parametrization F of the geometry.

First refinement step

RiN1i=1

F−−−−→

vi = Ri F−1N1i=1

A better approximation is obtained by refining the space, either taking afiner mesh (h-refinement) or raising the degree (p-refinement).

The geometry Ω and the parametrization F remain fixed after refinement.

Since the mesh is structured, refinement is very easy.

R. Vazquez (IMATI-CNR Italy) The NURBS and GeoPDEs packages OctConf 2015, Darmstadt 18 / 24

Page 32: The NURBS and GeoPDEs packages€¦ · 1 The NURBS package: B-splines and NURBS B-splines and NURBS: mathematical de nitions Functions and examples 2 The GeoPDEs package: isogeometric

Refinement in IGA

The coarsest mesh is given by the parametrization F of the geometry.

Second refinement step

RiN2i=1

F−−−−→

vi = Ri F−1N2i=1

A better approximation is obtained by refining the space, either taking afiner mesh (h-refinement) or raising the degree (p-refinement).

The geometry Ω and the parametrization F remain fixed after refinement.

Since the mesh is structured, refinement is very easy.

R. Vazquez (IMATI-CNR Italy) The NURBS and GeoPDEs packages OctConf 2015, Darmstadt 18 / 24

Page 33: The NURBS and GeoPDEs packages€¦ · 1 The NURBS package: B-splines and NURBS B-splines and NURBS: mathematical de nitions Functions and examples 2 The GeoPDEs package: isogeometric

GeoPDEs: development

GeoPDEs was originally developed in Pavia, by Carlo de Falco, AlessandroReali, and myself.

2009/2010: join forces to obtain a single/uniform code.

2010: first public release of GeoPDEs.

2011: presentation at the first IGA conference.

2012: version 2.0, efficient use of tensor-product features.

2015: version 2.1 (to be released), dimension independent.

2016 (expected): adaptivity with hierarchical splines.

Other developers and contributorsAndrea Bressan, Elena Bulgarello, Durkbin Cho, Jacopo Corno, AdrianoCortes, Luca Dede, Sara Frizziero, Eduardo M. Garau, Timo Lahivaara,Marco Pingaro, Anna Tagliabue.

R. Vazquez (IMATI-CNR Italy) The NURBS and GeoPDEs packages OctConf 2015, Darmstadt 19 / 24

Page 34: The NURBS and GeoPDEs packages€¦ · 1 The NURBS package: B-splines and NURBS B-splines and NURBS: mathematical de nitions Functions and examples 2 The GeoPDEs package: isogeometric

GeoPDEs: development

GeoPDEs was originally developed in Pavia, by Carlo de Falco, AlessandroReali, and myself.

2009/2010: join forces to obtain a single/uniform code.

2010: first public release of GeoPDEs.

2011: presentation at the first IGA conference.

2012: version 2.0, efficient use of tensor-product features.

2015: version 2.1 (to be released), dimension independent.

2016 (expected): adaptivity with hierarchical splines.

Other developers and contributorsAndrea Bressan, Elena Bulgarello, Durkbin Cho, Jacopo Corno, AdrianoCortes, Luca Dede, Sara Frizziero, Eduardo M. Garau, Timo Lahivaara,Marco Pingaro, Anna Tagliabue.

R. Vazquez (IMATI-CNR Italy) The NURBS and GeoPDEs packages OctConf 2015, Darmstadt 19 / 24

Page 35: The NURBS and GeoPDEs packages€¦ · 1 The NURBS package: B-splines and NURBS B-splines and NURBS: mathematical de nitions Functions and examples 2 The GeoPDEs package: isogeometric

GeoPDEs: description of the software

GeoPDEs consists of a set of interrelated packages for different problems:

base: the main package, with examples for Laplace problem.

elasticity: a simple package for linear elasticity problems.

fluid: Stokes’ equations, with generalization of face finite elements.

maxwell: Maxwell equations, generalization of edge finite elements.

multipatch: extension to multi-patch defined geometries.

The main features (structures, classes and functions) are defined ingeopdes base.

The other packages are based on the structures defined in base, with thesame nomenclature in each package.

All the packages are built as in octave-forge.

R. Vazquez (IMATI-CNR Italy) The NURBS and GeoPDEs packages OctConf 2015, Darmstadt 20 / 24

Page 36: The NURBS and GeoPDEs packages€¦ · 1 The NURBS package: B-splines and NURBS B-splines and NURBS: mathematical de nitions Functions and examples 2 The GeoPDEs package: isogeometric

GeoPDEs: description of the software

GeoPDEs consists of a set of interrelated packages for different problems:

base: the main package, with examples for Laplace problem.

elasticity: a simple package for linear elasticity problems.

fluid: Stokes’ equations, with generalization of face finite elements.

maxwell: Maxwell equations, generalization of edge finite elements.

multipatch: extension to multi-patch defined geometries.

The main features (structures, classes and functions) are defined ingeopdes base.

The other packages are based on the structures defined in base, with thesame nomenclature in each package.

All the packages are built as in octave-forge.

R. Vazquez (IMATI-CNR Italy) The NURBS and GeoPDEs packages OctConf 2015, Darmstadt 20 / 24

Page 37: The NURBS and GeoPDEs packages€¦ · 1 The NURBS package: B-splines and NURBS B-splines and NURBS: mathematical de nitions Functions and examples 2 The GeoPDEs package: isogeometric

The main structures of GeoPDEs

GeoPDEs has been implemented following an abstract framework.

The code is based on three main structures/classes:

Geometry: the parametrization F and its derivatives.

Mesh: the partition of the domain for numerical integration.

Space: the basis functions of the approximation space.

The geometry can use the NURBS package, but is not limited to it.

In version 2.0, mesh and space became classes, to avoid precomputing.

The structures/classes are used in different applications without changes.

R. Vazquez (IMATI-CNR Italy) The NURBS and GeoPDEs packages OctConf 2015, Darmstadt 21 / 24

Page 38: The NURBS and GeoPDEs packages€¦ · 1 The NURBS package: B-splines and NURBS B-splines and NURBS: mathematical de nitions Functions and examples 2 The GeoPDEs package: isogeometric

The main structures of GeoPDEs

GeoPDEs has been implemented following an abstract framework.

The code is based on three main structures/classes:

Geometry: the parametrization F and its derivatives.

Mesh: the partition of the domain for numerical integration.

Space: the basis functions of the approximation space.

The geometry can use the NURBS package, but is not limited to it.

In version 2.0, mesh and space became classes, to avoid precomputing.

The structures/classes are used in different applications without changes.

R. Vazquez (IMATI-CNR Italy) The NURBS and GeoPDEs packages OctConf 2015, Darmstadt 21 / 24

Page 39: The NURBS and GeoPDEs packages€¦ · 1 The NURBS package: B-splines and NURBS B-splines and NURBS: mathematical de nitions Functions and examples 2 The GeoPDEs package: isogeometric

Other important features

The core of GeoPDEs are the operator functions, a family of functions toassemble the matrices and vectors of the method.

This is the most time-consuming part. For efficiency, they areimplemented in oct-files.

Several examples are already present: Laplacian, bilaplacian, convectionterms, SUPG stabilization, Stokes, linear elasticity, Maxwell equations ...

GeoPDEs also includes several functions for postprocessing.

Export to Paraview.

Evaluate the solution at given points.

Compute the error in academic problems with known solution.

R. Vazquez (IMATI-CNR Italy) The NURBS and GeoPDEs packages OctConf 2015, Darmstadt 22 / 24

Page 40: The NURBS and GeoPDEs packages€¦ · 1 The NURBS package: B-splines and NURBS B-splines and NURBS: mathematical de nitions Functions and examples 2 The GeoPDEs package: isogeometric

Other important features

The core of GeoPDEs are the operator functions, a family of functions toassemble the matrices and vectors of the method.

This is the most time-consuming part. For efficiency, they areimplemented in oct-files.

Several examples are already present: Laplacian, bilaplacian, convectionterms, SUPG stabilization, Stokes, linear elasticity, Maxwell equations ...

GeoPDEs also includes several functions for postprocessing.

Export to Paraview.

Evaluate the solution at given points.

Compute the error in academic problems with known solution.

R. Vazquez (IMATI-CNR Italy) The NURBS and GeoPDEs packages OctConf 2015, Darmstadt 22 / 24

Page 41: The NURBS and GeoPDEs packages€¦ · 1 The NURBS package: B-splines and NURBS B-splines and NURBS: mathematical de nitions Functions and examples 2 The GeoPDEs package: isogeometric

Some examples

Linear elasticity. Maxwell problem in a deformed waveguide.

Stokes flow in a twisted pipe.Bressan, Sangalli (2012)

The TM010 mode for a TESLA cavity.Courtesy of Jacopo Corno

R. Vazquez (IMATI-CNR Italy) The NURBS and GeoPDEs packages OctConf 2015, Darmstadt 23 / 24

Page 42: The NURBS and GeoPDEs packages€¦ · 1 The NURBS package: B-splines and NURBS B-splines and NURBS: mathematical de nitions Functions and examples 2 The GeoPDEs package: isogeometric

Current and future work

I am currently working on

A dimension-independent implementation (it will be released soon).I Reduction of number of classes, functions and lines of code.I Simplifies the imposition of boundary conditions.

Hierarchical splines with adaptivity (joint work with E. Garau).I Still in a preliminary stage.I Works in geopdes base. Needs to be extended to other packages.

Some theorems that (almost) nobody will understand.

Actually, I should also work on

Adding a test suite. Only 3 functions have a test.

Change the repository (subversion in sourceforge).

Rewrite the classes using classdef.

A new web page.

http://geopdes.sourceforge.net

Thanks for your attention!

R. Vazquez (IMATI-CNR Italy) The NURBS and GeoPDEs packages OctConf 2015, Darmstadt 24 / 24

Page 43: The NURBS and GeoPDEs packages€¦ · 1 The NURBS package: B-splines and NURBS B-splines and NURBS: mathematical de nitions Functions and examples 2 The GeoPDEs package: isogeometric

Current and future work

I am currently working on

A dimension-independent implementation (it will be released soon).I Reduction of number of classes, functions and lines of code.I Simplifies the imposition of boundary conditions.

Hierarchical splines with adaptivity (joint work with E. Garau).I Still in a preliminary stage.I Works in geopdes base. Needs to be extended to other packages.

Some theorems that (almost) nobody will understand.

Actually, I should also work on

Adding a test suite. Only 3 functions have a test.

Change the repository (subversion in sourceforge).

Rewrite the classes using classdef.

A new web page.

http://geopdes.sourceforge.net

Thanks for your attention!

R. Vazquez (IMATI-CNR Italy) The NURBS and GeoPDEs packages OctConf 2015, Darmstadt 24 / 24

Page 44: The NURBS and GeoPDEs packages€¦ · 1 The NURBS package: B-splines and NURBS B-splines and NURBS: mathematical de nitions Functions and examples 2 The GeoPDEs package: isogeometric

Current and future work

I am currently working on

A dimension-independent implementation (it will be released soon).I Reduction of number of classes, functions and lines of code.I Simplifies the imposition of boundary conditions.

Hierarchical splines with adaptivity (joint work with E. Garau).I Still in a preliminary stage.I Works in geopdes base. Needs to be extended to other packages.

Some theorems that (almost) nobody will understand.

Actually, I should also work on

Adding a test suite. Only 3 functions have a test.

Change the repository (subversion in sourceforge).

Rewrite the classes using classdef.

A new web page.

http://geopdes.sourceforge.net

Thanks for your attention!R. Vazquez (IMATI-CNR Italy) The NURBS and GeoPDEs packages OctConf 2015, Darmstadt 24 / 24