Home
last modified time | relevance | path

Searched refs:fh (Results 1 – 11 of 11) sorted by relevance

/petsc/lib/petsc/bin/
H A DPetscBinaryIO.py237 def readReal(self, fh): argument
241 vals = np.fromfile(fh, dtype=self._scalartype, count=1)
249 def readVec(self, fh): argument
252 nz = np.fromfile(fh, dtype=self._inttype, count=1)[0]
254 vals = np.fromfile(fh, dtype=self._scalartype, count=nz)
262 def writeVec(self, fh, vec): argument
266 metadata.tofile(fh)
267 vec.astype(self._scalartype).tofile(fh)
271 def readMatSparse(self, fh): argument
285 M,N,nz = np.fromfile(fh, dtype=self._inttype, count=3)
[all …]
H A DPetscBinaryIOTrajectory.py22 fh = open(os.path.join(directory,'SA-%06d.bin'%cnt));
24 objecttype = io.readObjectType(fh)
25 v.append(io.readVec(fh))
26 t.append(np.fromfile(fh, dtype=io._scalartype, count=1)[0])
32 fh = open(os.path.join(directory,'variablenames'))
33 nstrings = np.fromfile(fh, dtype=io._inttype, count=1)[0]
34 sizes = np.fromfile(fh, dtype=io._inttype, count=nstrings)
36 s = np.fromfile(fh, dtype=np.byte, count=sizes[i])
/petsc/src/binding/petsc4py/demo/legacy/kspsolve/
H A Dtest_mat_ksp.py5 fh = open(file, "r")
6 try: exec(fh.read()+"\n", globals, locals)
7 finally: fh.close()
H A Dtest_mat_cg.py5 fh = open(file, "r")
6 try: exec(fh.read()+"\n", globals, locals)
7 finally: fh.close()
/petsc/config/
H A Dgmakegentest.py486 def _writeTodoSkip(self,fh,tors,reasons,footer): argument
496 fh.write('if ! $force; then\n')
500 fh.write(tab + 'if test -z "${DATAFILESPATH}"; then\n')
503 fh.write(tab+tsStr+"\n" + tab + "total=1; "+tors+"=1\n")
504 fh.write(tab+footer+"\n")
505 fh.write(tab+"exit\n")
507 fh.write(' fi\n')
509 fh.write('fi\n')
510 fh.write('\n\n')
558 with open(os.path.join(runscript_dir,testname+".sh"),"w",opener=opener) as fh:
[all …]
/petsc/lib/petsc/bin/maint/
H A Dexampleslog.py90 fh=os.popen(git_authorname_cmd)
91 output=fh.read(); fh.close
152 fh=open(outprefix+branch+".csv","w")
160 fh.write(fname+c+test+c+str(ndays)+fdate)
162 fh.close()
/petsc/
H A Dsetup.py100 with open(os.path.join(pkgdir, pyfile), 'w') as fh:
101 fh.write(contents)
/petsc/lib/petsc/bin/maint/petsclinter/petsclinter/classes/docs/
H A D_doc_section.py162 with open(cursor.get_file()) as fh:
163 … gen = (l.strip() for l in fh if l.lstrip().startswith('#') and 'include' in l and '/*' in l)
/petsc/src/binding/petsc4py/conf/
H A Dconfpetsc.py724 with open(filename, 'w') as fh:
725 fh.write(config_data)
/petsc/src/sys/objects/
H A Doptions.c435 FILE *fh = fopen(filename, "r"); in PetscOptionsFilename() local
436 if (fh) { in PetscOptionsFilename()
438 if (fread(buf, 1, 6, fh) > 0) { in PetscOptionsFilename()
442 (void)fclose(fh); in PetscOptionsFilename()
/petsc/src/snes/interface/
H A Dsnes.c5329 Vec u, uh, fh; in SNESTestLocalMin() local
5336 PetscCall(VecDuplicate(u, &fh)); in SNESTestLocalMin()
5347 PetscCall(SNESComputeFunction(snes, uh, fh)); in SNESTestLocalMin()
5348 …PetscCall(VecNorm(fh, NORM_2, &norm)); /* does not handle use of SNESSetFunctionDomainError() corr… in SNESTestLocalMin()
5355 PetscCall(VecDestroy(&fh)); in SNESTestLocalMin()