0% found this document useful (0 votes)
20 views

Marsupilami Readthedocs Io en Develop

This document provides documentation for the Marsupilami library, which is a .NET library for solving networks of beams, bars, and cables using a dynamic relaxation algorithm. It includes sections on installation instructions, examples and tutorials, developer documentation, and an overview of the library's motivating example, references, and credits.

Uploaded by

carolstarr78
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

Marsupilami Readthedocs Io en Develop

This document provides documentation for the Marsupilami library, which is a .NET library for solving networks of beams, bars, and cables using a dynamic relaxation algorithm. It includes sections on installation instructions, examples and tutorials, developer documentation, and an overview of the library's motivating example, references, and credits.

Uploaded by

carolstarr78
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

Marsupilami Documentation

Release 0.x.0

Lionel du Peloux

November 30, 2015


Contents

1 Overview 3
1.1 Motivating Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Installation Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.4 Credits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2 Learning and Teaching 5


2.1 Simple cable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2 Simple Elastica . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.3 C# API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

3 Theory 7
3.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.2 Darboux Vector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.3 Dynamic relaxation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.4 Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

4 Simple Catenary 9

5 Simple Elastica 11
5.1 Simple cable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
5.2 Simple Elastica . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
5.3 C# API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

6 Spheric Gridshell 13
6.1 The compas methode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
6.2 Formfinding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
6.3 Bracing Impact . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

7 Development 15
7.1 Get Involved . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
7.2 Open source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
7.3 Ressources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

8 Autodoc SetUp : WIP 17


8.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
8.2 Environnement Virtuel (python) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
8.3 Générer la doc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

i
9 API autodoc (WIP) 19
9.1 Test handwritten doc (sphinxcontrib-dotnetdomain) . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
9.2 Dynamic Relaxation (breathe) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
9.3 Element (breathe) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
9.4 Utility (breathe) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

10 Indices and tables 25

ii
Marsupilami Documentation, Release 0.x.0

Marsupilami is a non linear solver for networks of beams, bars and cables. It is based on a dynamic relaxation
algorithm.

The main documentation for the site is organized into a couple sections:
• User Documentation
• Examples and Tutorials
• Developer Documentation

Contents 1
Marsupilami Documentation, Release 0.x.0

2 Contents
CHAPTER 1

Overview

Marsupilami is a non linear solver for networks of beams, bars and cables. It is based on a dynamic relaxation
algorithm.

1.1 Motivating Example


using Rhino

x = rand(1000, 1000)
r = sum(x, 2)

1.2 Installation Instructions

Marsupilami is a .Net libray written in C#.


It has some dependencies : - Rhinoceros 5 - Grasshopper - Math.NET numerics - Intel MKL

1.3 References

1.4 Credits

Laboratoire Navier
2010 - Lionel du Peloux

3
Marsupilami Documentation, Release 0.x.0

4 Chapter 1. Overview
CHAPTER 2

Learning and Teaching

Marsupilami is a non linear solver for networks of beams, bars and cables. It is based on a dynamic relaxation
algorithm.

2.1 Simple cable


using Rhino

x = rand(1000, 1000)
r = sum(x, 2)

2.2 Simple Elastica

2.3 C# API

5
Marsupilami Documentation, Release 0.x.0

6 Chapter 2. Learning and Teaching


CHAPTER 3

Theory

Marsupilami is a non linear solver for networks of beams, bars and cables. It is based on a dynamic relaxation
algorithm.

3.1 Overview

Darboux vector Those equations can be formulated with the emph{Darboux vector} of the chosen material frame,
which represents the rotational velocity of the frame along 𝑥(𝑠) :

3.2 Darboux Vector

⎡ ⎤
𝜏 (𝑠)
𝑑′𝑖 (𝑠) = Ω𝑚 (𝑠) × 𝑑𝑖 (𝑠) , Ω𝑚 (𝑠) = ⎣𝜅1 (𝑠)⎦
𝜅2 (𝑠)

3.3 Dynamic relaxation

3.4 Elements

7
Marsupilami Documentation, Release 0.x.0

8 Chapter 3. Theory
CHAPTER 4

Simple Catenary

Tutorial over the calssic problem of the catenary / hanging chaine.

9
Marsupilami Documentation, Release 0.x.0

10 Chapter 4. Simple Catenary


CHAPTER 5

Simple Elastica

Tutorial over the calssic problem of the elastica

5.1 Simple cable


using Rhino

x = rand(1000, 1000)
r = sum(x, 2)

5.2 Simple Elastica

5.3 C# API

11
Marsupilami Documentation, Release 0.x.0

12 Chapter 5. Simple Elastica


CHAPTER 6

Spheric Gridshell

Tutorial over a simple spherical elastic gridshell.

6.1 The compas methode

6.2 Formfinding

6.3 Bracing Impact

