Giter VIP home page Giter VIP logo

ddtruss's People

Contributors

tianyikillua avatar

Watchers

 avatar

ddtruss's Issues

1D example error

Changing the 1D example in examples/truss.ipynb as
points = np.array([ [0, 0], [0.5, 0], [1, 0], ]) lines = np.array([ [0, 1], [1, 2] ], dtype=int) truss = Truss(points, lines)

produces the following error

_---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
in
47 idx=[0],
48 n_neighbors=2,
---> 49 save_history=True,
50 )
51

~/opt/anaconda3/lib/python3.7/site-packages/ddtruss/solver.py in solve(self, A, U_dict, F_dict, n_iterations, E_num, n_neighbors, idx, save_history)
102 construct_K = False
103 u, eps, _ = self.truss.solve(
--> 104 A=A, E=E_num, U_dict=U_dict, sig0=sig0, construct_K=construct_K
105 )
106

~/opt/anaconda3/lib/python3.7/site-packages/ddtruss/truss.py in solve(self, A, E, U_dict, F_dict, sig0, construct_K)
98
99 # Right hand side
--> 100 self._construct_F(F_dict, sig0)
101 self._apply_Dirichlet(U_dict, F=self.F)
102

~/opt/anaconda3/lib/python3.7/site-packages/ddtruss/truss.py in _construct_F(self, F_dict, sig0)
155 # Initial stress
156 if sig0 is not None:
--> 157 assert len(sig0) == self.n_lines
158 self._compute_elementary_quantities()
159 for i, line in enumerate(self.lines):

AssertionError:_

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.