1 / 31

Trellis: A Framework for Adaptive Numerical Analysis Based on Multiparadigm Programming in C++

Trellis: A Framework for Adaptive Numerical Analysis Based on Multiparadigm Programming in C++. Jean-Francois Remacle, Ottmar Klaas and Mark Shephard Scientific Computation Research Center Rensselaer Polytechnic Institute. Scope of the presentation .

scott
Download Presentation

Trellis: A Framework for Adaptive Numerical Analysis Based on Multiparadigm Programming in C++

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Trellis: A Framework for Adaptive Numerical Analysis Based on Multiparadigm Programming in C++ Jean-Francois Remacle, Ottmar Klaas and Mark Shephard Scientific Computation Research Center Rensselaer Polytechnic Institute

  2. Scope of the presentation • Aim of Trellis: find y(x,t)Y(W) such that • Trellis modular design • A parallel adaptive mesh library, takes care of W • A discretization library, takes care of Y(W) • A core library, takes care of f • A solver library for algebraic systems

  3. Linearization • We usually need a linearization of • The aim of Trellis is to provide M, C, K and f • Trellis interacts with external solvers like PetSC or DASPK

  4. Parallel Algorithm Oriented Mesh Data-structure • Aim of AOMD: providing services to mesh users • Basic services, iterators to various ranges of entities, iterators on adjacencies, input-output ... • Geometry based analysis, relation mesh to model is maintained • Support of dynamic mesh adjacencies • Parallel services: message passing and load balancing capabilities • Open source: www.scorec.rpi.edu/AOMD

  5. Parallel Algorithm Oriented Mesh Data-structure • AOMD extensions • Conforming (anisotropic) and non-conforming adaptive capabilities, available in parallel • Calculus toolkit, integration, curvilinear elements and their mappings (Bezier, Lagrange) • Computational Geometry toolkit (Octree, ADT) • Interface to solid modelers (e.g. Parasolid), vertex snapping • TSTT interface

  6. Example of AOMD capabilities • Parallel • Adaptive • D.G. Solver • Load Balancing • High order

  7. The Discretization Library • Representing componentsyi of a tensor field y • With • A functional basis: • Coefficients (DOF’s):

  8. Aim: flexibility parallel, h-p adaptive multiple fields multi-methods, multi-physics Representation constant part, DofKey variable part DofData The idea of a general DOF representation is far more important than the implementation Degrees of Freedom

  9. Degrees of Freedom Manager • Design • Contains all degrees of freedom • Container: std::map or std::hash_map if available e.g. at www.stlport.org • Singleton pattern i.e. one only instance in the program • Parallel capabilities

  10. Function Spaces • Provide C and N of • Hierarchy of classes • Available: • Hierarchical, p<15 • Lagrange, p<10 • L2-Orthogonal, p<15 • Crouzeix-Raviart • Enriched X-fem basis,to come...

  11. Examples of Function Spaces

  12. Examples of Function Spaces

  13. Examples of Function Spaces

  14. Linear operators • Aim: take tensor components and build a tensorial representation • A field with 3 component may be a covariant vector, a vector or 3 scalars (Euler 1-D e.g.) • We call with and we have the expansion

  15. Examples of Operators

  16. Scalar product, dual pairing • Consider • Operators Fiacting on yi • Contraction :: between operator results produces a scalar • Particular case: bilinear density • Linearisation of the general case • Representation: dim(L1)dim(L2) matrix (not tensor!)

  17. Some other densities • Linear Form • Representation: column vector, dim(L) • Trilinear Form • Automatic linearization

  18. Contributors • Matrix Contributor • Representation

  19. Implementation • Generic: • Template parameters: operators, material law • Efficient (inlining) and very general • An operator that computes must exist • That type safety helps developer not to make mistakes

  20. Algebraic and ODE Solvers • Interfaces • to serial linear system solvers: Sparskit, IML,… • to parallel solvers: PetSC, SuperLU • to ODE solvers: PesSC, DASPK • Internal Trellis solvers • Newton, BFGS • classical ODE solvers: CN, RK...

  21. Navier-Stokes in 4 lines of code • Constraints: fix components to a value

  22. Channel flow, Re=625

  23. Natural convection (time dependant)

  24. Heated from below • Natural convection • Ra = 105 • Semi-implicit

  25. Magneto-hydrodynamics • Tilt instability • Dipole of current (b) oppositely directed (repelling forces) in a constant b (confining field) • dipole starts turning in order to align the external magnetic field (minimize magnetic energy) • repelling effect is able to expel vortices • Instability: kinetic energy grows like exp(gt) with g = O(1.4)

  26. Magneto-hydrodynamics • Characterization of ker(div) • From “inside”, with potentials • From “outside” with Lagrange multipliers (pressure and electric potential). SUPG stabilization (modified upwind operators b’ and l’)

  27. Results for a Tilt instability • Magnetic potential a with b = (aez ) , p=1 and p=3 (v and b)

  28. Results for the Tilt instability • Magnetic Flux Density and Velocity

  29. Results for the Tilt instability • Kinetic energy vs. time

  30. Current • Current density j ez= b • Oscillations observed • SUPG Stabilization for higher order (p=3) may not be sufficient

  31. Conclusions • Multiparadigm design in C++ • Higher level objects, Object Oriented • Kernel, Generic • Trellis • Operator based, linear and non-linear • Complex physics easy to implement • Future • Parallel (in progress) and adaptive (in progress)

More Related