10 #ifndef SOLVERALGORITHMS_H
11 #define SOLVERALGORITHMS_H
18 template <
class Iterator,
class Assembler>
26 for(Iterator it = itbegin; it != itend; ++it) {
31 term.
get(e, npts, GP, localMatrix);
33 assembler.assemble(R, localMatrix);
37 template <
class Iterator,
class Assembler>
45 for(Iterator it = itbegin; it != itend; ++it) {
51 term.
get(e, npts, GP, localMatrix);
53 assembler.assemble(R, localMatrix);
58 template <
class Assembler>
66 term.
get(e, npts, GP, localMatrix);
68 assembler.assemble(R, localMatrix);
71 template <
class Iterator,
class Assembler>
80 for(Iterator it = itbegin; it != itend; ++it) {
86 term.
get(e, npts, GP, localMatrix);
102 assembler.assemble(R, C, localMatrix);
114 assembler.assemble(C, R, localMatrix.
transpose());
118 template <
class Iterator,
class Assembler>
121 Assembler &assembler)
125 for(Iterator it = itbegin; it != itend; ++it) {
130 term.
get(e, npts, GP, localVector);
132 assembler.assemble(R, localVector);
136 template <
class Iterator,
class Assembler>
143 for(Iterator it = itbegin; it != itend; ++it) {
149 term.
get(e, npts, GP, localVector);
151 assembler.assemble(R, localVector);
156 template <
class Assembler>
164 term.
get(e, npts, GP, localVector);
166 assembler.assemble(R, localVector);
169 template <
class Iterator,
class dataMat>
174 for(Iterator it = itbegin; it != itend; ++it) {
178 term.
get(e, npts, GP, localval);
183 template <
class Iterator,
class dataMat>
188 for(Iterator it = itbegin; it != itend; ++it) {
193 term.
get(e, npts, GP, localval);
199 template <
class Iterator,
class dataMat>
206 term.
get(e, npts, GP, localval);
210 template <
class Assembler>
211 void FixDofs(Assembler &assembler, std::vector<Dof> &dofs,
212 std::vector<typename Assembler::dataVec> &vals)
214 int nbff = dofs.size();
215 for(
int i = 0; i < nbff; ++i) {
216 assembler.fixDof(dofs[i], vals[i]);
241 if(icomp ==
comp)
return true;
265 for(std::size_t i = 0; i < R.size(); i++) this->
addDof(R[i]);
269 template <
class Assembler>
274 std::vector<MVertex *> tabV;
279 for(
int i = 0; i < nv; ++i) tabV.push_back(e->
getVertex(i));
281 for(
auto itd = R.begin(); itd != R.end(); ++itd) {
284 for(
int i = 0; i < nv; ++i) {
285 if((
long int)tabV[i]->getNum() == key.
getEntity()) {
286 assembler.fixDof(key, fct(tabV[i]->x(), tabV[i]->y(), tabV[i]->
z()));
294 template <
class Iterator,
class Assembler>
296 Assembler &assembler,
300 for(Iterator it = itbegin; it != itend; ++it)
304 template <
class Iterator,
class Assembler>
306 Iterator itend, Assembler &assembler)
310 FixNodalDofs(space, itbegin, itend, assembler, fct, filter);
313 template <
class Iterator,
class Assembler>
315 Assembler &assembler)
317 for(Iterator it = itbegin; it != itend; ++it) {
321 int nbdofs = R.size();
322 for(
int i = 0; i < nbdofs; ++i) assembler.numberDof(R[i]);