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