A presentation of the library OFELI Rachid Touzani Laboratoire de - - PowerPoint PPT Presentation

a presentation of the library ofeli
SMART_READER_LITE
LIVE PREVIEW

A presentation of the library OFELI Rachid Touzani Laboratoire de - - PowerPoint PPT Presentation

A presentation of the library OFELI Rachid Touzani Laboratoire de Math ematiques Universit e Blaise Pascal Clermont-Ferrand, France OFELI Presentation R. Touzani 1/20 Introduction An example of a finite element code Structure of the


slide-1
SLIDE 1

A presentation of the library OFELI

Rachid Touzani

Laboratoire de Math´ ematiques Universit´ e Blaise Pascal Clermont-Ferrand, France OFELI Presentation

  • R. Touzani

1/20

slide-2
SLIDE 2

Introduction An example of a finite element code Structure of the library The OFELI package

Outlook

1 What is OFELI ? 2 Levels of use 3 A finite element code example using OFELI 4 The library structure 5 The OFELI package 6 Current and future developments OFELI Presentation

  • R. Touzani

2/20

slide-3
SLIDE 3

Introduction An example of a finite element code Structure of the library The OFELI package

What is OFELI ?

  • OFELI: Object Finite Element LIbrary
  • The OFELI library is a collection of C++ classes C++ and utilities enabling the construction
  • f finite element codes.
  • It provides a variety of prototypes codes enabling familiarity with the library usage
  • It enables implementation of other approximation methods (finite volumes, finite differences,

integral representations, . . . )

  • It contains utility programs for:
  • Mesh generation in 2-D
  • Conversion from and to various mesh generators and graphical post-processors
  • . . .

What is not OFELI ?

  • A programming environment (like Matlab, Scilab, . . . )
  • A metalanguage for finite element programming (like freefem, Melina, . . . )

OFELI Presentation

  • R. Touzani

3/20

slide-4
SLIDE 4

Introduction An example of a finite element code Structure of the library The OFELI package

What is OFELI ?

  • OFELI: Object Finite Element LIbrary
  • The OFELI library is a collection of C++ classes C++ and utilities enabling the construction
  • f finite element codes.
  • It provides a variety of prototypes codes enabling familiarity with the library usage
  • It enables implementation of other approximation methods (finite volumes, finite differences,

integral representations, . . . )

  • It contains utility programs for:
  • Mesh generation in 2-D
  • Conversion from and to various mesh generators and graphical post-processors
  • . . .

What is not OFELI ?

  • A programming environment (like Matlab, Scilab, . . . )
  • A metalanguage for finite element programming (like freefem, Melina, . . . )

OFELI Presentation

  • R. Touzani

3/20

slide-5
SLIDE 5

Introduction An example of a finite element code Structure of the library The OFELI package

What is OFELI ?

  • OFELI: Object Finite Element LIbrary
  • The OFELI library is a collection of C++ classes C++ and utilities enabling the construction
  • f finite element codes.
  • It provides a variety of prototypes codes enabling familiarity with the library usage
  • It enables implementation of other approximation methods (finite volumes, finite differences,

integral representations, . . . )

  • It contains utility programs for:
  • Mesh generation in 2-D
  • Conversion from and to various mesh generators and graphical post-processors
  • . . .

What is not OFELI ?

  • A programming environment (like Matlab, Scilab, . . . )
  • A metalanguage for finite element programming (like freefem, Melina, . . . )

OFELI Presentation

  • R. Touzani

3/20

slide-6
SLIDE 6

Introduction An example of a finite element code Structure of the library The OFELI package

What is OFELI ?

  • OFELI: Object Finite Element LIbrary
  • The OFELI library is a collection of C++ classes C++ and utilities enabling the construction
  • f finite element codes.
  • It provides a variety of prototypes codes enabling familiarity with the library usage
  • It enables implementation of other approximation methods (finite volumes, finite differences,

integral representations, . . . )

  • It contains utility programs for:
  • Mesh generation in 2-D
  • Conversion from and to various mesh generators and graphical post-processors
  • . . .

What is not OFELI ?

  • A programming environment (like Matlab, Scilab, . . . )
  • A metalanguage for finite element programming (like freefem, Melina, . . . )

OFELI Presentation

  • R. Touzani

3/20

slide-7
SLIDE 7

Introduction An example of a finite element code Structure of the library The OFELI package

What is OFELI ?

  • OFELI: Object Finite Element LIbrary
  • The OFELI library is a collection of C++ classes C++ and utilities enabling the construction
  • f finite element codes.
  • It provides a variety of prototypes codes enabling familiarity with the library usage
  • It enables implementation of other approximation methods (finite volumes, finite differences,

integral representations, . . . )

  • It contains utility programs for:
  • Mesh generation in 2-D
  • Conversion from and to various mesh generators and graphical post-processors
  • . . .

What is not OFELI ?

  • A programming environment (like Matlab, Scilab, . . . )
  • A metalanguage for finite element programming (like freefem, Melina, . . . )

OFELI Presentation

  • R. Touzani

3/20

slide-8
SLIDE 8

Introduction An example of a finite element code Structure of the library The OFELI package

What is OFELI ?

  • OFELI: Object Finite Element LIbrary
  • The OFELI library is a collection of C++ classes C++ and utilities enabling the construction
  • f finite element codes.
  • It provides a variety of prototypes codes enabling familiarity with the library usage
  • It enables implementation of other approximation methods (finite volumes, finite differences,

integral representations, . . . )

  • It contains utility programs for:
  • Mesh generation in 2-D
  • Conversion from and to various mesh generators and graphical post-processors
  • . . .

What is not OFELI ?

  • A programming environment (like Matlab, Scilab, . . . )
  • A metalanguage for finite element programming (like freefem, Melina, . . . )

OFELI Presentation

  • R. Touzani

3/20

slide-9
SLIDE 9

Introduction An example of a finite element code Structure of the library The OFELI package

What is OFELI ?

  • OFELI: Object Finite Element LIbrary
  • The OFELI library is a collection of C++ classes C++ and utilities enabling the construction
  • f finite element codes.
  • It provides a variety of prototypes codes enabling familiarity with the library usage
  • It enables implementation of other approximation methods (finite volumes, finite differences,

integral representations, . . . )

  • It contains utility programs for:
  • Mesh generation in 2-D
  • Conversion from and to various mesh generators and graphical post-processors
  • . . .

What is not OFELI ?

  • A programming environment (like Matlab, Scilab, . . . )
  • A metalanguage for finite element programming (like freefem, Melina, . . . )

OFELI Presentation

  • R. Touzani

3/20

slide-10
SLIDE 10

Introduction An example of a finite element code Structure of the library The OFELI package

What is OFELI ?

  • OFELI: Object Finite Element LIbrary
  • The OFELI library is a collection of C++ classes C++ and utilities enabling the construction
  • f finite element codes.
  • It provides a variety of prototypes codes enabling familiarity with the library usage
  • It enables implementation of other approximation methods (finite volumes, finite differences,

integral representations, . . . )

  • It contains utility programs for:
  • Mesh generation in 2-D
  • Conversion from and to various mesh generators and graphical post-processors
  • . . .

What is not OFELI ?

  • A programming environment (like Matlab, Scilab, . . . )
  • A metalanguage for finite element programming (like freefem, Melina, . . . )

OFELI Presentation

  • R. Touzani

3/20

slide-11
SLIDE 11

Introduction An example of a finite element code Structure of the library The OFELI package

What is OFELI ?

  • OFELI: Object Finite Element LIbrary
  • The OFELI library is a collection of C++ classes C++ and utilities enabling the construction
  • f finite element codes.
  • It provides a variety of prototypes codes enabling familiarity with the library usage
  • It enables implementation of other approximation methods (finite volumes, finite differences,

integral representations, . . . )

  • It contains utility programs for:
  • Mesh generation in 2-D
  • Conversion from and to various mesh generators and graphical post-processors
  • . . .

What is not OFELI ?

  • A programming environment (like Matlab, Scilab, . . . )
  • A metalanguage for finite element programming (like freefem, Melina, . . . )

