Lines Matching refs:s
21 PetscErrorCode PetscSectionVecView(PetscSection s, Vec v, PetscViewer viewer) in PetscSectionVecView() argument
28 PetscValidHeaderSpecific(s, PETSC_SECTION_CLASSID, 1); in PetscSectionVecView()
37 if (s->numFields) { in PetscSectionVecView()
38 …PetscCall(PetscViewerASCIIPrintf(viewer, "%s with %" PetscInt_FMT " fields\n", name, s->numFields)… in PetscSectionVecView()
39 for (f = 0; f < s->numFields; ++f) { in PetscSectionVecView()
40 …viewer, " field %" PetscInt_FMT " with %" PetscInt_FMT " components\n", f, s->numFieldComponents[… in PetscSectionVecView()
42 PetscCall(PetscSectionArrayView_ASCII_Internal(s->field[f], array, PETSC_SCALAR, viewer)); in PetscSectionVecView()
48 PetscCall(PetscSectionArrayView_ASCII_Internal(s, array, PETSC_SCALAR, viewer)); in PetscSectionVecView()
72 PetscErrorCode VecGetValuesSection(Vec v, PetscSection s, PetscInt point, PetscScalar *values[]) in VecGetValuesSection() argument
75 const PetscInt p = point - s->pStart; in VecGetValuesSection()
79 PetscValidHeaderSpecific(s, PETSC_SECTION_CLASSID, 2); in VecGetValuesSection()
81 *values = &baseArray[s->atlasOff[p]]; in VecGetValuesSection()
102 PetscErrorCode VecSetValuesSection(Vec v, PetscSection s, PetscInt point, const PetscScalar values[… in VecSetValuesSection() argument
108 const PetscInt p = point - s->pStart; in VecSetValuesSection()
114 PetscValidHeaderSpecific(s, PETSC_SECTION_CLASSID, 2); in VecSetValuesSection()
115 PetscCall(PetscSectionGetConstraintDof(s, point, &cDim)); in VecSetValuesSection()
117 array = &baseArray[s->atlasOff[p]]; in VecSetValuesSection()
120 const PetscInt dim = s->atlasDof[p]; in VecSetValuesSection()
132 for (field = 0; field < s->numFields; ++field) { in VecSetValuesSection()
133 const PetscInt dim = s->field[field]->atlasDof[p]; /* PetscSectionGetFieldDof() */ in VecSetValuesSection()
141 const PetscInt dim = s->atlasDof[p]; in VecSetValuesSection()
145 PetscCall(PetscSectionGetConstraintIndices(s, point, &cDof)); in VecSetValuesSection()
172 PetscCall(PetscSectionGetConstraintIndices(s, point, &cDof)); in VecSetValuesSection()
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()
257 PetscErrorCode PetscSectionVecNorm(PetscSection s, PetscSection gs, Vec x, NormType type, PetscReal… in PetscSectionVecNorm() argument
262 PetscValidHeaderSpecific(s, PETSC_SECTION_CLASSID, 1); in PetscSectionVecNorm()
266 PetscCall(PetscSectionGetNumFields(s, &Nf)); in PetscSectionVecNorm()
269 PetscCall(PetscSectionGetChart(s, &pStart, &pEnd)); in PetscSectionVecNorm()
274 PetscCall(PetscSectionGetField_Internal(s, gs, x, f, pStart, pEnd, &is, &subv)); in PetscSectionVecNorm()
276 PetscCall(PetscSectionRestoreField_Internal(s, gs, x, f, pStart, pEnd, &is, &subv)); in PetscSectionVecNorm()