OpenCMISS-Zinc C++ API Documentation
fieldnodesetoperators.hpp
Go to the documentation of this file.
1 
4 /* OpenCMISS-Zinc Library
5 *
6 * This Source Code Form is subject to the terms of the Mozilla Public
7 * License, v. 2.0. If a copy of the MPL was not distributed with this
8 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
9 #ifndef CMZN_FIELDNODESETOPERATORS_HPP__
10 #define CMZN_FIELDNODESETOPERATORS_HPP__
11 
12 #include "opencmiss/zinc/fieldnodesetoperators.h"
13 #include "opencmiss/zinc/field.hpp"
14 #include "opencmiss/zinc/fieldmodule.hpp"
15 #include "opencmiss/zinc/node.hpp"
16 
17 namespace OpenCMISS
18 {
19 namespace Zinc
20 {
21 class FieldNodesetSum : public Field
31 {
32 private:
33  // takes ownership of C handle, responsibility for destroying it
34  explicit FieldNodesetSum(cmzn_field_id field_id) : Field(field_id)
35  { }
36 
37  friend FieldNodesetSum Fieldmodule::createFieldNodesetSum(const Field& sourceField, const Nodeset& nodeset);
38 
39 public:
40 
41  FieldNodesetSum() : Field(0)
42  { }
43 
44 };
45 class FieldNodesetMean : public Field
55 {
56 private:
57  // takes ownership of C handle, responsibility for destroying it
58  explicit FieldNodesetMean(cmzn_field_id field_id) : Field(field_id)
59  { }
60 
61  friend FieldNodesetMean Fieldmodule::createFieldNodesetMean(const Field& sourceField,
62  const Nodeset& nodeset);
63 
64 public:
65 
66  FieldNodesetMean() : Field(0)
67  { }
68 
69 };
70 class FieldNodesetSumSquares : public Field
82 {
83 private:
84  // takes ownership of C handle, responsibility for destroying it
85  explicit FieldNodesetSumSquares(cmzn_field_id field_id) : Field(field_id)
86  { }
87 
88  friend FieldNodesetSumSquares Fieldmodule::createFieldNodesetSumSquares(
89  const Field& sourceField, const Nodeset& nodeset);
90 
91 public:
92 
93  FieldNodesetSumSquares() : Field(0)
94  { }
95 
96 };
97 class FieldNodesetMeanSquares : public Field
110 {
111 private:
112  // takes ownership of C handle, responsibility for destroying it
113  explicit FieldNodesetMeanSquares(cmzn_field_id field_id) : Field(field_id)
114  { }
115 
116  friend FieldNodesetMeanSquares Fieldmodule::createFieldNodesetMeanSquares(
117  const Field& sourceField, const Nodeset& nodeset);
118 
119 public:
120 
121  FieldNodesetMeanSquares() : Field(0)
122  { }
123 
124 };
125 class FieldNodesetMinimum : public Field
135 {
136 private:
137  // takes ownership of C handle, responsibility for destroying it
138  explicit FieldNodesetMinimum(cmzn_field_id field_id) : Field(field_id)
139  { }
140 
141  friend FieldNodesetMinimum Fieldmodule::createFieldNodesetMinimum(
142  const Field& sourceField, const Nodeset& nodeset);
143 
144 public:
145 
146  FieldNodesetMinimum() : Field(0)
147  { }
148 
149 };
150 class FieldNodesetMaximum : public Field
160 {
161 private:
162  // takes ownership of C handle, responsibility for destroying it
163  explicit FieldNodesetMaximum(cmzn_field_id field_id) : Field(field_id)
164  { }
165 
166  friend FieldNodesetMaximum Fieldmodule::createFieldNodesetMaximum(
167  const Field& sourceField, const Nodeset& nodeset);
168 
169 public:
170 
171  FieldNodesetMaximum() : Field(0)
172  { }
173 
174 };
175 
176 inline FieldNodesetSum Fieldmodule::createFieldNodesetSum(const Field& sourceField, const Nodeset& nodeset)
177 {
178  return FieldNodesetSum(cmzn_fieldmodule_create_field_nodeset_sum(id,
179  sourceField.getId(), nodeset.getId()));
180 }
181 
182 inline FieldNodesetMean Fieldmodule::createFieldNodesetMean(const Field& sourceField, const Nodeset& nodeset)
183 {
184  return FieldNodesetMean(cmzn_fieldmodule_create_field_nodeset_mean(id,
185  sourceField.getId(), nodeset.getId()));
186 }
187 
189  const Field& sourceField, const Nodeset& nodeset)
190 {
191  return FieldNodesetSumSquares(cmzn_fieldmodule_create_field_nodeset_sum_squares(id,
192  sourceField.getId(), nodeset.getId()));
193 }
194 
196  const Field& sourceField, const Nodeset& nodeset)
197 {
198  return FieldNodesetMeanSquares(cmzn_fieldmodule_create_field_nodeset_mean_squares(id,
199  sourceField.getId(), nodeset.getId()));
200 }
201 
203  const Field& sourceField, const Nodeset& nodeset)
204 {
205  return FieldNodesetMinimum(cmzn_fieldmodule_create_field_nodeset_minimum(id,
206  sourceField.getId(), nodeset.getId()));
207 }
208 
210  const Field& sourceField, const Nodeset& nodeset)
211 {
212  return FieldNodesetMaximum(cmzn_fieldmodule_create_field_nodeset_maximum(id,
213  sourceField.getId(), nodeset.getId()));
214 }
215 
216 } // namespace Zinc
217 }
218 
219 #endif
A field which computes the mean of the squares of each source field component over all nodes in the n...
Definition: fieldnodesetoperators.hpp:109
FieldNodesetMaximum createFieldNodesetMaximum(const Field &sourceField, const Nodeset &nodeset)
Definition: fieldnodesetoperators.hpp:209
Base field type: an abstraction of a mathematical field.
Definition: field.hpp:51
FieldNodesetSumSquares createFieldNodesetSumSquares(const Field &sourceField, const Nodeset &nodeset)
Definition: fieldnodesetoperators.hpp:188
cmzn_nodeset_id getId() const
Definition: nodeset.hpp:82
A field which computes the sum of each source field component over all nodes in the nodeset for which...
Definition: fieldnodesetoperators.hpp:30
FieldNodesetMean createFieldNodesetMean(const Field &sourceField, const Nodeset &nodeset)
Definition: fieldnodesetoperators.hpp:182
cmzn_field_id getId() const
Definition: field.hpp:103
FieldNodesetSum createFieldNodesetSum(const Field &sourceField, const Nodeset &nodeset)
Definition: fieldnodesetoperators.hpp:176
FieldNodesetMinimum createFieldNodesetMinimum(const Field &sourceField, const Nodeset &nodeset)
Definition: fieldnodesetoperators.hpp:202
A field which computes the maximum of each source field component over all nodes in the nodeset for w...
Definition: fieldnodesetoperators.hpp:159
A field which computes the minimum of each source field component over all nodes in the nodeset for w...
Definition: fieldnodesetoperators.hpp:134
The OpenCMISS namespace.
Definition: context.hpp:20
A field which computes the mean of each source field component over all nodes in the nodeset for whic...
Definition: fieldnodesetoperators.hpp:54
FieldNodesetMeanSquares createFieldNodesetMeanSquares(const Field &sourceField, const Nodeset &nodeset)
Definition: fieldnodesetoperators.hpp:195
A field which computes the sum of the squares of each source field component over all nodes in the no...
Definition: fieldnodesetoperators.hpp:81
A set of nodes or points.
Definition: nodeset.hpp:29