OFELI Presentation

  • R. Touzani

3/20

slide-12
SLIDE 12

Introduction An example of a finite element code Structure of the library The OFELI package

What is OFELI ?

  • OFELI: Object Finite Element LIbrary
  • The OFELI library is a collection of C++ classes C++ and utilities enabling the construction
  • f finite element codes.
  • It provides a variety of prototypes codes enabling familiarity with the library usage
  • It enables implementation of other approximation methods (finite volumes, finite differences,

integral representations, . . . )

  • It contains utility programs for:
  • Mesh generation in 2-D
  • Conversion from and to various mesh generators and graphical post-processors
  • . . .

What is not OFELI ?

  • A programming environment (like Matlab, Scilab, . . . )
  • A metalanguage for finite element programming (like freefem, Melina, . . . )

OFELI Presentation

  • R. Touzani

3/20

slide-13
SLIDE 13

Introduction An example of a finite element code Structure of the library The OFELI package

Levels of use of the library

  • Level 0: No knowledge of C++ is required. Use of prototype programs (Demos)
  • Level 1: Programming of finite element codes using OFELI classes. Possible contribution

with classes and functions = ⇒ Contribution to Demo programs

  • Level 2: Contribution to the library’s kernel by Implementing equations classes and solvers,

. . .

What are objects in a finite element code ?

Mathematical entities that one manipulates when solving a problem: Mesh, matrices, vectors, equations, solvers (nonlinear problems, optimization, . . . ), . . .

OFELI Presentation

  • R. Touzani

4/20

slide-14
SLIDE 14

Introduction An example of a finite element code Structure of the library The OFELI package

Levels of use of the library

  • Level 0: No knowledge of C++ is required. Use of prototype programs (Demos)
  • Level 1: Programming of finite element codes using OFELI classes. Possible contribution

with classes and functions = ⇒ Contribution to Demo programs

  • Level 2: Contribution to the library’s kernel by Implementing equations classes and solvers,

. . .

What are objects in a finite element code ?

Mathematical entities that one manipulates when solving a problem: Mesh, matrices, vectors, equations, solvers (nonlinear problems, optimization, . . . ), . . .

OFELI Presentation

  • R. Touzani

4/20

slide-15
SLIDE 15

Introduction An example of a finite element code Structure of the library The OFELI package

Levels of use of the library

  • Level 0: No knowledge of C++ is required. Use of prototype programs (Demos)
  • Level 1: Programming of finite element codes using OFELI classes. Possible contribution

with classes and functions = ⇒ Contribution to Demo programs

  • Level 2: Contribution to the library’s kernel by Implementing equations classes and solvers,

. . .

What are objects in a finite element code ?

Mathematical entities that one manipulates when solving a problem: Mesh, matrices, vectors, equations, solvers (nonlinear problems, optimization, . . . ), . . .

OFELI Presentation

  • R. Touzani

4/20

slide-16
SLIDE 16

Introduction An example of a finite element code Structure of the library The OFELI package

Levels of use of the library

  • Level 0: No knowledge of C++ is required. Use of prototype programs (Demos)
  • Level 1: Programming of finite element codes using OFELI classes. Possible contribution

with classes and functions = ⇒ Contribution to Demo programs

  • Level 2: Contribution to the library’s kernel by Implementing equations classes and solvers,

. . .

What are objects in a finite element code ?

Mathematical entities that one manipulates when solving a problem: Mesh, matrices, vectors, equations, solvers (nonlinear problems, optimization, . . . ), . . .

OFELI Presentation

  • R. Touzani

4/20

slide-17
SLIDE 17

Introduction An example of a finite element code Structure of the library The OFELI package

Levels of use of the library

  • Level 0: No knowledge of C++ is required. Use of prototype programs (Demos)
  • Level 1: Programming of finite element codes using OFELI classes. Possible contribution

with classes and functions = ⇒ Contribution to Demo programs

  • Level 2: Contribution to the library’s kernel by Implementing equations classes and solvers,

. . .

What are objects in a finite element code ?

Mathematical entities that one manipulates when solving a problem: Mesh, matrices, vectors, equations, solvers (nonlinear problems, optimization, . . . ), . . .

OFELI Presentation

  • R. Touzani

4/20

slide-18
SLIDE 18

Introduction An example of a finite element code Structure of the library The OFELI package

An example of program

Consider the following boundary value problem: ∆u = 0 in Ω ⊂ R2 (or R3) u = g

  • n ∂Ω

Matrix Formulation

Au = b where aij =

∇φj · ∇φi dx Boundary Conditions: We enforce u = g by a penalty technique:

i−1

  • j=1

aijuj +

N

  • j=i+1

aijuj + λaiiui = λaiig(xi) λ ≫ 1 for each node i on the boundary.

OFELI Presentation

  • R. Touzani

5/20

slide-19
SLIDE 19

Introduction An example of a finite element code Structure of the library The OFELI package

An example of program

Consider the following boundary value problem: ∆u = 0 in Ω ⊂ R2 (or R3) u = g

  • n ∂Ω

Matrix Formulation

Au = b where aij =

∇φj · ∇φi dx Boundary Conditions: We enforce u = g by a penalty technique:

i−1

  • j=1

aijuj +

N

  • j=i+1

aijuj + λaiiui = λaiig(xi) λ ≫ 1 for each node i on the boundary.

OFELI Presentation

  • R. Touzani

5/20

slide-20
SLIDE 20

Introduction An example of a finite element code Structure of the library The OFELI package

An example of program

Consider the following boundary value problem: ∆u = 0 in Ω ⊂ R2 (or R3) u = g

  • n ∂Ω

Matrix Formulation

Au = b where aij =

∇φj · ∇φi dx Boundary Conditions: We enforce u = g by a penalty technique:

i−1

  • j=1

aijuj +

N

  • j=i+1

aijuj + λaiiui = λaiig(xi) λ ≫ 1 for each node i on the boundary.

OFELI Presentation

  • R. Touzani

5/20

slide-21
SLIDE 21

Introduction An example of a finite element code Structure of the library The OFELI package

An example of program

Consider the following boundary value problem: ∆u = 0 in Ω ⊂ R2 (or R3) u = g

  • n ∂Ω

Matrix Formulation

Au = b where aij =

∇φj · ∇φi dx Boundary Conditions: We enforce u = g by a penalty technique:

i−1

  • j=1

aijuj +

N

  • j=i+1

aijuj + λaiiui = λaiig(xi) λ ≫ 1 for each node i on the boundary.

OFELI Presentation

  • R. Touzani

5/20

slide-22
SLIDE 22

Introduction An example of a finite element code Structure of the library The OFELI package

#include "OFELI.h" #include "Therm.h" using namespace OFELI; int main() { Mesh ms("test.m"); SkSMatrix<double> A(ms); Vect<double> b(ms.getNbDOF()), bc(ms.getNbDOF()); // Initialize bc MeshElements(ms) { DC2DT3 eq(theElement); eq.Diffusion(); eq.ElementAssembly(A); } A.Prescribe(ms,b,bc); A.Factor(); A.Solve(b); cout << b; return 0; }

OFELI Presentation

  • R. Touzani

6/20

slide-23
SLIDE 23

Introduction An example of a finite element code Structure of the library The OFELI package

#include "OFELI.h" #include "Therm.h" using namespace OFELI; int main() { Mesh ms("test.m"); SkSMatrix<double> A(ms); Vect<double> b(ms.getNbDOF()), bc(ms.getNbDOF()); // Initialize bc MeshElements(ms) { DC2DT3 eq(theElement); eq.Diffusion(); eq.ElementAssembly(A); } A.Prescribe(ms,b,bc); A.Factor(); A.Solve(b); cout << b; return 0; }

OFELI Presentation

  • R. Touzani

6/20

slide-24
SLIDE 24

Introduction An example of a finite element code Structure of the library The OFELI package

