File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323
2424int feenox_problem_dirichlet_add (size_t j_global , unsigned int g , double value ) {
2525
26+ #ifdef HAVE_PETSC
2627 feenox .pde .dirichlet_nodes [feenox .pde .dirichlet_k ] = feenox .pde .mesh -> node [j_global ].tag ;
2728 feenox .pde .dirichlet_dofs [feenox .pde .dirichlet_k ] = g ;
2829
29- #ifdef HAVE_PETSC
3030 feenox .pde .dirichlet_indexes [feenox .pde .dirichlet_k ] = feenox .pde .mesh -> node [j_global ].index_dof [g ];
3131 feenox .pde .dirichlet_values [feenox .pde .dirichlet_k ] = value ;
32- #endif
3332 feenox .pde .dirichlet_k ++ ;
33+ #endif
3434
3535 return FEENOX_OK ;
3636}
@@ -58,6 +58,7 @@ int feenox_problem_multifreedom_add(size_t j_global, double *coefficients) {
5858}
5959
6060int feenox_problem_dirichlet_reallocate (size_t n_bcs ) {
61+ #ifdef HAVE_PETSC
6162 size_t size_plus_safety = n_bcs + feenox .pde .dofs + 1 ;
6263
6364 feenox_check_alloc (feenox .pde .dirichlet_nodes = reallocarray (feenox .pde .dirichlet_nodes , size_plus_safety , sizeof (size_t )));
@@ -68,7 +69,7 @@ int feenox_problem_dirichlet_reallocate(size_t n_bcs) {
6869
6970 feenox_check_alloc (feenox .pde .multifreedom_indexes = reallocarray (feenox .pde .multifreedom_indexes , size_plus_safety , sizeof (PetscInt * )));
7071 feenox_check_alloc (feenox .pde .multifreedom_coefficients = reallocarray (feenox .pde .multifreedom_coefficients , size_plus_safety , sizeof (PetscScalar * )));
71-
72+ #endif
7273 return FEENOX_OK ;
7374}
7475
You can’t perform that action at this time.
0 commit comments