| fe.c (cef0416bfaf3f2eda18a772a528c82211592945c) | fe.c (f13dfd9ea68e0ddeee984e65c377a1819eab8a8a) |
|---|---|
| 1/* Basis Jet Tabulation 2 3We would like to tabulate the nodal basis functions and derivatives at a set of points, usually quadrature points. We 4follow here the derviation in http://www.math.ttu.edu/~kirby/papers/fiat-toms-2004.pdf. The nodal basis $\psi_i$ can 5be expressed in terms of a prime basis $\phi_i$ which can be stably evaluated. In PETSc, we will use the Legendre basis 6as a prime basis. 7 8 \psi_i = \sum_k \alpha_{ki} \phi_k --- 44 unchanged lines hidden (view full) --- 53PetscLogEvent PETSCFE_SetUp; 54 55PetscFunctionList PetscFEList = NULL; 56PetscBool PetscFERegisterAllCalled = PETSC_FALSE; 57 58/*@C 59 PetscFERegister - Adds a new `PetscFEType` 60 | 1/* Basis Jet Tabulation 2 3We would like to tabulate the nodal basis functions and derivatives at a set of points, usually quadrature points. We 4follow here the derviation in http://www.math.ttu.edu/~kirby/papers/fiat-toms-2004.pdf. The nodal basis $\psi_i$ can 5be expressed in terms of a prime basis $\phi_i$ which can be stably evaluated. In PETSc, we will use the Legendre basis 6as a prime basis. 7 8 \psi_i = \sum_k \alpha_{ki} \phi_k --- 44 unchanged lines hidden (view full) --- 53PetscLogEvent PETSCFE_SetUp; 54 55PetscFunctionList PetscFEList = NULL; 56PetscBool PetscFERegisterAllCalled = PETSC_FALSE; 57 58/*@C 59 PetscFERegister - Adds a new `PetscFEType` 60 |
| 61 Not Collective, No Fortran Support | 61 Not Collective |
| 62 63 Input Parameters: 64+ sname - The name of a new user-defined creation routine 65- function - The creation routine 66 67 Example Usage: 68.vb 69 PetscFERegister("my_fe", MyPetscFECreate); --- 18 unchanged lines hidden (view full) --- 88@*/ 89PetscErrorCode PetscFERegister(const char sname[], PetscErrorCode (*function)(PetscFE)) 90{ 91 PetscFunctionBegin; 92 PetscCall(PetscFunctionListAdd(&PetscFEList, sname, function)); 93 PetscFunctionReturn(PETSC_SUCCESS); 94} 95 | 62 63 Input Parameters: 64+ sname - The name of a new user-defined creation routine 65- function - The creation routine 66 67 Example Usage: 68.vb 69 PetscFERegister("my_fe", MyPetscFECreate); --- 18 unchanged lines hidden (view full) --- 88@*/ 89PetscErrorCode PetscFERegister(const char sname[], PetscErrorCode (*function)(PetscFE)) 90{ 91 PetscFunctionBegin; 92 PetscCall(PetscFunctionListAdd(&PetscFEList, sname, function)); 93 PetscFunctionReturn(PETSC_SUCCESS); 94} 95 |
| 96/*@ | 96/*@C |
| 97 PetscFESetType - Builds a particular `PetscFE` 98 99 Collective 100 101 Input Parameters: 102+ fem - The `PetscFE` object 103- name - The kind of FEM space 104 --- 21 unchanged lines hidden (view full) --- 126 PetscTryTypeMethod(fem, destroy); 127 fem->ops->destroy = NULL; 128 129 PetscCall((*r)(fem)); 130 PetscCall(PetscObjectChangeTypeName((PetscObject)fem, name)); 131 PetscFunctionReturn(PETSC_SUCCESS); 132} 133 | 97 PetscFESetType - Builds a particular `PetscFE` 98 99 Collective 100 101 Input Parameters: 102+ fem - The `PetscFE` object 103- name - The kind of FEM space 104 --- 21 unchanged lines hidden (view full) --- 126 PetscTryTypeMethod(fem, destroy); 127 fem->ops->destroy = NULL; 128 129 PetscCall((*r)(fem)); 130 PetscCall(PetscObjectChangeTypeName((PetscObject)fem, name)); 131 PetscFunctionReturn(PETSC_SUCCESS); 132} 133 |
| 134/*@ | 134/*@C |
| 135 PetscFEGetType - Gets the `PetscFEType` (as a string) from the `PetscFE` object. 136 137 Not Collective 138 139 Input Parameter: 140. fem - The `PetscFE` 141 142 Output Parameter: --- 8 unchanged lines hidden (view full) --- 151 PetscFunctionBegin; 152 PetscValidHeaderSpecific(fem, PETSCFE_CLASSID, 1); 153 PetscAssertPointer(name, 2); 154 if (!PetscFERegisterAllCalled) PetscCall(PetscFERegisterAll()); 155 *name = ((PetscObject)fem)->type_name; 156 PetscFunctionReturn(PETSC_SUCCESS); 157} 158 | 135 PetscFEGetType - Gets the `PetscFEType` (as a string) from the `PetscFE` object. 136 137 Not Collective 138 139 Input Parameter: 140. fem - The `PetscFE` 141 142 Output Parameter: --- 8 unchanged lines hidden (view full) --- 151 PetscFunctionBegin; 152 PetscValidHeaderSpecific(fem, PETSCFE_CLASSID, 1); 153 PetscAssertPointer(name, 2); 154 if (!PetscFERegisterAllCalled) PetscCall(PetscFERegisterAll()); 155 *name = ((PetscObject)fem)->type_name; 156 PetscFunctionReturn(PETSC_SUCCESS); 157} 158 |
| 159/*@ | 159/*@C |
| 160 PetscFEViewFromOptions - View from a `PetscFE` based on values in the options database 161 162 Collective 163 164 Input Parameters: 165+ A - the `PetscFE` object 166. obj - Optional object that provides the options prefix 167- name - command line option name --- 5 unchanged lines hidden (view full) --- 173PetscErrorCode PetscFEViewFromOptions(PetscFE A, PetscObject obj, const char name[]) 174{ 175 PetscFunctionBegin; 176 PetscValidHeaderSpecific(A, PETSCFE_CLASSID, 1); 177 PetscCall(PetscObjectViewFromOptions((PetscObject)A, obj, name)); 178 PetscFunctionReturn(PETSC_SUCCESS); 179} 180 | 160 PetscFEViewFromOptions - View from a `PetscFE` based on values in the options database 161 162 Collective 163 164 Input Parameters: 165+ A - the `PetscFE` object 166. obj - Optional object that provides the options prefix 167- name - command line option name --- 5 unchanged lines hidden (view full) --- 173PetscErrorCode PetscFEViewFromOptions(PetscFE A, PetscObject obj, const char name[]) 174{ 175 PetscFunctionBegin; 176 PetscValidHeaderSpecific(A, PETSCFE_CLASSID, 1); 177 PetscCall(PetscObjectViewFromOptions((PetscObject)A, obj, name)); 178 PetscFunctionReturn(PETSC_SUCCESS); 179} 180 |
| 181/*@ | 181/*@C |
| 182 PetscFEView - Views a `PetscFE` 183 184 Collective 185 186 Input Parameters: 187+ fem - the `PetscFE` object to view 188- viewer - the viewer 189 --- 58 unchanged lines hidden (view full) --- 248 PetscTryTypeMethod(fem, setfromoptions, PetscOptionsObject); 249 /* process any options handlers added with PetscObjectAddOptionsHandler() */ 250 PetscCall(PetscObjectProcessOptionsHandlers((PetscObject)fem, PetscOptionsObject)); 251 PetscOptionsEnd(); 252 PetscCall(PetscFEViewFromOptions(fem, NULL, "-petscfe_view")); 253 PetscFunctionReturn(PETSC_SUCCESS); 254} 255 | 182 PetscFEView - Views a `PetscFE` 183 184 Collective 185 186 Input Parameters: 187+ fem - the `PetscFE` object to view 188- viewer - the viewer 189 --- 58 unchanged lines hidden (view full) --- 248 PetscTryTypeMethod(fem, setfromoptions, PetscOptionsObject); 249 /* process any options handlers added with PetscObjectAddOptionsHandler() */ 250 PetscCall(PetscObjectProcessOptionsHandlers((PetscObject)fem, PetscOptionsObject)); 251 PetscOptionsEnd(); 252 PetscCall(PetscFEViewFromOptions(fem, NULL, "-petscfe_view")); 253 PetscFunctionReturn(PETSC_SUCCESS); 254} 255 |
| 256/*@ | 256/*@C |
| 257 PetscFESetUp - Construct data structures for the `PetscFE` after the `PetscFEType` has been set 258 259 Collective 260 261 Input Parameter: 262. fem - the `PetscFE` object to setup 263 264 Level: intermediate --- 481 unchanged lines hidden (view full) --- 746 PetscFEGetNumDof - Returns the number of dofs (dual basis vectors) associated to mesh points on the reference cell of a given dimension 747 748 Not Collective 749 750 Input Parameter: 751. fem - The `PetscFE` object 752 753 Output Parameter: | 257 PetscFESetUp - Construct data structures for the `PetscFE` after the `PetscFEType` has been set 258 259 Collective 260 261 Input Parameter: 262. fem - the `PetscFE` object to setup 263 264 Level: intermediate --- 481 unchanged lines hidden (view full) --- 746 PetscFEGetNumDof - Returns the number of dofs (dual basis vectors) associated to mesh points on the reference cell of a given dimension 747 748 Not Collective 749 750 Input Parameter: 751. fem - The `PetscFE` object 752 753 Output Parameter: |
| 754. numDof - Array with the number of dofs per dimension | 754. numDof - Array of length `dim` with the number of dofs in each dimension |
| 755 756 Level: intermediate 757 758.seealso: `PetscFE`, `PetscSpace`, `PetscDualSpace`, `PetscFECreate()` 759@*/ | 755 756 Level: intermediate 757 758.seealso: `PetscFE`, `PetscSpace`, `PetscDualSpace`, `PetscFECreate()` 759@*/ |
| 760PetscErrorCode PetscFEGetNumDof(PetscFE fem, const PetscInt **numDof) | 760PetscErrorCode PetscFEGetNumDof(PetscFE fem, const PetscInt *numDof[]) |
| 761{ 762 PetscFunctionBegin; 763 PetscValidHeaderSpecific(fem, PETSCFE_CLASSID, 1); 764 PetscAssertPointer(numDof, 2); 765 PetscCall(PetscDualSpaceGetNumDof(fem->dualSpace, numDof)); 766 PetscFunctionReturn(PETSC_SUCCESS); 767} 768 --- 255 unchanged lines hidden (view full) --- 1024 PetscCheck(T->cdim == cdim, PETSC_COMM_SELF, PETSC_ERR_ARG_SIZ, "Tabulation cdim %" PetscInt_FMT " must match requested cdim %" PetscInt_FMT, T->cdim, cdim); 1025 } 1026 T->Nr = 1; 1027 T->Np = npoints; 1028 PetscUseTypeMethod(fem, createtabulation, npoints, points, K, T); 1029 PetscFunctionReturn(PETSC_SUCCESS); 1030} 1031 | 761{ 762 PetscFunctionBegin; 763 PetscValidHeaderSpecific(fem, PETSCFE_CLASSID, 1); 764 PetscAssertPointer(numDof, 2); 765 PetscCall(PetscDualSpaceGetNumDof(fem->dualSpace, numDof)); 766 PetscFunctionReturn(PETSC_SUCCESS); 767} 768 --- 255 unchanged lines hidden (view full) --- 1024 PetscCheck(T->cdim == cdim, PETSC_COMM_SELF, PETSC_ERR_ARG_SIZ, "Tabulation cdim %" PetscInt_FMT " must match requested cdim %" PetscInt_FMT, T->cdim, cdim); 1025 } 1026 T->Nr = 1; 1027 T->Np = npoints; 1028 PetscUseTypeMethod(fem, createtabulation, npoints, points, K, T); 1029 PetscFunctionReturn(PETSC_SUCCESS); 1030} 1031 |
| 1032/*@ | 1032/*@C |
| 1033 PetscTabulationDestroy - Frees memory from the associated tabulation. 1034 1035 Not Collective 1036 1037 Input Parameter: 1038. T - The tabulation 1039 1040 Level: intermediate --- 114 unchanged lines hidden (view full) --- 1155{ 1156 PetscFunctionBegin; 1157 PetscValidHeaderSpecific(fem, PETSCFE_CLASSID, 1); 1158 PetscAssertPointer(dim, 2); 1159 PetscTryTypeMethod(fem, getdimension, dim); 1160 PetscFunctionReturn(PETSC_SUCCESS); 1161} 1162 | 1033 PetscTabulationDestroy - Frees memory from the associated tabulation. 1034 1035 Not Collective 1036 1037 Input Parameter: 1038. T - The tabulation 1039 1040 Level: intermediate --- 114 unchanged lines hidden (view full) --- 1155{ 1156 PetscFunctionBegin; 1157 PetscValidHeaderSpecific(fem, PETSCFE_CLASSID, 1); 1158 PetscAssertPointer(dim, 2); 1159 PetscTryTypeMethod(fem, getdimension, dim); 1160 PetscFunctionReturn(PETSC_SUCCESS); 1161} 1162 |
| 1163/*@ | 1163/*@C |
| 1164 PetscFEPushforward - Map the reference element function to real space 1165 1166 Input Parameters: 1167+ fe - The `PetscFE` 1168. fegeom - The cell geometry 1169. Nv - The number of function values 1170- vals - The function values 1171 --- 11 unchanged lines hidden (view full) --- 1183@*/ 1184PetscErrorCode PetscFEPushforward(PetscFE fe, PetscFEGeom *fegeom, PetscInt Nv, PetscScalar vals[]) 1185{ 1186 PetscFunctionBeginHot; 1187 PetscCall(PetscDualSpacePushforward(fe->dualSpace, fegeom, Nv, fe->numComponents, vals)); 1188 PetscFunctionReturn(PETSC_SUCCESS); 1189} 1190 | 1164 PetscFEPushforward - Map the reference element function to real space 1165 1166 Input Parameters: 1167+ fe - The `PetscFE` 1168. fegeom - The cell geometry 1169. Nv - The number of function values 1170- vals - The function values 1171 --- 11 unchanged lines hidden (view full) --- 1183@*/ 1184PetscErrorCode PetscFEPushforward(PetscFE fe, PetscFEGeom *fegeom, PetscInt Nv, PetscScalar vals[]) 1185{ 1186 PetscFunctionBeginHot; 1187 PetscCall(PetscDualSpacePushforward(fe->dualSpace, fegeom, Nv, fe->numComponents, vals)); 1188 PetscFunctionReturn(PETSC_SUCCESS); 1189} 1190 |
| 1191/*@ | 1191/*@C |
| 1192 PetscFEPushforwardGradient - Map the reference element function gradient to real space 1193 1194 Input Parameters: 1195+ fe - The `PetscFE` 1196. fegeom - The cell geometry 1197. Nv - The number of function gradient values 1198- vals - The function gradient values 1199 --- 11 unchanged lines hidden (view full) --- 1211@*/ 1212PetscErrorCode PetscFEPushforwardGradient(PetscFE fe, PetscFEGeom *fegeom, PetscInt Nv, PetscScalar vals[]) 1213{ 1214 PetscFunctionBeginHot; 1215 PetscCall(PetscDualSpacePushforwardGradient(fe->dualSpace, fegeom, Nv, fe->numComponents, vals)); 1216 PetscFunctionReturn(PETSC_SUCCESS); 1217} 1218 | 1192 PetscFEPushforwardGradient - Map the reference element function gradient to real space 1193 1194 Input Parameters: 1195+ fe - The `PetscFE` 1196. fegeom - The cell geometry 1197. Nv - The number of function gradient values 1198- vals - The function gradient values 1199 --- 11 unchanged lines hidden (view full) --- 1211@*/ 1212PetscErrorCode PetscFEPushforwardGradient(PetscFE fe, PetscFEGeom *fegeom, PetscInt Nv, PetscScalar vals[]) 1213{ 1214 PetscFunctionBeginHot; 1215 PetscCall(PetscDualSpacePushforwardGradient(fe->dualSpace, fegeom, Nv, fe->numComponents, vals)); 1216 PetscFunctionReturn(PETSC_SUCCESS); 1217} 1218 |
| 1219/*@ | 1219/*@C |
| 1220 PetscFEPushforwardHessian - Map the reference element function Hessian to real space 1221 1222 Input Parameters: 1223+ fe - The `PetscFE` 1224. fegeom - The cell geometry 1225. Nv - The number of function Hessian values 1226- vals - The function Hessian values 1227 --- 102 unchanged lines hidden (view full) --- 1330ex52_integrateElementOpenCL.c: 1331PETSC_EXTERN PetscErrorCode IntegrateElementBatchGPU(PetscInt spatial_dim, PetscInt Ne, PetscInt Ncb, PetscInt Nbc, PetscInt N_bl, const PetscScalar coefficients[], 1332 const PetscReal jacobianInverses[], const PetscReal jacobianDeterminants[], PetscScalar elemVec[], 1333 PetscLogEvent event, PetscInt debug, PetscInt pde_op) 1334 1335__kernel void integrateElementQuadrature(int N_cb, __global float *coefficients, __global float *jacobianInverses, __global float *jacobianDeterminants, __global float *elemVec) 1336*/ 1337 | 1220 PetscFEPushforwardHessian - Map the reference element function Hessian to real space 1221 1222 Input Parameters: 1223+ fe - The `PetscFE` 1224. fegeom - The cell geometry 1225. Nv - The number of function Hessian values 1226- vals - The function Hessian values 1227 --- 102 unchanged lines hidden (view full) --- 1330ex52_integrateElementOpenCL.c: 1331PETSC_EXTERN PetscErrorCode IntegrateElementBatchGPU(PetscInt spatial_dim, PetscInt Ne, PetscInt Ncb, PetscInt Nbc, PetscInt N_bl, const PetscScalar coefficients[], 1332 const PetscReal jacobianInverses[], const PetscReal jacobianDeterminants[], PetscScalar elemVec[], 1333 PetscLogEvent event, PetscInt debug, PetscInt pde_op) 1334 1335__kernel void integrateElementQuadrature(int N_cb, __global float *coefficients, __global float *jacobianInverses, __global float *jacobianDeterminants, __global float *elemVec) 1336*/ 1337 |
| 1338/*@ | 1338/*@C |
| 1339 PetscFEIntegrate - Produce the integral for the given field for a chunk of elements by quadrature integration 1340 1341 Not Collective 1342 1343 Input Parameters: 1344+ prob - The `PetscDS` specifying the discretizations and continuum functions 1345. field - The field being integrated 1346. Ne - The number of elements in the chunk --- 54 unchanged lines hidden (view full) --- 1401 1402 PetscFunctionBegin; 1403 PetscValidHeaderSpecific(prob, PETSCDS_CLASSID, 1); 1404 PetscCall(PetscDSGetDiscretization(prob, field, (PetscObject *)&fe)); 1405 if (fe->ops->integratebd) PetscCall((*fe->ops->integratebd)(prob, field, obj_func, Ne, geom, coefficients, probAux, coefficientsAux, integral)); 1406 PetscFunctionReturn(PETSC_SUCCESS); 1407} 1408 | 1339 PetscFEIntegrate - Produce the integral for the given field for a chunk of elements by quadrature integration 1340 1341 Not Collective 1342 1343 Input Parameters: 1344+ prob - The `PetscDS` specifying the discretizations and continuum functions 1345. field - The field being integrated 1346. Ne - The number of elements in the chunk --- 54 unchanged lines hidden (view full) --- 1401 1402 PetscFunctionBegin; 1403 PetscValidHeaderSpecific(prob, PETSCDS_CLASSID, 1); 1404 PetscCall(PetscDSGetDiscretization(prob, field, (PetscObject *)&fe)); 1405 if (fe->ops->integratebd) PetscCall((*fe->ops->integratebd)(prob, field, obj_func, Ne, geom, coefficients, probAux, coefficientsAux, integral)); 1406 PetscFunctionReturn(PETSC_SUCCESS); 1407} 1408 |
| 1409/*@ | 1409/*@C |
| 1410 PetscFEIntegrateResidual - Produce the element residual vector for a chunk of elements by quadrature integration 1411 1412 Not Collective 1413 1414 Input Parameters: 1415+ ds - The `PetscDS` specifying the discretizations and continuum functions 1416. key - The (label+value, field) being integrated 1417. Ne - The number of elements in the chunk --- 27 unchanged lines hidden (view full) --- 1445 1446 PetscFunctionBeginHot; 1447 PetscValidHeaderSpecific(ds, PETSCDS_CLASSID, 1); 1448 PetscCall(PetscDSGetDiscretization(ds, key.field, (PetscObject *)&fe)); 1449 if (fe->ops->integrateresidual) PetscCall((*fe->ops->integrateresidual)(ds, key, Ne, cgeom, coefficients, coefficients_t, probAux, coefficientsAux, t, elemVec)); 1450 PetscFunctionReturn(PETSC_SUCCESS); 1451} 1452 | 1410 PetscFEIntegrateResidual - Produce the element residual vector for a chunk of elements by quadrature integration 1411 1412 Not Collective 1413 1414 Input Parameters: 1415+ ds - The `PetscDS` specifying the discretizations and continuum functions 1416. key - The (label+value, field) being integrated 1417. Ne - The number of elements in the chunk --- 27 unchanged lines hidden (view full) --- 1445 1446 PetscFunctionBeginHot; 1447 PetscValidHeaderSpecific(ds, PETSCDS_CLASSID, 1); 1448 PetscCall(PetscDSGetDiscretization(ds, key.field, (PetscObject *)&fe)); 1449 if (fe->ops->integrateresidual) PetscCall((*fe->ops->integrateresidual)(ds, key, Ne, cgeom, coefficients, coefficients_t, probAux, coefficientsAux, t, elemVec)); 1450 PetscFunctionReturn(PETSC_SUCCESS); 1451} 1452 |
| 1453/*@ | 1453/*@C |
| 1454 PetscFEIntegrateBdResidual - Produce the element residual vector for a chunk of elements by quadrature integration over a boundary 1455 1456 Not Collective 1457 1458 Input Parameters: 1459+ ds - The `PetscDS` specifying the discretizations and continuum functions 1460. wf - The PetscWeakForm object holding the pointwise functions 1461. key - The (label+value, field) being integrated --- 18 unchanged lines hidden (view full) --- 1480 1481 PetscFunctionBegin; 1482 PetscValidHeaderSpecific(ds, PETSCDS_CLASSID, 1); 1483 PetscCall(PetscDSGetDiscretization(ds, key.field, (PetscObject *)&fe)); 1484 if (fe->ops->integratebdresidual) PetscCall((*fe->ops->integratebdresidual)(ds, wf, key, Ne, fgeom, coefficients, coefficients_t, probAux, coefficientsAux, t, elemVec)); 1485 PetscFunctionReturn(PETSC_SUCCESS); 1486} 1487 | 1454 PetscFEIntegrateBdResidual - Produce the element residual vector for a chunk of elements by quadrature integration over a boundary 1455 1456 Not Collective 1457 1458 Input Parameters: 1459+ ds - The `PetscDS` specifying the discretizations and continuum functions 1460. wf - The PetscWeakForm object holding the pointwise functions 1461. key - The (label+value, field) being integrated --- 18 unchanged lines hidden (view full) --- 1480 1481 PetscFunctionBegin; 1482 PetscValidHeaderSpecific(ds, PETSCDS_CLASSID, 1); 1483 PetscCall(PetscDSGetDiscretization(ds, key.field, (PetscObject *)&fe)); 1484 if (fe->ops->integratebdresidual) PetscCall((*fe->ops->integratebdresidual)(ds, wf, key, Ne, fgeom, coefficients, coefficients_t, probAux, coefficientsAux, t, elemVec)); 1485 PetscFunctionReturn(PETSC_SUCCESS); 1486} 1487 |
| 1488/*@ | 1488/*@C |
| 1489 PetscFEIntegrateHybridResidual - Produce the element residual vector for a chunk of hybrid element faces by quadrature integration 1490 1491 Not Collective 1492 1493 Input Parameters: 1494+ ds - The `PetscDS` specifying the discretizations and continuum functions 1495. dsIn - The `PetscDS` specifying the discretizations and continuum functions for input 1496. key - The (label+value, field) being integrated --- 20 unchanged lines hidden (view full) --- 1517 PetscFunctionBegin; 1518 PetscValidHeaderSpecific(ds, PETSCDS_CLASSID, 1); 1519 PetscValidHeaderSpecific(dsIn, PETSCDS_CLASSID, 2); 1520 PetscCall(PetscDSGetDiscretization(ds, key.field, (PetscObject *)&fe)); 1521 if (fe->ops->integratehybridresidual) PetscCall((*fe->ops->integratehybridresidual)(ds, dsIn, key, s, Ne, fgeom, coefficients, coefficients_t, probAux, coefficientsAux, t, elemVec)); 1522 PetscFunctionReturn(PETSC_SUCCESS); 1523} 1524 | 1489 PetscFEIntegrateHybridResidual - Produce the element residual vector for a chunk of hybrid element faces by quadrature integration 1490 1491 Not Collective 1492 1493 Input Parameters: 1494+ ds - The `PetscDS` specifying the discretizations and continuum functions 1495. dsIn - The `PetscDS` specifying the discretizations and continuum functions for input 1496. key - The (label+value, field) being integrated --- 20 unchanged lines hidden (view full) --- 1517 PetscFunctionBegin; 1518 PetscValidHeaderSpecific(ds, PETSCDS_CLASSID, 1); 1519 PetscValidHeaderSpecific(dsIn, PETSCDS_CLASSID, 2); 1520 PetscCall(PetscDSGetDiscretization(ds, key.field, (PetscObject *)&fe)); 1521 if (fe->ops->integratehybridresidual) PetscCall((*fe->ops->integratehybridresidual)(ds, dsIn, key, s, Ne, fgeom, coefficients, coefficients_t, probAux, coefficientsAux, t, elemVec)); 1522 PetscFunctionReturn(PETSC_SUCCESS); 1523} 1524 |
| 1525/*@ | 1525/*@C |
| 1526 PetscFEIntegrateJacobian - Produce the element Jacobian for a chunk of elements by quadrature integration 1527 1528 Not Collective 1529 1530 Input Parameters: 1531+ ds - The `PetscDS` specifying the discretizations and continuum functions 1532. jtype - The type of matrix pointwise functions that should be used 1533. key - The (label+value, fieldI*Nf + fieldJ) being integrated --- 33 unchanged lines hidden (view full) --- 1567 PetscFunctionBegin; 1568 PetscValidHeaderSpecific(ds, PETSCDS_CLASSID, 1); 1569 PetscCall(PetscDSGetNumFields(ds, &Nf)); 1570 PetscCall(PetscDSGetDiscretization(ds, key.field / Nf, (PetscObject *)&fe)); 1571 if (fe->ops->integratejacobian) PetscCall((*fe->ops->integratejacobian)(ds, jtype, key, Ne, cgeom, coefficients, coefficients_t, probAux, coefficientsAux, t, u_tshift, elemMat)); 1572 PetscFunctionReturn(PETSC_SUCCESS); 1573} 1574 | 1526 PetscFEIntegrateJacobian - Produce the element Jacobian for a chunk of elements by quadrature integration 1527 1528 Not Collective 1529 1530 Input Parameters: 1531+ ds - The `PetscDS` specifying the discretizations and continuum functions 1532. jtype - The type of matrix pointwise functions that should be used 1533. key - The (label+value, fieldI*Nf + fieldJ) being integrated --- 33 unchanged lines hidden (view full) --- 1567 PetscFunctionBegin; 1568 PetscValidHeaderSpecific(ds, PETSCDS_CLASSID, 1); 1569 PetscCall(PetscDSGetNumFields(ds, &Nf)); 1570 PetscCall(PetscDSGetDiscretization(ds, key.field / Nf, (PetscObject *)&fe)); 1571 if (fe->ops->integratejacobian) PetscCall((*fe->ops->integratejacobian)(ds, jtype, key, Ne, cgeom, coefficients, coefficients_t, probAux, coefficientsAux, t, u_tshift, elemMat)); 1572 PetscFunctionReturn(PETSC_SUCCESS); 1573} 1574 |
| 1575/*@ | 1575/*@C |
| 1576 PetscFEIntegrateBdJacobian - Produce the boundary element Jacobian for a chunk of elements by quadrature integration 1577 1578 Not Collective 1579 1580 Input Parameters: 1581+ ds - The `PetscDS` specifying the discretizations and continuum functions 1582. wf - The PetscWeakForm holding the pointwise functions 1583. jtype - The type of matrix pointwise functions that should be used --- 34 unchanged lines hidden (view full) --- 1618 PetscFunctionBegin; 1619 PetscValidHeaderSpecific(ds, PETSCDS_CLASSID, 1); 1620 PetscCall(PetscDSGetNumFields(ds, &Nf)); 1621 PetscCall(PetscDSGetDiscretization(ds, key.field / Nf, (PetscObject *)&fe)); 1622 if (fe->ops->integratebdjacobian) PetscCall((*fe->ops->integratebdjacobian)(ds, wf, jtype, key, Ne, fgeom, coefficients, coefficients_t, probAux, coefficientsAux, t, u_tshift, elemMat)); 1623 PetscFunctionReturn(PETSC_SUCCESS); 1624} 1625 | 1576 PetscFEIntegrateBdJacobian - Produce the boundary element Jacobian for a chunk of elements by quadrature integration 1577 1578 Not Collective 1579 1580 Input Parameters: 1581+ ds - The `PetscDS` specifying the discretizations and continuum functions 1582. wf - The PetscWeakForm holding the pointwise functions 1583. jtype - The type of matrix pointwise functions that should be used --- 34 unchanged lines hidden (view full) --- 1618 PetscFunctionBegin; 1619 PetscValidHeaderSpecific(ds, PETSCDS_CLASSID, 1); 1620 PetscCall(PetscDSGetNumFields(ds, &Nf)); 1621 PetscCall(PetscDSGetDiscretization(ds, key.field / Nf, (PetscObject *)&fe)); 1622 if (fe->ops->integratebdjacobian) PetscCall((*fe->ops->integratebdjacobian)(ds, wf, jtype, key, Ne, fgeom, coefficients, coefficients_t, probAux, coefficientsAux, t, u_tshift, elemMat)); 1623 PetscFunctionReturn(PETSC_SUCCESS); 1624} 1625 |
| 1626/*@ | 1626/*@C |
| 1627 PetscFEIntegrateHybridJacobian - Produce the boundary element Jacobian for a chunk of hybrid elements by quadrature integration 1628 1629 Not Collective 1630 1631 Input Parameters: 1632+ ds - The `PetscDS` specifying the discretizations and continuum functions for the output 1633. dsIn - The `PetscDS` specifying the discretizations and continuum functions for the input 1634. jtype - The type of matrix pointwise functions that should be used --- 413 unchanged lines hidden (view full) --- 2048 } 2049 PetscCall(PetscDTCreateDefaultQuadrature(ct, qorder, &q, &fq)); 2050 /* Create finite element */ 2051 PetscCall(PetscFECreateFromSpaces(P, Q, q, fq, fem)); 2052 if (setFromOptions) PetscCall(PetscFESetFromOptions(*fem)); 2053 PetscFunctionReturn(PETSC_SUCCESS); 2054} 2055 | 1627 PetscFEIntegrateHybridJacobian - Produce the boundary element Jacobian for a chunk of hybrid elements by quadrature integration 1628 1629 Not Collective 1630 1631 Input Parameters: 1632+ ds - The `PetscDS` specifying the discretizations and continuum functions for the output 1633. dsIn - The `PetscDS` specifying the discretizations and continuum functions for the input 1634. jtype - The type of matrix pointwise functions that should be used --- 413 unchanged lines hidden (view full) --- 2048 } 2049 PetscCall(PetscDTCreateDefaultQuadrature(ct, qorder, &q, &fq)); 2050 /* Create finite element */ 2051 PetscCall(PetscFECreateFromSpaces(P, Q, q, fq, fem)); 2052 if (setFromOptions) PetscCall(PetscFESetFromOptions(*fem)); 2053 PetscFunctionReturn(PETSC_SUCCESS); 2054} 2055 |
| 2056/*@ | 2056/*@C |
| 2057 PetscFECreateDefault - Create a `PetscFE` for basic FEM computation 2058 2059 Collective 2060 2061 Input Parameters: 2062+ comm - The MPI comm 2063. dim - The spatial dimension 2064. Nc - The number of components --- 13 unchanged lines hidden (view full) --- 2078@*/ 2079PetscErrorCode PetscFECreateDefault(MPI_Comm comm, PetscInt dim, PetscInt Nc, PetscBool isSimplex, const char prefix[], PetscInt qorder, PetscFE *fem) 2080{ 2081 PetscFunctionBegin; 2082 PetscCall(PetscFECreate_Internal(comm, dim, Nc, DMPolytopeTypeSimpleShape(dim, isSimplex), prefix, PETSC_DECIDE, qorder, PETSC_TRUE, fem)); 2083 PetscFunctionReturn(PETSC_SUCCESS); 2084} 2085 | 2057 PetscFECreateDefault - Create a `PetscFE` for basic FEM computation 2058 2059 Collective 2060 2061 Input Parameters: 2062+ comm - The MPI comm 2063. dim - The spatial dimension 2064. Nc - The number of components --- 13 unchanged lines hidden (view full) --- 2078@*/ 2079PetscErrorCode PetscFECreateDefault(MPI_Comm comm, PetscInt dim, PetscInt Nc, PetscBool isSimplex, const char prefix[], PetscInt qorder, PetscFE *fem) 2080{ 2081 PetscFunctionBegin; 2082 PetscCall(PetscFECreate_Internal(comm, dim, Nc, DMPolytopeTypeSimpleShape(dim, isSimplex), prefix, PETSC_DECIDE, qorder, PETSC_TRUE, fem)); 2083 PetscFunctionReturn(PETSC_SUCCESS); 2084} 2085 |
| 2086/*@ | 2086/*@C |
| 2087 PetscFECreateByCell - Create a `PetscFE` for basic FEM computation 2088 2089 Collective 2090 2091 Input Parameters: 2092+ comm - The MPI comm 2093. dim - The spatial dimension 2094. Nc - The number of components --- 73 unchanged lines hidden (view full) --- 2168@*/ 2169PetscErrorCode PetscFECreateLagrangeByCell(MPI_Comm comm, PetscInt dim, PetscInt Nc, DMPolytopeType ct, PetscInt k, PetscInt qorder, PetscFE *fem) 2170{ 2171 PetscFunctionBegin; 2172 PetscCall(PetscFECreate_Internal(comm, dim, Nc, ct, NULL, k, qorder, PETSC_FALSE, fem)); 2173 PetscFunctionReturn(PETSC_SUCCESS); 2174} 2175 | 2087 PetscFECreateByCell - Create a `PetscFE` for basic FEM computation 2088 2089 Collective 2090 2091 Input Parameters: 2092+ comm - The MPI comm 2093. dim - The spatial dimension 2094. Nc - The number of components --- 73 unchanged lines hidden (view full) --- 2168@*/ 2169PetscErrorCode PetscFECreateLagrangeByCell(MPI_Comm comm, PetscInt dim, PetscInt Nc, DMPolytopeType ct, PetscInt k, PetscInt qorder, PetscFE *fem) 2170{ 2171 PetscFunctionBegin; 2172 PetscCall(PetscFECreate_Internal(comm, dim, Nc, ct, NULL, k, qorder, PETSC_FALSE, fem)); 2173 PetscFunctionReturn(PETSC_SUCCESS); 2174} 2175 |
| 2176/*@ | 2176/*@C |
| 2177 PetscFESetName - Names the `PetscFE` and its subobjects 2178 2179 Not Collective 2180 2181 Input Parameters: 2182+ fe - The `PetscFE` 2183- name - The name 2184 --- 406 unchanged lines hidden --- | 2177 PetscFESetName - Names the `PetscFE` and its subobjects 2178 2179 Not Collective 2180 2181 Input Parameters: 2182+ fe - The `PetscFE` 2183- name - The name 2184 --- 406 unchanged lines hidden --- |