#include "OFELI.h" #include "Therm.h" using namespace OFELI; int main() { Mesh ms("test.m"); SkSMatrix<double> A(ms); Vect<double> b(ms.getNbDOF()), bc(ms.getNbDOF()); // Initialize bc MeshElements(ms) { DC2DT3 eq(theElement); eq.Diffusion(); eq.ElementAssembly(A); } A.Prescribe(ms,b,bc); A.Factor(); A.Solve(b); cout << b; return 0; }

OFELI Presentation

  • R. Touzani

6/20

slide-25
SLIDE 25

Introduction An example of a finite element code Structure of the library The OFELI package

#include "OFELI.h" #include "Therm.h" using namespace OFELI; int main() { Mesh ms("test.m"); SkSMatrix<double> A(ms); Vect<double> b(ms.getNbDOF()), bc(ms.getNbDOF()); // Initialize bc MeshElements(ms) { DC2DT3 eq(theElement); eq.Diffusion(); eq.ElementAssembly(A); } A.Prescribe(ms,b,bc); A.Factor(); A.Solve(b); cout << b; return 0; }

OFELI Presentation

  • R. Touzani

6/20

slide-26
SLIDE 26

Introduction An example of a finite element code Structure of the library The OFELI package

#include "OFELI.h" #include "Therm.h" using namespace OFELI; int main() { Mesh ms("test.m"); SkSMatrix<double> A(ms); Vect<double> b(ms.getNbDOF()), bc(ms.getNbDOF()); // Initialize bc MeshElements(ms) { DC2DT3 eq(theElement); eq.Diffusion(); eq.ElementAssembly(A); } A.Prescribe(ms,b,bc); A.Factor(); A.Solve(b); cout << b; return 0; }

OFELI Presentation

  • R. Touzani

6/20

slide-27
SLIDE 27

Introduction An example of a finite element code Structure of the library The OFELI package

#include "OFELI.h" #include "Therm.h" using namespace OFELI; int main() { Mesh ms("test.m"); SkSMatrix<double> A(ms); Vect<double> b(ms.getNbDOF()), bc(ms.getNbDOF()); // Initialize bc MeshElements(ms) { DC2DT3 eq(theElement); eq.Diffusion(); eq.ElementAssembly(A); } A.Prescribe(ms,b,bc); A.Factor(); A.Solve(b); cout << b; return 0; }

OFELI Presentation

  • R. Touzani

6/20

slide-28
SLIDE 28

Introduction An example of a finite element code Structure of the library The OFELI package

#include "OFELI.h" #include "Therm.h" using namespace OFELI; int main() { Mesh ms("test.m"); SkSMatrix<double> A(ms); Vect<double> b(ms.getNbDOF()), bc(ms.getNbDOF()); // Initialize bc MeshElements(ms) { DC2DT3 eq(theElement); eq.Diffusion(); eq.ElementAssembly(A); } A.Prescribe(ms,b,bc); A.Factor(); A.Solve(b); cout << b; return 0; }

OFELI Presentation

  • R. Touzani

6/20

slide-29
SLIDE 29

Introduction An example of a finite element code Structure of the library The OFELI package

#include "OFELI.h" #include "Therm.h" using namespace OFELI; int main() { Mesh ms("test.m"); SkSMatrix<double> A(ms); Vect<double> b(ms.getNbDOF()), bc(ms.getNbDOF()); // Initialize bc MeshElements(ms) { DC2DT3 eq(theElement); eq.Diffusion(); eq.ElementAssembly(A); } A.Prescribe(ms,b,bc); A.Factor(); A.Solve(b); cout << b; return 0; }

OFELI Presentation

  • R. Touzani

6/20

slide-30
SLIDE 30

Introduction An example of a finite element code Structure of the library The OFELI package

#include "OFELI.h" #include "Therm.h" using namespace OFELI; int main() { Mesh ms("test.m"); SkSMatrix<double> A(ms); Vect<double> b(ms.getNbDOF()), bc(ms.getNbDOF()); // Initialize bc MeshElements(ms) { DC2DT3 eq(theElement); eq.Diffusion(); eq.ElementAssembly(A); } A.Prescribe(ms,b,bc); A.Factor(); A.Solve(b); cout << b; return 0; }

OFELI Presentation

  • R. Touzani

6/20

slide-31
SLIDE 31

Introduction An example of a finite element code Structure of the library The OFELI package

#include "OFELI.h" #include "Therm.h" using namespace OFELI; int main() { Mesh ms("test.m"); SkSMatrix<double> A(ms); Vect<double> b(ms.getNbDOF()), bc(ms.getNbDOF()); // Initialize bc MeshElements(ms) { DC2DT3 eq(theElement); eq.Diffusion(); eq.ElementAssembly(A); } A.Prescribe(ms,b,bc); A.Factor(); A.Solve(b); cout << b; return 0; }

OFELI Presentation

  • R. Touzani

6/20

slide-32
SLIDE 32

Introduction An example of a finite element code Structure of the library The OFELI package

Classes in OFELI

Some conventions

  • Class names always begin with a capital letter.
  • Member function names begin with capital letters except if the name starts with a verb. et

les get....

  • Class members that modify a class have generally names that start with the verb set (e.g.,

setSize())

  • Class members that return an information have generally names that start with the verb get.

(e.g., getNbNodes())

  • Most of classes have an overload of the operator <<

OFELI Presentation

  • R. Touzani

7/20

slide-33
SLIDE 33

Introduction An example of a finite element code Structure of the library The OFELI package

To each phase in the procedure corresponds a family of classes :

  • 1. Mesh classes

Construction of a mesh: Mesh ms("test.m"); Output of a mesh : cout << ms; Loop over elements: for (ms.topElement(); (theElement=ms.getElement());) cout << *theElement;

  • r equivalently:

MeshElements(ms) Get pointer to a node: Node *nd = el->getPtrNode(2); Creation of boundary sides: ms.getBoundarySides(); Creation of all sides: ms.getAllSides(); Change of unknown support: ms.setDOFSupport(SIDE DOF);

OFELI Presentation

  • R. Touzani

8/20

slide-34
SLIDE 34

Introduction An example of a finite element code Structure of the library The OFELI package

To each phase in the procedure corresponds a family of classes :

  • 1. Mesh classes

Construction of a mesh: Mesh ms("test.m"); Output of a mesh : cout << ms; Loop over elements: for (ms.topElement(); (theElement=ms.getElement());) cout << *theElement;

  • r equivalently:

MeshElements(ms) Get pointer to a node: Node *nd = el->getPtrNode(2); Creation of boundary sides: ms.getBoundarySides(); Creation of all sides: ms.getAllSides(); Change of unknown support: ms.setDOFSupport(SIDE DOF);

OFELI Presentation

  • R. Touzani

8/20

slide-35
SLIDE 35

Introduction An example of a finite element code Structure of the library The OFELI package

To each phase in the procedure corresponds a family of classes :

  • 1. Mesh classes

Construction of a mesh: Mesh ms("test.m"); Output of a mesh : cout << ms; Loop over elements: for (ms.topElement(); (theElement=ms.getElement());) cout << *theElement;

  • r equivalently:

MeshElements(ms) Get pointer to a node: Node *nd = el->getPtrNode(2); Creation of boundary sides: ms.getBoundarySides(); Creation of all sides: ms.getAllSides(); Change of unknown support: ms.setDOFSupport(SIDE DOF);

OFELI Presentation

  • R. Touzani

8/20

slide-36
SLIDE 36

Introduction An example of a finite element code Structure of the library The OFELI package

To each phase in the procedure corresponds a family of classes :

  • 1. Mesh classes

Construction of a mesh: Mesh ms("test.m"); Output of a mesh : cout << ms; Loop over elements: for (ms.topElement(); (theElement=ms.getElement());) cout << *theElement;

  • r equivalently:

MeshElements(ms) Get pointer to a node: Node *nd = el->getPtrNode(2); Creation of boundary sides: ms.getBoundarySides(); Creation of all sides: ms.getAllSides(); Change of unknown support: ms.setDOFSupport(SIDE DOF);

OFELI Presentation

  • R. Touzani

