Home
last modified time | relevance | path

Searched refs:format (Results 1 – 25 of 306) sorted by relevance

12345678910>>...13

/petsc/src/sys/fileio/
H A Dmprint.c39 PetscErrorCode PetscFormatConvertGetSize(const char format[], size_t *size) in PetscFormatConvertGetSize() argument
45 PetscAssertPointer(format, 1); in PetscFormatConvertGetSize()
47 while (format[i]) { in PetscFormatConvertGetSize()
48 if (format[i] == '%') { in PetscFormatConvertGetSize()
49 if (format[i + 1] == '%') { in PetscFormatConvertGetSize()
55 while (format[i] && (format[i] <= '9')) { in PetscFormatConvertGetSize()
59 switch (format[i]) { in PetscFormatConvertGetSize()
101 PetscErrorCode PetscFormatConvert(const char format[], char newformat[]) in PetscFormatConvert() argument
106 while (format[i]) { in PetscFormatConvert()
107 if (format[i] == '%' && format[i + 1] == '%') { in PetscFormatConvert()
[all …]
/petsc/src/sys/classes/viewer/interface/
H A Dviewa.c24 PetscErrorCode PetscViewerSetFormat(PetscViewer viewer, PetscViewerFormat format) in PetscViewerSetFormat() argument
29 PetscValidLogicalCollectiveEnum(viewer, format, 2); in PetscViewerSetFormat()
30 viewer->format = format; in PetscViewerSetFormat()
51 PetscErrorCode PetscViewerPushFormat(PetscViewer viewer, PetscViewerFormat format) in PetscViewerPushFormat() argument
55 PetscValidLogicalCollectiveEnum(viewer, format, 2); in PetscViewerPushFormat()
58 viewer->formats[viewer->iformat++] = viewer->format; in PetscViewerPushFormat()
59 viewer->format = format; in PetscViewerPushFormat()
82 viewer->format = viewer->formats[--viewer->iformat]; in PetscViewerPopFormat()
105 PetscErrorCode PetscViewerGetFormat(PetscViewer viewer, PetscViewerFormat *format) in PetscViewerGetFormat() argument
109 *format = viewer->format; in PetscViewerGetFormat()
H A Dview.c133 PetscErrorCode PetscViewerAndFormatCreate(PetscViewer viewer, PetscViewerFormat format, PetscViewer… in PetscViewerAndFormatCreate() argument
139 (*vf)->format = format; in PetscViewerAndFormatCreate()
337 PetscViewerFormat format; in PetscViewerView() local
354 PetscCall(PetscViewerGetFormat(viewer, &format)); in PetscViewerView()
356 …if (format == PETSC_VIEWER_DEFAULT || format == PETSC_VIEWER_ASCII_INFO || format == PETSC_VIEWER_… in PetscViewerView()
357 …if (v->format) PetscCall(PetscViewerASCIIPrintf(viewer, " Viewer format = %s\n", PetscViewerForma… in PetscViewerView()
H A Dviewreg.c167 …teViewers_Single(MPI_Comm comm, const char value[], PetscViewer *viewer, PetscViewerFormat *format) in PetscOptionsCreateViewers_Single() argument
177 if (format) *format = PETSC_VIEWER_DEFAULT; in PetscOptionsCreateViewers_Single()
298 if (format) *format = tfmt; in PetscOptionsCreateViewers_Single()
300 } else if (viewer && (cnt == 6) && format) { /* Get format from VTK viewer */ in PetscOptionsCreateViewers_Single()
301 PetscCall(PetscViewerGetFormat(*viewer, format)); in PetscOptionsCreateViewers_Single()
307 … char name[], PetscInt *n_max_p, PetscViewer viewer[], PetscViewerFormat format[], PetscBool *set,… in PetscOptionsCreateViewers_Internal() argument
346 if (format) *format = PETSC_VIEWER_DEFAULT; in PetscOptionsCreateViewers_Internal()
377 this_viewer_format = PetscSafePointerPlusOffset(format, n); in PetscOptionsCreateViewers_Internal()
444 …onst char pre[], const char name[], PetscViewer *viewer, PetscViewerFormat *format, PetscBool *set) in PetscOptionsCreateViewer() argument
451 if (format) *format = PETSC_VIEWER_DEFAULT; in PetscOptionsCreateViewer()
[all …]
/petsc/config/BuildSystem/config/utilities/
H A DcacheDetails.py57 func_name = 'getconf_{}'.format(var)
63 'int64_t {}(void) {{'.format(func_name),
64 ' int64_t linesize = {};'.format(default_val),
67 ' return ret ? {} : linesize;'.format(default_val),
76 'long {}(void) {{'.format(func_name),
77 ' long val = sysconf(_SC_{});'.format(var.upper()),
78 ' return val >= 0 ? val : {};'.format(default_val),
88 'long {}(void) {{'.format(func_name),
90 ' FILE *f = popen("getconf {}", "r");'.format(var.lower()),
93 ' return val >= 0 ? val : {};'.format(default_val),
[all …]
/petsc/lib/petsc/bin/
H A DtasClasses.py20 print('\t\t*******************Data for {}***************************'.format(self.fileName))
23 print(" {: >18} : {}\n".format(k,self.fileData[k]))
42 row[item] = '{:.3g}'.format((self.fileData['Times'][stage]))
44 row[item] = '{:.3g}'.format((self.fileData['Flops'][stage])/1000000000)
46 … row[item] = '{:.3g}'.format((self.fileData['Mean Flops'][stage])/1000000000)
48 row[item]='{:.3g}'.format((self.fileData[item][stage]))
61 row[item] = '{:.3g}'.format(field.alpha)
63 row[item] = '{:.3g}'.format(field.beta)
65 row[item] = '{:.3g}'.format(field.cRate)
67 row[item] = '{:.3g}'.format((field.fieldData[item][stage]))
[all …]
/petsc/src/ksp/ksp/tutorials/output/
H A Dex2_help.out47 -log_view [:filename:[format]]: logging objects and events
72 …-mat_view ascii[:[filename][:[format][:append]]]: Prints object to stdout or ASCII file (PetscOpti…
73 …-mat_view binary[:[filename][:[format][:append]]]: Saves object to a binary file (PetscOptionsCrea…
74 -mat_view draw[:[drawtype][:filename|format]] Draws object (PetscOptionsCreateViewer)
84 …-ksp_monitor ascii[:[filename][:[format][:append]]]: Prints object to stdout or ASCII file (PetscO…
85 …-ksp_monitor binary[:[filename][:[format][:append]]]: Saves object to a binary file (PetscOptionsC…
86 -ksp_monitor draw[:[drawtype][:filename|format]] Draws object (PetscOptionsCreateViewer)
90 …-ksp_monitor_short ascii[:[filename][:[format][:append]]]: Prints object to stdout or ASCII file (…
91 …-ksp_monitor_short binary[:[filename][:[format][:append]]]: Saves object to a binary file (PetscOp…
92 -ksp_monitor_short draw[:[drawtype][:filename|format]] Draws object (PetscOptionsCreateViewer)
[all …]
/petsc/src/sys/classes/viewer/tests/
H A Dex5.c8 PetscViewerFormat format; in main() local
13 …PetscCall(PetscOptionsCreateViewer(PETSC_COMM_WORLD, NULL, NULL, "-myviewer", &viewer, &format, NU… in main()
17 PetscCall(PetscViewerPushFormat(viewer, format)); in main()
22 …PetscCall(PetscOptionsCreateViewer(PETSC_COMM_WORLD, NULL, NULL, "-myviewer", &viewer, &format, &f… in main()
25 PetscCall(PetscViewerPushFormat(viewer, format)); in main()
30 …PetscCall(PetscOptionsCreateViewer(PETSC_COMM_WORLD, NULL, NULL, "-myviewer", &viewer, &format, &f… in main()
31 PetscCall(PetscViewerPushFormat(viewer, format)); in main()
H A Dex4.c8 PetscViewerFormat format; in main() local
13 …PetscCall(PetscOptionsCreateViewer(PETSC_COMM_WORLD, NULL, NULL, "-myviewer", &viewer, &format, NU… in main()
16 PetscCall(PetscViewerPushFormat(viewer, format)); in main()
20 …PetscCall(PetscOptionsCreateViewer(PETSC_COMM_WORLD, NULL, NULL, "-myviewer", &viewer, &format, NU… in main()
21 PetscCall(PetscViewerPushFormat(viewer, format)); in main()
/petsc/src/sys/objects/
H A Dpname.c55 PetscViewerFormat format; in PetscObjectPrintClassNamePrefixType() local
63 PetscCall(PetscViewerGetFormat(viewer, &format)); in PetscObjectPrintClassNamePrefixType()
64 …if (format == PETSC_VIEWER_ASCII_MATRIXMARKET || format == PETSC_VIEWER_ASCII_LATEX || format == P… in PetscObjectPrintClassNamePrefixType()
66 if (format == PETSC_VIEWER_ASCII_MATLAB) PetscCall(PetscViewerASCIIPrintf(viewer, "%%")); in PetscObjectPrintClassNamePrefixType()
69 if (format == PETSC_VIEWER_ASCII_MATLAB) PetscCall(PetscViewerASCIIPrintf(viewer, "%%")); in PetscObjectPrintClassNamePrefixType()
/petsc/src/ksp/ksp/interface/
H A Diterativ.c130 PetscViewerFormat format = vf->format; in KSPMonitorResidual() local
138 PetscCall(PetscViewerPushFormat(viewer, format)); in KSPMonitorResidual()
172 PetscViewerFormat format = vf->format; in KSPMonitorResidualView() local
177 PetscCall(PetscViewerPushFormat(viewer, format)); in KSPMonitorResidualView()
215 PetscViewerFormat format = vf->format; in KSPMonitorResidualDrawLG() local
222 PetscCall(PetscViewerPushFormat(viewer, format)); in KSPMonitorResidualDrawLG()
256 PetscErrorCode KSPMonitorResidualDrawLGCreate(PetscViewer viewer, PetscViewerFormat format, PetscCt… in KSPMonitorResidualDrawLGCreate() argument
259 PetscCall(PetscViewerAndFormatCreate(viewer, format, vf)); in KSPMonitorResidualDrawLGCreate()
275 PetscViewerFormat format = vf->format; in KSPMonitorResidualShort() local
283 PetscCall(PetscViewerPushFormat(viewer, format)); in KSPMonitorResidualShort()
[all …]
/petsc/src/sys/classes/viewer/impls/vtk/
H A Dvtkv.c125format == PETSC_VIEWER_DEFAULT, PetscObjectComm((PetscObject)viewer), PETSC_ERR_ARG_INCOMP, "Canno… in PetscViewerFileSetName_VTK()
127 if (viewer->format == PETSC_VIEWER_DEFAULT) viewer->format = PETSC_VIEWER_VTK_VTS; in PetscViewerFileSetName_VTK()
128format == PETSC_VIEWER_VTK_VTS, PetscObjectComm((PetscObject)viewer), PETSC_ERR_ARG_INCOMP, "Canno… in PetscViewerFileSetName_VTK()
130 if (viewer->format == PETSC_VIEWER_DEFAULT) viewer->format = PETSC_VIEWER_VTK_VTU; in PetscViewerFileSetName_VTK()
131format == PETSC_VIEWER_VTK_VTU, PetscObjectComm((PetscObject)viewer), PETSC_ERR_ARG_INCOMP, "Canno… in PetscViewerFileSetName_VTK()
133 if (viewer->format == PETSC_VIEWER_DEFAULT) viewer->format = PETSC_VIEWER_VTK_VTR; in PetscViewerFileSetName_VTK()
134format == PETSC_VIEWER_VTK_VTR, PetscObjectComm((PetscObject)viewer), PETSC_ERR_ARG_INCOMP, "Canno… in PetscViewerFileSetName_VTK()
/petsc/src/binding/petsc4py/src/petsc4py/include/petsc4py/
H A Dpybuffer.h55 view->format = NULL; in PyPetscBuffer_FillInfo()
58 case 'i': view->format = (char *) _PyPetsc_FMT_PETSC_INT; break; in PyPetscBuffer_FillInfo()
59 case 'r': view->format = (char *) _PyPetsc_FMT_PETSC_REAL; break; in PyPetscBuffer_FillInfo()
60 case 's': view->format = (char *) _PyPetsc_FMT_PETSC_SCALAR; break; in PyPetscBuffer_FillInfo()
61 case 'c': view->format = (char *) _PyPetsc_FMT_PETSC_COMPLEX; break; in PyPetscBuffer_FillInfo()
62 default: view->format = (char *) "B"; in PyPetscBuffer_FillInfo()
/petsc/config/BuildSystem/config/packages/
H A DlibCEED.py30 args = ['prefix={0}'.format(self.installDir), 'V=1']
54 'ROCM_DIR={0}'.format(self.hip.hipDir),
55 'HIPCC={0}'.format(self.getCompiler()),
56 'HIPCCFLAGS={0}'.format(self.getCompilerFlags()),
57 'HIP_ARCH={0}'.format(self.hip.hipArch),
59 if self.setCompilers.LDFLAGS: args += ['LDFLAGS={0}'.format(self.setCompilers.LDFLAGS)]
H A Dboost.py38 cmd = 'cd {} && ln -s $PWD/boost {}'.format(self.packageDir, boostIncludeDir)
63 raise RuntimeError('Invalid CXX compiler specifield for boost: {}'.format(cxx))
65 self.logPrintBox('Building Boost with toolset "{}", compiler "{}"'.format(toolset, cxx))
68 jamfile.write_text('using {} : : {} : <cxxflags>"{}" ;\n'.format(toolset, cxx, cxxflags))
75 …bootstrap_cmd = 'cd {} && ./bootstrap.sh --with-toolset={} --prefix={}'.format(self.packageDir, to…
78 …build_cmd = 'cd {} && ./b2 toolset={} {} pch={} -j{}'.format(self.packageDir, toolset, bootstrap_a…
81 …install_cmd = 'cd {} && ./b2 toolset={} {} pch={} -j{} install'.format(self.packageDir, toolset, b…
H A DUmpire.py44 args.append('-DENABLE_CUDA={}'.format('ON' if self.cuda.found else 'OFF'))
45 args.append('-DENABLE_HIP={}'.format('ON' if self.hip.found else 'OFF'))
46 args.append('-DENABLE_SYCL={}'.format('ON' if self.sycl.found else 'OFF'))
47 args.append('-DENABLE_OPENMP={}'.format('ON' if self.openmp.found else 'OFF'))
/petsc/src/sys/classes/viewer/tutorials/
H A Dex2.c8 PetscViewerFormat format; in main() local
12 …PetscCall(PetscOptionsCreateViewer(PETSC_COMM_WORLD, NULL, NULL, "-myviewer", &viewer, &format, NU… in main()
13 PetscCall(PetscViewerPushFormat(viewer, format)); in main()
/petsc/src/snes/interface/
H A Dsnesut.c37 PetscCall(PetscViewerPushFormat(viewer, vf->format)); in SNESMonitorSolution()
73 PetscCall(PetscViewerPushFormat(vf->viewer, vf->format)); in SNESMonitorResidual()
110 PetscCall(PetscViewerPushFormat(viewer, vf->format)); in SNESMonitorSolutionUpdate()
143 PetscViewerFormat format = vf->format; in KSPMonitorSNESResidual() local
164 PetscCall(PetscViewerPushFormat(viewer, format)); in KSPMonitorSNESResidual()
198 PetscViewerFormat format = vf->format; in KSPMonitorSNESResidualDrawLG() local
219 PetscCall(PetscViewerPushFormat(viewer, format)); in KSPMonitorSNESResidualDrawLG()
254 PetscErrorCode KSPMonitorSNESResidualDrawLGCreate(PetscViewer viewer, PetscViewerFormat format, Pet… in KSPMonitorSNESResidualDrawLGCreate() argument
259 PetscCall(PetscViewerAndFormatCreate(viewer, format, vf)); in KSPMonitorSNESResidualDrawLGCreate()
268 …if (vf->format == PETSC_VIEWER_DRAW_LG) PetscCall(PetscViewerMonitorLGSetUp(vf->viewer, NULL, NULL… in SNESMonitorDefaultSetUp()
[all …]
/petsc/config/PETSc/options/
H A Dpetscdir.py38 …correct. You need to use back quotes around the pwd - i.e: {1} PETSC_DIR=`pwd`'.format(msg1, msg2))
40 …s is not allowed. Change the directory with PETSc to not have spaces in it'.format(msg1, self.dir))
42 …_DIR={1} is a relative path. Use absolute path - i.e: {2} PETSC_DIR={3}'.format(msg1, self.dir, ms…
44 raise RuntimeError('{0} PETSC_DIR={1} is not a directory'.format(msg1, self.dir))
46 …raise RuntimeError('{0} PETSC_DIR={1} MUST be the current directory {2}'.format(msg1, self.dir, os…
/petsc/src/sys/classes/viewer/impls/ascii/
H A Dfilev.c572 static PetscErrorCode PetscVFPrintfFortran(int unit, const char format[], va_list Argp) in PetscVFPrintfFortran() argument
579 PetscCall(PetscVSNPrintf(str, sizeof(str), format, NULL, Argp)); in PetscVFPrintfFortran()
599 static PetscErrorCode PetscVFPrintfFortran(int unit, const char format[], va_list Argp) in PetscVFPrintfFortran() argument
657 PetscViewerFormat format; in PetscViewerASCIIGetStdout() local
662 …etEnum(NULL, NULL, "-petsc_viewer_stdout_format", PetscViewerFormats, (PetscEnum *)&format, &set)); in PetscViewerASCIIGetStdout()
663 if (set) PetscCall(PetscViewerPushFormat(*viewer, format)); in PetscViewerASCIIGetStdout()
697 PetscErrorCode PetscViewerASCIIPrintf(PetscViewer viewer, const char format[], ...) in PetscViewerASCIIPrintf() argument
708 PetscAssertPointer(format, 2); in PetscViewerASCIIPrintf()
721 va_start(Argp, format); in PetscViewerASCIIPrintf()
722 …PetscCall(PetscVSNPrintf(string + 2 * intab, QUEUESTRINGSIZE - 2 * intab, format, &fullLength, Arg… in PetscViewerASCIIPrintf()
[all …]
/petsc/src/dm/impls/plex/tests/
H A Dex51.c27 PetscViewerFormat format = PETSC_VIEWER_HDF5_PETSC; in main() local
57 PetscCall(PetscViewerPushFormat(viewer, format)); in main()
63 PetscCall(PetscViewerPushFormat(viewer, format)); in main()
86 PetscCall(PetscViewerPushFormat(viewer, format)); in main()
93 PetscCall(PetscViewerPushFormat(viewer, format)); in main()
/petsc/share/petsc/matlab/
H A DUFgetPetscMat.m5 % (2) loads in matrices in MATLAB format in increasing order of
7 % (3) writes into PETSc binary format in the given directory with
21 %loads in matrix in MATLAB format
29 % converts to PETSc binary format and writes into ~mat/A_{id}
/petsc/src/sys/tests/options/
H A Dex55.c24 PetscViewerFormat format; in main() local
29 …ionsCreateViewer(PETSC_COMM_WORLD, NULL, NULL, "-options_monitor_viewer", &viewer, &format, NULL)); in main()
31 PetscCall(PetscViewerPushFormat(viewer, format)); in main()
/petsc/src/mat/impls/aij/seq/hdf5/
H A Daijhdf5.c8 PetscViewerFormat format; in MatLoad_AIJ_HDF5() local
26 PetscCall(PetscViewerGetFormat(viewer, &format)); in MatLoad_AIJ_HDF5()
27 switch (format) { in MatLoad_AIJ_HDF5()
34 …, PETSC_ERR_SUP, "PetscViewerFormat %s not supported for HDF5 input.", PetscViewerFormats[format]); in MatLoad_AIJ_HDF5()
41 if (format == PETSC_VIEWER_HDF5_MAT) { in MatLoad_AIJ_HDF5()
65 if (format == PETSC_VIEWER_HDF5_MAT && mat->symmetric != PETSC_BOOL3_TRUE) { in MatLoad_AIJ_HDF5()
142 if (format == PETSC_VIEWER_HDF5_MAT && mat->symmetric != PETSC_BOOL3_TRUE) { in MatLoad_AIJ_HDF5()
/petsc/src/mat/tests/
H A Dbench_spmv.c88 cJSON *format = NULL; in UpdateJSON() local
92 format = cJSON_GetObjectItem(spmv, matformat); in UpdateJSON()
93 if (format) { in UpdateJSON()
94 …cJSON_SetNumberValue(cJSON_GetObjectItem(format, "time"), (spmv_times[i] - ((i == 0) ? starting_sp… in UpdateJSON()
95 cJSON_SetIntValue(cJSON_GetObjectItem(format, "repetitions"), repetitions); in UpdateJSON()
97 format = cJSON_CreateObject(); in UpdateJSON()
98 cJSON_AddItemToObject(spmv, matformat, format); in UpdateJSON()
99 …cJSON_AddNumberToObject(format, "time", (spmv_times[i] - ((i == 0) ? starting_spmv_time : spmv_tim… in UpdateJSON()
100 cJSON_AddNumberToObject(format, "repetitions", repetitions); in UpdateJSON()
105 format = cJSON_CreateObject(); in UpdateJSON()
[all …]

12345678910>>...13