setup-dm.c (82bcd3d49ffed6252dd261f790745c0e54ecd545) setup-dm.c (49a40c8a2d720db341b0b117b89656b473cbebfb)
1// Copyright (c) 2017-2022, Lawrence Livermore National Security, LLC and other CEED contributors.
2// All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
3//
4// SPDX-License-Identifier: BSD-2-Clause
5//
6// This file is part of CEED: http://github.com/ceed
7
8/// @file

--- 72 unchanged lines hidden (view full) ---

81 PetscCall(DMAddField(dm, NULL, (PetscObject)fe));
82 PetscCall(DMCreateDS(dm));
83 {
84 /* create FE field for coordinates */
85 PetscFE fe_coords;
86 PetscInt num_comp_coord;
87 PetscCall(DMGetCoordinateDim(dm, &num_comp_coord));
88 PetscCall(PetscFECreateLagrange(comm, dim, num_comp_coord, PETSC_FALSE, 1, 1, &fe_coords));
1// Copyright (c) 2017-2022, Lawrence Livermore National Security, LLC and other CEED contributors.
2// All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
3//
4// SPDX-License-Identifier: BSD-2-Clause
5//
6// This file is part of CEED: http://github.com/ceed
7
8/// @file

--- 72 unchanged lines hidden (view full) ---

81 PetscCall(DMAddField(dm, NULL, (PetscObject)fe));
82 PetscCall(DMCreateDS(dm));
83 {
84 /* create FE field for coordinates */
85 PetscFE fe_coords;
86 PetscInt num_comp_coord;
87 PetscCall(DMGetCoordinateDim(dm, &num_comp_coord));
88 PetscCall(PetscFECreateLagrange(comm, dim, num_comp_coord, PETSC_FALSE, 1, 1, &fe_coords));
89 PetscCall(DMProjectCoordinates(dm, fe_coords));
89 PetscCall(DMSetCoordinateDisc(dm, fe_coords, PETSC_TRUE));
90 PetscCall(PetscFEDestroy(&fe_coords));
91 }
92
93 // Add Dirichlet (Essential) boundary
94 if (boundary) {
95 if (app_ctx->forcing_choice == FORCE_MMS) {
96 if (app_ctx->test_mode) {
97 // -- Test mode - box mesh

--- 40 unchanged lines hidden ---
90 PetscCall(PetscFEDestroy(&fe_coords));
91 }
92
93 // Add Dirichlet (Essential) boundary
94 if (boundary) {
95 if (app_ctx->forcing_choice == FORCE_MMS) {
96 if (app_ctx->test_mode) {
97 // -- Test mode - box mesh

--- 40 unchanged lines hidden ---