8/20

slide-37
SLIDE 37

Introduction An example of a finite element code Structure of the library The OFELI package

To each phase in the procedure corresponds a family of classes :

  • 1. Mesh classes

Construction of a mesh: Mesh ms("test.m"); Output of a mesh : cout << ms; Loop over elements: for (ms.topElement(); (theElement=ms.getElement());) cout << *theElement;

  • r equivalently:

MeshElements(ms) Get pointer to a node: Node *nd = el->getPtrNode(2); Creation of boundary sides: ms.getBoundarySides(); Creation of all sides: ms.getAllSides(); Change of unknown support: ms.setDOFSupport(SIDE DOF);

OFELI Presentation

  • R. Touzani

8/20

slide-38
SLIDE 38

Introduction An example of a finite element code Structure of the library The OFELI package

To each phase in the procedure corresponds a family of classes :

  • 1. Mesh classes

Construction of a mesh: Mesh ms("test.m"); Output of a mesh : cout << ms; Loop over elements: for (ms.topElement(); (theElement=ms.getElement());) cout << *theElement;

  • r equivalently:

MeshElements(ms) Get pointer to a node: Node *nd = el->getPtrNode(2); Creation of boundary sides: ms.getBoundarySides(); Creation of all sides: ms.getAllSides(); Change of unknown support: ms.setDOFSupport(SIDE DOF);

OFELI Presentation

  • R. Touzani

8/20

slide-39
SLIDE 39

Introduction An example of a finite element code Structure of the library The OFELI package

To each phase in the procedure corresponds a family of classes :

  • 1. Mesh classes

Construction of a mesh: Mesh ms("test.m"); Output of a mesh : cout << ms; Loop over elements: for (ms.topElement(); (theElement=ms.getElement());) cout << *theElement;

  • r equivalently:

MeshElements(ms) Get pointer to a node: Node *nd = el->getPtrNode(2); Creation of boundary sides: ms.getBoundarySides(); Creation of all sides: ms.getAllSides(); Change of unknown support: ms.setDOFSupport(SIDE DOF);

OFELI Presentation

  • R. Touzani

8/20

slide-40
SLIDE 40

Introduction An example of a finite element code Structure of the library The OFELI package

To each phase in the procedure corresponds a family of classes :

  • 1. Mesh classes

Construction of a mesh: Mesh ms("test.m"); Output of a mesh : cout << ms; Loop over elements: for (ms.topElement(); (theElement=ms.getElement());) cout << *theElement;

  • r equivalently:

MeshElements(ms) Get pointer to a node: Node *nd = el->getPtrNode(2); Creation of boundary sides: ms.getBoundarySides(); Creation of all sides: ms.getAllSides(); Change of unknown support: ms.setDOFSupport(SIDE DOF);

OFELI Presentation

  • R. Touzani

8/20

slide-41
SLIDE 41

Introduction An example of a finite element code Structure of the library The OFELI package

To each phase in the procedure corresponds a family of classes :

  • 1. Mesh classes

Construction of a mesh: Mesh ms("test.m"); Output of a mesh : cout << ms; Loop over elements: for (ms.topElement(); (theElement=ms.getElement());) cout << *theElement;

  • r equivalently:

MeshElements(ms) Get pointer to a node: Node *nd = el->getPtrNode(2); Creation of boundary sides: ms.getBoundarySides(); Creation of all sides: ms.getAllSides(); Change of unknown support: ms.setDOFSupport(SIDE DOF);

OFELI Presentation

  • R. Touzani

8/20

slide-42
SLIDE 42

Introduction An example of a finite element code Structure of the library The OFELI package

  • 2. Vector classes

A wide variety of Template classes for vectors The template parameter is the data type for vector entries A vector class called Vect<T >. Class Vect<T > : Construction of a vector: Vect<double> v(ms.getNbNodes()); Assignment: v(1) = 5; v[0] = 5; v = -10; Other operations: v += w; v *= 5; Assembly: v.Assembly(el,ve); Euclidean norm: double x = v.getNorm2(); Vector size: int n = v.getSize();

OFELI Presentation

  • R. Touzani

9/20

slide-43
SLIDE 43

Introduction An example of a finite element code Structure of the library The OFELI package

  • 2. Vector classes

A wide variety of Template classes for vectors The template parameter is the data type for vector entries A vector class called Vect<T >. Class Vect<T > : Construction of a vector: Vect<double> v(ms.getNbNodes()); Assignment: v(1) = 5; v[0] = 5; v = -10; Other operations: v += w; v *= 5; Assembly: v.Assembly(el,ve); Euclidean norm: double x = v.getNorm2(); Vector size: int n = v.getSize();

OFELI Presentation

  • R. Touzani

9/20

slide-44
SLIDE 44

Introduction An example of a finite element code Structure of the library The OFELI package

  • 2. Vector classes

A wide variety of Template classes for vectors The template parameter is the data type for vector entries A vector class called Vect<T >. Class Vect<T > : Construction of a vector: Vect<double> v(ms.getNbNodes()); Assignment: v(1) = 5; v[0] = 5; v = -10; Other operations: v += w; v *= 5; Assembly: v.Assembly(el,ve); Euclidean norm: double x = v.getNorm2(); Vector size: int n = v.getSize();

OFELI Presentation

  • R. Touzani

9/20

slide-45
SLIDE 45

Introduction An example of a finite element code Structure of the library The OFELI package

  • 2. Vector classes

A wide variety of Template classes for vectors The template parameter is the data type for vector entries A vector class called Vect<T >. Class Vect<T > : Construction of a vector: Vect<double> v(ms.getNbNodes()); Assignment: v(1) = 5; v[0] = 5; v = -10; Other operations: v += w; v *= 5; Assembly: v.Assembly(el,ve); Euclidean norm: double x = v.getNorm2(); Vector size: int n = v.getSize();

OFELI Presentation

  • R. Touzani

9/20

slide-46
SLIDE 46

Introduction An example of a finite element code Structure of the library The OFELI package

  • 2. Vector classes

A wide variety of Template classes for vectors The template parameter is the data type for vector entries A vector class called Vect<T >. Class Vect<T > : Construction of a vector: Vect<double> v(ms.getNbNodes()); Assignment: v(1) = 5; v[0] = 5; v = -10; Other operations: v += w; v *= 5; Assembly: v.Assembly(el,ve); Euclidean norm: double x = v.getNorm2(); Vector size: int n = v.getSize();

OFELI Presentation

  • R. Touzani

9/20

slide-47
SLIDE 47

Introduction An example of a finite element code Structure of the library The OFELI package

  • 2. Vector classes

A wide variety of Template classes for vectors The template parameter is the data type for vector entries A vector class called Vect<T >. Class Vect<T > : Construction of a vector: Vect<double> v(ms.getNbNodes()); Assignment: v(1) = 5; v[0] = 5; v = -10; Other operations: v += w; v *= 5; Assembly: v.Assembly(el,ve); Euclidean norm: double x = v.getNorm2(); Vector size: int n = v.getSize();

OFELI Presentation

  • R. Touzani

9/20

slide-48
SLIDE 48

Introduction An example of a finite element code Structure of the library The OFELI package

  • 2. Vector classes

A wide variety of Template classes for vectors The template parameter is the data type for vector entries A vector class called Vect<T >. Class Vect<T > : Construction of a vector: Vect<double> v(ms.getNbNodes()); Assignment: v(1) = 5; v[0] = 5; v = -10; Other operations: v += w; v *= 5; Assembly: v.Assembly(el,ve); Euclidean norm: double x = v.getNorm2(); Vector size: int n = v.getSize();

OFELI Presentation

  • R. Touzani

9/20

slide-49
SLIDE 49

Introduction An example of a finite element code Structure of the library The OFELI package

  • 2. Vector classes

A wide variety of Template classes for vectors The template parameter is the data type for vector entries A vector class called Vect<T >. Class Vect<T > : Construction of a vector: Vect<double> v(ms.getNbNodes()); Assignment: v(1) = 5; v[0] = 5; v = -10; Other operations: v += w; v *= 5; Assembly: v.Assembly(el,ve); Euclidean norm: double x = v.getNorm2(); Vector size: int n = v.getSize();

