-
Notifications
You must be signed in to change notification settings - Fork 96
/
FaultCohesive.i
106 lines (89 loc) · 3.25 KB
/
FaultCohesive.i
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
// -*- C++ -*-
//
// ----------------------------------------------------------------------
//
// Brad T. Aagaard, U.S. Geological Survey
// Charles A. Williams, GNS Science
// Matthew G. Knepley, University of Chicago
//
// This code was developed as part of the Computational Infrastructure
// for Geodynamics (http://geodynamics.org).
//
// Copyright (c) 2010 University of California, Davis
//
// See COPYING for license information.
//
// ----------------------------------------------------------------------
//
/** @file modulesrc/faults/FaultCohesive.i
*
* @brief Python interface to C++ FaultCohesive object.
*/
namespace pylith {
namespace faults {
class FaultCohesive : public Fault,
public pylith::feassemble::Integrator<pylith::feassemble::Quadrature<pylith::topology::SubMesh> >
{ // class FaultCohesive
// PUBLIC METHODS /////////////////////////////////////////////////
public :
/// Default constructor.
FaultCohesive(void);
/// Destructor.
virtual
~FaultCohesive(void);
/// Deallocate PETSc and local data structures.
virtual
void deallocate(void);
/** Set flag for using fault mesh or group of vertices to define
* fault surface.
*
* This method is part of a KLUDGE to allow creation of cohesive
* cells in cases where domain cells have more than one face
* (edge for 2-D problems) on the fault.
*
* @param flag True if using fault mesh, false if using vertices.
*/
void useFaultMesh(const bool flag);
/** Set filename of UCD file for fault mesh.
*
* This method is part of a KLUDGE to allow creation of cohesive
* cells in cases where domain cells have more than one face
* (edge for 2-D problems) on the fault.
*
* @param filename Filename for UCD file.
*/
void faultMeshFilename(const char* filename);
/** Get the number of vertices on the fault.
*
* @param mesh PETSc mesh
* @return Number of vertices on the fault.
*/
int numVertices(const topology::Mesh& mesh) const;
/** Adjust mesh topology for fault implementation.
*
* @param mesh PETSc mesh.
* @param flipFault Flip fault orientation.
*/
%apply int *INOUT {int *firstFaultVertex, int *firstLagrangeVertex, int *firstFaultCell};
void adjustTopology(pylith::topology::Mesh* const mesh,
int *firstFaultVertex,
int *firstLagrangeVertex,
int *firstFaultCell,
const bool flipFault = false);
%clear int *firstFaultVertex, int *firstLagrangeVertex, int *firstFaultCell;
/** Cohesive cells use Lagrange multiplier constraints?
*
* @returns True if implementation using Lagrange multiplier
* constraints, false otherwise.
*/
bool useLagrangeConstraints(void) const;
/** Get fields associated with fault.
*
* @returns Fields associated with fault.
*/
const pylith::topology::Fields<topology::Field<pylith::topology::SubMesh> >*
fields(void) const;
}; // class FaultCohesive
} // faults
} // pylith
// End of file