Coverage for src/meshpy/four_c/input_file_mappings.py: 100%

2 statements  

« prev     ^ index     » next       coverage.py v7.9.0, created at 2025-06-13 04:26 +0000

1# The MIT License (MIT) 

2# 

3# Copyright (c) 2018-2025 MeshPy Authors 

4# 

5# Permission is hereby granted, free of charge, to any person obtaining a copy 

6# of this software and associated documentation files (the "Software"), to deal 

7# in the Software without restriction, including without limitation the rights 

8# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 

9# copies of the Software, and to permit persons to whom the Software is 

10# furnished to do so, subject to the following conditions: 

11# 

12# The above copyright notice and this permission notice shall be included in 

13# all copies or substantial portions of the Software. 

14# 

15# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 

16# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 

17# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 

18# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 

19# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 

20# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 

21# THE SOFTWARE. 

22"""This file provides the mappings between MeshPy objects and 4C input 

23files.""" 

24 

25from meshpy.core.conf import mpy as _mpy 

26 

27INPUT_FILE_MAPPINGS = { 

28 "boundary_conditions": { 

29 (_mpy.bc.dirichlet, _mpy.geo.point): "DESIGN POINT DIRICH CONDITIONS", 

30 (_mpy.bc.dirichlet, _mpy.geo.line): "DESIGN LINE DIRICH CONDITIONS", 

31 (_mpy.bc.dirichlet, _mpy.geo.surface): "DESIGN SURF DIRICH CONDITIONS", 

32 (_mpy.bc.dirichlet, _mpy.geo.volume): "DESIGN VOL DIRICH CONDITIONS", 

33 (_mpy.bc.locsys, _mpy.geo.point): "DESIGN POINT LOCSYS CONDITIONS", 

34 (_mpy.bc.locsys, _mpy.geo.line): "DESIGN LINE LOCSYS CONDITIONS", 

35 (_mpy.bc.locsys, _mpy.geo.surface): "DESIGN SURF LOCSYS CONDITIONS", 

36 (_mpy.bc.locsys, _mpy.geo.volume): "DESIGN VOL LOCSYS CONDITIONS", 

37 (_mpy.bc.neumann, _mpy.geo.point): "DESIGN POINT NEUMANN CONDITIONS", 

38 (_mpy.bc.neumann, _mpy.geo.line): "DESIGN LINE NEUMANN CONDITIONS", 

39 (_mpy.bc.neumann, _mpy.geo.surface): "DESIGN SURF NEUMANN CONDITIONS", 

40 (_mpy.bc.neumann, _mpy.geo.volume): "DESIGN VOL NEUMANN CONDITIONS", 

41 ( 

42 _mpy.bc.moment_euler_bernoulli, 

43 _mpy.geo.point, 

44 ): "DESIGN POINT MOMENT EB CONDITIONS", 

45 ( 

46 _mpy.bc.beam_to_solid_volume_meshtying, 

47 _mpy.geo.line, 

48 ): "BEAM INTERACTION/BEAM TO SOLID VOLUME MESHTYING LINE", 

49 ( 

50 _mpy.bc.beam_to_solid_volume_meshtying, 

51 _mpy.geo.volume, 

52 ): "BEAM INTERACTION/BEAM TO SOLID VOLUME MESHTYING VOLUME", 

53 ( 

54 _mpy.bc.beam_to_solid_surface_meshtying, 

55 _mpy.geo.line, 

56 ): "BEAM INTERACTION/BEAM TO SOLID SURFACE MESHTYING LINE", 

57 ( 

58 _mpy.bc.beam_to_solid_surface_meshtying, 

59 _mpy.geo.surface, 

60 ): "BEAM INTERACTION/BEAM TO SOLID SURFACE MESHTYING SURFACE", 

61 ( 

62 _mpy.bc.beam_to_solid_surface_contact, 

63 _mpy.geo.line, 

64 ): "BEAM INTERACTION/BEAM TO SOLID SURFACE CONTACT LINE", 

65 ( 

66 _mpy.bc.beam_to_solid_surface_contact, 

67 _mpy.geo.surface, 

68 ): "BEAM INTERACTION/BEAM TO SOLID SURFACE CONTACT SURFACE", 

69 (_mpy.bc.point_coupling, _mpy.geo.point): "DESIGN POINT COUPLING CONDITIONS", 

70 ( 

71 _mpy.bc.beam_to_beam_contact, 

72 _mpy.geo.line, 

73 ): "BEAM INTERACTION/BEAM TO BEAM CONTACT CONDITIONS", 

74 ( 

75 _mpy.bc.point_coupling_penalty, 

76 _mpy.geo.point, 

77 ): "DESIGN POINT PENALTY COUPLING CONDITIONS", 

78 ( 

79 "DESIGN SURF MORTAR CONTACT CONDITIONS 3D", 

80 _mpy.geo.surface, 

81 ): "DESIGN SURF MORTAR CONTACT CONDITIONS 3D", 

82 }, 

83 "geometry_sets": { 

84 _mpy.geo.point: "DNODE-NODE TOPOLOGY", 

85 _mpy.geo.line: "DLINE-NODE TOPOLOGY", 

86 _mpy.geo.surface: "DSURF-NODE TOPOLOGY", 

87 _mpy.geo.volume: "DVOL-NODE TOPOLOGY", 

88 }, 

89}