OFELI Presentation

  • R. Touzani

9/20

slide-50
SLIDE 50

Introduction An example of a finite element code Structure of the library The OFELI package

  • 2. Vector classes

A wide variety of Template classes for vectors The template parameter is the data type for vector entries A vector class called Vect<T >. Class Vect<T > : Construction of a vector: Vect<double> v(ms.getNbNodes()); Assignment: v(1) = 5; v[0] = 5; v = -10; Other operations: v += w; v *= 5; Assembly: v.Assembly(el,ve); Euclidean norm: double x = v.getNorm2(); Vector size: int n = v.getSize();

OFELI Presentation

  • R. Touzani

9/20

slide-51
SLIDE 51

Introduction An example of a finite element code Structure of the library The OFELI package

  • 2. Vector classes

A wide variety of Template classes for vectors The template parameter is the data type for vector entries A vector class called Vect<T >. Class Vect<T > : Construction of a vector: Vect<double> v(ms.getNbNodes()); Assignment: v(1) = 5; v[0] = 5; v = -10; Other operations: v += w; v *= 5; Assembly: v.Assembly(el,ve); Euclidean norm: double x = v.getNorm2(); Vector size: int n = v.getSize();

OFELI Presentation

  • R. Touzani

9/20

slide-52
SLIDE 52

Introduction An example of a finite element code Structure of the library The OFELI package

  • 2. Vector classes

A wide variety of Template classes for vectors The template parameter is the data type for vector entries A vector class called Vect<T >. Class Vect<T > : Construction of a vector: Vect<double> v(ms.getNbNodes()); Assignment: v(1) = 5; v[0] = 5; v = -10; Other operations: v += w; v *= 5; Assembly: v.Assembly(el,ve); Euclidean norm: double x = v.getNorm2(); Vector size: int n = v.getSize();

OFELI Presentation

  • R. Touzani

9/20

slide-53
SLIDE 53

Introduction An example of a finite element code Structure of the library The OFELI package

  • 2. Vector classes:

Class NodeVect<T >: “Node” oriented vector Construction of a vector: NodeVect<double> v(ms); NodeVect(Mesh &mesh, const Vect<T > &v, int nb dof, int first dof, char *name, double time); Assignment: v(n,i) = 5; Class ElementVect<T >: “Element” oriented vector Class SideVect<T >: “Side” oriented vector Class LocalVect<T ,N >: Small size vector LocalVect<double,4> v;

OFELI Presentation

  • R. Touzani

10/20

slide-54
SLIDE 54

Introduction An example of a finite element code Structure of the library The OFELI package

  • 2. Vector classes:

Class NodeVect<T >: “Node” oriented vector Construction of a vector: NodeVect<double> v(ms); NodeVect(Mesh &mesh, const Vect<T > &v, int nb dof, int first dof, char *name, double time); Assignment: v(n,i) = 5; Class ElementVect<T >: “Element” oriented vector Class SideVect<T >: “Side” oriented vector Class LocalVect<T ,N >: Small size vector LocalVect<double,4> v;

OFELI Presentation

  • R. Touzani

10/20

slide-55
SLIDE 55

Introduction An example of a finite element code Structure of the library The OFELI package

  • 2. Vector classes:

Class NodeVect<T >: “Node” oriented vector Construction of a vector: NodeVect<double> v(ms); NodeVect(Mesh &mesh, const Vect<T > &v, int nb dof, int first dof, char *name, double time); Assignment: v(n,i) = 5; Class ElementVect<T >: “Element” oriented vector Class SideVect<T >: “Side” oriented vector Class LocalVect<T ,N >: Small size vector LocalVect<double,4> v;

OFELI Presentation

  • R. Touzani

10/20

slide-56
SLIDE 56

Introduction An example of a finite element code Structure of the library The OFELI package

  • 2. Vector classes:

Class NodeVect<T >: “Node” oriented vector Construction of a vector: NodeVect<double> v(ms); NodeVect(Mesh &mesh, const Vect<T > &v, int nb dof, int first dof, char *name, double time); Assignment: v(n,i) = 5; Class ElementVect<T >: “Element” oriented vector Class SideVect<T >: “Side” oriented vector Class LocalVect<T ,N >: Small size vector LocalVect<double,4> v;

OFELI Presentation

  • R. Touzani

10/20

slide-57
SLIDE 57

Introduction An example of a finite element code Structure of the library The OFELI package

  • 2. Vector classes:

Class NodeVect<T >: “Node” oriented vector Construction of a vector: NodeVect<double> v(ms); NodeVect(Mesh &mesh, const Vect<T > &v, int nb dof, int first dof, char *name, double time); Assignment: v(n,i) = 5; Class ElementVect<T >: “Element” oriented vector Class SideVect<T >: “Side” oriented vector Class LocalVect<T ,N >: Small size vector LocalVect<double,4> v;

OFELI Presentation

  • R. Touzani

10/20

slide-58
SLIDE 58

Introduction An example of a finite element code Structure of the library The OFELI package

  • 2. Vector classes:

Class NodeVect<T >: “Node” oriented vector Construction of a vector: NodeVect<double> v(ms); NodeVect(Mesh &mesh, const Vect<T > &v, int nb dof, int first dof, char *name, double time); Assignment: v(n,i) = 5; Class ElementVect<T >: “Element” oriented vector Class SideVect<T >: “Side” oriented vector Class LocalVect<T ,N >: Small size vector LocalVect<double,4> v;

OFELI Presentation

  • R. Touzani

10/20

slide-59
SLIDE 59

Introduction An example of a finite element code Structure of the library The OFELI package

  • 3. Matrix classes:

Template classes for storage and manipulation of matrices using principal storage types:

  • Dense storage: DMatrix<T > and DSMatrix<T >
  • Skyline storage: SkMatrix<T > and SkSMatrix<T >
  • Sparse storage: SpMatrix<T >
  • TrMatrix<T >, LocalMatrix<T ,NR ,NC >, . . .

OFELI Presentation

  • R. Touzani

11/20

slide-60
SLIDE 60

Introduction An example of a finite element code Structure of the library The OFELI package

  • 3. Matrix classes:

Template classes for storage and manipulation of matrices using principal storage types:

  • Dense storage: DMatrix<T > and DSMatrix<T >
  • Skyline storage: SkMatrix<T > and SkSMatrix<T >
  • Sparse storage: SpMatrix<T >
  • TrMatrix<T >, LocalMatrix<T ,NR ,NC >, . . .

OFELI Presentation

  • R. Touzani

11/20

slide-61
SLIDE 61

Introduction An example of a finite element code Structure of the library The OFELI package

  • 3. Matrix classes:

Template classes for storage and manipulation of matrices using principal storage types:

  • Dense storage: DMatrix<T > and DSMatrix<T >
  • Skyline storage: SkMatrix<T > and SkSMatrix<T >
  • Sparse storage: SpMatrix<T >
  • TrMatrix<T >, LocalMatrix<T ,NR ,NC >, . . .

OFELI Presentation

  • R. Touzani

11/20

slide-62
SLIDE 62

Introduction An example of a finite element code Structure of the library The OFELI package

  • 3. Matrix classes:

Template classes for storage and manipulation of matrices using principal storage types:

  • Dense storage: DMatrix<T > and DSMatrix<T >
  • Skyline storage: SkMatrix<T > and SkSMatrix<T >
  • Sparse storage: SpMatrix<T >
  • TrMatrix<T >, LocalMatrix<T ,NR ,NC >, . . .

OFELI Presentation

  • R. Touzani

11/20

slide-63
SLIDE 63

Introduction An example of a finite element code Structure of the library The OFELI package

  • 3. Matrix classes:

Template classes for storage and manipulation of matrices using principal storage types:

  • Dense storage: DMatrix<T > and DSMatrix<T >
  • Skyline storage: SkMatrix<T > and SkSMatrix<T >
  • Sparse storage: SpMatrix<T >
  • TrMatrix<T >, LocalMatrix<T ,NR ,NC >, . . .

