xref: /libCEED/examples/solids/include/setup-dm.h (revision ce18bed930e8f3bfebcf709a18844aba97fe4630)
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 #ifndef libceed_solids_examples_setup_dm_h
9 #define libceed_solids_examples_setup_dm_h
10 
11 #include <ceed.h>
12 #include <petsc.h>
13 #include <petscdmplex.h>
14 #include <petscfe.h>
15 #include "../include/structs.h"
16 
17 // -----------------------------------------------------------------------------
18 // Setup DM
19 // -----------------------------------------------------------------------------
20 PetscErrorCode CreateBCLabel(DM dm, const char name[]);
21 
22 // Read mesh and distribute DM in parallel
23 PetscErrorCode CreateDistributedDM(MPI_Comm comm, AppCtx app_ctx, DM *dm);
24 
25 // Setup DM with FE space of appropriate degree
26 PetscErrorCode SetupDMByDegree(DM dm, AppCtx app_ctx, PetscInt order,
27                                PetscBool boundary, PetscInt num_comp_u);
28 
29 #endif // libceed_solids_examples_setup_dm_h
30