Giter VIP home page Giter VIP logo

Comments (6)

mdzik avatar mdzik commented on August 17, 2024

All TCLB XML is write-to-TLCB-as-you-read-XML, so yes - order matters. This is why warnings are displayed in your case (check output) We would need a DOM XML model, not a parser to handle it properly

from tclb.

mdzik avatar mdzik commented on August 17, 2024

To add bit more context:
#100

Without DOM model (build object tree then execute, implement LBM node's claims?) it's not easy to distinguish if a node was written too or not. There is warning in when you write to non-zero value for that case

IMHO One think that could be implemented is that Param without zone MUST always be triggered first, if not fail.
I could do that, but it might be breaking change for some examples. Votes?

BTW: XML standard assures that

<Param name="PhaseField_init" value="0.0"/>
<Param name="PhaseField_init" value="1.0" zone="water"/>

is different from

<Param name="PhaseField_init" value="1.0" zone="water"/>
<Param name="PhaseField_init" value="0.0"/>

Think of it as python's list of dicts. So it's predictable output.

from tclb.

llaniewski avatar llaniewski commented on August 17, 2024

"Param without zone MUST always be triggered first" This is not such a bad idea. I vote yes

@TravisMitchell any comments?

from tclb.

TravisMitchell avatar TravisMitchell commented on August 17, 2024

I think a trigger for this is a good idea. If the user is overwriting their zonal value, I think we can assume it is not done on purpose and the code should flag this too them.

Vote: yes

from tclb.

ggruszczynski avatar ggruszczynski commented on August 17, 2024

What is/(shall be) the expected behaviour for the config below?

<Geometry nx="256" ny="256">
	<CM><Box/></CM>
	<None name="lava">Box ny="48" nx="32"/></None>
	<None name="water">Box ny="96" nx="32"/></None>
</Geometry>
<Model>
	<Param name="PhaseField_init" value="0.0"/>
	<Param name="PhaseField_init" value="1.0" zone="water"/>
	<Param name="PhaseField_init" value="-1.0" zone="lava"/>
</Model>

from tclb.

llaniewski avatar llaniewski commented on August 17, 2024

@ggruszczynski <Param/> without zone= sets a setting in all the zones. So in your case: first all zones are set to 0, then water to 1 and lava to -1.

I think Michaล‚'s suggestion kind of makes sense, that you have to put all the <Param/> without zone= before the ones with zone=, and if you don't TCLB will give an error.

from tclb.

Related Issues (20)

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.