OFELI Presentation

  • R. Touzani

11/20

slide-64
SLIDE 64

Introduction An example of a finite element code Structure of the library The OFELI package

  • 3. Matrix classes:

Template classes for storage and manipulation of matrices using principal storage types:

  • Dense storage: DMatrix<T > and DSMatrix<T >
  • Skyline storage: SkMatrix<T > and SkSMatrix<T >
  • Sparse storage: SpMatrix<T >
  • TrMatrix<T >, LocalMatrix<T ,NR ,NC >, . . .

OFELI Presentation

  • R. Touzani

11/20

slide-65
SLIDE 65

Introduction An example of a finite element code Structure of the library The OFELI package

  • 4. Equation classes:
  • An element equation is an object
  • Each term of the equation is a member of the class that contributes to the left and/or the

right-hand side

  • OFELI contains a collection of classes specific to problems:
  • Laplace : Various numerical methods to solve the Laplace equation
  • Therm: Diffusion-convection problem with phase change
  • Solid: Elasticity problem
  • Fluid: Incompressible Navier-Stokes equations
  • Electromagnetics: Electromagnetic and Eddy Current problems
  • CL: Systems of Conservation Laws

OFELI Presentation

  • R. Touzani

12/20

slide-66
SLIDE 66

Introduction An example of a finite element code Structure of the library The OFELI package

  • 4. Equation classes:
  • An element equation is an object
  • Each term of the equation is a member of the class that contributes to the left and/or the

right-hand side

  • OFELI contains a collection of classes specific to problems:
  • Laplace : Various numerical methods to solve the Laplace equation
  • Therm: Diffusion-convection problem with phase change
  • Solid: Elasticity problem
  • Fluid: Incompressible Navier-Stokes equations
  • Electromagnetics: Electromagnetic and Eddy Current problems
  • CL: Systems of Conservation Laws

OFELI Presentation

  • R. Touzani

12/20

slide-67
SLIDE 67

Introduction An example of a finite element code Structure of the library The OFELI package

  • 4. Equation classes:
  • An element equation is an object
  • Each term of the equation is a member of the class that contributes to the left and/or the

right-hand side

  • OFELI contains a collection of classes specific to problems:
  • Laplace : Various numerical methods to solve the Laplace equation
  • Therm: Diffusion-convection problem with phase change
  • Solid: Elasticity problem
  • Fluid: Incompressible Navier-Stokes equations
  • Electromagnetics: Electromagnetic and Eddy Current problems
  • CL: Systems of Conservation Laws

OFELI Presentation

  • R. Touzani

12/20

slide-68
SLIDE 68

Introduction An example of a finite element code Structure of the library The OFELI package

  • 4. Equation classes:
  • An element equation is an object
  • Each term of the equation is a member of the class that contributes to the left and/or the

right-hand side

  • OFELI contains a collection of classes specific to problems:
  • Laplace : Various numerical methods to solve the Laplace equation
  • Therm: Diffusion-convection problem with phase change
  • Solid: Elasticity problem
  • Fluid: Incompressible Navier-Stokes equations
  • Electromagnetics: Electromagnetic and Eddy Current problems
  • CL: Systems of Conservation Laws

OFELI Presentation

  • R. Touzani

12/20

slide-69
SLIDE 69

Introduction An example of a finite element code Structure of the library The OFELI package

  • 5. Shape function classes:

To each finite element interpolation corresponds a class (e.g., 3-Node triangles (P1): Triang3) Available shape function classes: Line2, Line3, Triang3, Triang6S, Quad4, Tetra4, Hexa8.

  • 6. Solvers:

OFELI contains some template functions enabling the solution of specific problems.

  • Direct and iterative solvers (with preconditioners) for linear systems
  • Optimization problems can be solved by using a template function. The Objective function

and its gradient are given through a user defined class.

OFELI Presentation

  • R. Touzani

13/20

slide-70
SLIDE 70

Introduction An example of a finite element code Structure of the library The OFELI package

  • 5. Shape function classes:

To each finite element interpolation corresponds a class (e.g., 3-Node triangles (P1): Triang3) Available shape function classes: Line2, Line3, Triang3, Triang6S, Quad4, Tetra4, Hexa8.

  • 6. Solvers:

OFELI contains some template functions enabling the solution of specific problems.

  • Direct and iterative solvers (with preconditioners) for linear systems
  • Optimization problems can be solved by using a template function. The Objective function

and its gradient are given through a user defined class.

OFELI Presentation

  • R. Touzani

13/20

slide-71
SLIDE 71

Introduction An example of a finite element code Structure of the library The OFELI package

  • 5. Shape function classes:

To each finite element interpolation corresponds a class (e.g., 3-Node triangles (P1): Triang3) Available shape function classes: Line2, Line3, Triang3, Triang6S, Quad4, Tetra4, Hexa8.

  • 6. Solvers:

OFELI contains some template functions enabling the solution of specific problems.

  • Direct and iterative solvers (with preconditioners) for linear systems
  • Optimization problems can be solved by using a template function. The Objective function

and its gradient are given through a user defined class.

OFELI Presentation

  • R. Touzani

13/20

slide-72
SLIDE 72

Introduction An example of a finite element code Structure of the library The OFELI package

  • 5. Shape function classes:

To each finite element interpolation corresponds a class (e.g., 3-Node triangles (P1): Triang3) Available shape function classes: Line2, Line3, Triang3, Triang6S, Quad4, Tetra4, Hexa8.

  • 6. Solvers:

OFELI contains some template functions enabling the solution of specific problems.

  • Direct and iterative solvers (with preconditioners) for linear systems
  • Optimization problems can be solved by using a template function. The Objective function

and its gradient are given through a user defined class.

OFELI Presentation

  • R. Touzani

13/20

slide-73
SLIDE 73

Introduction An example of a finite element code Structure of the library The OFELI package

  • 5. Shape function classes:

To each finite element interpolation corresponds a class (e.g., 3-Node triangles (P1): Triang3) Available shape function classes: Line2, Line3, Triang3, Triang6S, Quad4, Tetra4, Hexa8.

  • 6. Solvers:

OFELI contains some template functions enabling the solution of specific problems.

  • Direct and iterative solvers (with preconditioners) for linear systems
  • Optimization problems can be solved by using a template function. The Objective function

and its gradient are given through a user defined class.

OFELI Presentation

  • R. Touzani

13/20

slide-74
SLIDE 74

Introduction An example of a finite element code Structure of the library The OFELI package

  • 5. Shape function classes:

To each finite element interpolation corresponds a class (e.g., 3-Node triangles (P1): Triang3) Available shape function classes: Line2, Line3, Triang3, Triang6S, Quad4, Tetra4, Hexa8.

  • 6. Solvers:

OFELI contains some template functions enabling the solution of specific problems.

  • Direct and iterative solvers (with preconditioners) for linear systems
  • Optimization problems can be solved by using a template function. The Objective function

and its gradient are given through a user defined class.

OFELI Presentation

  • R. Touzani

13/20

slide-75
SLIDE 75

Introduction An example of a finite element code Structure of the library The OFELI package

  • 5. Shape function classes:

To each finite element interpolation corresponds a class (e.g., 3-Node triangles (P1): Triang3) Available shape function classes: Line2, Line3, Triang3, Triang6S, Quad4, Tetra4, Hexa8.

  • 6. Solvers:

OFELI contains some template functions enabling the solution of specific problems.

  • Direct and iterative solvers (with preconditioners) for linear systems
  • Optimization problems can be solved by using a template function. The Objective function

and its gradient are given through a user defined class.

OFELI Presentation

  • R. Touzani

13/20

slide-76
SLIDE 76

Introduction An example of a finite element code Structure of the library The OFELI package

Handling of material properties:

  • Each material is defined in a file having its name (e.g., Copper.md).
  • A user can defined his own material file.
  • A generic material enables giving standard properties of a material.