13
Marsupilami Documentation, Release 0.x.0

14 Chapter 6. Spheric Gridshell


CHAPTER 7

Development

Marsupilami is a non linear solver for networks of beams, bars and cables. It is based on a dynamic relaxation
algorithm.
reST <http://openalea.gforge.inria.fr/doc/openalea/doc/_build/html/source/sphinx/rest_syntax.html>

7.1 Get Involved

Directives to contribut. Pull request via GitHub.

7.2 Open source

7.3 Ressources

• GitHub
• Read the doc
• McNeel

15
Marsupilami Documentation, Release 0.x.0

16 Chapter 7. Development
CHAPTER 8

Autodoc SetUp : WIP

8.1 Introduction

Plusieurs solutions ont été testées pour réaliser une doc automatique façon “API” à partir de sphinx. En effet,
sphinx dispose d’un module autodoc mais celui-ci est reservé à python. Cependant, sphinx permet l’ajout de
domain pour cibler d’autres langages. Pour .NET, une tentative existe mais n’est qu’en verison alpha à ce jour :
• sphinxcontrib-dotnetdomain : un domain pour sphinx prenant en charge .Net (édité par RTD)
• sphinx-autoapi : une extension sphinx pour générer de la doc façon “API” automatiquement, avec prise en
compte .Net (édité par RTD)
• sphinx-autoapi needs docfx
• breathe : une extension sphinx pour faire le lien entre doxygen et sphinx (actuellement en place, mais orienté
C++, ne semble pas très bien adapté pour le C#)
• doxygen : utilitaire avec interface graphique qui permet de générer un autodoc façon “API” à partir d’un code
Csharp. Fonctionne très bien. Pas d’intégration en standard avec sphinx.
• Je devrais jetter un coup d’oeil également à MKDocs
Tout celà fonctionne avec python. Pour s’affranchir de difficultées liées à de multiples installations python, un
virtualenv a été mis en place au sein du dossier manual.

Note: Un virtualenv n’est autre qu’une distribution locale et isolée de python dans laquelle on peut se placer
pour travailler. Idéal pour les problèmes liés aux liens symbolics lorsqu’on a de multiples versions de python sur la
même machine.

8.2 Environnement Virtuel (python)

Installer virtualenv pour la distribution python utilisée par défaut pour le système avec pip (la commande sudo
permet d’executer la commande avec les privilèges admin si nécessaire):
$ [sudo] pip install virtualenv

Créer un environnement virtuel dans le dossier. ../Marsupilami/doc/manual/_virtualenv avec la com-


mande suivante:
$ virtualenv ../Marsupilami/doc/manual/_virtualenv

17
Marsupilami Documentation, Release 0.x.0

Se placer dans cet environnement virtuel avec la commande suivante:


$ source ../Marsupilami/doc/manual/_virtualenv/bin/activate

Note: L’invite de commande du terminal change alors de nom pour montrer que les appels pythons se feront désormais
à partir de cet environnement virtuel.

Dans cet envrionnement virtuel, installer les packages requis:


$ pip install sphinx
$ pip install breathe
$ pip install sphinxcontrib-dotnetdomain
$ pip install sphinx-autoapi

Vérifier les modules installés en appelant la commande:


$ pip list

8.3 Générer la doc

La doc est générée :


• à partir des fichiers .rst du dossier ../Marsupilami/doc/manual/
• à partir des fichiers xml générés par doxygen et situés dans le dossier
../Marsupilami/doc/manual/_doxygen/
Un mémo REST est disponible sur RTD.
La génération de la XML doc (et d’un HTML façon “API”) avec doxygen est sans soucis.
La configuration de breathe se fait dans le fichier conf.py du projet sphinx:
extensions = ['sphinx.ext.autodoc','autoapi.extension','sphinxcontrib.dotnetdomain','breathe']
breathe_projects = { "Marsupilami": "../manual/_doxygen/xml/" }
breathe_default_members = ('members', 'undoc-members','protected-members','private-members')
breathe_default_project = 'Marsupilami'

Une fois placé dans l’environnement python virtuel, se placer dans le dossier ../Marsupilami/doc/manual/
et invoquer la commande (selon les cas):
$ make html
$ make clean html

Autre point d’aide pour breathe : tuto

18 Chapter 8. Autodoc SetUp : WIP


CHAPTER 9

API autodoc (WIP)

9.1 Test handwritten doc (sphinxcontrib-dotnetdomain)

This should be available in a near futur with autodoc capabilities with the sphinx-autoapi (WIP).
method(FooType bar)
Arguments
• bar (Bar) – A Bar instance
Returns Altered bar instance
On Foo instance, return Bar instance
class protected static ValidClass

MethodNoArgs()
MethodArg(T1)
Arguments
• T1 – Version slug to use for node lookup
MethodArgs(T1, T2)
Arguments
• T1 – desciption T1
• T2 – desciption T2
method(FooType bar)
Arguments
• bar (Bar) – A Bar instance
Returns Altered bar instance
MethodNested(List<int>, Dictionary<string, List<int>>)
Foobar()
Setter
Getter
Foobar()
Adder
Remover
namespace ValidNamespace
class ValidClass

19
Marsupilami Documentation, Release 0.x.0

struct ValidStructure
interface ValidInterface
ValidProperty()
ValidField()
ValidEvent()
ValidOperator()
namespace ValidNamespace

class ValidNamespace.Foobar<T>
class ValidNamespace.Foobar<T,T>
class ValidNamespace.Foobar<TFoo,TBar>
class ValidNamespace.Foobar<T,<string>>
class ValidNamespace.Foobar<T,<T,<string>>>
NestedProperty()
NestedField()
NestedEvent()
NestedOperator()
class ValidNamespace.NestedClass

NestedClassProperty()
NestedClassField()
NestedClassEvent()
NestedClassOperator()

9.2 Dynamic Relaxation (breathe)

class Marsupilami::Kernel::DRRelax
Dynamic Relaxation alogithm with kinetic damping (autodoc)

Public Functions

DRRelax(DRElement [] elements, List< DRConstraint > constraints)


void Run()
List<string> Info()
DataTree<Vector3d> GHTree_Xt()
DataTree<Vector3d> GHTree_Xi()
DataTree<Vector3d> GHTree_Vt()
DataTree<Vector3d> GHTree_Rt()

20 Chapter 9. API autodoc (WIP)


Marsupilami Documentation, Release 0.x.0

DataTree<Vector3d> GHTree_Fext()
DataTree<GH_Number> GHTree_LMt()
DataTree<GH_Number> GHTree_N()
DataTree<GH_Number> GHTree_T()
DataTree<GH_Number> GHTree_M()

Public Members

int numIteration
int numPic
int numCurrentPicIterations
List<int> iterationHistory
List<double> chronoHistory
Stopwatch chrono

Property

property Marsupilami::Kernel::DRRelax::CountElements
property Marsupilami::Kernel::DRRelax::CountNodes
property Marsupilami::Kernel::DRRelax::Ect
property Marsupilami::Kernel::DRRelax::Ec0
property Marsupilami::Kernel::DRRelax::Ec1
property Marsupilami::Kernel::DRRelax::Eclim
property Marsupilami::Kernel::DRRelax::dt
property Marsupilami::Kernel::DRRelax::Fext
property Marsupilami::Kernel::DRRelax::Xi
property Marsupilami::Kernel::DRRelax::Xt
property Marsupilami::Kernel::DRRelax::Vt
property Marsupilami::Kernel::DRRelax::Rt
property Marsupilami::Kernel::DRRelax::LMt
property Marsupilami::Kernel::DRRelax::Elements

Private Functions

void Init()
void Reset()
void InterpolateEc(double E0, double E1, double E2)
void Update_F()

9.2. Dynamic Relaxation (breathe) 21


Marsupilami Documentation, Release 0.x.0

Private Members

double _Eclim
double _Ect
double _Ec0
double _Ec1
double _dt
int numElements
int numNodes
Vector3d [][] _Xi
Vector3d [][] _Fext
Vector3d [][] _Xt
Vector3d [][] _Vt
Vector3d [][] _Rt
double [][] _LMt
DRElement [] elements
double q
Vector3d [][] Vtmp
DRConstraint [] constraints
DRKinematicConstraint [] kinematicConstraints
DRMechanicalConstraint [] mechanicalConstraints
DRLinkConstraint [] linkConstraints

9.3 Element (breathe)

class Marsupilami::Kernel::DRElement

Public Functions

virtual abstract override string ToString() = 0


virtual abstract void Update_R(ref Vector3d Rt[][], ref Vector3d Fext[][], ref Vector3
virtual abstract void Update_LM(ref double LMt[][]) = 0
Vector3d [] X(ref Vector3d Xt[][])
Vector3d [] V(ref Vector3d Vt[][])
Vector3d [] R(ref Vector3d Rt[][])
Vector3d [] F(ref Vector3d Fext[][])
double [] LM(ref double LMt[][])

22 Chapter 9. API autodoc (WIP)


Marsupilami Documentation, Release 0.x.0

virtual abstract double [] N() = 0


virtual abstract double [] T() = 0
virtual abstract double [] M() = 0

Property

property Marsupilami::Kernel::DRElement::Count
property Marsupilami::Kernel::DRElement::Index
property Marsupilami::Kernel::DRElement::Name
property Marsupilami::Kernel::DRElement::Type
property Marsupilami::Kernel::DRElement::E
property Marsupilami::Kernel::DRElement::S
property Marsupilami::Kernel::DRElement::I
property Marsupilami::Kernel::DRElement::ES
property Marsupilami::Kernel::DRElement::EI
property Marsupilami::Kernel::DRElement::Xi
property Marsupilami::Kernel::DRElement::L0
property Marsupilami::Kernel::DRElement::Fext
property Marsupilami::Kernel::DRElement::Lt
property Marsupilami::Kernel::DRElement::X12
property Marsupilami::Kernel::DRElement::N12
property Marsupilami::Kernel::DRElement::M12
property Marsupilami::Kernel::DRElement::F1
property Marsupilami::Kernel::DRElement::F2
property Marsupilami::Kernel::DRElement::dt
property Marsupilami::Kernel::DRElement::g

Protected Functions

DRElement(int index, Vector3d[] Xi, double[] L0, Vector3d[] Fext, double dt)

Protected Attributes

double alpha
double k
double lm

9.3. Element (breathe) 23


Marsupilami Documentation, Release 0.x.0

Private Members

int _numNodes
int _index
ElementTypes _type
string _name
double _E
double _S
double _I
double _ES
double _EI
Vector3d [] _Xi
Vector3d [] _Fext
double [] _L0
double [] _Lt
Vector3d [] _X12
Vector3d [] _N12
Vector3d [] _M12
Vector3d [] _F1
Vector3d [] _F2
double _dt
double _g

9.4 Utility (breathe)

class Marsupilami::Kernel::Utility

24 Chapter 9. API autodoc (WIP)


CHAPTER 10

Indices and tables

• genindex
• search

25
Marsupilami Documentation, Release 0.x.0

26 Chapter 10. Indices and tables


Index

Symbols K
_E (C++ member), 24 k (C++ member), 23
_EI (C++ member), 24
_ES (C++ member), 24 L
_Ec0 (C++ member), 22 lm (C++ member), 23
_Ec1 (C++ member), 22
_Eclim (C++ member), 22 M
_Ect (C++ member), 22 Marsupilami::Kernel::DRElement (C++ class), 22
_I (C++ member), 24 Marsupilami::Kernel::DRRelax (C++ class), 20
_S (C++ member), 24 Marsupilami::Kernel::Utility (C++ class), 24
_dt (C++ member), 22, 24
_g (C++ member), 24 N
_index (C++ member), 24
None (Foo.method method), 19
_name (C++ member), 24
None (ValidClass class), 19
_numNodes (C++ member), 24
None (ValidClass.Foobar field), 19
_type (C++ member), 24
None (ValidClass.Foobar property), 19
None (ValidClass.method method), 19
A None (ValidClass.MethodArg method), 19
alpha (C++ member), 23 None (ValidClass.MethodArgs method), 19
None (ValidClass.MethodNested method), 19
C None (ValidClass.MethodNoArgs method), 19
chrono (C++ member), 21 None (ValidEvent event), 20
chronoHistory (C++ member), 21 None (ValidField field), 20
None (ValidInterface interface), 20
G None (ValidNamespace namespace), 19, 20
GHTree_Fext (C++ function), 20 None (ValidNamespace.Foobar<T,<string>> class), 20
GHTree_LMt (C++ function), 21 None (ValidNamespace.Foobar<T,<T,<string>>> class),
GHTree_M (C++ function), 21 20
GHTree_N (C++ function), 21 None (ValidNamespace.Foobar<T,T> class), 20
GHTree_Rt (C++ function), 20 None (ValidNamespace.Foobar<T> class), 20
GHTree_T (C++ function), 21 None (ValidNamespace.Foobar<TFoo,TBar> class), 20
GHTree_Vt (C++ function), 20 None (ValidNamespace.NestedClass class), 20
GHTree_Xi (C++ function), 20 None (ValidNamespace.NestedClass.NestedClassEvent
GHTree_Xt (C++ function), 20 event), 20
None (ValidNamespace.NestedClass.NestedClassField
I field), 20
Info (C++ function), 20 None (ValidNamespace.NestedClass.NestedClassOperator
Init (C++ function), 21 operator), 20
InterpolateEc (C++ function), 21 None (ValidNamespace.NestedClass.NestedClassProperty
iterationHistory (C++ member), 21 property), 20

27
Marsupilami Documentation, Release 0.x.0

None (ValidNamespace.NestedEvent event), 20


None (ValidNamespace.NestedField field), 20
None (ValidNamespace.NestedOperator operator), 20
None (ValidNamespace.NestedProperty property), 20
None (ValidOperator operator), 20
None (ValidProperty property), 20
None (ValidStructure structure), 19
numCurrentPicIterations (C++ member), 21
numElements (C++ member), 22
numIteration (C++ member), 21
numNodes (C++ member), 22
numPic (C++ member), 21

Q
q (C++ member), 22

R
Reset (C++ function), 21
Run (C++ function), 20

U
Update_F (C++ function), 21

28 Index

You might also like