@@ -136,12 +136,14 @@ static int CeedOperatorFieldView(CeedOperatorField op_field, CeedQFunctionField
136
136
@ref Utility
137
137
**/
138
138
int CeedOperatorSingleView (CeedOperator op , bool sub , FILE * stream ) {
139
+ bool is_at_points ;
139
140
const char * pre = sub ? " " : "" ;
140
141
CeedInt num_elem , num_qpts , total_fields = 0 , num_input_fields , num_output_fields ;
141
142
CeedQFunction qf ;
142
143
CeedQFunctionField * qf_input_fields , * qf_output_fields ;
143
144
CeedOperatorField * op_input_fields , * op_output_fields ;
144
145
146
+ CeedCall (CeedOperatorIsAtPoints (op , & is_at_points ));
145
147
CeedCall (CeedOperatorGetNumElements (op , & num_elem ));
146
148
CeedCall (CeedOperatorGetNumQuadraturePoints (op , & num_qpts ));
147
149
CeedCall (CeedOperatorGetNumArgs (op , & total_fields ));
@@ -150,7 +152,17 @@ int CeedOperatorSingleView(CeedOperator op, bool sub, FILE *stream) {
150
152
CeedCall (CeedQFunctionGetFields (qf , NULL , & qf_input_fields , NULL , & qf_output_fields ));
151
153
CeedCall (CeedQFunctionDestroy (& qf ));
152
154
153
- fprintf (stream , "%s %" CeedInt_FMT " elements with %" CeedInt_FMT " quadrature points each\n" , pre , num_elem , num_qpts );
155
+ if (is_at_points ) {
156
+ CeedInt max_points = 0 ;
157
+ CeedElemRestriction rstr_points ;
158
+
159
+ CeedCall (CeedOperatorAtPointsGetPoints (op , & rstr_points , NULL ));
160
+ CeedCall (CeedElemRestrictionGetMaxPointsInElement (rstr_points , & max_points ));
161
+ fprintf (stream , "%s %" CeedInt_FMT " elements with %" CeedInt_FMT " max points each\n" , pre , num_elem , max_points );
162
+ CeedCall (CeedElemRestrictionDestroy (& rstr_points ));
163
+ } else {
164
+ fprintf (stream , "%s %" CeedInt_FMT " elements with %" CeedInt_FMT " quadrature points each\n" , pre , num_elem , num_qpts );
165
+ }
154
166
fprintf (stream , "%s %" CeedInt_FMT " field%s\n" , pre , total_fields , total_fields > 1 ? "s" : "" );
155
167
fprintf (stream , "%s %" CeedInt_FMT " input field%s:\n" , pre , num_input_fields , num_input_fields > 1 ? "s" : "" );
156
168
for (CeedInt i = 0 ; i < num_input_fields ; i ++ ) {
@@ -1551,9 +1563,10 @@ int CeedOperatorSetName(CeedOperator op, const char *name) {
1551
1563
@return Error code: 0 - success, otherwise - failure
1552
1564
**/
1553
1565
static int CeedOperatorView_Core (CeedOperator op , FILE * stream , bool is_full ) {
1554
- bool has_name = op -> name , is_composite ;
1566
+ bool has_name = op -> name , is_composite , is_at_points ;
1555
1567
1556
1568
CeedCall (CeedOperatorIsComposite (op , & is_composite ));
1569
+ CeedCall (CeedOperatorIsAtPoints (op , & is_at_points ));
1557
1570
if (is_composite ) {
1558
1571
CeedInt num_suboperators ;
1559
1572
CeedOperator * sub_operators ;
@@ -1564,11 +1577,12 @@ static int CeedOperatorView_Core(CeedOperator op, FILE *stream, bool is_full) {
1564
1577
1565
1578
for (CeedInt i = 0 ; i < num_suboperators ; i ++ ) {
1566
1579
has_name = sub_operators [i ]-> name ;
1567
- fprintf (stream , " SubOperator %" CeedInt_FMT "%s%s%s\n" , i , has_name ? " - " : "" , has_name ? sub_operators [i ]-> name : "" , is_full ? ":" : "" );
1580
+ fprintf (stream , " SubOperator%s %" CeedInt_FMT "%s%s%s\n" , is_at_points ? " AtPoints" : "" , i , has_name ? " - " : "" ,
1581
+ has_name ? sub_operators [i ]-> name : "" , is_full ? ":" : "" );
1568
1582
if (is_full ) CeedCall (CeedOperatorSingleView (sub_operators [i ], 1 , stream ));
1569
1583
}
1570
1584
} else {
1571
- fprintf (stream , "CeedOperator%s%s\n " , has_name ? " - " : "" , has_name ? op -> name : "" );
1585
+ fprintf (stream , "CeedOperator%s%s%s\n" , is_at_points ? " AtPoints" : " " , has_name ? " - " : "" , has_name ? op -> name : "" );
1572
1586
if (is_full ) CeedCall (CeedOperatorSingleView (op , 0 , stream ));
1573
1587
}
1574
1588
return CEED_ERROR_SUCCESS ;
0 commit comments