OFELI Presentation

  • R. Touzani

14/20

slide-77
SLIDE 77

Introduction An example of a finite element code Structure of the library The OFELI package

Handling of material properties:

  • Each material is defined in a file having its name (e.g., Copper.md).
  • A user can defined his own material file.
  • A generic material enables giving standard properties of a material.

OFELI Presentation

  • R. Touzani

14/20

slide-78
SLIDE 78

Introduction An example of a finite element code Structure of the library The OFELI package

Handling of material properties:

  • Each material is defined in a file having its name (e.g., Copper.md).
  • A user can defined his own material file.
  • A generic material enables giving standard properties of a material.

OFELI Presentation

  • R. Touzani

14/20

slide-79
SLIDE 79

Introduction An example of a finite element code Structure of the library The OFELI package

Handling of material properties:

  • Each material is defined in a file having its name (e.g., Copper.md).
  • A user can defined his own material file.
  • A generic material enables giving standard properties of a material.

OFELI Presentation

  • R. Touzani

14/20

slide-80
SLIDE 80

Introduction An example of a finite element code Structure of the library The OFELI package

Data structures in OFELI

OFELI use the XML syntax for all input and output files. All types of data are to be introduced by means of an XML tag:Various data files can be used: Project: To introduce various parameters for a main program Domain: To describe a domain via its geometric properties (for 2-D mesh generation) Mesh: To describe mesh data Material: To describe properties of a material (i.e. a used defined material) Field: To give any input or output field (by nodes, elements or sides). A typical XML OFELI File <?xml version="1.0" encoding="ISO-8859-1" ?> <OFELI File> <info> <title></title> <date></date> <author></author> </info> ... ... </OFELI File>

OFELI Presentation

  • R. Touzani

15/20

slide-81
SLIDE 81

Introduction An example of a finite element code Structure of the library The OFELI package

Data structures in OFELI

OFELI use the XML syntax for all input and output files. All types of data are to be introduced by means of an XML tag:Various data files can be used: Project: To introduce various parameters for a main program Domain: To describe a domain via its geometric properties (for 2-D mesh generation) Mesh: To describe mesh data Material: To describe properties of a material (i.e. a used defined material) Field: To give any input or output field (by nodes, elements or sides). A typical XML OFELI File <?xml version="1.0" encoding="ISO-8859-1" ?> <OFELI File> <info> <title></title> <date></date> <author></author> </info> ... ... </OFELI File>

OFELI Presentation

  • R. Touzani

15/20

slide-82
SLIDE 82

Introduction An example of a finite element code Structure of the library The OFELI package

Data structures in OFELI

OFELI use the XML syntax for all input and output files. All types of data are to be introduced by means of an XML tag:Various data files can be used: Project: To introduce various parameters for a main program Domain: To describe a domain via its geometric properties (for 2-D mesh generation) Mesh: To describe mesh data Material: To describe properties of a material (i.e. a used defined material) Field: To give any input or output field (by nodes, elements or sides). A typical XML OFELI File <?xml version="1.0" encoding="ISO-8859-1" ?> <OFELI File> <info> <title></title> <date></date> <author></author> </info> ... ... </OFELI File>

OFELI Presentation

  • R. Touzani

15/20

slide-83
SLIDE 83

Introduction An example of a finite element code Structure of the library The OFELI package

An example of mesh file:

<?xml version="1.0" encoding="ISO-8859-1" ?> <OFELI File> <info> <title></title> <date></date> <author></author> </info> <Mesh dim="2"> <Nodes> 0.00 0.00 2 1.00 0.00 1.00 1.00 2 0.00 1.00 0.50 0.50 1 </Nodes> <Elements shape="triangle" nodes="3"> 1 2 5 2 3 5 3 4 5 3 4 5 4 1 5 </Elements> </Mesh> </OFELI File>

OFELI Presentation

  • R. Touzani

16/20

slide-84
SLIDE 84

Introduction An example of a finite element code Structure of the library The OFELI package

The OFELI package

The OFELI library is free and under the GPL license (GNU General Public License). It is available

  • n the web site http://www.ofeli.net.

The package contains:

1 Source files of the library (kernel + problem dependent classes: Laplace, Thermics, Solid

mechanics, Fluid dynamics, Electromagnetics).

2 Documentation in HTML and PDF. The documentation is automatically generated by

doxygen.

3 A tutorial with examples of finite element codes with increasing difficulty 4 Demos: Multiple finite element programs 5 A mesh generator for 2–D meshes 6 Utility programs: conversion OFELI Presentation

  • R. Touzani

17/20

slide-85
SLIDE 85

Introduction An example of a finite element code Structure of the library The OFELI package

The OFELI package

The OFELI library is free and under the GPL license (GNU General Public License). It is available

  • n the web site http://www.ofeli.net.

The package contains:

1 Source files of the library (kernel + problem dependent classes: Laplace, Thermics, Solid

mechanics, Fluid dynamics, Electromagnetics).

2 Documentation in HTML and PDF. The documentation is automatically generated by

doxygen.

3 A tutorial with examples of finite element codes with increasing difficulty 4 Demos: Multiple finite element programs 5 A mesh generator for 2–D meshes 6 Utility programs: conversion OFELI Presentation

  • R. Touzani

17/20

slide-86
SLIDE 86

Introduction An example of a finite element code Structure of the library The OFELI package

The OFELI package

The OFELI library is free and under the GPL license (GNU General Public License). It is available

  • n the web site http://www.ofeli.net.

The package contains:

1 Source files of the library (kernel + problem dependent classes: Laplace, Thermics, Solid

mechanics, Fluid dynamics, Electromagnetics).

2 Documentation in HTML and PDF. The documentation is automatically generated by

doxygen.

3 A tutorial with examples of finite element codes with increasing difficulty 4 Demos: Multiple finite element programs 5 A mesh generator for 2–D meshes 6 Utility programs: conversion OFELI Presentation

  • R. Touzani

17/20

slide-87
SLIDE 87

Introduction An example of a finite element code Structure of the library The OFELI package

The OFELI package

The OFELI library is free and under the GPL license (GNU General Public License). It is available

  • n the web site http://www.ofeli.net.

The package contains:

1 Source files of the library (kernel + problem dependent classes: Laplace, Thermics, Solid

mechanics, Fluid dynamics, Electromagnetics).

2 Documentation in HTML and PDF. The documentation is automatically generated by

doxygen.

3 A tutorial with examples of finite element codes with increasing difficulty 4 Demos: Multiple finite element programs 5 A mesh generator for 2–D meshes 6 Utility programs: conversion OFELI Presentation

  • R. Touzani

17/20

slide-88
SLIDE 88

Introduction An example of a finite element code Structure of the library The OFELI package

The OFELI package

The OFELI library is free and under the GPL license (GNU General Public License). It is available

  • n the web site http://www.ofeli.net.

The package contains:

1 Source files of the library (kernel + problem dependent classes: Laplace, Thermics, Solid

mechanics, Fluid dynamics, Electromagnetics).

2 Documentation in HTML and PDF. The documentation is automatically generated by

doxygen.

3 A tutorial with examples of finite element codes with increasing difficulty 4 Demos: Multiple finite element programs 5 A mesh generator for 2–D meshes 6 Utility programs: conversion OFELI Presentation

  • R. Touzani

17/20

slide-89
SLIDE 89

Introduction An example of a finite element code Structure of the library The OFELI package

The OFELI package

The OFELI library is free and under the GPL license (GNU General Public License). It is available

  • n the web site http://www.ofeli.net.

The package contains:

1 Source files of the library (kernel + problem dependent classes: Laplace, Thermics, Solid

mechanics, Fluid dynamics, Electromagnetics).

2 Documentation in HTML and PDF. The documentation is automatically generated by

doxygen.

3 A tutorial with examples of finite element codes with increasing difficulty 4 Demos: Multiple finite element programs 5 A mesh generator for 2–D meshes 6 Utility programs: conversion OFELI Presentation

  • R. Touzani

17/20

slide-90
SLIDE 90

