1 / 42

A Network-based PDE Solving Environment

PDE.Mart. A Network-based PDE Solving Environment. Mo Mu Department of Mathematics Hong Kong University of Science & Technology Team members:

lixue
Télécharger la présentation

A Network-based PDE Solving Environment

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. PDE.Mart A Network-based PDE Solving Environment Mo Mu Department of Mathematics Hong Kong University of Science & Technology Team members: Chan Chui Ling, Chan Wing On, Cheung Lai Yee, Chim Lai Fong, Choi Kam Wing, Ho Ka Man, Ho Woon Ping, Kong Yin Wa, Law Man Fai, Ma Po Yee, So Ming Cheung, Tsui Ka Cheung, Tsui Wai Ming, Wu Sze Man, Yan Chi Hang, Falcon Siu, Xaio Hong Zhu

  2. PDE.Mart Background • NetSolve/GridSolve • Network and grid-based • Function evaluation: <output> = <name>(<input>) • Some PDE applications • Web Pellpack • PDE oriented with the full functionality of PDELab • Host-based with VNC + html upload • WebInterfacer • Host-based with CGI + html + … • Batch applications • PDE.Mart • Network-based with Java platform + multi-language library • PDE-oriented • Net Pellpack • Network-based with Java + … • PDE-oriented

  3. Missions PDE.Mart • Develop a network-based and PDE-oriented PSE (Problem solving environment) • Investigate the impact and research issues of the rapidly growing network/grid technologies in designing and developing network/grid-based PSEs for scientific and engineering applications.

  4. System Structure PDE.Mart

  5. Features PDE.Mart • Network-based Java platform • Web browser-enabled interactive GUI • Client-Server protocol • PDE-oriented PSE • Problem specification with complicated geometry, PDE, and boundary/interface/initial conditions, including multi-domain and multi-model problems • Engine builder for method selection and composition • Post-processing with visualization and data analysis • Software engineering • Platform: uniform, flexible, machine independent, object-oriented • LIB: effective and efficient software integration with multi-language and multi-source software parts • PDE-API-based mechanism • Multi-layer and two-way wrapper framework

  6. PDE.Mart NETWORK-based GUI GUI • Provide a platform for specifying applications, constructing PDE solvers, and post-processing • Convert the graphical user interface to the PDE object-based internal system interface • Communicate with the server for transporting the objects • Serve as an agent between the client and server

  7. PDE.Mart Characteristics GUI • Intensive interaction • Demanding graphics support • Object-oriented • Hierarchical browsing (domain shapes, PDE types, numerical)

  8. PDE.Mart Overall Structure of PDE-GUI GUI

  9. PDE.Mart Domain Editor GUI

  10. PDE.Mart Shape Editor: General 2D GUI

  11. PDE.Mart PDE Editor: Rectangle GUI

  12. PDE.Mart PDE Editor GUI

  13. PDE.Mart Model Editor: Elliptic, 2nd Order, Linear, Standard Form-- Equation Page (3D) GUI

  14. PDE.Mart Model Editor: Elliptic, 2nd Order, Linear, Standard Form-- Boundary Condition Page (3D) GUI

  15. PDE.Mart Method Editors GUI • Components of Numerical PDE methods • Domain (spatial & temporal) discretization • PDE discretization • Indexing • Solution • Blackbox • Method browsing • Application range – problems and other numerical components • Performance evaluation and method recommendation • Relational database for method selection, solver composition, and consistency/error checking

  16. PDE.Mart Post-processing GUI • Visualization • VisAD • Built on top of Java3D • Data analysis • Error analysis • Interpolation at off-mesh points • Derivatives, etc

  17. PDE.Mart Surface Plot of PDE Solution GUI

  18. PDE.Mart PDE-SERVER SERVER • Java application running on the host server • Client-Server protocol • Multiple users • PDE solution services

  19. PDE.Mart Overall Structure of PDE-Server SERVER

  20. PDE.Mart Server SERVER • Create the Client-Server protocol • Listen to clients on the Internet • Create a socket for each client-server connection to establish the communication channel • Create a CS (computational session) thread as an instance of Engine Builder for the client to build the computational engine

  21. PDE.Mart Engine Builder and Computational Session SERVER • A CS is an instance of Engine Builder • A CS is an interactive Control Program: • communicating with the user (through PDE-GUI) via the socket for input or output • mapping a PDE-GUI session to the internal system interface • controlling the computation on the server: to create or update the Domain object, PDE object, Mesh object, Discrete PDE object, Indexing object, and Solution object, or Blackbox-solver object that combines the latter three • CS is object-oriented based on PDE-API • CS is multi-threaded

  22. PDE.Mart Engine Components SERVER • Domain Creator • PDE Creator • Mesh Generator • Discretizer • Indexer • Solver • Blackbox-solver

  23. PDE.Mart Client-Server Communication SERVER • Java RMI (Remote Method Invocation) • Easy and convenient for developing distributed object-based applications • Without object transportation and replication • Expensive communication • Object Serialization • Read/write a full-blown object via byte streams • With object replication • Convenient • Improved communication performance than RMI, yet still expensive for BIG objects

  24. PDE.Mart Client-Server Communication (continued) SERVER • Parameter-based object transmission • Passing defining information and re-creating/updating the object • More efficient • Tedious low-level socket data manipulation • Hash table-based Key-Value parameter array • Creator key for identifying a creator to invoke • Object key for identifying an object to create/update, such as shape key for domain objects, type key for PDE object, … • Event-driven CS

  25. PDE.Mart PDE-LIB LIB • A collection of computational and utility supporting software parts for developing PDE-oriented PSEs • Self-developed or ported from existing systems for software re-use • Most of the computationally intensive software parts are fine-tuned and mature native codes • Challenge: software integration with multi-language and multi-source native codes into an object-oriented Java platform

  26. PDE.Mart Computational Flow in PDE Solution LIB • Descriptive objects • Processing objects

  27. PDE.Mart Application Programmer Interfaces LIB • BLAS: API for numerical linear algebra • API for FFT • PDE-API • PDE-oriented API • Descriptive objects • A standard set of methods for the specification of geometry, PDE, initial/boundary/interface conditions, domain discretization, PDE discretization, indexing, solution • A protocol of behavior for a group of classes that implement the interface

  28. PDE.Mart PDE-API LIB • Domain Interfaces • Domain2DInterface • Domain3DInterface • PDE Interfaces • PDEEllipticInterface • PDEParabolicInterface • PDEHyperbolicInterface • …… • Mesh Interfaces • Mesh2DGridInterface • Mesh2DFEInterafce • …… • Discrete Interfaces • DiscreteLinearInterface • DiscreteNonlinearInterface • Indexing Interface • Solution Interface

  29. PDE.Mart API-based Framework for Software Integration LIB • A processing class expects certain input from the descriptive objects on the argument list • A processing class has its application range • Java interface can be used as a reference data type • Only an instance of a class that implements the interface can be assigned to a reference variable whose type is an interface name

  30. PDE.Mart Uniform Structure of Processing Class in PDE-LIB LIB • PDE-API interfaces, instead of class names, are used as reference data types to declare the input arguments for descriptive objects • The descriptive objects implementing the interfaces offer the promise to provide all the necessary information expected by the underlying numerical procedure • The interface data types ensure the application limitation of the numerical procedure • PDE-API defines a protocol of proper communication among the PDE-LIB objects

  31. PDE.Mart Example of Processing Class LIB

  32. PDE.Mart Multi-layer Wrapper Framework LIB • Direct implementation of the numerical procedure is possible • Native method invocation is more practical • Software re-use • Numerical efficiency • The general class structure is reduced to a Java wrapper • JNI (Java Native Interface) supports native method invocation • Native codes are ported from existing packages • Self-contained systems and Own data structures • Control program (main program) • Memory declaration • Data structures allocation: global variables, common blocks • User-supplied routines • Native method invocation • Preprocessor • Determine memory size • Generate control program

  33. PDE.Mart Java Wrappers LIB • Lack of preprocessor and control program • MemoryAllocator • Calculate the dimension sizes of all the arrays associated to each numerical procedure • Allocate the required memory of the data structures • GlobalControl • encapsulate the global control information necessary in a PDE computation, but not available from other descriptive objects such as domain, PDE, mesh, etc • Wrapper structure extended from the general structure • Native method declaration • Descriptive objects plus GlobalControl object are passed to the argument list due to object-orientation • Numerical procedure implementation • Memory allocation • Native method invocation

  34. PDE.Mart Example of Java Wrapper LIB

  35. PDE.Mart C++ Wrappers LIB • The official Java technology only supports the JNI interface to C/C++ • Technology for interfacing Java with Fortran or othersis not mature and standard yet • The arguments to a native method in a Java wrapper are passed by objects • So, all native methods declared in Java wrappers are implemented in C++ • If the target native code is not in C++, theC++ code is again reduced to a C++ wrapper

  36. PDE.Mart Structure of C++ Wrappers LIB • Declare the external native routine; • Decode the information encapsulated in the argument objects passed from the Java side; • Invoke the native routine for passing the decoded information to input arguments and returning the computed information from theoutput arguments; • Encode the output from the native code to the target object for returning back to the Java sidethrough the output argument of the C++ wrapper.

  37. PDE.Mart Fortran/C Wrappers LIB • The technology for calling routines between C++ and Fortran is mature and stable • Fortran routine declared in a C++ wrapper is usually still not the target native codedue to the lack of control program • To invoke a library module, the control program contains a segment of statements for the setup • Global variables cannot appear inan argument list • A Fortran wrapper basically replaces part of the Fortran control program corresponding tothe given numerical procedure.

  38. PDE.Mart Structure of Fortran/C Wrappers LIB • Pass the input data from the C++ wrapper to the Fortran side through the argument listto the Fortran wrapper • Set up the global data structures, mostly in common blocks, as required by the Fortran routines involved in the native invocation • Invoke the target Fortran native method together with the necessary setup • Return the generated output to the C++ wrapper through the argument list to theFortran wrapper

  39. PDE.Mart Call-back Wrappers LIB • Some native methods need to invokemethods available on the Java side • ELLPACK • Built-in routinesfor problem specification are available in the controlprogram • Used by Domain processor, Discretization modules, … • Available from Java methods defined inPDE-API • Integrate ELLPACK intoPDE.Mart • Five Fortran call-back wrappers Q1BDRY Q1PCOE R1PRHS Q1BCOE R1BRHS of the same names in ELLPACK for the missing built-in routines • Five C++ call-back wrappers DomBdryCpp, PDECoeCpp, PDERhsCpp, BCCoeCpp, BCRhsCpp

  40. PDE.Mart Multi-layer and Two-way Wrapper Framework LIB

  41. PDE.Mart PDE.Mart Packages • PDEMart • PDEMart.GUI • PDEMart.SERVER • PDEMart.LIB • PDEMart.LIB.Geometry • PDEMart.LIB.PDE • PDEMart.LIB.Mesh • PDEMart.LIB.Discretization • PDEMart.LIB.Indexing • PDEMart.LIB.Solver • PDEMart.LIB.Util

  42. PDE.Mart PDE-LIB: Geometry Package

More Related