Code Monkey home page Code Monkey logo

riversimpy's People

Contributors

okmechak avatar

Watchers

 avatar

riversimpy's Issues

Problems with mesh refinement around tip points

meshAreaConstraint returns max_area value at any point

model = riversim.Model()
model. Height = 50; model. Width = 2; model.dx = 1;
model.initializeLaplace()
H = 1
model.solver_params.adaptive_refinment_steps = 0
model. Rivers[1].addPoint(riversim.Polar(H, 0), 0)
model.mesh_params.max_area = 1000
model.mesh_params.min_area = 1e-7
model.mesh_params.min_edge = 1e-17
model.mesh_params.min_edge = 1e+17
triangle.mesh_params.tip_points = model.rivers.tipPoints()
model.mesh_params.meshAreaConstraint(1, 1)

Bug in boundary generation from region with hole

from riversim import *

        outer_boundary = Boundary(); inner_boundary = Boundary()
        region = Region()
        region[1] = outer_boundary; region[2] = inner_boundary
        region.holes.append(Point(0.4, 0.7))
        
        outer_boundary.vertices.extend([Point(0.13, 0.011), Point(0.31, 0), Point(0.74, 0.22), Point(0.95, 0.35), Point(0.8, 0.75), Point(0.47, 0.85), Point(0.152, 0.76), Point(0, 0.5), Point(0.025, 0.3)])
        outer_boundary.lines.extend([Line(0, 1, 1), Line(1, 2, 1), Line(2, 3, 1), Line(3, 4, 1), Line(4, 5, 2), Line(5, 6, 2), Line(6, 7, 1), Line(7, 8, 1), Line(8, 0, 1)])
        inner_boundary.vertices.extend([Point(0.3, 0.7), Point(0.66, 0.59), Point(0.65, 0.7), Point(0.5, 0.76)])
        inner_boundary.lines.extend([Line(0, 1, 1), Line(1, 2, 3), Line(2, 3, 3), Line(3, 0, 1)])

        sources = Sources()
        sources[1] = t_source_coord(1, 1) 
        sources[2] = t_source_coord(1, 8) 
        sources[3] = t_source_coord(2, 3)


        rivers = Rivers()
        rivers.initialize(region.getSourcesIdsPointsAndAngles(sources))


        rivers_ids = t_sources_ids(); rivers_ids.extend([1, 2, 3])
        ds = 0.01
        tip_points = t_PolarList(); tip_points.extend([Polar(ds, 0), Polar(ds, 0), Polar(ds, 0)])
        boundaries_ids = t_boundaries_ids(); boundaries_ids.extend([1, 2, 1])
        rivers.addPolars(rivers_ids, tip_points, boundaries_ids)
      
        sub_branch_ids = rivers.createSubBranches(1, -3.1415/5, 3.1415/5)


        region_params = RegionParams()
        region_params.smoothness_degree = 0.2
        region_params.river_width = 1e-8
        boundary = BoundaryGenerator(sources, region, rivers, region_params)

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.