program families in scientific computing
play

Program Families in Scientific Computing Methodology Mesh Generator - PowerPoint PPT Presentation

Slide 1 of 20 Why Program Families? Program Families in Scientific Computing Methodology Mesh Generator Generator Virtual Spencer Smith, John McCutchan and Fang Cao Laboratories Concluding Remarks Department of Computing and Software


  1. Slide 1 of 20 Why Program Families? Program Families in Scientific Computing Methodology Mesh Generator Generator Virtual Spencer Smith, John McCutchan and Fang Cao Laboratories Concluding Remarks Department of Computing and Software McMaster University The 7 th OOPSLA Workshop on Domain-Specific Modeling

  2. Outline Slide 2 of 20 Why Program Families? Methodology Why Program Families in Scientific Computing (SC)? 1 Mesh Generator Generator Virtual 2 Proposed Methodology Laboratories Concluding Remarks Multipurpose Tool: A Mesh Generator Generator 3 Specific Physical Model: A Family of Virtual Material 4 Testing Laboratories

  3. Advantages of Program Families to SC? Slide 3 of 20 Why Program • Usual benefits Families? Methodology • Reduced development time Mesh Generator • Improved quality Generator • Reduced maintenance effort Virtual • Increased ability to cope with complexity Laboratories Concluding • Reusability Remarks • Underused potential for reuse in SC • Reuse commonalities • Systematically handle variabilities • Usability • Documentation often lacking in SC • Documentation part of program family methodology • Create family members that are only as general purpose as necessary • Improved performance

  4. Is SC Suited to a Program Family Approach? Slide 4 of 20 Why Program Families? • The redevelopment hypothesis Methodology • A significant portion of requirements, design and code Mesh Generator Generator should be common between family members Virtual • Common model of software development in SC is to Laboratories rework an existing program Concluding • Progress is made by removing assumptions Remarks • The oracle hypothesis • Likely changes should be predictable • Literature on SC, example systems, mathematics • The organizational hypothesis • Design so that predicted changes can be made independently • Tight coupling between data structures and algorithms • Need a suitable abstraction

  5. Proposed Methodology Slide 5 of 20 Why Program Families? 1 Identify family of interest Methodology • Specific physical model? Mesh Generator Generator • Multipurpose tool? Virtual 2 Commonality analysis Laboratories • Terminology Concluding Remarks • Commonalities • Variabilities • Parameters of variation • Binding time 3 Domain Specific Language (DSL) 4 Generation of family members

  6. Commonality Analysis Slide 6 of 20 1 Reference Material: a) Table of Contents b) Table Why Program of Symbols c) Abbreviations and Acronyms Families? Methodology 2 Introduction: a) Purpose of the Document b) Mesh Generator Organization of the Document Generator 3 General System Description: a) Potential System Virtual Laboratories Contexts b) Potential User Characteristics c) Concluding Potential System Constraints Remarks 4 Commonalities: a) Background Overview b) Terminology Definition c) Goal Statements d) Theoretical Models 5 Variabilities: a) Input Assumptions b) Calculation c) Output 6 Traceability Matrix 7 References

  7. A Mesh Generator Generator Slide 7 of 20 Why Program Families? Methodology v i y y y Mesh Generator i u i Generator 8 12 16 4 20 Virtual Laboratories 6 9 12 3 Concluding Remarks 3 7 11 15 19 x W 2 5 8 11 2 6 18 10 14 1 4 10 7 1 1 5 9 13 17 x L

  8. Mesh Generator (MG) Goals Slide 8 of 20 Why Program Families? Methodology G1 Input spatial domain Ω output a mesh M that covers Mesh Generator Generator this domain. Virtual Laboratories G2 Transform information on the materials, material Concluding properties and the locations of the different materials Remarks G3 Transform information on the boundary condition types, values and locations G4 Transform system information, such as numerical algorithm parameters

  9. Element Variability Slide 9 of 20 Location of nodes: sequence of LocationT Why Program Families? Number of dof at nodes: sequence of N Methodology LocationT = tuple of ( L 1 : natT, L 2 : natT, L 3 : natT) Mesh Generator natT = { s : R | 0 ≤ s ≤ 1 : s } Generator Virtual Laboratories Concluding Remarks 3 2 1

  10. Local Topology Variability Slide 10 of 20 Why Program Families? Methodology Mesh Generator Generator Triangle1 Quad Triangle2 Virtual Laboratories Concluding Remarks Triangle4 Triangle3 Triangle5 Triangle6 Triangle7 Triangle8

  11. DSL Using XML Slide 11 of 20 < elementSet > Why Program Families? < geometrySpec > Methodology < shape > t r i a n g l e 1 < / shape > Mesh Generator Generator < nodeGeo count=” 3 ” > Virtual < node id=” 1 ” > Laboratories < l o c a t i o n > 1 ,0 ,0 < / l o c a t i o n > Concluding Remarks < / node > < node id=” 2 ” > < l o c a t i o n > 0 ,1 ,0 < / l o c a t i o n > < / node > . . . < / nodeGeo > < / geometrySpec > < / elementSet >

  12. Proof of Concept Implementation Slide 12 of 20 Why Program • XML document that customizes a Java object Families? Methodology • The Java object customizes the general purpose MG Mesh Generator as it is loaded Generator • General purpose MG Virtual Laboratories • All variabilities bound at run-time Concluding • Corresponds to an empty XML specification Remarks

  13. A Virtual Material Testing Laboratory Slide 13 of 20 Why Program Families? y Methodology Mesh Generator Generator Virtual Laboratories Concluding Remarks F x H 0 H W W 0 L 0 ∆ L z L

  14. Goal Slide 14 of 20 Given the deformation history of a material particle, Why Program determine the internal stress within the material particle. Families? Methodology y Mesh Generator σ yy Generator Virtual σ yx Laboratories Concluding σ xy σ yz Remarks σ xx σ zy x σ xz σ zz σ zx z

  15. Theoretical Model Input Slide 15 of 20 σ 0 : R 6 Why Program Families? Methodology t beg : R Mesh Generator Generator Virtual t end : R Laboratories Concluding Remarks ǫ ( t ) : { t : R | t beg ≤ t ≤ t end : t } → R 6 ˙ mat prop val : string → R E : { x : R | x ≥ 0 : x } ν : { x : R | 0 < x ≤ 0 . 5 : x }

  16. Theoretical Model Output Slide 16 of 20 σ ( t ) : { t : R | t beg ≤ t ≤ t end : t } → R 6 such that Why Program Families? � � ǫ − γ < φ ( F ( σ , κ )) > ∂ Q ( σ ) Methodology σ = D ˙ ˙ and σ ( t beg ) = σ 0 ∂ σ Mesh Generator Generator Virtual Laboratories Concluding ∂ Q Remarks ∂ σ F = 0 Q = 0

  17. Variabilities Slide 17 of 20 Why Program Families? Methodology Mesh Generator • F = F ( σ , κ ) : R 6 × R → R Generator • Q = Q ( σ ) : R 6 → R Virtual Laboratories • κ = κ ( ǫ vp ) : R 6 → R Concluding Remarks • φ = φ ( F ) : R → R • γ : R • mat prop names : set of string

  18. Code Generation Slide 18 of 20 • Specify variabilities Why Program • Symbolically calculate terms needed by numerical Families? algorithm, including ∂ Q ∂ σ , ∂ F Methodology ∂ σ , etc. Mesh Generator • Symbolic processing avoids tedious and error-prone Generator hand calculations Virtual Laboratories • Reduces workload Concluding • Allows non-experts to deal with new problems Remarks • Increases reliability • Use Maple Computer Algebra System for model manipulation • Convert math expressions into C expressions using “CodeGeneration” • Inline into a C++ class defining the material model • A finite element program can this interface to realize the numerical algorithm

  19. BNF of DSL for F Slide 19 of 20 � expression �→� number �| Why Program ( � expression � ) | Families? � expression � ˆ � expression �| Methodology � expression �∗� expression �| Mesh Generator Generator ... Virtual Laboratories � simulation-variable-F �|� user-defined-constants � Concluding Remarks � simulation-variable-F �→ Kappa |� simulation- variable-stress �|� simulation-variable-stress- macros � � simulation-variable- stress �→ SigmaXX | SigmaYY | SigmaZZ | SigmaXY | SigmaYZ | SigmaXZ � simulation-variable-stress- macros �→ Sxx | Syy | Szz | Sxy | Syz | Sxz | Sm | J2 | J3 | q � user-defined-constants �→� string �

  20. Concluding Remarks Slide 20 of 20 Why Program Families? Methodology • SC software is a great candidate for development as a Mesh Generator program family Generator • Produce programs that are as special or general Virtual Laboratories purpose as needed Concluding Remarks • Improve reusability, usability and reliability • Potential to improve performance • A commonality analysis facilitates the design of a DSL • Symbolic processing and code generation are very useful techniques

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend