This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| """" | |
| This script illustrates command line handling | |
| """ | |
| import argparse | |
| def make_parser(): | |
| """Build command line parser""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| file fin=input('readcoords.dat'); | |
| pair [] xy; | |
| real cx,cy; | |
| int n = fin; | |
| for (int i=0; i<n; ++i) { | |
| cx= fin; | |
| cy = fin; | |
| xy.push((cx,cy)); | |
| } | |
| write(xy); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| % This is quick-and-dirty attempt at buildig simple | |
| % application in Octave using GUI control. | |
| % The application allows to crate and visualise simple 1D mesh. | |
| close all | |
| clear app | |
| graphics_toolkit qt | |
| function app = generate_mesh(app) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| names = {'ala', 'ola', 'ula'}; | |
| codes = [3,2,1]; | |
| selector = struct(); | |
| for i=1:length(names) | |
| selector.(names{i}) = codes(i); | |
| end | |
| disp(selector); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| %% Deformation of unit square into quarter of a disk | |
| % This script illustrates how to generate displacement field that | |
| % deforms unit square into quarter of a disk. Subsequent visualization | |
| % is done in a way that closely resembles visualizatio done in ParaView | |
| % (with default settings). | |
| clf | |
| clear all | |
| N = 10; | |
| x = linspace(0,1,N); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // To run: gmsh - strings.geo -v 3 | |
| names[] = Str("ola", "ola", "ula"); | |
| msg = StrCat("Message for ", names[2]); | |
| Printf(msg); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| MIT License | |
| Copyright (c) 2018 Roman Putanowicz | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is | |
| furnished to do so, subject to the following conditions: |