Home
last modified time | relevance | path

Searched refs:dir (Results 1 – 25 of 119) sorted by relevance

12345

/petsc/src/ksp/pc/impls/factor/lu/
H A Dlu.c42 PC_LU *dir = (PC_LU *)pc->data; in PCSetUp_LU() local
49 if (dir->hdr.reusefill && pc->setupcalled) ((PC_Factor *)dir)->info.fill = dir->hdr.actualfill; in PCSetUp_LU()
55 if (dir->hdr.inplace) { in PCSetUp_LU()
60 if (dir->row && dir->col && dir->row != dir->col) PetscCall(ISDestroy(&dir->row)); in PCSetUp_LU()
61 PetscCall(ISDestroy(&dir->col)); in PCSetUp_LU()
64 PetscCall(MatGetOrdering(pc->pmat, ((PC_Factor *)dir)->ordering, &dir->row, &dir->col)); in PCSetUp_LU()
65 PetscCall(MatLUFactor(pc->pmat, dir->row, dir->col, &((PC_Factor *)dir)->info)); in PCSetUp_LU()
72 ((PC_Factor *)dir)->fact = pc->pmat; in PCSetUp_LU()
80 PetscCall(MatFactorGetCanUseOrdering(((PC_Factor *)dir)->fact, &canuseordering)); in PCSetUp_LU()
85 PetscCall(PetscStrcmp(((PC_Factor *)dir)->ordering, MATORDERINGEXTERNAL, &external)); in PCSetUp_LU()
[all …]
/petsc/src/ksp/pc/impls/factor/cholesky/
H A Dcholesky.c25 PC_Cholesky *dir = (PC_Cholesky *)pc->data; in PCSetUp_Cholesky() local
32 if (dir->hdr.reusefill && pc->setupcalled) ((PC_Factor *)dir)->info.fill = dir->hdr.actualfill; in PCSetUp_Cholesky()
38 if (dir->hdr.inplace) { in PCSetUp_Cholesky()
43 if (dir->row && dir->col && (dir->row != dir->col)) PetscCall(ISDestroy(&dir->row)); in PCSetUp_Cholesky()
44 PetscCall(ISDestroy(&dir->col)); in PCSetUp_Cholesky()
47 PetscCall(MatGetOrdering(pc->pmat, ((PC_Factor *)dir)->ordering, &dir->row, &dir->col)); in PCSetUp_Cholesky()
48 if (dir->col && (dir->row != dir->col)) { /* only use row ordering for SBAIJ */ in PCSetUp_Cholesky()
49 PetscCall(ISDestroy(&dir->col)); in PCSetUp_Cholesky()
51 PetscCall(MatCholeskyFactor(pc->pmat, dir->row, &((PC_Factor *)dir)->info)); in PCSetUp_Cholesky()
58 ((PC_Factor *)dir)->fact = pc->pmat; in PCSetUp_Cholesky()
[all …]
/petsc/src/ksp/pc/impls/factor/qr/
H A Dqr.c10 PC_QR *dir = (PC_QR *)pc->data; in PCSetUp_QR() local
19 if (dir->hdr.reusefill && pc->setupcalled) ((PC_Factor *)dir)->info.fill = dir->hdr.actualfill; in PCSetUp_QR()
22 if (dir->hdr.inplace) { in PCSetUp_QR()
27 PetscCall(MatQRFactor(pc->pmat, dir->col, &((PC_Factor *)dir)->info)); in PCSetUp_QR()
34 ((PC_Factor *)dir)->fact = pc->pmat; in PCSetUp_QR()
39 …if (!((PC_Factor *)dir)->fact) PetscCall(MatGetFactor(pc->pmat, ((PC_Factor *)dir)->solvertype, MA… in PCSetUp_QR()
40 …PetscCall(MatQRFactorSymbolic(((PC_Factor *)dir)->fact, pc->pmat, dir->col, &((PC_Factor *)dir)->i… in PCSetUp_QR()
41 PetscCall(MatGetInfo(((PC_Factor *)dir)->fact, MAT_LOCAL, &info)); in PCSetUp_QR()
42 dir->hdr.actualfill = info.fill_ratio_needed; in PCSetUp_QR()
44 …PetscCall(MatQRFactorSymbolic(((PC_Factor *)dir)->fact, pc->pmat, dir->col, &((PC_Factor *)dir)->i… in PCSetUp_QR()
[all …]
/petsc/src/sys/fileio/
H A Dfdir.c43 PetscErrorCode PetscMkdir(const char dir[]) in PetscMkdir() argument
49 PetscCall(PetscTestDirectory(dir, 'w', &flg)); in PetscMkdir()
52 err = _mkdir(dir); in PetscMkdir()
54 err = mkdir(dir, S_IRWXU | S_IRGRP | S_IXGRP); in PetscMkdir()
56 PetscCheck(!err, PETSC_COMM_SELF, PETSC_ERR_FILE_UNEXPECTED, "Could not create dir: %s", dir); in PetscMkdir()
70 PetscErrorCode PetscMkdtemp(char dir[]) in PetscMkdtemp() argument
81 PetscCall(PetscStrncpy(name, dir, sizeof(name))); in PetscMkdtemp()
84 …M_SELF, PETSC_ERR_FILE_UNEXPECTED, "Could not generate a unique name using the template: %s", dir); in PetscMkdtemp()
88 …_UNEXPECTED, "Exceeds maximum retry time when creating temporary dir using the template: %s", dir); in PetscMkdtemp()
89 PetscCall(PetscStrncpy(dir, name, len + 1)); in PetscMkdtemp()
[all …]
H A Dghome.c26 PetscErrorCode PetscGetHomeDirectory(char dir[], size_t maxlen) in PetscGetHomeDirectory() argument
32 if (d1) PetscCall(PetscStrncpy(dir, d1, maxlen)); in PetscGetHomeDirectory()
33 else if (maxlen > 0) dir[0] = 0; in PetscGetHomeDirectory()
/petsc/config/PETSc/options/
H A Dpetscdir.py14 return ' PETSC_DIR: '+str(self.dir)+'\n'
25 self.dir = os.path.normpath(self.framework.argDB['PETSC_DIR'])
29 self.dir = os.path.normpath(os.environ['PETSC_DIR'])
33 self.dir = os.getcwd()
37 if self.dir == 'pwd':
39 elif self.dir.find(' ') > -1:
40 …s is not allowed. Change the directory with PETSc to not have spaces in it'.format(msg1, self.dir))
41 elif not os.path.isabs(self.dir):
42 …se absolute path - i.e: {2} PETSC_DIR={3}'.format(msg1, self.dir, msg2, os.path.abspath(self.dir)))
43 elif not os.path.isdir(self.dir):
[all …]
H A DinstallDir.py11 self.dir = ''
16 return ' Prefix: ' + self.dir + '\n'
36 self.dir = os.path.abspath(os.path.expanduser(self.framework.argDB['prefix']))
37 self.petscDir = self.dir
40 os.makedirs(os.path.join(self.dir,'PETScTestDirectory'))
41 os.rmdir(os.path.join(self.dir,'PETScTestDirectory'))
46 self.dir = os.path.abspath(os.path.join(self.petscdir.dir, self.arch.arch))
47 self.petscDir = self.petscdir.dir
49 self.addMakeMacro('PREFIXDIR',self.dir)
50 self.confDir = os.path.abspath(os.path.join(self.petscdir.dir, self.arch.arch))
[all …]
H A Dpetscclone.py21 if os.path.exists(os.path.join(self.petscdir.dir,'lib','petsc','bin','maint')):
23 if os.path.exists(os.path.join(self.petscdir.dir, '.git')):
26 …ntrol.git, 'describe', '--match=v*'],checkCommand = noCheck, log = self.log, cwd=self.petscdir.dir)
27 …, 'log', '-1', '--pretty=format:%H'],checkCommand = noCheck, log = self.log, cwd=self.petscdir.dir)
28 … 'log', '-1', '--pretty=format:%ci'],checkCommand = noCheck, log = self.log, cwd=self.petscdir.dir)
29 …'rev-parse', '--abbrev-ref', 'HEAD'],checkCommand = noCheck, log = self.log, cwd=self.petscdir.dir)
30 …ol.git, 'status', '--short', '-uno'],checkCommand = noCheck, log = self.log, cwd=self.petscdir.dir)
44 if os.path.exists(os.path.join(self.petscdir.dir, '.git')):
H A Dexternalpackagesdir.py18 self.dir = os.path.join(os.path.abspath(os.path.join(self.arch.arch)), 'externalpackages')
20 self.dir = os.path.join(self.framework.externalPackagesDir,self.arch.arch)
26 if self.framework.argDB['with-clean'] and os.path.isdir(self.dir):
27 …lf.logPrintWarning('"with-clean" is specified. Removing all externalpackage files from '+ self.dir)
28 shutil.rmtree(self.dir)
/petsc/config/BuildSystem/config/packages/
H A DBlasLapack.py323 dir = self.argDB['with-blaslapack-dir']
325 if os.path.realpath(dir).find(os.path.realpath(self.externalPackagesDir)) >=0:
326 …fakeExternalPackagesDir = dir.replace(os.path.realpath(dir).replace(os.path.realpath(self.external…
331 …pecified installation root (F2CBLASLAPACK)', os.path.join(dir,'libf2cblas.a'), os.path.join(dir, '…
332 …('__float128 precision requires f2c libraries; they are not available in '+dir+'; suggest --downlo…
334 if not (len(dir) > 2 and dir[1] == ':') :
335 dir = os.path.abspath(dir)
336 self.log.write('Looking for BLAS/LAPACK in user specified directory: '+dir+'\n')
337 self.log.write('Files and directories in that directory:\n'+str(os.listdir(dir))+'\n')
357 if not os.path.exists(os.path.join(dir,libdir)):
[all …]
/petsc/src/sys/classes/viewer/impls/ams/
H A Damsopen.c63 char dir[1024]; in PetscObjectViewSAWs() local
74 PetscCall(PetscSNPrintf(dir, 1024, "/PETSc/Objects/%s/Class", obj->name)); in PetscObjectViewSAWs()
75 PetscCallSAWs(SAWs_Register, (dir, &obj->class_name, 1, SAWs_READ, SAWs_STRING)); in PetscObjectViewSAWs()
76 PetscCall(PetscSNPrintf(dir, 1024, "/PETSc/Objects/%s/Type", obj->name)); in PetscObjectViewSAWs()
77 PetscCallSAWs(SAWs_Register, (dir, &obj->type_name, 1, SAWs_READ, SAWs_STRING)); in PetscObjectViewSAWs()
78 PetscCall(PetscSNPrintf(dir, 1024, "/PETSc/Objects/%s/__Id", obj->name)); in PetscObjectViewSAWs()
79 PetscCallSAWs(SAWs_Register, (dir, &obj->id, 1, SAWs_READ, SAWs_INT)); in PetscObjectViewSAWs()
/petsc/lib/petsc/bin/
H A Dpetscversion10 dir=$(dirname "$0")
11 dir=$(dirname "$dir")
12 dir=$(dirname "$dir")
13 PETSC_DIR=$(dirname "$dir")
H A Dgeneratefortranbindings.py227 dir = os.path.join(petscarch,'ftn',fun.mansec.lower(),'stubs')
230 dir = os.path.join(petscarch,fun.dir.replace('src/','ftn/'))
233 dir = os.path.join(fun.dir,'ftn-custom')
235 if not os.path.isdir(dir): os.makedirs(dir)
237 with open(os.path.join(dir,filename.replace('.c','f.c')),'a') as fd:
432 shutil.copy(os.path.join(fun.dir,'makefile'), os.path.join(dir,'makefile'))
434 with open(os.path.join(fun.dir,'makefile')) as fin:
435 with open(os.path.join(dir,'makefile'),'w') as fout:
437 output = check_output('git add ' + os.path.join(dir,'makefile'), shell=True).decode('utf-8')
438 …print('Fix the manual stub for ' + fun.name + ' in ' + os.path.join(dir,filename.replace('.c','f.c…
[all …]
/petsc/src/ksp/pc/impls/gamg/
H A Dutil.c27 PetscInt nnodes, num_ghosts, dir, kk, jj, my0, Iend, nloc; in PCGAMGGetDataWithGhosts() local
44 for (dir = 0; dir < data_sz; dir++) { in PCGAMGGetDataWithGhosts()
48 PetscScalar crd = data_in[dir * nloc + kk]; /* col oriented */ in PCGAMGGetDataWithGhosts()
49 datas[dir * nnodes + kk] = PetscRealPart(crd); // get local part now in PCGAMGGetDataWithGhosts()
59 …for (kk = nloc, jj = 0; jj < num_ghosts; kk++, jj++) datas[dir * nnodes + kk] = PetscRealPart(data… in PCGAMGGetDataWithGhosts()
/petsc/src/ksp/ksp/tutorials/
H A Dex75.c15 char dir[PETSC_MAX_PATH_LEN], name[256]; in main() local
20 PetscCall(PetscStrncpy(dir, ".", sizeof(dir))); in main()
21 PetscCall(PetscOptionsGetString(NULL, NULL, "-load_dir", dir, sizeof(dir), NULL)); in main()
29 PetscCall(PetscSNPrintf(name, sizeof(name), "%s/A_%" PetscInt_FMT ".dat", dir, j)); in main()
34 PetscCall(PetscSNPrintf(name, sizeof(name), "%s/rhs_%" PetscInt_FMT ".dat", dir, j)); in main()
H A Dex75f.F9017 character*(PETSC_MAX_PATH_LEN) dir, name
24 dir = '.'
25 …PetscCallA(PetscOptionsGetString(PETSC_NULL_OPTIONS, PETSC_NULL_CHARACTER, '-load_dir', dir, flg, …
36 write (name, '(a)') trim(dir)//'/A_'//cmat//'.dat'
43 write (name, '(a)') trim(dir)//'/rhs_'//cmat//'.dat'
H A Dex76.c18 char dir[PETSC_MAX_PATH_LEN], name[PETSC_MAX_PATH_LEN], type[256]; in main() local
30 PetscCall(PetscStrncpy(dir, ".", sizeof(dir))); in main()
31 PetscCall(PetscOptionsGetString(NULL, NULL, "-load_dir", dir, sizeof(dir), NULL)); in main()
33 PetscCall(PetscSNPrintf(name, sizeof(name), "%s/sizes_%d.dat", dir, size)); in main()
45 PetscCall(PetscSNPrintf(name, sizeof(name), "%s/A.dat", dir)); in main()
49 PetscCall(PetscSNPrintf(name, sizeof(name), "%s/is_%d.dat", dir, size)); in main()
63 PetscCall(PetscSNPrintf(name, sizeof(name), "%s/Neumann_%d.dat", dir, size)); in main()
246 PetscCall(PetscSNPrintf(name, sizeof(name), "%s/sizes_%d.dat", dir, size)); in main()
257 PetscCall(PetscSNPrintf(name, sizeof(name), "%s/is_%d.dat", dir, size)); in main()
271 PetscCall(PetscSNPrintf(name, sizeof(name), "%s/Neumann_%d.dat", dir, size)); in main()
[all …]
H A Dex76f.F9018 character*(PETSC_MAX_PATH_LEN) dir, name
31 dir = '.'
32 …PetscCallA(PetscOptionsGetString(PETSC_NULL_OPTIONS, PETSC_NULL_CHARACTER, '-load_dir', dir, flg, …
34 write (name, '(a,a,i0,a)') trim(dir), '/sizes_', size, '.dat'
46 write (name, '(a,a)') trim(dir), '/A.dat'
50 write (name, '(a,a,i0,a)') trim(dir), '/is_', size, '.dat'
62 write (name, '(a,a,i0,a)') trim(dir), '/Neumann_', size, '.dat'
/petsc/src/ksp/pc/impls/factor/
H A Dfactimpl.c26 PC_Factor *dir = (PC_Factor *)pc->data; in PCFactorSetShiftType_Factor() local
29 …if (shifttype == (MatFactorShiftType)PETSC_DECIDE) dir->info.shifttype = (PetscReal)MAT_SHIFT_NONE; in PCFactorSetShiftType_Factor()
31 dir->info.shifttype = (PetscReal)shifttype; in PCFactorSetShiftType_Factor()
32 …== MAT_SHIFT_NONZERO || shifttype == MAT_SHIFT_INBLOCKS) && dir->info.shiftamount == 0.0) dir->inf… in PCFactorSetShiftType_Factor()
39 PC_Factor *dir = (PC_Factor *)pc->data; in PCFactorSetShiftAmount_Factor() local
42 if (shiftamount == (PetscReal)PETSC_DECIDE) dir->info.shiftamount = 100.0 * PETSC_MACHINE_EPSILON; in PCFactorSetShiftAmount_Factor()
43 else dir->info.shiftamount = shiftamount; in PCFactorSetShiftAmount_Factor()
63 PC_Factor *dir = (PC_Factor *)pc->data; in PCFactorSetFill_Factor() local
66 dir->info.fill = fill; in PCFactorSetFill_Factor()
72 PC_Factor *dir = (PC_Factor *)pc->data; in PCFactorSetMatOrderingType_Factor() local
[all …]
/petsc/doc/
H A Dbuild_man_examples_links.py6 def processfile(petsc_dir,dir,file,keyre,mdict,uses): argument
9 with open(os.path.join(dir,file),'r') as fd:
14 uses[i[1:-1]].append(os.path.join(dir,file))
16 def processdir(petsc_dir,dir,keyre,mdict,uses): argument
19 for file in os.listdir(dir):
20 …isfile(os.path.join(dir,file)) and (file.endswith('.c') or file.endswith('.cxx') or file.endswith(…
H A Dbuild_man_pages.py29 def processdir(petsc_dir, build_dir, dir, doctext): argument
34 if os.path.isfile(os.path.join(dir,'makefile')):
35 lmansec = findlmansec(os.path.join(dir,'makefile'))
38 for file in os.listdir(dir):
40 …if os.path.isfile(os.path.join(dir,file)) and pathlib.Path(file).suffix in ['.c', '.cxx', '.h', '.…
43 llmansec = findlmansec(os.path.join(dir,file))
54 '-locdir', dir[len(petsc_dir)+1:]+'/',
57 sp = subprocess.run(command, cwd=dir, capture_output=True, encoding='UTF-8', check=True)
/petsc/src/dm/impls/da/ftn-custom/
H A Dzdasubf.c12 PETSC_EXTERN void dmdagetprocessorsubset_(DM *da, DMDirection *dir, PetscInt *gp, MPI_Fint *fcomm, … in dmdagetprocessorsubset_() argument
15 *__ierr = DMDAGetProcessorSubset(*da, *dir, *gp, &comm); in dmdagetprocessorsubset_()
18 PETSC_EXTERN void dmdagetprocessorsubsets_(DM *da, DMDirection *dir, MPI_Fint *subfcomm, int *__ier… in dmdagetprocessorsubsets_() argument
21 *__ierr = DMDAGetProcessorSubsets(*da, *dir, &subcomm); in dmdagetprocessorsubsets_()
/petsc/src/dm/impls/da/
H A Ddasub.c103 PetscErrorCode DMDAGetRay(DM da, DMDirection dir, PetscInt gp, Vec *newvec, VecScatter *scatter) in DMDAGetRay() argument
118 if (dir == DM_X) { in DMDAGetRay()
129 …PetscCheck(dir != DM_Y, PetscObjectComm((PetscObject)da), PETSC_ERR_SUP, "Cannot get Y slice from … in DMDAGetRay()
133 if (dir == DM_Y) { in DMDAGetRay()
144 } else if (dir == DM_X) { in DMDAGetRay()
199 PetscErrorCode DMDAGetProcessorSubset(DM da, DMDirection dir, PetscInt gp, MPI_Comm *comm) in DMDAGetProcessorSubset() argument
212 if (dir == DM_Z) { in DMDAGetProcessorSubset()
216 } else if (dir == DM_Y) { in DMDAGetProcessorSubset()
220 } else if (dir == DM_X) { in DMDAGetProcessorSubset()
228 …cessorSubset: dim=%" PetscInt_FMT ", direction=%d, procs: ", da->dim, (int)dir)); /* checkbadSourc… in DMDAGetProcessorSubset()
[all …]
/petsc/src/sys/ams/
H A Dpams.c129 char dir[PETSC_MAX_PATH_LEN]; in PetscObjectSAWsViewOff() local
134 PetscCall(PetscSNPrintf(dir, sizeof(dir), "/PETSc/Objects/%s", obj->name)); in PetscObjectSAWsViewOff()
135 PetscCallSAWs(SAWs_Delete, (dir)); in PetscObjectSAWsViewOff()
/petsc/share/petsc/matlab/@PetscOpenFile/
H A DPetscOpenFile.m18 dir = fileparts(filename) variable
19 if and(not(isempty(dir)),not(isfolder(dir)))
20 error(strcat('Directory ',dir,' does not exist to write file ',filename,'into'))

12345