xref: /libCEED/examples/solids/include/setup-dm.h (revision 49aac155e7a09736f56fb3abac0f57dab29f7cbf)
13d8e8822SJeremy L Thompson // Copyright (c) 2017-2022, Lawrence Livermore National Security, LLC and other CEED contributors.
23d8e8822SJeremy L Thompson // All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
33d8e8822SJeremy L Thompson //
43d8e8822SJeremy L Thompson // SPDX-License-Identifier: BSD-2-Clause
53d8e8822SJeremy L Thompson //
63d8e8822SJeremy L Thompson // This file is part of CEED:  http://github.com/ceed
73d8e8822SJeremy L Thompson 
8b7c563b6SJeremy L Thompson #ifndef libceed_solids_examples_setup_dm_h
9b7c563b6SJeremy L Thompson #define libceed_solids_examples_setup_dm_h
105754ecacSJeremy L Thompson 
115754ecacSJeremy L Thompson #include <ceed.h>
12*49aac155SJeremy L Thompson #include <petscdm.h>
132b730f8bSJeremy L Thompson 
145754ecacSJeremy L Thompson #include "../include/structs.h"
155754ecacSJeremy L Thompson 
165754ecacSJeremy L Thompson // -----------------------------------------------------------------------------
175754ecacSJeremy L Thompson // Setup DM
185754ecacSJeremy L Thompson // -----------------------------------------------------------------------------
195754ecacSJeremy L Thompson PetscErrorCode CreateBCLabel(DM dm, const char name[]);
205754ecacSJeremy L Thompson 
215754ecacSJeremy L Thompson // Read mesh and distribute DM in parallel
225754ecacSJeremy L Thompson PetscErrorCode CreateDistributedDM(MPI_Comm comm, AppCtx app_ctx, DM *dm);
235754ecacSJeremy L Thompson 
245754ecacSJeremy L Thompson // Setup DM with FE space of appropriate degree
252b730f8bSJeremy L Thompson PetscErrorCode SetupDMByDegree(DM dm, AppCtx app_ctx, PetscInt order, PetscBool boundary, PetscInt num_comp_u);
265754ecacSJeremy L Thompson 
27b7c563b6SJeremy L Thompson #endif  // libceed_solids_examples_setup_dm_h
28