| libceedsetup.c (9890f3e7f85f457150d1c5a387cb512d35d373a0) | libceedsetup.c (5dfaedb85d2aa5da89951bb5d8f41d61be09bbf6) |
|---|---|
| 1#include <stdio.h> 2#include "../include/libceedsetup.h" 3#include "../include/petscutils.h" 4 5// ----------------------------------------------------------------------------- 6// Destroy libCEED operator objects 7// ----------------------------------------------------------------------------- 8PetscErrorCode CeedDataDestroy(CeedInt i, CeedData data) { 9 int ierr; 10 | 1#include <stdio.h> 2#include "../include/libceedsetup.h" 3#include "../include/petscutils.h" 4 5// ----------------------------------------------------------------------------- 6// Destroy libCEED operator objects 7// ----------------------------------------------------------------------------- 8PetscErrorCode CeedDataDestroy(CeedInt i, CeedData data) { 9 int ierr; 10 |
| 11 PetscFunctionBeginUser; |
|
| 11 CeedVectorDestroy(&data->q_data); 12 CeedVectorDestroy(&data->x_ceed); 13 CeedVectorDestroy(&data->y_ceed); 14 CeedBasisDestroy(&data->basis_x); 15 CeedBasisDestroy(&data->basis_u); 16 CeedElemRestrictionDestroy(&data->elem_restr_u); 17 CeedElemRestrictionDestroy(&data->elem_restr_x); 18 CeedElemRestrictionDestroy(&data->elem_restr_u_i); --- 29 unchanged lines hidden (view full) --- 48 CeedQFunction qf_setup_geo, qf_apply; 49 CeedOperator op_setup_geo, op_apply; 50 CeedVector x_coord, q_data, x_ceed, y_ceed; 51 CeedInt P, Q, num_qpts, c_start, c_end, num_elem, 52 q_data_size = bp_data.q_data_size; 53 CeedScalar R = 1, // radius of the sphere 54 l = 1.0/PetscSqrtReal(3.0); // half edge of the inscribed cube 55 | 12 CeedVectorDestroy(&data->q_data); 13 CeedVectorDestroy(&data->x_ceed); 14 CeedVectorDestroy(&data->y_ceed); 15 CeedBasisDestroy(&data->basis_x); 16 CeedBasisDestroy(&data->basis_u); 17 CeedElemRestrictionDestroy(&data->elem_restr_u); 18 CeedElemRestrictionDestroy(&data->elem_restr_x); 19 CeedElemRestrictionDestroy(&data->elem_restr_u_i); --- 29 unchanged lines hidden (view full) --- 49 CeedQFunction qf_setup_geo, qf_apply; 50 CeedOperator op_setup_geo, op_apply; 51 CeedVector x_coord, q_data, x_ceed, y_ceed; 52 CeedInt P, Q, num_qpts, c_start, c_end, num_elem, 53 q_data_size = bp_data.q_data_size; 54 CeedScalar R = 1, // radius of the sphere 55 l = 1.0/PetscSqrtReal(3.0); // half edge of the inscribed cube 56 |
| 57 PetscFunctionBeginUser; |
|
| 56 // CEED bases 57 P = degree + 1; 58 Q = P + q_extra; 59 CeedBasisCreateTensorH1Lagrange(ceed, topo_dim, num_comp_u, P, Q, 60 bp_data.q_mode, 61 &basis_u); 62 CeedBasisCreateTensorH1Lagrange(ceed, topo_dim, num_comp_x, 2, Q, 63 bp_data.q_mode, --- 137 unchanged lines hidden (view full) --- 201 202// ----------------------------------------------------------------------------- 203// Setup libCEED level transfer operator objects 204// ----------------------------------------------------------------------------- 205PetscErrorCode CeedLevelTransferSetup(Ceed ceed, CeedInt num_levels, 206 CeedInt num_comp_u, CeedData *data, 207 CeedInt *level_degrees, 208 CeedQFunction qf_restrict, CeedQFunction qf_prolong) { | 58 // CEED bases 59 P = degree + 1; 60 Q = P + q_extra; 61 CeedBasisCreateTensorH1Lagrange(ceed, topo_dim, num_comp_u, P, Q, 62 bp_data.q_mode, 63 &basis_u); 64 CeedBasisCreateTensorH1Lagrange(ceed, topo_dim, num_comp_x, 2, Q, 65 bp_data.q_mode, --- 137 unchanged lines hidden (view full) --- 203 204// ----------------------------------------------------------------------------- 205// Setup libCEED level transfer operator objects 206// ----------------------------------------------------------------------------- 207PetscErrorCode CeedLevelTransferSetup(Ceed ceed, CeedInt num_levels, 208 CeedInt num_comp_u, CeedData *data, 209 CeedInt *level_degrees, 210 CeedQFunction qf_restrict, CeedQFunction qf_prolong) { |
| 211 PetscFunctionBeginUser; |
|
| 209 // Return early if num_levels=1 210 if (num_levels == 1) 211 PetscFunctionReturn(0); 212 213 // Set up each level 214 for (CeedInt i=1; i<num_levels; i++) { 215 // P coarse and P fine 216 CeedInt Pc = level_degrees[i-1] + 1; --- 41 unchanged lines hidden --- | 212 // Return early if num_levels=1 213 if (num_levels == 1) 214 PetscFunctionReturn(0); 215 216 // Set up each level 217 for (CeedInt i=1; i<num_levels; i++) { 218 // P coarse and P fine 219 CeedInt Pc = level_degrees[i-1] + 1; --- 41 unchanged lines hidden --- |