GithubHelp home page GithubHelp logo

complexify's Introduction

README

Build Status Documentation Status

The complex-step is a method for estimating derivatives.

This repository provides a:

  1. Fortran library and scripts to covert Fortran code to complex-step compatible code
  2. Python module redefining numpy functions that are not complex safe

Documentation

Please see the documentation for installation details and API documentation.

To locally build the documentation, enter the doc folder and enter make html in terminal. You can then view the built documentation in the _build folder.

Citation

Please cite the complex step method in any publication for which you find it useful. For more background, theory, and figures, see the this paper.

The Complex-Step Derivative Approximation

@Article{Martins2003a,
    author      = {Joaquim R. R. A. Martins and Peter Sturdza and Juan J. Alonso},
    title       = {The Complex-Step Derivative Approximation},
    doi         = {10.1145/838250.838251},
    journal     = {ACM Transactions on Mathematical Software},
    month       = {September},
    number      = {3},
    pages       = {245--262},
    pdfurl      = {https://www.researchgate.net/profile/Joaquim_Martins/publication/222112601_The_Complex-Step_Derivative_Approximation/links/0912f50c7474bb861d000000/The-Complex-Step-Derivative-Approximation.pdf},
    volume      = {29},
    year        = {2003}
}

Copyright MDO Lab.

complexify's People

Watchers

 avatar  avatar  avatar  avatar

Forkers

cykabear414

complexify's Issues

Avoid changing strings when complexifying

Description

The current pattern matching does not check whether the patterns are used in strings that are printed out. For example in mdolab/adflow#229, I ran into a problem where a sequence of "======" being used as a separator was converted to ".ceq..ceq..ceq.". This does not necessarily break the compilation, but it can if the line exceeds the character limit.

Steps to reproduce issue

  1. Build the complex version of ADflow.
  2. Check src_cs/BCData.F90 for .ceq..ceq..ceq.

Current behavior

Some strings are substituted with complexified functions.

Expected behavior

Strings should stay the same.

Add python definitions of complex-safe functions

Description of feature

We should add a python library of complex-safe functions, similar to what's done in the complexify module in Fortran. That way, codes that require these definitions don't have to define them in an ad-hoc fashion.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.