| /petsc/src/sys/classes/draw/utils/ |
| H A D | axisc.c | 391 PetscErrorCode PetscStripe0(char *buf) in PetscStripe0() argument 398 PetscCall(PetscStrlen(buf, &n)); in PetscStripe0() 399 PetscCall(PetscStrendswith(buf, "e00", &flg)); in PetscStripe0() 400 if (flg) buf[n - 3] = 0; in PetscStripe0() 401 PetscCall(PetscStrstr(buf, "e0", &str)); in PetscStripe0() 403 buf[n - 2] = buf[n - 1]; in PetscStripe0() 404 buf[n - 1] = 0; in PetscStripe0() 406 PetscCall(PetscStrstr(buf, "e-0", &str)); in PetscStripe0() 408 buf[n - 2] = buf[n - 1]; in PetscStripe0() 409 buf[n - 1] = 0; in PetscStripe0() [all …]
|
| H A D | axis.c | 10 static char buf[40]; in PetscADefLabel() local 15 buf[0] = '0'; in PetscADefLabel() 16 buf[1] = 0; in PetscADefLabel() 18 PetscCall(PetscSNPrintf(buf, PETSC_STATIC_ARRAY_LENGTH(buf), "%0.1e", (double)val)); in PetscADefLabel() 19 PetscCall(PetscStripZerosPlus(buf)); in PetscADefLabel() 20 PetscCall(PetscStripe0(buf)); in PetscADefLabel() 21 PetscCall(PetscStripInitialZero(buf)); in PetscADefLabel() 22 PetscCall(PetscStripAllZeros(buf)); in PetscADefLabel() 23 PetscCall(PetscStripTrailingZeros(buf)); in PetscADefLabel() 25 *p = buf; in PetscADefLabel()
|
| /petsc/config/BuildSystem/config/ |
| H A D | preTests.py | 23 buf = os.popen('/usr/bin/cygcheck.exe -c cygwin').read() 24 if buf.find('1.5.11-1') > -1: 35 buf = os.popen('/usr/bin/cygcheck.exe -c python').read() 36 if buf.find('2.4') > -1: 49 buf = file.read() 54 if buf.find('Shrike') > -1:
|
| /petsc/lib/petsc/bin/maint/ |
| H A D | bk2hg.py | 24 buf = fd.read() 27 return buf.splitlines()[0].split(':')[2] 103 buf=fd.read() 105 if buf == '': 108 elif buf.splitlines()[0].find(' -1:') >=0: 113 for line in buf.splitlines(): 133 buf=fd.read() 135 revs=buf.splitlines() 169 buf=fd.read() 171 msg = 'bk-changeset-'+revn + '\n' + rev + '\n'+ buf.strip() + '\n' [all …]
|
| H A D | bk2darcs.py | 77 buf=fd.read() 79 if buf == '': 82 bk_cset_min = buf.splitlines()[2].strip() 96 buf=fd.read() 98 revs=buf.splitlines() 129 buf=fd.read() 131 msg = 'bk-changeset-'+revn + '\n' + rev + '\n'+ buf.strip() + '\n'
|
| /petsc/src/dm/impls/plex/ |
| H A D | gmshlex.h | 72 int i, j, *sub, buf[SN2(GMSH_MAX_ORDER)]; in GmshLexOrder_TRI() local 87 node = GmshLexOrder_TRI(p - 3, sub = buf, node); in GmshLexOrder_TRI() 100 int i, j, *sub, buf[BN2(GMSH_MAX_ORDER)]; in GmshLexOrder_QUA() local 116 node = GmshLexOrder_QUA(p - 2, sub = buf, node); in GmshLexOrder_QUA() 130 int i, j, k, *sub, buf[SN3(GMSH_MAX_ORDER)]; in GmshLexOrder_TET() local 149 node = GmshLexOrder_TRI(p - 3, sub = buf, node); in GmshLexOrder_TET() 151 node = GmshLexOrder_TRI(p - 3, sub = buf, node); in GmshLexOrder_TET() 153 node = GmshLexOrder_TRI(p - 3, sub = buf, node); in GmshLexOrder_TET() 155 node = GmshLexOrder_TRI(p - 3, sub = buf, node); in GmshLexOrder_TET() 159 node = GmshLexOrder_TET(p - 4, sub = buf, node); in GmshLexOrder_TET() [all …]
|
| H A D | plexgmsh.c | 212 static PetscErrorCode GmshBufferGet(GmshFile *gmsh, PetscCount count, size_t eltsize, void *buf) in GmshBufferGet() argument 222 *(void **)buf = size ? gmsh->wbuf : NULL; in GmshBufferGet() 229 static PetscErrorCode GmshBufferSizeGet(GmshFile *gmsh, PetscCount count, void *buf) in GmshBufferSizeGet() argument 240 *(void **)buf = size ? gmsh->sbuf : NULL; in GmshBufferSizeGet() 247 static PetscErrorCode GmshRead(GmshFile *gmsh, void *buf, PetscCount count, PetscDataType dtype) in GmshRead() argument 253 PetscCall(PetscViewerRead(gmsh->viewer, buf, icount, NULL, dtype)); in GmshRead() 254 if (gmsh->byteSwap) PetscCall(PetscByteSwap(buf, dtype, icount)); in GmshRead() 258 static PetscErrorCode GmshReadString(GmshFile *gmsh, char *buf, PetscCount count) in GmshReadString() argument 264 PetscCall(PetscViewerRead(gmsh->viewer, buf, icount, NULL, PETSC_STRING)); in GmshReadString() 314 static PetscErrorCode GmshReadPetscInt(GmshFile *gmsh, PetscInt *buf, PetscCount count) in GmshReadPetscInt() argument [all …]
|
| /petsc/include/petsc/mpiuni/ |
| H A D | mpi.h | 414 …#define MPI_Send(buf, count, datatype, dest, tag, comm) (M… argument 416 …#define MPI_Recv(buf, count, datatype, source, tag, comm, status) (M… argument 419 …#define MPI_Bsend(buf, count, datatype, dest, tag, comm) (M… argument 420 …#define MPI_Ssend(buf, count, datatype, dest, tag, comm) (M… argument 421 …#define MPI_Rsend(buf, count, datatype, dest, tag, comm) (M… argument 424 …#define MPI_Ibsend(buf, count, datatype, dest, tag, comm, request) (M… argument 425 …#define MPI_Issend(buf, count, datatype, dest, tag, comm, request) (M… argument 426 …#define MPI_Irsend(buf, count, datatype, dest, tag, comm, request) (M… argument 428 …#define MPI_Irecv(buf, count, datatype, source, tag, comm, request) (M… argument 430 …#define MPI_Isend(buf, count, datatype, dest, tag, comm, request) (M… argument [all …]
|
| /petsc/src/vec/is/sf/tutorials/ |
| H A D | ex1.c | 198 char buf[256]; in main() local 212 PetscCall(PetscSNPrintf(buf, 256, "%4d:", rank)); in main() 215 PetscCall(PetscSNPrintf(buf + len, 256 - len, "%5c", rootdata[i])); in main() 218 PetscCall(PetscSynchronizedPrintf(PETSC_COMM_WORLD, "%s\n", buf)); in main() 223 PetscCall(PetscSNPrintf(buf, 256, "%4d:", rank)); in main() 226 PetscCall(PetscSNPrintf(buf + len, 256 - len, "%5c", leafdata[i])); in main() 229 PetscCall(PetscSynchronizedPrintf(PETSC_COMM_WORLD, "%s\n", buf)); in main() 281 char buf[256]; in main() local 293 PetscCall(PetscSNPrintf(buf, 256, "%4d:", rank)); in main() 296 PetscCall(PetscSNPrintf(buf + len, 256 - len, "%5d", rootdata[i])); in main() [all …]
|
| /petsc/src/mat/impls/localref/ |
| H A D | mlocalref.c | 12 #define IndexSpaceGet(buf, nrow, ncol, irowm, icolm) \ argument 14 if (nrow + ncol > (PetscInt)PETSC_STATIC_ARRAY_LENGTH(buf)) { \ 17 irowm = &buf[0]; \ 18 icolm = &buf[nrow]; \ 22 #define IndexSpaceRestore(buf, nrow, ncol, irowm, icolm) \ argument 24 … if (nrow + ncol > (PetscInt)PETSC_STATIC_ARRAY_LENGTH(buf)) PetscCall(PetscFree2(irowm, icolm)); \ 38 PetscInt buf[4096], *irowm = NULL, *icolm; /* suppress maybe-uninitialized warning */ in MatSetValuesBlockedLocal_LocalRef_Block() local 42 IndexSpaceGet(buf, nrow, ncol, irowm, icolm); in MatSetValuesBlockedLocal_LocalRef_Block() 46 IndexSpaceRestore(buf, nrow, ncol, irowm, icolm); in MatSetValuesBlockedLocal_LocalRef_Block() 53 PetscInt rbs, cbs, buf[4096], *irowm, *icolm; in MatSetValuesBlockedLocal_LocalRef_Scalar() local [all …]
|
| /petsc/src/tao/leastsquares/tutorials/matlab/ |
| H A D | matlab_ls_test.c | 56 char buf[1024]; in TaoPounders() local 60 PetscCall(PetscSNPrintf(buf, PETSC_STATIC_ARRAY_LENGTH(buf), "%d", user->npmax)); in TaoPounders() 61 PetscCall(PetscOptionsSetValue(NULL, "-tao_pounders_npmax", buf)); in TaoPounders() 62 PetscCall(PetscSNPrintf(buf, PETSC_STATIC_ARRAY_LENGTH(buf), "%5.4e", user->delta)); in TaoPounders() 63 PetscCall(PetscOptionsSetValue(NULL, "-tao_pounders_delta", buf)); in TaoPounders()
|
| /petsc/src/sys/classes/draw/interface/ |
| H A D | dsave.c | 42 char buf[PETSC_MAX_PATH_LEN]; in PetscDrawSetSave() local 56 PetscCall(PetscStrncpy(buf, filename, sizeof(buf))); in PetscDrawSetSave() 57 buf[l1 - l2 + 1] = '\0'; in PetscDrawSetSave() 58 savename = buf; in PetscDrawSetSave() 143 char buf[PETSC_MAX_PATH_LEN]; in PetscDrawSetSaveFinalImage() local 151 PetscCall(PetscSNPrintf(buf, sizeof(buf), "%s%s", draw->savefilename, draw->saveimageext)); in PetscDrawSetSaveFinalImage() 152 filename = buf; in PetscDrawSetSaveFinalImage()
|
| /petsc/src/sys/objects/ |
| H A D | prefix.c | 182 char *buf; in PetscObjectPrependOptionsPrefix() local 196 buf = obj->prefix; in PetscObjectPrependOptionsPrefix() 200 PetscCall(PetscStrncpy(obj->prefix + len1, buf, len2 + 1)); in PetscObjectPrependOptionsPrefix() 201 PetscCall(PetscFree(buf)); in PetscObjectPrependOptionsPrefix()
|
| H A D | optionsyaml.c | 81 char *buf, *strlist; in PetscParseLayerYAML() local 126 PetscCall(PetscSegBufferGet(seg, 1, &buf)); in PetscParseLayerYAML() 127 PetscCall(PetscArraycpy(buf, ",", 1)); in PetscParseLayerYAML() 129 PetscCall(PetscSegBufferGet(seg, itemlen, &buf)); in PetscParseLayerYAML() 130 PetscCall(PetscArraycpy(buf, itemstr, itemlen)); in PetscParseLayerYAML() 134 PetscCall(PetscSegBufferGet(seg, 1, &buf)); in PetscParseLayerYAML() 135 PetscCall(PetscArrayzero(buf, 1)); in PetscParseLayerYAML()
|
| /petsc/src/sys/objects/device/impls/ |
| H A D | impldevicebase.hpp | 136 auto buf = std::array<char, 128>{}; in PetscOptionDevice() 137 constexpr auto buflen = buf.size() - 1; in PetscOptionDevice() 145 PetscCall(PetscSNPrintf(buf.data(), buflen, "%s%s", optstub, implname)); in PetscOptionDevice() 146 PetscCall(OptionsFunction(PetscOptionsObject, buf.data(), std::forward<T>(args)...)); in PetscOptionDevice() 220 auto buf = std::array<char, 128>{}; in PetscOptionDeviceAll() 221 constexpr auto buflen = buf.size() - 1; // -1 to leave room for null in PetscOptionDeviceAll() 230 PetscCall(PetscSNPrintf(buf.data(), buflen, optname, implname)); in PetscOptionDeviceAll() 231 PetscOptionsBegin(comm, nullptr, buf.data(), "Sys"); in PetscOptionDeviceAll()
|
| /petsc/src/sys/tests/ |
| H A D | ex8.c | 65 Unit *buf; in FRecv() local 69 PetscCall(PetscSegBufferGet(fctx->seg, 1, &buf)); in FRecv() 70 PetscCallMPI(MPI_Irecv(&buf->rank, 1, MPIU_INT, rank, tag[0], comm, &req[0])); in FRecv() 71 PetscCallMPI(MPI_Irecv(&buf->value, 1, MPIU_SCALAR, rank, tag[1], comm, &req[1])); in FRecv() 72 buf->ok[0] = 'o'; in FRecv() 73 buf->ok[1] = 'k'; in FRecv() 74 buf->ok[2] = 0; in FRecv()
|
| H A D | ex64.cxx | 56 PetscErrorCode to_string(std::string &buf) const noexcept in to_string() 59 PetscCallCXX(buf = std::to_string(x) + ", " + std::to_string(y)); in to_string() 86 PetscErrorCode to_string(std::string &buf) const noexcept in to_string() 89 PetscCallCXX(buf = '<'); in to_string() 91 PetscCallCXX(buf += std::to_string(x[i])); in to_string() 92 if (i + 1 != x.size()) PetscCallCXX(buf += ", "); in to_string() 94 PetscCallCXX(buf += ">, <" + y + '>'); in to_string() 658 const auto int_printer = [](int key, std::string &buf) { in main() argument 660 PetscCallCXX(buf = std::to_string(key)); in main() 663 const auto double_printer = [](double value, std::string &buf) { in main() argument [all …]
|
| /petsc/src/vec/vec/tests/ |
| H A D | ex48.c | 339 char buf[PETSC_MAX_PATH_LEN]; in testGroupsDatasets() local 435 char *fullname = buf; in testGroupsDatasets() 438 PetscCall(PetscSNPrintf(fullname, sizeof(buf), "%s/%s", group, name)); in testGroupsDatasets() 467 …formPath(PetscBool relativize, const char path[], const char dataset[], char buf[], size_t bufsize) in formPath() argument 475 PetscCall(PetscStrncpy(buf, dataset, bufsize)); in formPath() 478 PetscCall(PetscSNPrintf(buf, bufsize, "%s/%s", path + 1, dataset)); in formPath() 481 PetscCall(PetscSNPrintf(buf, bufsize, "%s/%s", isroot ? "" : path, dataset)); in formPath() 489 char buf[PETSC_MAX_PATH_LEN]; in testAttributesAbsolutePath() local 522 PetscCall(formPath((PetscBool)!!prefix, paths[p], datasets[s], buf, sizeof(buf))); in testAttributesAbsolutePath() 523 PetscCall(shouldExist(buf, PETSC_TRUE, &flg)); in testAttributesAbsolutePath() [all …]
|
| /petsc/src/binding/petsc4py/src/petsc4py/include/petsc4py/ |
| H A D | pybuffer.h | 37 void *buf, PetscInt count, char typechar, in PyPetscBuffer_FillInfo() argument 45 view->buf = buf; in PyPetscBuffer_FillInfo()
|
| /petsc/include/ |
| H A D | petsclog.h | 491 #define MPI_Irecv(buf, count, datatype, source, tag, comm, request) \ argument 492 …unt), (datatype), &(petsc_irecv_len), &(petsc_irecv_len_th)) || MPI_Irecv((buf), (count), (datatyp… 494 #define MPI_Irecv_c(buf, count, datatype, source, tag, comm, request) \ argument 495 …t), (datatype), &(petsc_irecv_len), &(petsc_irecv_len_th)) || MPI_Irecv_c((buf), (count), (datatyp… 497 #define MPI_Isend(buf, count, datatype, dest, tag, comm, request) \ argument 498 …unt), (datatype), &(petsc_isend_len), &(petsc_isend_len_th)) || MPI_Isend((buf), (count), (datatyp… 500 #define MPI_Isend_c(buf, count, datatype, dest, tag, comm, request) \ argument 501 …t), (datatype), &(petsc_isend_len), &(petsc_isend_len_th)) || MPI_Isend_c((buf), (count), (datatyp… 511 #define MPI_Recv(buf, count, datatype, source, tag, comm, status) \ argument 512 …(count), (datatype), (&petsc_recv_len), (&petsc_recv_len_th)) || MPI_Recv((buf), (count), (datatyp… [all …]
|
| /petsc/doc/ |
| H A D | conf.py | 45 buf = version_file.read() variable 46 petsc_release_flag = re.search(' PETSC_VERSION_RELEASE[ ]*([0-9]*)',buf).group(1) 47 major_version = re.search(' PETSC_VERSION_MAJOR[ ]*([0-9]*)',buf).group(1) 48 minor_version = re.search(' PETSC_VERSION_MINOR[ ]*([0-9]*)',buf).group(1) 49 subminor_version = re.search(' PETSC_VERSION_SUBMINOR[ ]*([0-9]*)',buf).group(1)
|
| H A D | build_man_index.py | 101 buf = fd.read() 104 m = re_name.search(buf) 112 …buf += "\n\n---\n[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/%s/%s)\n\n" % (edit_branch… 120 m = re_level.search(buf) 129 tmpbuf = re_level.sub('',buf)
|
| /petsc/src/sys/fileio/ |
| H A D | fretrieve.c | 407 char buf[1024], *str, *substring; in PetscFileRetrieve() local 412 str = fgets(buf, sizeof(buf) - 1, fd); in PetscFileRetrieve() 414 PetscCall(PetscStrstr(buf, "<!DOCTYPE html>", &substring)); in PetscFileRetrieve() 416 PetscCall(PetscStrstr(buf, "Not Found", &substring)); in PetscFileRetrieve() 418 str = fgets(buf, sizeof(buf) - 1, fd); in PetscFileRetrieve()
|
| H A D | smatlab.c | 32 char buf[1024], *found; in PetscStartMatlab() local 41 if (rank == 0) found = fgets(buf, 1024, fd); in PetscStartMatlab()
|
| /petsc/src/sys/classes/viewer/impls/hdf5/ |
| H A D | hdf5v.c | 34 char buf[PETSC_MAX_PATH_LEN] = ""; in PetscViewerHDF5GetGroup() local 44 PetscCall(PetscStrncpy(buf, group, sizeof(buf))); in PetscViewerHDF5GetGroup() 45 if (!group || len) PetscCall(PetscStrlcat(buf, "/", sizeof(buf))); in PetscViewerHDF5GetGroup() 46 PetscCall(PetscStrlcat(buf, path, sizeof(buf))); in PetscViewerHDF5GetGroup() 47 PetscCall(PetscStrallocpy(buf, (char **)abspath)); in PetscViewerHDF5GetGroup() 768 char buf[PETSC_MAX_PATH_LEN]; in PetscViewerHDF5PushGroup() local 791 PetscCall(PetscSNPrintf(buf, sizeof(buf), "%s/%s", parent, name)); in PetscViewerHDF5PushGroup() 792 gname = buf; in PetscViewerHDF5PushGroup() 1400 char buf[PETSC_MAX_PATH_LEN] = ""; in PetscViewerHDF5Traverse_Internal() local 1432 PetscCall(PetscStrlcat(buf, "/", sizeof(buf))); in PetscViewerHDF5Traverse_Internal() [all …]
|