Git Product home page Git Product logo

pdecollector's Introduction

PDEcollector

Collect PDE and its true solution

  

maybe exsit errors in PDE, please use it carefully !

PDE

- - - PDE_name

 datafile    # if PDE_analytic_solution = False
 description.pdf
 
 PDE_name.py
    import numpy as np
    
    abs_dir=os.path.dirname(__file__)+'/'
    PDE_datafile = abs_dir+'datafile' # if PDE_analytic_solution = False
    PDE_dim = 2
    PDE_vars = ['x', 'y']
    PDE_scale = {
        'x': (0, 1),
        'y': (0, 1)
    }
    PDE_analytic_solution = True
    PDE_description = 'Uxx + Uyy = PDE_f1(x, y)'
    PDE_initial_condition = ['PDE_ic1()']
    PDE_boundary_condition = ['PDE_bc1(y, x=0)', 'PDE_bc2(y, x=1)', 'PDE_bc3(x, y=0)', 'PDE_bc4(x, y=1)']

    
    def PDE_f1(x, y):
        return np.exp(-x) * (x - 2 + np.power(y, 3) + 6 * y)
    
    #def PDE_ic1():
    #    pass
        
    def PDE_bc1(y, x=0):
        return np.power(y, 3)

    def PDE_bc2(y, x=1):
        return np.exp(-1) * (1 + np.power(y, 3))

    def PDE_bc3(x, y=0):
        return np.exp(-x) * x

    def PDE_bc4(x, y=1):
        return np.exp(-x) * (x + 1)
    
    # if PDE_analytic_solution = True
    def PDE_u(x, y):
        return np.exp(-x) * (x + np.power(y, 3))
        
    # if PDE_analytic_solution = False
    #def PDE_get_data():

    #    return {
    #        'data': data,
    #        'x': x,
    #        'x_dim': len(x),
    #        'y': y,
    #        'y_dim': len(y),
    #        'solution_type': 'X Y U',
    #        'solution': [X, Y, Exact]
    #    }
    

pdecollector's People

Contributors

hsbhc avatar

Stargazers

Learn2Learn avatar atatat avatar dinglei-zhang avatar

Watchers

 avatar

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.