Home
last modified time | relevance | path

Searched refs:field (Results 1 – 25 of 390) sorted by relevance

12345678910>>...16

/petsc/src/dm/field/interface/
H A Ddmfield.c7 …rrorCode DMFieldCreate(DM dm, PetscInt numComponents, DMFieldContinuity continuity, DMField *field) in DMFieldCreate() argument
13 PetscAssertPointer(field, 4); in DMFieldCreate()
21 *field = b; in DMFieldCreate()
37 PetscErrorCode DMFieldDestroy(DMField *field) in DMFieldDestroy() argument
40 if (!*field) PetscFunctionReturn(PETSC_SUCCESS); in DMFieldDestroy()
41 PetscValidHeaderSpecific(*field, DMFIELD_CLASSID, 1); in DMFieldDestroy()
42 if (--((PetscObject)*field)->refct > 0) { in DMFieldDestroy()
43 *field = NULL; in DMFieldDestroy()
46 PetscTryTypeMethod(*field, destroy); in DMFieldDestroy()
47 PetscCall(DMDestroy(&(*field)->dm)); in DMFieldDestroy()
[all …]
/petsc/src/dm/field/impls/shell/
H A Ddmfieldshell.c8 PetscErrorCode DMFieldShellGetContext(DMField field, PetscCtxRt ctx) in DMFieldShellGetContext() argument
13 PetscValidHeaderSpecific(field, DMFIELD_CLASSID, 1); in DMFieldShellGetContext()
15 PetscCall(PetscObjectTypeCompare((PetscObject)field, DMFIELDSHELL, &flg)); in DMFieldShellGetContext()
16 …PetscCheck(flg, PetscObjectComm((PetscObject)field), PETSC_ERR_SUP, "Cannot get context from non-s… in DMFieldShellGetContext()
17 *(void **)ctx = ((DMField_Shell *)field->data)->ctx; in DMFieldShellGetContext()
21 static PetscErrorCode DMFieldDestroy_Shell(DMField field) in DMFieldDestroy_Shell() argument
23 DMField_Shell *shell = (DMField_Shell *)field->data; in DMFieldDestroy_Shell()
26 if (shell->destroy) PetscCall((*shell->destroy)(field)); in DMFieldDestroy_Shell()
27 PetscCall(PetscFree(field->data)); in DMFieldDestroy_Shell()
31 PetscErrorCode DMFieldShellEvaluateFEDefault(DMField field, IS pointIS, PetscQuadrature quad, Petsc… in DMFieldShellEvaluateFEDefault() argument
[all …]
/petsc/src/dm/dt/tests/
H A Dex12.c31 …PetscCall(PetscWeakFormGetResidual(wf, key.label, key.value, key.field, key.part, &n0, &f0, &n1, &… in CheckResidual()
43 const PetscInt value = 3, field = 1, part = 2; in TestSetIndex() local
51 key.field = field; in TestSetIndex()
61 …PetscCall(PetscWeakFormSetIndexResidual(wf, key.label, key.value, key.field, key.part, i, f[i], 0,… in TestSetIndex()
62 …PetscCall(PetscWeakFormSetIndexResidual(wf, key.label, key.value, key.field, key.part, j, f[j], 0,… in TestSetIndex()
63 …PetscCall(PetscWeakFormSetIndexResidual(wf, key.label, key.value, key.field, key.part, k, f[k], 0,… in TestSetIndex()
64 …PetscCall(PetscWeakFormSetIndexResidual(wf, key.label, key.value, key.field, key.part, l, f[l], 0,… in TestSetIndex()
79 …PetscCall(PetscWeakFormSetIndexResidual(wf, key.label, key.value, key.field, key.part, 0, NULL, i,… in TestSetIndex()
80 …PetscCall(PetscWeakFormSetIndexResidual(wf, key.label, key.value, key.field, key.part, 0, NULL, j,… in TestSetIndex()
81 …PetscCall(PetscWeakFormSetIndexResidual(wf, key.label, key.value, key.field, key.part, 0, NULL, k,… in TestSetIndex()
[all …]
/petsc/src/dm/impls/swarm/
H A Ddata_bucket.c83 PetscCall(PetscMalloc1(1, &db->field)); in DMSwarmDataBucketCreate()
95 for (f = 0; f < db->nfields; ++f) PetscCall(DMSwarmDataFieldDestroy(&db->field[f])); in DMSwarmDataBucketDestroy()
97 if (db->field != NULL) PetscCall(PetscFree(db->field)); in DMSwarmDataBucketDestroy()
110 if (db->field[f]->active) { in DMSwarmDataBucketQueryForActiveFields()
132 …(DMSwarmDataFieldStringInList(field_name, db->nfields, (const DMSwarmDataField *)db->field, &val)); in DMSwarmDataBucketRegisterField()
135 PetscCall(PetscRealloc(sizeof(DMSwarmDataField) * (db->nfields + 1), &db->field)); in DMSwarmDataBucketRegisterField()
138 db->field[db->nfields] = fp; in DMSwarmDataBucketRegisterField()
159 …PetscCall(DMSwarmDataFieldStringInList(name, db->nfields, (const DMSwarmDataField *)db->field, &fo… in DMSwarmDataBucketGetDMSwarmDataFieldIdByName()
161 …PetscCall(DMSwarmDataFieldStringFindInList(name, db->nfields, (const DMSwarmDataField *)db->field,… in DMSwarmDataBucketGetDMSwarmDataFieldIdByName()
171 …PetscCall(DMSwarmDataFieldStringInList(name, db->nfields, (const DMSwarmDataField *)db->field, &fo… in DMSwarmDataBucketGetDMSwarmDataFieldByName()
[all …]
/petsc/src/binding/petsc4py/src/petsc4py/PETSc/
H A DSection.pyx156 def getFieldName(self, field: int) -> str:
157 """Return the name of a field in the section.
163 field
164 The field number.
171 cdef PetscInt cfield = asInt(field)
176 def setFieldName(self, field: int, fieldName: str) -> None:
177 """Set the name of a field in the section.
183 field
184 The field number.
186 The field name.
[all …]
/petsc/config/
H A Dquery_tests.py100 for field in fields.replace('|',',').split(','):
103 if field == 'name':
113 for key in invDict[field]:
119 setlist.append(invDict[field][key])
133 for field in ufield.split('|')[1:]:
153 for field in fields.replace('|',',').split(','):
154 if field not in invDict:
155 if field == 'name':
156 invDict[field]=[] # List for ease
158 invDict[field]={}
[all …]
/petsc/src/dm/impls/moab/
H A Ddmmbfield.cxx201 PetscErrorCode DMMoabGetFieldName(DM dm, PetscInt field, const char *fieldName[]) in DMMoabGetFieldName() argument
208 …tscCheck(!(field < 0) && !(field >= dmmoab->numFields), PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE,… in DMMoabGetFieldName()
210 *fieldName = dmmoab->fieldNames[field]; in DMMoabGetFieldName()
231 PetscErrorCode DMMoabSetFieldName(DM dm, PetscInt field, const char *fieldName) in DMMoabSetFieldName() argument
240 …tscCheck(!(field < 0) && !(field >= dmmoab->numFields), PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE,… in DMMoabSetFieldName()
242 if (dmmoab->fieldNames[field]) PetscCall(PetscFree(dmmoab->fieldNames[field])); in DMMoabSetFieldName()
243 PetscCall(PetscStrallocpy(fieldName, (char **)&dmmoab->fieldNames[field])); in DMMoabSetFieldName()
265 PetscErrorCode DMMoabGetFieldDof(DM dm, moab::EntityHandle point, PetscInt field, PetscInt *dof) in DMMoabGetFieldDof() argument
273 …ab->seqstart] + field * dmmoab->n : dmmoab->gidmap[dmmoab->mbiface->id_from_handle(point) - dmmoab… in DMMoabGetFieldDof()
296 …FieldDofs(DM dm, PetscInt npoints, const moab::EntityHandle *points, PetscInt field, PetscInt *dof) in DMMoabGetFieldDofs() argument
[all …]
/petsc/src/vec/vec/utils/
H A Dvsection.c42 PetscCall(PetscSectionArrayView_ASCII_Internal(s->field[f], array, PETSC_SCALAR, viewer)); in PetscSectionVecView()
130 PetscInt j = -1, field, i; in VecSetValuesSection() local
132 for (field = 0; field < s->numFields; ++field) { in VecSetValuesSection()
133 const PetscInt dim = s->field[field]->atlasDof[p]; /* PetscSectionGetFieldDof() */ in VecSetValuesSection()
170 PetscInt j = 0, field; in VecSetValuesSection() local
173 for (field = 0; field < s->numFields; ++field) { in VecSetValuesSection()
174 const PetscInt dim = s->field[field]->atlasDof[p]; /* PetscSectionGetFieldDof() */ in VecSetValuesSection()
175 … const PetscInt tDim = s->field[field]->bc->atlasDof[p]; /* PetscSectionGetFieldConstraintDof() */ in VecSetValuesSection()
195 …nternal(PetscSection section, PetscSection sectionGlobal, Vec v, PetscInt field, PetscInt pStart, … in PetscSectionGetField_Internal() argument
201 PetscCall(PetscSectionGetFieldComponents(section, field, &Nc)); in PetscSectionGetField_Internal()
[all …]
/petsc/src/dm/field/tutorials/
H A Dex1.c26 static PetscErrorCode TestEvaluate(DMField field, PetscInt n, PetscRandom rand) in TestEvaluate() argument
38 comm = PetscObjectComm((PetscObject)field); in TestEvaluate()
39 PetscCall(DMFieldGetNumComponents(field, &nc)); in TestEvaluate()
40 PetscCall(DMFieldGetDM(field, &dm)); in TestEvaluate()
42 …PetscCall(VecCreateFromOptions(PetscObjectComm((PetscObject)field), NULL, 1, n * dim, PETSC_DETERM… in TestEvaluate()
48 PetscCall(DMFieldEvaluate(field, points, PETSC_SCALAR, B, D, H)); in TestEvaluate()
49 PetscCall(DMFieldEvaluate(field, points, PETSC_REAL, rB, rD, rH)); in TestEvaluate()
61 static PetscErrorCode TestEvaluateFE(DMField field, PetscInt n, PetscInt cStart, PetscInt cEnd, Pet… in TestEvaluateFE() argument
74 comm = PetscObjectComm((PetscObject)field); in TestEvaluateFE()
75 PetscCall(DMFieldGetNumComponents(field, &nc)); in TestEvaluateFE()
[all …]
/petsc/lib/petsc/bin/
H A DtasClasses.py14 def addField(self, field): argument
15 self.fieldList.append(field)
24 for field in self.fieldList:
25 field.printField()
50 for field in self.fieldList:
51 with open(self.fileName + '_' + field.fieldName+'.csv', mode='w') as csv_file:
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]))
H A Dpetsc_tas_analysis.py745 for field in file.fieldList:
747 if isinstance(field.fieldData['Errors'][0], str) or field.fieldData['Errors'][0] == -1:
749 for x in range(len(field.fieldData['Errors'])):
750 field.fieldData['Errors'][x] = 1
755 field.fieldData['dofs'], field.fieldData['Errors'])
762 print('convRate: {} of {} field'.format(convRate, field.fieldName))
764 field.setConvergeRate(convRate)
765 field.setAlpha(lstSqMeshConv[0])
766 field.setBeta(lstSqMeshConv[1])
774 if not pd.isna(field.fieldData['Errors'][0]):
[all …]
/petsc/src/dm/impls/plex/
H A Dplexvtu.c146 static PetscErrorCode DMGetFieldIfFV_Private(DM dm, PetscInt field, PetscFV *fv) in DMGetFieldIfFV_Private() argument
156 PetscCall(DMGetField(dm, field, NULL, &f)); in DMGetFieldIfFV_Private()
271 PetscInt bs = 1, nfields, field; in DMPlexVTKWriteAll_VTU() local
284 field = 0; in DMPlexVTKWriteAll_VTU()
285 if (link->field >= 0) { in DMPlexVTKWriteAll_VTU()
286 field = link->field; in DMPlexVTKWriteAll_VTU()
287 nfields = field + 1; in DMPlexVTKWriteAll_VTU()
289 for (i = 0; field < (nfields ? nfields : 1); field++) { in DMPlexVTKWriteAll_VTU()
297 PetscCall(PetscSectionGetFieldDof(section, cStart, field, &fbs)); in DMPlexVTKWriteAll_VTU()
298 PetscCall(PetscSectionGetFieldName(section, field, &fieldname)); in DMPlexVTKWriteAll_VTU()
[all …]
H A Dplexpoint.c134 PetscErrorCode DMPlexGetPointLocalField(DM dm, PetscInt point, PetscInt field, PetscInt *start, Pet… in DMPlexGetPointLocalField() argument
142 PetscCall(DMGetLocalFieldOffset_Private(dm, point, field, &s, &e)); in DMPlexGetPointLocalField()
166 PetscErrorCode DMPlexPointLocalFieldRead(DM dm, PetscInt point, PetscInt field, const PetscScalar *… in DMPlexPointLocalFieldRead() argument
174 PetscCall(DMGetLocalFieldOffset_Private(dm, point, field, &start, &end)); in DMPlexPointLocalFieldRead()
197 PetscErrorCode DMPlexPointLocalFieldRef(DM dm, PetscInt point, PetscInt field, PetscScalar *array, … in DMPlexPointLocalFieldRef() argument
205 PetscCall(DMGetLocalFieldOffset_Private(dm, point, field, &start, &end)); in DMPlexPointLocalFieldRef()
341 PetscErrorCode DMPlexGetPointGlobalField(DM dm, PetscInt point, PetscInt field, PetscInt *start, Pe… in DMPlexGetPointGlobalField() argument
349 PetscCall(DMGetGlobalFieldOffset_Private(dm, point, field, &s, &e)); in DMPlexGetPointGlobalField()
373 PetscErrorCode DMPlexPointGlobalFieldRead(DM dm, PetscInt point, PetscInt field, const PetscScalar … in DMPlexPointGlobalFieldRead() argument
381 PetscCall(DMGetGlobalFieldOffset_Private(dm, point, field, &start, &end)); in DMPlexPointGlobalFieldRead()
[all …]
H A Dplexfvm.c7 …ll, PetscLimiter lim, PetscInt dim, PetscInt dof, PetscInt cell, PetscInt field, PetscInt face, Pe… in DMPlexApplyLimiter_Internal() argument
20 …d) PetscCall(DMPlexApplyLimiter_Internal(dm, dmCell, lim, dim, dof, cell, field, childFace, fStart… in DMPlexApplyLimiter_Internal()
36 if (field >= 0) { in DMPlexApplyLimiter_Internal()
37 PetscCall(DMPlexPointLocalFieldRead(dm, ncell, field, x, &ncx)); in DMPlexApplyLimiter_Internal()
66 PetscInt dim, face, cell, field, dof, cStart, cEnd, nFields; in DMPlexReconstructGradients_Internal() local
72 PetscCall(PetscDSGetFieldIndex(prob, (PetscObject)fvm, &field)); in DMPlexReconstructGradients_Internal()
73 PetscCall(PetscDSGetFieldSize(prob, field, &dof)); in DMPlexReconstructGradients_Internal()
103 PetscCall(DMPlexPointLocalFieldRead(dm, cells[c], field, x, &cx[c])); in DMPlexReconstructGradients_Internal()
132 PetscCall(DMPlexPointLocalFieldRead(dm, cell, field, x, &cx)); in DMPlexReconstructGradients_Internal()
142 …MPlexApplyLimiter_Internal(dm, dmCell, lim, dim, dof, cell, nFields > 1 ? field : -1, faces[f], fS… in DMPlexReconstructGradients_Internal()
H A Dplexsection.c203 PetscInt field = 0; in DMPlexCreateSectionBCDof() local
209 field = bcField[bc]; in DMPlexCreateSectionBCDof()
210 PetscCall(PetscSectionGetFieldComponents(section, field, &Nc)); in DMPlexCreateSectionBCDof()
222 PetscCall(PetscSectionGetFieldDof(section, p, field, &numConst)); in DMPlexCreateSectionBCDof()
237 if (Nf) PetscCall(PetscSectionAddFieldConstraintDof(section, p, field, numConst)); in DMPlexCreateSectionBCDof()
291 const PetscInt field = bcField[bc]; in DMPlexCreateSectionBCIndicesField() local
295 PetscCall(PetscSectionGetFieldComponents(section, field, &Nc)); in DMPlexCreateSectionBCIndicesField()
306 PetscCall(PetscSectionGetFieldDof(section, p, field, &fdof)); in DMPlexCreateSectionBCIndicesField()
314 PetscCall(PetscSectionGetFieldConstraintDof(section, p, field, &fcdof)); in DMPlexCreateSectionBCIndicesField()
315 PetscCall(PetscSectionGetFieldConstraintIndices(section, p, field, &find)); in DMPlexCreateSectionBCIndicesField()
[all …]
/petsc/src/dm/field/impls/da/
H A Ddmfieldda.c12 static PetscErrorCode DMFieldDestroy_DA(DMField field) in DMFieldDestroy_DA() argument
17 dafield = (DMField_DA *)field->data; in DMFieldDestroy_DA()
23 static PetscErrorCode DMFieldView_DA(DMField field, PetscViewer viewer) in DMFieldView_DA() argument
25 DMField_DA *dafield = (DMField_DA *)field->data; in DMFieldView_DA()
33 DM dm = field->dm; in DMFieldView_DA()
38 nc = field->numComponents; in DMFieldView_DA()
179 static PetscErrorCode DMFieldEvaluate_DA(DMField field, Vec points, PetscDataType datatype, void *B… in DMFieldEvaluate_DA() argument
189 dm = field->dm; in DMFieldEvaluate_DA()
190 nc = field->numComponents; in DMFieldEvaluate_DA()
191 dafield = (DMField_DA *)field->data; in DMFieldEvaluate_DA()
[all …]
/petsc/src/dm/field/impls/ds/
H A Ddmfieldds.c18 static PetscErrorCode DMFieldDestroy_DS(DMField field) in DMFieldDestroy_DS() argument
20 DMField_DS *dsfield = (DMField_DS *)field->data; in DMFieldDestroy_DS()
35 static PetscErrorCode DMFieldView_DS(DMField field, PetscViewer viewer) in DMFieldView_DS() argument
37 DMField_DS *dsfield = (DMField_DS *)field->data; in DMFieldView_DS()
51 …PetscCheck(!dsfield->multifieldVec, PetscObjectComm((PetscObject)field), PETSC_ERR_SUP, "View of s… in DMFieldView_DS()
57 static PetscErrorCode DMFieldDSGetHeightDisc(DMField field, PetscInt height, PetscObject discList[]… in DMFieldDSGetHeightDisc() argument
86 static PetscErrorCode DMFieldGetClosure_Internal(DMField field, PetscInt cell, PetscBool *isDG, Pet… in DMFieldGetClosure_Internal() argument
88 DMField_DS *dsfield = (DMField_DS *)field->data; in DMFieldGetClosure_Internal()
120 PetscCall(DMFieldGetDM(field, &fdm)); in DMFieldGetClosure_Internal()
127 static PetscErrorCode DMFieldRestoreClosure_Internal(DMField field, PetscInt cell, PetscBool *isDG,… in DMFieldRestoreClosure_Internal() argument
[all …]
/petsc/src/vec/is/tests/output/
H A Dex5_1.out4 field 0 "Field_0" with 1 components
14 field 1 "Field_1" with 1 components
27 field 0 "Field_0" with 1 components
37 field 1 "Field_1" with 1 components
50 field 0 "Field_0" with 1 components
59 field 1 "Field_1" with 1 components
H A Dex5_0.out4 field 0 "Field_0" with 1 components
14 field 1 "Field_1" with 1 components
27 field 0 "Field_0" with 1 components
37 field 1 "Field_1" with 1 components
50 field 0 "Field_0" with 1 components
59 field 1 "Field_1" with 1 components
/petsc/include/petsc/private/
H A Dpetscdsimpl.h20 PetscInt field; /* The field constrained by the condition */ member
42 …cHashPointer((key).label), PetscHashInt((key).value)), PetscHashInt((key).field)), PetscHashInt((k…
44 …) (((k1).label == (k2).label) ? ((k1).value == (k2).value) ? ((k1).field == (k2).field) ? ((k1).pa…
61 ….value < r.value) ? -1 : (l.value > r.value) ? 1 : ((l.field < r.field) ? -1 : (l.field > r.field)… in PETSC_HASH_MAP()
/petsc/src/vec/is/section/interface/
H A Dsection.c56 (*s)->field = NULL; in PetscSectionCreate()
390 PetscCall(PetscMalloc1(s->numFields, &s->field)); in PetscSectionSetNumFields()
396 PetscCall(PetscSectionCreate(PetscObjectComm((PetscObject)s), &s->field[f])); in PetscSectionSetNumFields()
425 PetscErrorCode PetscSectionGetFieldName(PetscSection s, PetscInt field, const char *fieldName[]) in PetscSectionGetFieldName() argument
430 PetscSectionCheckValidField(field, s->numFields); in PetscSectionGetFieldName()
431 *fieldName = s->fieldNames[field]; in PetscSectionGetFieldName()
452 PetscErrorCode PetscSectionSetFieldName(PetscSection s, PetscInt field, const char fieldName[]) in PetscSectionSetFieldName() argument
457 PetscSectionCheckValidField(field, s->numFields); in PetscSectionSetFieldName()
458 PetscCall(PetscFree(s->fieldNames[field])); in PetscSectionSetFieldName()
459 PetscCall(PetscStrallocpy(fieldName, &s->fieldNames[field])); in PetscSectionSetFieldName()
[all …]
/petsc/src/dm/impls/plex/tests/output/
H A Dex8_1.out27 field 0 with 2 components
67 field 0 with 3 components
113 field 0 with 2 components
162 field 0 with 3 components
243 field 0 with 3 components
382 field 0 with 3 components
511 field 0 with 3 components
/petsc/src/vec/is/utils/ftn-custom/
H A Dzvsectionisf.c26 PETSC_EXTERN void petscsectiongetfieldpointsyms_(PetscSection section, PetscInt *field, PetscInt *n… in petscsectiongetfieldpointsyms_() argument
28 …*__ierr = PetscSectionGetFieldPointSyms(section, *field, *numPoints, points, (const PetscInt ***)p… in petscsectiongetfieldpointsyms_()
30 PETSC_EXTERN void petscsectionrestorefieldpointsyms_(PetscSection section, PetscInt *field, PetscIn… in petscsectionrestorefieldpointsyms_() argument
32 …*__ierr = PetscSectionRestoreFieldPointSyms(section, *field, *numPoints, points, (const PetscInt *… in petscsectionrestorefieldpointsyms_()
/petsc/src/vec/is/section/interface/ftn-custom/
H A Dzvsectionisf90.c33 …iongetfieldconstraintindices_(PetscSection *s, PetscInt *point, PetscInt *field, F90Array1d *indic… in petscsectiongetfieldconstraintindices_() argument
38 *ierr = PetscSectionGetFieldConstraintIndices(*s, *point, *field, &idx); in petscsectiongetfieldconstraintindices_()
40 *ierr = PetscSectionGetFieldConstraintDof(*s, *point, *field, &n); in petscsectiongetfieldconstraintindices_()
45 …estorefieldconstraintindices_(PetscSection *s, PetscInt *point, PetscInt *field, F90Array1d *indic… in petscsectionrestorefieldconstraintindices_() argument
/petsc/src/dm/impls/plex/tests/
H A Dex98.c9 const PetscInt field = 0; in main() local
37 PetscCall(PetscSectionSetFieldName(section, field, "U")); in main()
38 PetscCall(PetscSectionSetFieldComponents(section, field, sdim)); in main()
63 PetscCall(PetscSectionSetFieldConstraintDof(section, pointID[p], field, 1)); in main()
80 PetscCall(PetscSectionSetFieldConstraintIndices(section, pointID[p], field, constraints)); in main()

12345678910>>...16