Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

  • 70bf5e9
  • /
  • getVideo.c
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
content badge
swh:1:cnt:33c8bb054afb598889a1f7cd6523f7ec3c16852f
directory badge
swh:1:dir:70bf5e99543362ad259e4f1a4ade4d7219a68ef3

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
getVideo.c
/* Title: Saving images with bview
# Authors: Vatsal & Youssef
# vatsalsanjay@gmail.com
# Physics of Fluids
*/

#include "axi.h"
#include "navier-stokes/centered.h"
#include "view.h"

scalar f1[], f2[], omega[], vel[];
char filename[80], Imagename[80];

int main(int a, char const *arguments[]) {
  sprintf (filename, "%s", arguments[1]);
  sprintf (Imagename, "%s",arguments[2]);
  restore (file = filename);
  vorticity(u, omega);
  foreach(){
    vel[] = sqrt(sq(u.x[]) + sq(u.y[]));
  }

  // boundary conditions
  u.t[left] = dirichlet(0.0);
  f1[left] = dirichlet(0.0);
  f2[left] = dirichlet(1.0);
  f1.prolongation = fraction_refine;
  f2.prolongation = fraction_refine;
  boundary((scalar *){f1, f2, u.x, u.y, omega, vel});

  view (fov = 15.0, quat = {0,0,-0.707107,0.707107}, tx = 0.0, ty = -0.30, bg = {1,1,1}, width = 1920, height = 1016, samples = 1);
  draw_vof("f1", lw=4);
  draw_vof("f2", lw=4);
  squares ("omega", spread=9, linear=true, map = cool_warm);
  box(notics=true);
  cells(n = {0, 0, 1}, lc = {0.5,0.5,0.5}, lw=1);

  mirror ({0,1}) {
    draw_vof("f1", lw=4);
    draw_vof("f2", lw=4);
    squares ("vel", linear=true);
  }
  save (Imagename);
}

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API