Home
last modified time | relevance | path

Searched refs:cls (Results 1 – 25 of 26) sorted by relevance

12

/petsc/lib/petsc/bin/maint/petsclinter/petsclinter/classes/
H A D_cursor.py32 def from_param(cls, obj: SupportsInt) -> int: argument
187 def _unhandleable_cursor(cls, cursor: CursorLike) -> NoReturn: argument
211 srcstr = cls.get_raw_source_from_cursor(cursor)
212 errstr = cls.error_view_from_cursor(cursor)
232 def cast(cls, cursor: CursorLike) -> Cursor: argument
245 return cursor if isinstance(cursor, cls) else cls(cursor)
248 def error_view_from_cursor(cls, cursor: CursorLike) -> str: argument
267 loc_str = cls.get_formatted_location_string_from_cursor(cursor)
268 typename = cls.get_typename_from_cursor(cursor)
269 src_str = cls.get_formatted_source_from_cursor(cursor, num_context=2)
[all …]
H A D_src_pos.py91 …def cast(cls, other: SourceLocationLike, tu: Optional[clx.TranslationUnit] = None) -> SourceLocati… argument
116 if isinstance(other, cls):
119 return cls(other, tu=tu)
123 def get_filename_from_tu(cls, tu: clx.TranslationUnit) -> clx.File: argument
141 return cls.__filecache.getname(tu)
144 def from_position(cls, tu: clx.TranslationUnit, line: int, col: int) -> SourceLocation: argument
161 return cls(clx.SourceLocation.from_position(tu, cls.get_filename_from_tu(tu), line, col), tu=tu)
205 def as_clang_source_location(cls, other: SourceLocationLike) -> clx.SourceLocation: argument
228 if isinstance(other, cls):
352 def cast(cls, other: SourceRangeLike, tu: Optional[clx.TranslationUnit] = None) -> SourceRange: argument
[all …]
H A D_diag.py46 for cls in self._mro:
48 sub_diag_map = diag_map_diags[cls.__qualname__]
130 def registered(cls) -> dict[str, str]: argument
138 return cls._registered
169 def flag_prefix(cls, obj: object) -> Callable[[str], str]: argument
190 def check_flag(cls, flag: str) -> str: argument
208 flag = cls._expand_flag(flag)
209 if flag not in cls._registered:
214 def _inject_diag_map(cls, symbol: _T, diag_pairs: Iterable[tuple[str, str]]) -> _T: argument
258 symbol_flag_prefix = cls.flag_prefix(symbol)
[all …]
H A D_patch.py122 def from_cursor(cls, cursor: CursorLike, value: str, **kwargs) -> Patch: argument
139 return cls(cursor.extent, value, **kwargs)
/petsc/lib/petsc/bin/maint/petsclinter/petsclinter/util/
H A D_color.py19 def bright_red(cls) -> str: argument
27 return cls.__COLOR_BRIGHT_RED__
30 def bright_yellow(cls) -> str: argument
38 return cls.__COLOR_BRIGHT_YELLOW__
41 def reset(cls) -> str: argument
49 return cls.__COLOR_RESET__
H A D_utility.py336 …def from_flags(cls, petsc_dir: Path, compiler_flags: list[str], extra_header_includes: Optional[li… argument
469 return cls(precompiled_header, verbose)
/petsc/src/ts/interface/
H A Ddlregists.c37 PetscBool opt, pkg, cls; in TSInitializePackage() local
91 PetscCall(PetscStrInList("dm", logList, ',', &cls)); in TSInitializePackage()
92 if (pkg || cls) PetscCall(PetscLogEventExcludeClass(DMTS_CLASSID)); in TSInitializePackage()
93 PetscCall(PetscStrInList("tsadapt", logList, ',', &cls)); in TSInitializePackage()
94 if (pkg || cls) PetscCall(PetscLogEventExcludeClass(TSADAPT_CLASSID)); in TSInitializePackage()
95 PetscCall(PetscStrInList("tstrajectory", logList, ',', &cls)); in TSInitializePackage()
96 if (pkg || cls) PetscCall(PetscLogEventExcludeClass(TSTRAJECTORY_CLASSID)); in TSInitializePackage()
/petsc/src/binding/petsc4py/conf/
H A Dstubgen.py120 def visit_constructor(cls, name='__init__', args=None): argument
122 argname = cls.__name__.lower()
123 argtype = cls.__name__
135 def visit_class(cls, outer=None, done=None): argument
165 qualname = cls.__name__
166 cls_name = cls.__name__
182 class sub(cls):
190 base = cls.__base__
201 if name in cls.__dict__:
204 if '__hash__' in cls.__dict__:
[all …]
/petsc/src/snes/interface/
H A Ddlregissnes.c41 PetscBool opt, pkg, cls; in SNESInitializePackage() local
87 PetscCall(PetscStrInList("dm", logList, ',', &cls)); in SNESInitializePackage()
88 if (pkg || cls) PetscCall(PetscLogEventExcludeClass(DMSNES_CLASSID)); in SNESInitializePackage()
89 PetscCall(PetscStrInList("sneslinesearch", logList, ',', &cls)); in SNESInitializePackage()
90 if (pkg || cls) PetscCall(PetscLogEventExcludeClass(SNESLINESEARCH_CLASSID)); in SNESInitializePackage()
/petsc/src/binding/petsc4py/src/petsc4py/PETSc/
H A DSys.pyx9 cls, argument
63 def getVersionInfo(cls) -> dict[str, bool | int | str]: argument
78 version, dev, date, author = cls.getVersion(True, True, True)
89 def isInitialized(cls) -> bool: argument
102 def isFinalized(cls) -> bool: argument
117 def getDefaultComm(cls) -> Comm: argument
132 def setDefaultComm(cls, comm: Comm | None) -> None: argument
157 cls, argument
199 cls, argument
241 def syncFlush(cls, comm: Comm | None = None) -> None: argument
[all …]
H A DLog.pyx12 def Stage(cls, name: str) -> LogStage: argument
46 def Class(cls, name: str) -> LogClass: argument
80 def Event(cls, name: str, klass: LogClass | None = None) -> LogEvent: argument
118 def begin(cls) -> None: argument
131 def view(cls, Viewer viewer=None) -> None: argument
152 def logFlops(cls, flops: float) -> None: argument
171 def addFlops(cls, flops: float) -> None: argument
194 def getFlops(cls) -> float: argument
214 def getTime(cls) -> float: argument
234 def getCPUTime(cls) -> float: argument
[all …]
H A DObject.pyx606 cdef int PyPetscType_Register(int classid, type cls) except -1: argument
609 cdef object value = cls
612 type_registry[key] = cls
613 reg_LogClass(str2bytes(cls.__name__, &dummy),
615 TypeEnableGC(<PyTypeObject*>cls)
618 if cls is not value:
621 "already registered: %s" % (key, cls, value))
627 cdef type cls = Object
629 cls = type_registry[key]
631 cls = Object
[all …]
H A DDevice.pyx95 def create(cls, dtype: Type | None = None, device_id: int = DECIDE) -> Device: argument
114 … cdef PetscDeviceType cdevice_type = asDeviceType(dtype if dtype is not None else cls.Type.DEFAULT)
115 cdef Device device = cls()
H A DScatter.pyx206 def toAll(cls, Vec vec) -> tuple[Scatter, Vec]: argument
234 def toZero(cls, Vec vec) -> tuple[Scatter, Vec]: argument
H A DViewer.pyx569 def STDOUT(cls, comm: Comm | None = None) -> Viewer: argument
587 def STDERR(cls, comm: Comm | None = None) -> Viewer: argument
605 def ASCII(cls, name : str, comm: Comm | None = None) -> Viewer: argument
626 def BINARY(cls, comm: Comm | None = None) -> Viewer: argument
644 def DRAW(cls, comm: Comm | None = None) -> Viewer: argument
H A Dlibpetsc4py.pyx230 cls = getattr(ctx, '__class__', None)
231 if cls:
232 clsname = getattr(cls, '__name__', None)
234 modname = getattr(cls, '__module__', None)
253 cdef cls
261 cls = getattr(mod, attr)
262 return cls()
270 cls = getattr(mod, clsname)
271 if not PyModule_Check(cls):
272 return cls()
/petsc/src/binding/petsc4py/docs/source/
H A Dapidoc.py201 def visit_constructor(cls, name='__init__', args=None): argument
203 argname = cls.__mro__[-2].__name__.lower()
204 argtype = cls.__name__
215 def visit_class(cls, outer=None, done=None): argument
241 qualname = cls.__name__
242 cls_name = cls.__name__
251 base = cls.__base__
258 lines.add = docstring(cls)
261 if name in cls.__dict__:
264 dct = cls.__dict__
[all …]
H A Dconf.py201 cls = type(clsname, (), {})
202 cls.__module__ = mod.__name__
203 setattr(mod, clsname, cls)
/petsc/src/ksp/ksp/interface/
H A Ddlregisksp.c157 PetscBool opt, pkg, cls; in KSPInitializePackage() local
197 PetscCall(PetscStrInList("dm", logList, ',', &cls)); in KSPInitializePackage()
198 if (pkg || cls) PetscCall(PetscLogEventExcludeClass(DMKSP_CLASSID)); in KSPInitializePackage()
199 PetscCall(PetscStrInList("kspguess", logList, ',', &cls)); in KSPInitializePackage()
200 if (pkg || cls) PetscCall(PetscLogEventExcludeClass(KSPGUESS_CLASSID)); in KSPInitializePackage()
/petsc/src/ksp/pc/impls/gamg/
H A Dclassical.c64 PC_GAMG_Classical *cls = (PC_GAMG_Classical *)pc_gamg->subctx; in PCGAMGClassicalSetType_GAMG() local
67 PetscCall(PetscStrncpy(cls->prolongtype, type, sizeof(cls->prolongtype))); in PCGAMGClassicalSetType_GAMG()
75 PC_GAMG_Classical *cls = (PC_GAMG_Classical *)pc_gamg->subctx; in PCGAMGClassicalGetType_GAMG() local
78 *type = cls->prolongtype; in PCGAMGClassicalGetType_GAMG()
454 PC_GAMG_Classical *cls = (PC_GAMG_Classical *)pc_gamg->subctx; in PCGAMGTruncateProlongator_Private() local
481 …if (PetscRealPart(pval[j]) >= pmax_pos * cls->interp_threshold || PetscRealPart(pval[j]) <= pmax_n… in PCGAMGTruncateProlongator_Private()
517 if (PetscRealPart(pval[j]) >= cls->interp_threshold * pmax_pos) { in PCGAMGTruncateProlongator_Private()
519 } else if (PetscRealPart(pval[j]) <= cls->interp_threshold * pmax_neg) { in PCGAMGTruncateProlongator_Private()
532 if (PetscRealPart(pval[j]) >= pmax_pos * cls->interp_threshold) { in PCGAMGTruncateProlongator_Private()
536 } else if (PetscRealPart(pval[j]) <= pmax_neg * cls->interp_threshold) { in PCGAMGTruncateProlongator_Private()
[all …]
/petsc/lib/petsc/bin/maint/
H A Dgcov.py86 def from_string(cls, ver): argument
87 return cls.from_iterable(ver.split('.'))
90 def from_iterable(cls, it): argument
96 return cls(*version)
124 def gcovr_version(cls): argument
126 version = getattr(cls, attr_name, None)
139 setattr(cls, attr_name, version)
/petsc/lib/petsc/bin/maint/petsclinter/petsclinter/classes/docs/
H A D_doc_section.py32 def __diagnostic_prefix__(cls, *flags): argument
411 def __diagnostic_prefix__(cls, *flags): argument
857 def __diagnostic_prefix__(cls, *flags): argument
908 def __diagnostic_prefix__(cls, *flags): argument
930 def __diagnostic_prefix__(cls, *flags): argument
951 def __diagnostic_prefix__(cls, *flags): argument
973 def __diagnostic_prefix__(cls, *flags): argument
996 def __diagnostic_prefix__(cls, *flags): argument
1046 def __diagnostic_prefix__(cls, *flags): argument
1217 def __diagnostic_prefix__(cls, *flags): argument
H A D_doc_section_base.py167 def __diagnostic_prefix__(cls, *flags: str) -> collections.deque[str]: argument
168 return cls.diagnostic_flag('-'.join(flags))
171 …def diagnostic_flag(cls, text: Union[str, collections.deque[str]], *, prefix: str = 'doc') -> coll… argument
705 def __diagnostic_prefix__(cls, *flags): argument
846 def __diagnostic_prefix__(cls, *flags): argument
1025 def __diagnostic_prefix__(cls, *flags): argument
1130 def __diagnostic_prefix__(cls, *flags): argument
H A D_doc_str.py499 def _is_valid_docstring(cls, cursor: Cursor, raw: str, doc_extent: SourceRange) -> bool: argument
536 if any(raw.startswith(f'/*{char}') for char in cls.sowing_types):
542 have_title = sum(f'{title}:' in rawlo for title in map(str.casefold, cls.sections.gen_titles()))
557 def _get_sanitized_comment_and_range_from_cursor(cls, cursor: Cursor) -> tuple[str, SourceRange]: argument
580 if not cls._is_valid_docstring(cursor, raw, extent):
/petsc/config/BuildSystem/config/
H A DsetCompilers.py48 raise RuntimeError('must use strings as keys for {cls}'.format(cls=self.__class__))
54 raise RuntimeError('must use strings as keys for {cls}'.format(cls=self.__class__))
544 def isWindows(cls, compiler, log): argument
546 if cls.isCygwin(log):
555 def isMSVC(cls, compiler, log): argument
559 … output, error, _ = cls.executeShellCommand(compiler + ' --version', checkCommand=noCheck, log=log)

12