Introduction An example of a finite element code Structure of the library The OFELI package

The OFELI package

The OFELI library is free and under the GPL license (GNU General Public License). It is available

  • n the web site http://www.ofeli.net.

The package contains:

1 Source files of the library (kernel + problem dependent classes: Laplace, Thermics, Solid

mechanics, Fluid dynamics, Electromagnetics).

2 Documentation in HTML and PDF. The documentation is automatically generated by

doxygen.

3 A tutorial with examples of finite element codes with increasing difficulty 4 Demos: Multiple finite element programs 5 A mesh generator for 2–D meshes 6 Utility programs: conversion OFELI Presentation

  • R. Touzani

17/20

slide-91
SLIDE 91

Introduction An example of a finite element code Structure of the library The OFELI package

The Demos

These are partitioned in physical problems:

  • Therm: Diffusion–Convection (steady state and transient)
  • Solid: Linear Elasticity 2–D et 3–D
  • Fluid: Incompressible Navier-Stokes equations
  • Electromagnetics: Helmholtz and Eddy Current equations s in 2–D
  • CL: Systems of Conservation Laws

OFELI Presentation

  • R. Touzani

18/20

slide-92
SLIDE 92

Introduction An example of a finite element code Structure of the library The OFELI package

The Demos

These are partitioned in physical problems:

  • Therm: Diffusion–Convection (steady state and transient)
  • Solid: Linear Elasticity 2–D et 3–D
  • Fluid: Incompressible Navier-Stokes equations
  • Electromagnetics: Helmholtz and Eddy Current equations s in 2–D
  • CL: Systems of Conservation Laws

OFELI Presentation

  • R. Touzani

18/20

slide-93
SLIDE 93

Introduction An example of a finite element code Structure of the library The OFELI package

The Demos

These are partitioned in physical problems:

  • Therm: Diffusion–Convection (steady state and transient)
  • Solid: Linear Elasticity 2–D et 3–D
  • Fluid: Incompressible Navier-Stokes equations
  • Electromagnetics: Helmholtz and Eddy Current equations s in 2–D
  • CL: Systems of Conservation Laws

OFELI Presentation

  • R. Touzani

18/20

slide-94
SLIDE 94

Introduction An example of a finite element code Structure of the library The OFELI package

The Demos

These are partitioned in physical problems:

  • Therm: Diffusion–Convection (steady state and transient)
  • Solid: Linear Elasticity 2–D et 3–D
  • Fluid: Incompressible Navier-Stokes equations
  • Electromagnetics: Helmholtz and Eddy Current equations s in 2–D
  • CL: Systems of Conservation Laws

OFELI Presentation

  • R. Touzani

18/20

slide-95
SLIDE 95

Introduction An example of a finite element code Structure of the library The OFELI package

The Demos

These are partitioned in physical problems:

  • Therm: Diffusion–Convection (steady state and transient)
  • Solid: Linear Elasticity 2–D et 3–D
  • Fluid: Incompressible Navier-Stokes equations
  • Electromagnetics: Helmholtz and Eddy Current equations s in 2–D
  • CL: Systems of Conservation Laws

OFELI Presentation

  • R. Touzani

18/20

slide-96
SLIDE 96

Introduction An example of a finite element code Structure of the library The OFELI package

The Demos

These are partitioned in physical problems:

  • Therm: Diffusion–Convection (steady state and transient)
  • Solid: Linear Elasticity 2–D et 3–D
  • Fluid: Incompressible Navier-Stokes equations
  • Electromagnetics: Helmholtz and Eddy Current equations s in 2–D
  • CL: Systems of Conservation Laws

OFELI Presentation

  • R. Touzani

18/20

slide-97
SLIDE 97

Introduction An example of a finite element code Structure of the library The OFELI package

The utilities

  • Conversion of mesh files issued from: EasyMesh, EMC2, BAMG, Netgen, Gmsh, Gambit,

Triangle and Matlab

  • Conversion of mesh and output files issued from: Matlab, Tecplot, Gnuplot and Paraview

(VTK)

  • Generation of 2-D meshes by BAMG ou Triangle

OFELI Presentation

  • R. Touzani

19/20

slide-98
SLIDE 98

Introduction An example of a finite element code Structure of the library The OFELI package

The utilities

  • Conversion of mesh files issued from: EasyMesh, EMC2, BAMG, Netgen, Gmsh, Gambit,

Triangle and Matlab

  • Conversion of mesh and output files issued from: Matlab, Tecplot, Gnuplot and Paraview

(VTK)

  • Generation of 2-D meshes by BAMG ou Triangle

OFELI Presentation

  • R. Touzani

19/20

slide-99
SLIDE 99

Introduction An example of a finite element code Structure of the library The OFELI package

The utilities

  • Conversion of mesh files issued from: EasyMesh, EMC2, BAMG, Netgen, Gmsh, Gambit,

Triangle and Matlab

  • Conversion of mesh and output files issued from: Matlab, Tecplot, Gnuplot and Paraview

(VTK)

  • Generation of 2-D meshes by BAMG ou Triangle

OFELI Presentation

  • R. Touzani

19/20

slide-100
SLIDE 100

Introduction An example of a finite element code Structure of the library The OFELI package

The utilities

  • Conversion of mesh files issued from: EasyMesh, EMC2, BAMG, Netgen, Gmsh, Gambit,

Triangle and Matlab

  • Conversion of mesh and output files issued from: Matlab, Tecplot, Gnuplot and Paraview

(VTK)

  • Generation of 2-D meshes by BAMG ou Triangle

OFELI Presentation

  • R. Touzani

19/20

slide-101
SLIDE 101

Introduction An example of a finite element code Structure of the library The OFELI package

Current and future developments

  • Level Set and Fast Marching methods in 2–D and 3–D
  • Efficient solvers for coupled equations
  • Implementation of domain decomposition methods (coupling with Metis)
  • Implementation of mixed finite volumes for elliptic problems (C. Chainais)

OFELI Presentation

  • R. Touzani

20/20

slide-102
SLIDE 102

Introduction An example of a finite element code Structure of the library The OFELI package

Current and future developments

  • Level Set and Fast Marching methods in 2–D and 3–D
  • Efficient solvers for coupled equations
  • Implementation of domain decomposition methods (coupling with Metis)
  • Implementation of mixed finite volumes for elliptic problems (C. Chainais)

OFELI Presentation

  • R. Touzani

20/20

slide-103
SLIDE 103

Introduction An example of a finite element code Structure of the library The OFELI package

Current and future developments

  • Level Set and Fast Marching methods in 2–D and 3–D
  • Efficient solvers for coupled equations
  • Implementation of domain decomposition methods (coupling with Metis)
  • Implementation of mixed finite volumes for elliptic problems (C. Chainais)

OFELI Presentation

  • R. Touzani

20/20

slide-104
SLIDE 104

Introduction An example of a finite element code Structure of the library The OFELI package

Current and future developments

  • Level Set and Fast Marching methods in 2–D and 3–D
  • Efficient solvers for coupled equations
  • Implementation of domain decomposition methods (coupling with Metis)
  • Implementation of mixed finite volumes for elliptic problems (C. Chainais)

OFELI Presentation

  • R. Touzani

20/20

slide-105
SLIDE 105

Introduction An example of a finite element code Structure of the library The OFELI package

Current and future developments

  • Level Set and Fast Marching methods in 2–D and 3–D
  • Efficient solvers for coupled equations
  • Implementation of domain decomposition methods (coupling with Metis)
  • Implementation of mixed finite volumes for elliptic problems (C. Chainais)

OFELI Presentation

  • R. Touzani

20/20

slide-106
SLIDE 106

Introduction An example of a finite element code Structure of the library The OFELI package

Current and future developments

  • Level Set and Fast Marching methods in 2–D and 3–D
  • Efficient solvers for coupled equations
  • Implementation of domain decomposition methods (coupling with Metis)
  • Implementation of mixed finite volumes for elliptic problems (C. Chainais)

OFELI Presentation

  • R. Touzani

20/20