SheafSystem  0.0.0.0
avg_section_pusher.cc
Go to the documentation of this file.
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 
18 //
21 // A map from one sec_rep_space to another.
22 //
23 
24 #include "SheafSystem/avg_section_pusher.h"
25 #include "SheafSystem/assert_contract.h"
26 #include "SheafSystem/sec_ed_invertible.h"
27 
28 using namespace std;
29 using namespace fields; // Workaround for MS C++ bug.
30 
31 // =============================================================================
32 // AVG_SECTION_PUSHER FACET
33 // =============================================================================
34 
35 // PUBLIC MEMBER FUNCTIONS
36 
39  const sec_rep_space& xrange,
40  const geometry::sec_ed_invertible& xdom_coord,
41  const sec_ed& xran_coord,
42  bool xauto_access)
43  : section_pusher(xdomain, xrange, xdom_coord, xran_coord, xauto_access)
44 {
45  // Preconditions:
46 
47  require(precondition_of(section_pusher(xdomain, xrange, xdom_coord, xran_coord)));
48 
49  // Body:
50 
51  // Nothing to do.
52 
53  // Postconditions:
54 
55  ensure(postcondition_of(section_pusher(xdomain, xrange, xdomain_inverter, xran_coord)));
56 
57 
58  // Exit:
59 }
60 
61 
62 // PROTECTED MEMBER FUNCTIONS
63 
66 {
67  // Preconditions:
68 
69  // Body:
70 
71  not_implemented();
72 
73  // Postconditions:
74 
75  ensure(invariant());
76 
77  // Exit:
78 }
79 
80 void
82 extend(sec_vd& result, const scoped_index& xdisc_id)
83 {
84  // Preconditions:
85 
86  require(result.state_is_read_write_accessible());
87  require(range().schema().discretization().contains_member(xdisc_id));
88 
89  // Body:
90 
91  // Define result by averaging the values of the source field
92  // nearest to the discretization point identified by xdisc_id.
93 
94  not_implemented();
95 
96  // Postconditions:
97 
98  // Exit:
99 }
100 
101 
102 // =============================================================================
103 // ANY FACET
104 // =============================================================================
105 
106 // PUBLIC MEMBER FUNCTIONS
107 
110 {
111  // Preconditions:
112 
113  // Body:
114 
115  not_implemented();
116 
119 
120  // Postconditions:
121 
122  ensure(invariant());
123 
124  // Exit:
125 }
126 
129 {
130  // Preconditions:
131 
132  // Body:
133 
134  not_implemented();
135 
136  // Postconditions:
137 
138  ensure(invariant());
139 
140  // Exit:
141 }
142 
143 
144 bool
146 invariant() const
147 {
148  bool result = true;
149 
150  // Preconditions:
151 
152  // Body:
153 
154  // Must satisfy base class invariant.
155 
156  invariance(section_pusher::invariant());
157 
158  // Postconditions:
159 
160  // Exit
161 
162  return result;
163 }
Namespace for fields component of sheaf system.
A section pusher that uses extension by averaging to define the target outside the domain of the sour...
STL namespace.
virtual bool invariant() const
Class invariant.
section_pusher()
Default constructor; protected to prevent default construction.
virtual void extend(sec_vd &result, const scoped_index &xdisc_id)
Creates a value for the dofs at disc point xdisc_id. Intended for use when xdisc_id lies outside the ...
A section of a fiber bundle with a d-dimensional Euclidean vector space fiber.
Definition: sec_ed.h:47
An abstract invertible section of a fiber bundle with a d-dimensional base space and a d-dimensional ...
bool state_is_read_write_accessible() const
True if this is attached and if the state is accessible for read and write or access control is disab...
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
The general section push-forward operator; moves sections from one sec_rep_space to another using ext...
A section of a fiber bundle with a d-dimensional vector space fiber.
Definition: sec_vd.h:54
virtual bool invariant() const
Class invariant.
const sec_rep_space & range() const
The range of the push-forward map.
avg_section_pusher()
Default constructor.
virtual ~avg_section_pusher()
Destructor.
A handle for a poset whose members are numerical representations of sections of a fiber bundle...
Definition: sec_rep_space.h:61