SheafSystem  0.0.0.0
field_tp_funcs.impl.h
1 
2 //
3 // Copyright (c) 2014 Limit Point Systems, Inc.
4 //
5 // Licensed under the Apache License, Version 2.0 (the "License");
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17 
19 
20 //==============================================================================
21 // NON-MEMBER FUNCTIONS OF TP FACET
22 //==============================================================================
23 
24 #ifndef FIELD_ATP_H
25 #include "SheafSystem/field_atp.h"
26 #endif
27 
28 #ifndef FIELD_STP_H
29 #include "SheafSystem/field_stp.h"
30 #endif
31 
32 
34 void
36 alt(const field_tp& x0, field_atp& xresult, bool xauto_access)
37 {
38  // Preconditions:
39 
40  require(precondition_of(\
41  alt(x0.property(), xresult.property(), xauto_access)));
42 
43  // Body:
44 
45  fiber_bundle::sec_tp_algebra::alt(x0.property(), xresult.property(), xauto_access);
46 
47  // Postconditions:
48 
49  ensure(postcondition_of(\
50  alt(x0.property(), xresult.property(), xauto_access)));
51 
52  // Exit:
53 
54  return;
55 }
56 
58 void
60 sym(const field_tp& x0, field_stp& xresult, bool xauto_access)
61 {
62  // Preconditions:
63 
64  require(precondition_of(\
65  sym(x0.property(), xresult.property(), xauto_access)));
66 
67  // Body:
68 
69  fiber_bundle::sec_tp_algebra::sym(x0.property(), xresult.property(), xauto_access);
70 
71  // Postconditions:
72 
73  ensure(postcondition_of(\
74  sym(x0.property(), xresult.property(), xauto_access)));
75 
76  // Exit:
77 
78  return;
79 }
80 
82 void
84 contract(const field_tp& x0, int xp, int xq, field_tp& xresult,
85  bool xauto_access)
86 {
87  // Preconditions:
88 
89  require(precondition_of(\
90  contract(x0.property(), xp, xq, xresult.property(), xauto_access)));
91 
92  // Body:
93 
94  fiber_bundle::sec_tp_algebra::contract(x0.property(),xp, xq, xresult.property(), xauto_access);
95 
96  // Postconditions:
97 
98  ensure(postcondition_of(\
99  contract(x0.property(), xp, xq, xresult.property(), xauto_access)));
100 
101  // Exit:
102 
103  return;
104 }
105 
107 void
109 tensor(const field_tp& x0, const field_tp& x1, field_tp& xresult,
110  bool xauto_access)
111 {
112  // Preconditions:
113 
114  require(precondition_of(\
115  tensor(x0.property(), x1.property(), xresult.property(), xauto_access)));
116 
117  // Body:
118 
119  fiber_bundle::sec_tp_algebra::tensor(x0.property(), x1.property(), xresult.property(), xauto_access);
120 
121  // Postconditions:
122 
123  ensure(postcondition_of(\
124  tensor(x0.property(), x1.property(), xresult.property(), xauto_access)));
125 
126  // Exit:
127 
128  return;
129 }
130 
131 
SHEAF_DLL_SPEC void sym(const sec_t2 &x0, sec_st2 &xresult, bool xauto_access)
The symmetric part of tensor x0 (pre-allocated version).
Definition: sec_t2.cc:737
SHEAF_DLL_SPEC void alt(const t2_lite &x0, at2_lite &xresult)
The alternating (antisymmetric) part of tensor x0 (pre-allocated version for volatile types)...
Definition: t2.cc:1176
SHEAF_DLL_SPEC void sym(const t2_lite &x0, st2_lite &xresult)
The symmetric part of tensor x0 (pre-allocated version for volatile types).
Definition: t2.cc:1301
SHEAF_DLL_SPEC void alt(const sec_t2 &x0, sec_at2 &xresult, bool xauto_access)
The alternating (antisymmetric) part of tensor x0 (pre-allocated version).
Definition: sec_t2.cc:679
sec_atp & property() const
The dependent variable of this field.
Definition: field_atp.cc:329
A property of type sec_stp as a function of global coordinates.
Definition: field_stp.h:50
void SHEAF_DLL_SPEC tensor(const field_tp &x0, const field_tp &x1, field_tp &xresult, bool xauto_access)
Tensor product of x0 and x1 (pre-allocated version).
A property of type sec_atp as a function of global coordinates.
Definition: field_atp.h:50
sec_stp & property() const
The dependent variable of this field.
Definition: field_stp.cc:329
void SHEAF_DLL_SPEC sym(const field_tp &x0, field_stp &xresult, bool xauto_access)
The symmetric part of tensor x0 (pre-allocated version).
void SHEAF_DLL_SPEC contract(const field_tp &x0, int xp, int xq, field_tp &xresult, bool xauto_access)
Contraction on contravariant index xp and covariant index xq (pre-allocated version).
sec_tp & property() const
The dependent variable of this field.
Definition: field_tp.cc:329
SHEAF_DLL_SPEC void contract(const sec_t2 &x0, int xp, int xq, sec_at0 &xresult, bool xauto_access)
Contraction on contravariant index xp and covariant index xq (pre-allocated version).
Definition: sec_t2.cc:795
SHEAF_DLL_SPEC void tensor(const sec_at1 &x0, const sec_at1 &x1, sec_t2 &xresult, bool xauto_access)
Definition: sec_t2.cc:824
A property of type sec_tp as a function of global coordinates.
Definition: field_tp.h:50
void SHEAF_DLL_SPEC alt(const field_tp &x0, field_atp &xresult, bool xauto_access)
The alternating (antisymmetric) part of tensor x0 (pre-allocated version).
SHEAF_DLL_SPEC void tensor(const at1_lite &x0, const at1_lite &x1, t2_lite &xresult)
Tensor product (pre-allocated version for volatile types).
Definition: t2.cc:1488
SHEAF_DLL_SPEC void contract(const t2_lite &x0, int xp, int xq, at0_lite &xresult)
Contraction on contravariant index xp and covariant index xq (pre-allocated version for volatime type...
Definition: t2.cc:1091