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

https://github.com/jrethore/ufreckles
21 April 2026, 21:14:19 UTC
  • Code
  • Branches (4)
  • Releases (0)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/master
    • refs/heads/v2.0
    • refs/heads/v2.1
    • refs/heads/v2.2
    No releases to show
  • 5ade5ef
  • /
  • BasisFunctions
  • /
  • CreateNURBSBasis0D.m
Raw File Download Save again
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

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
  • revision
  • snapshot
origin badgecontent badge
swh:1:cnt:6d55a2e06f2c26e216554b041f4e2548b80393de
origin badgedirectory badge
swh:1:dir:d17c3691ebe586145cf6b2b4c2808ac6f7060c90
origin badgerevision badge
swh:1:rev:c38c036275d400217c433acd624a7e968a09fb55
origin badgesnapshot badge
swh:1:snp:e93363e05fc035dd2687d48111453842fa57bff8

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
  • revision
  • snapshot
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
Tip revision: c38c036275d400217c433acd624a7e968a09fb55 authored by Julien Réthoré on 16 June 2025, 12:35:44 UTC
update june 2025
Tip revision: c38c036
CreateNURBSBasis0D.m
function [phi,dphi,ddphi]=CreateNURBSBasis0D(mesh_file,p,yi,type_nurbs,isclosed,nband,sizeim)

if nargin < 4 , type_nurbs=1;end
if nargin < 5 , isclosed=0;end
if nargin < 6 , nband=[];end
load(mesh_file,'yo','vo');
if ~isempty(nband)
    assert(nargin==7);
    yi=yi(nband);
end
npt=length(yi(:));
indp=zeros((p+1)*npt,1);
indn=zeros((p+1)*npt,1);
val=zeros((p+1)*npt,1);
dval=zeros((p+1)*npt,1);
ddval=zeros((p+1)*npt,1);
if type_nurbs
Nny=length(yo)+p-1;
else
Nny=length(yo)*p-(p-1);    
end
nel=0;
toto=1;
Nelems=length(yo)-1;

for iy=1:Nelems
    if iy==Nelems
    found=find((yi(:)>=yo(iy))&(yi(:)<=yo(iy+1)));
    else
    found=find((yi(:)>=yo(iy))&(yi(:)<yo(iy+1)));
    end
    yp=yi(found);
    if isempty(yp)
        figure
plot(sort(yi),sort(yi),'b+');
hold on
plot(sort(yo),sort(yo),'ro')
    yo(iy)
    yo(iy+1)
    pause
    end
	if type_nurbs
    [N]=NURBSBasisFunc(iy+p,p,yp',vo,2);
    else
    toto=toto+p;
    [N]=NURBSBasisFunc(toto,p,yp',vo,2);
    end

	Sel=length(yp);
    for ip=1:(p+1)
        if type_nurbs
        indn(nel+(1:Sel))=iy+ip-1;
        else
        indn(nel+(1:Sel))=iy*p-p+ip;
        end            
        indp(nel+(1:Sel))=found;
		val(nel+(1:Sel))=N(:,ip,1);
		dval(nel+(1:Sel))=N(:,ip,2);
		ddval(nel+(1:Sel))=N(:,ip,3);
        nel=nel+Sel;
    end
end
found=find(indp);
indp=indp(found);
indn=indn(found);
val=val(found);
dval=dval(found);
ddval=ddval(found);
if isclosed
    for ip=1:p
    found=find(indn==Nny-ip+1);
    indn(found)=p-ip+1;
    end
    Nny=Nny-p;
end
if isempty(nband)
    size1=npt;
else
    indp=nband(indp);
    size1=prod(sizeim);
end
phi=sparse(indp,indn,val,size1,Nny);
dphi=sparse(indp,indn,dval,size1,Nny);
ddphi=sparse(indp,indn,ddval,size1,Nny);

end

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