/[escript]/branches/ripleygmg_from_3668/ripley/src/RipleyDomain.cpp
ViewVC logotype

Annotation of /branches/ripleygmg_from_3668/ripley/src/RipleyDomain.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3722 - (hide annotations)
Wed Dec 7 05:53:22 2011 UTC (7 years, 10 months ago) by caltinay
File size: 25020 byte(s)
All "util on ripley" tests pass now :-)
-added support for node/element/face tags
-implemented setToNormal()
-added a bunch of omp nowait

1 caltinay 3670
2     /*******************************************************
3     *
4     * Copyright (c) 2003-2011 by University of Queensland
5     * Earth Systems Science Computational Center (ESSCC)
6     * http://www.uq.edu.au/esscc
7     *
8     * Primary Business: Queensland, Australia
9     * Licensed under the Open Software License version 3.0
10     * http://www.opensource.org/licenses/osl-3.0.php
11     *
12     *******************************************************/
13    
14     #include <ripley/RipleyDomain.h>
15     #include <escript/DataFactory.h>
16 caltinay 3691 #include <escript/FunctionSpaceFactory.h>
17     #include <pasowrap/SystemMatrixAdapter.h>
18     #include <pasowrap/TransportProblemAdapter.h>
19 caltinay 3670
20     #include <iomanip>
21    
22     using namespace std;
23 caltinay 3691 using paso::SystemMatrixAdapter;
24     using paso::TransportProblemAdapter;
25 caltinay 3670
26     namespace ripley {
27    
28 caltinay 3691 escript::Domain_ptr RipleyDomain::loadMesh(const string& filename)
29 caltinay 3670 {
30 caltinay 3691 throw RipleyException("loadMesh() not implemented");
31 caltinay 3670 }
32    
33 caltinay 3691 escript::Domain_ptr RipleyDomain::readMesh(const string& filename)
34 caltinay 3670 {
35 caltinay 3691 throw RipleyException("readMesh() not implemented");
36 caltinay 3670 }
37    
38 caltinay 3691 RipleyDomain::RipleyDomain(dim_t dim) :
39     m_numDim(dim),
40     m_status(0)
41 caltinay 3670 {
42 caltinay 3691 m_mpiInfo = Esys_MPIInfo_alloc(MPI_COMM_WORLD);
43 caltinay 3670 }
44    
45 caltinay 3691 RipleyDomain::~RipleyDomain()
46 caltinay 3670 {
47 caltinay 3691 Esys_MPIInfo_free(m_mpiInfo);
48 caltinay 3670 }
49    
50 caltinay 3691 bool RipleyDomain::isValidFunctionSpaceType(int fsType) const
51 caltinay 3670 {
52 caltinay 3691 switch (fsType) {
53 caltinay 3670 case DegreesOfFreedom:
54     case ReducedDegreesOfFreedom:
55     case Nodes:
56     case ReducedNodes:
57     case Elements:
58     case ReducedElements:
59     case FaceElements:
60     case ReducedFaceElements:
61     case Points:
62 caltinay 3691 return true;
63     default:
64 caltinay 3670 break;
65     }
66 caltinay 3691 return false;
67 caltinay 3670 }
68    
69 caltinay 3691 string RipleyDomain::functionSpaceTypeAsString(int fsType) const
70 caltinay 3670 {
71 caltinay 3691 switch (fsType) {
72     case DegreesOfFreedom: return "Ripley_DegreesOfFreedom";
73     case ReducedDegreesOfFreedom: return "Ripley_ReducedDegreesOfFreedom";
74     case Nodes: return "Ripley_Nodes";
75     case ReducedNodes: return "Ripley_Reduced_Nodes";
76     case Elements: return "Ripley_Elements";
77     case ReducedElements: return "Ripley_Reduced_Elements";
78     case FaceElements: return "Ripley_Face_Elements";
79     case ReducedFaceElements: return "Ripley_Reduced_Face_Elements";
80     case Points: return "Ripley_Points";
81     default:
82 caltinay 3670 break;
83     }
84 caltinay 3691 return "Invalid function space type code";
85 caltinay 3670 }
86    
87 caltinay 3691 pair<int,int> RipleyDomain::getDataShape(int fsType) const
88 caltinay 3670 {
89 caltinay 3691 const int ptsPerSample = (m_numDim==2 ? 4 : 8);
90     switch (fsType) {
91 caltinay 3670 case Nodes:
92 caltinay 3713 case ReducedNodes:
93 caltinay 3670 case DegreesOfFreedom:
94 caltinay 3722 case ReducedDegreesOfFreedom:
95 caltinay 3691 return pair<int,int>(1, getNumNodes());
96 caltinay 3670 case Elements:
97 caltinay 3691 return pair<int,int>(ptsPerSample, getNumElements());
98 caltinay 3670 case FaceElements:
99 caltinay 3691 return pair<int,int>(ptsPerSample/2, getNumFaceElements());
100 caltinay 3711 case ReducedElements:
101     return pair<int,int>(1, getNumElements());
102     case ReducedFaceElements:
103     return pair<int,int>(1, getNumFaceElements());
104 caltinay 3691 /*
105 caltinay 3697 case Points:
106 caltinay 3711 return pair<int,int>(1, getNumPoints());
107 caltinay 3691 */
108 caltinay 3670 default:
109     break;
110     }
111    
112 caltinay 3691 stringstream msg;
113 caltinay 3702 msg << "getDataShape(): Unsupported function space type "
114     << functionSpaceTypeAsString(fsType) << " for " << getDescription();
115 caltinay 3691 throw RipleyException(msg.str());
116 caltinay 3670 }
117    
118 caltinay 3691 string RipleyDomain::showTagNames() const
119 caltinay 3670 {
120 caltinay 3691 stringstream ret;
121     TagMap::const_iterator it;
122     for (it=m_tagMap.begin(); it!=m_tagMap.end(); it++) {
123     if (it!=m_tagMap.begin()) ret << ", ";
124     ret << it->first;
125 caltinay 3670 }
126 caltinay 3691 return ret.str();
127 caltinay 3670 }
128    
129     bool RipleyDomain::commonFunctionSpace(const vector<int>& fs, int& resultcode) const
130     {
131 caltinay 3691 /*
132     The idea is to use equivalence classes (i.e. types which can be
133     interpolated back and forth):
134 caltinay 3670 class 1: DOF <-> Nodes
135     class 2: ReducedDOF <-> ReducedNodes
136     class 3: Points
137     class 4: Elements
138     class 5: ReducedElements
139     class 6: FaceElements
140     class 7: ReducedFaceElements
141     class 8: ContactElementZero <-> ContactElementOne
142     class 9: ReducedContactElementZero <-> ReducedContactElementOne
143    
144 caltinay 3691 There is also a set of lines. Interpolation is possible down a line but not
145     between lines.
146     class 1 and 2 belong to all lines so aren't considered.
147 caltinay 3670 line 0: class 3
148     line 1: class 4,5
149     line 2: class 6,7
150     line 3: class 8,9
151    
152     For classes with multiple members (eg class 2) we have vars to record if
153     there is at least one instance. e.g. hasnodes is true if we have at least
154     one instance of Nodes.
155     */
156     if (fs.empty())
157     return false;
158     vector<int> hasclass(10);
159     vector<int> hasline(4);
160     bool hasnodes=false;
161     bool hasrednodes=false;
162     for (int i=0;i<fs.size();++i) {
163     switch (fs[i]) {
164     case Nodes: hasnodes=true; // no break is deliberate
165     case DegreesOfFreedom:
166     hasclass[1]=1;
167     break;
168     case ReducedNodes: hasrednodes=true; // no break is deliberate
169     case ReducedDegreesOfFreedom:
170     hasclass[2]=1;
171     break;
172     case Points:
173     hasline[0]=1;
174     hasclass[3]=1;
175     break;
176     case Elements:
177     hasclass[4]=1;
178     hasline[1]=1;
179     break;
180     case ReducedElements:
181     hasclass[5]=1;
182     hasline[1]=1;
183     break;
184     case FaceElements:
185     hasclass[6]=1;
186     hasline[2]=1;
187     break;
188     case ReducedFaceElements:
189     hasclass[7]=1;
190     hasline[2]=1;
191     break;
192     default:
193     return false;
194     }
195     }
196     int totlines=hasline[0]+hasline[1]+hasline[2]+hasline[3];
197    
198     // fail if we have more than one leaf group
199     // = there are at least two branches we can't interpolate between
200     if (totlines>1)
201     return false;
202     else if (totlines==1) {
203     // we have points
204 caltinay 3691 if (hasline[0]==1)
205 caltinay 3670 resultcode=Points;
206 caltinay 3691 else if (hasline[1]==1) {
207     if (hasclass[5]==1)
208 caltinay 3670 resultcode=ReducedElements;
209 caltinay 3691 else
210 caltinay 3670 resultcode=Elements;
211     } else if (hasline[2]==1) {
212 caltinay 3691 if (hasclass[7]==1)
213 caltinay 3670 resultcode=ReducedFaceElements;
214 caltinay 3691 else
215 caltinay 3670 resultcode=FaceElements;
216 caltinay 3691 } else
217     throw RipleyException("Internal Ripley Error!");
218 caltinay 3670 } else { // totlines==0
219 caltinay 3691 if (hasclass[2]==1)
220 caltinay 3670 // something from class 2
221     resultcode=(hasrednodes ? ReducedNodes : ReducedDegreesOfFreedom);
222 caltinay 3691 else // something from class 1
223 caltinay 3670 resultcode=(hasnodes ? Nodes : DegreesOfFreedom);
224     }
225     return true;
226     }
227    
228 caltinay 3701 void RipleyDomain::interpolateOnDomain(escript::Data& target,
229     const escript::Data& in) const
230     {
231     const RipleyDomain& inDomain=dynamic_cast<const RipleyDomain&>(*(in.getFunctionSpace().getDomain()));
232     const RipleyDomain& targetDomain=dynamic_cast<const RipleyDomain&>(*(target.getFunctionSpace().getDomain()));
233     if (inDomain != *this)
234     throw RipleyException("Illegal domain of interpolant");
235     if (targetDomain != *this)
236     throw RipleyException("Illegal domain of interpolation target");
237    
238     stringstream msg;
239     msg << "interpolateOnDomain() not implemented for function space "
240     << functionSpaceTypeAsString(in.getFunctionSpace().getTypeCode())
241     << " -> "
242     << functionSpaceTypeAsString(target.getFunctionSpace().getTypeCode());
243    
244     switch (in.getFunctionSpace().getTypeCode()) {
245     case Nodes:
246 caltinay 3722 case ReducedNodes:
247 caltinay 3701 case DegreesOfFreedom:
248 caltinay 3722 case ReducedDegreesOfFreedom:
249 caltinay 3701 switch (target.getFunctionSpace().getTypeCode()) {
250 caltinay 3722 case Nodes:
251     case ReducedNodes:
252 caltinay 3701 case DegreesOfFreedom:
253 caltinay 3722 case ReducedDegreesOfFreedom:
254     // FIXME
255     copyNodalData(target, *const_cast<escript::Data*>(&in));
256 caltinay 3701 break;
257    
258     case Elements:
259 caltinay 3711 interpolateNodesOnElements(target, *const_cast<escript::Data*>(&in), false);
260 caltinay 3701 break;
261    
262 caltinay 3711 case ReducedElements:
263     interpolateNodesOnElements(target, *const_cast<escript::Data*>(&in), true);
264     break;
265    
266 caltinay 3701 case FaceElements:
267 caltinay 3711 interpolateNodesOnFaces(target, *const_cast<escript::Data*>(&in), false);
268 caltinay 3701 break;
269    
270 caltinay 3711 case ReducedFaceElements:
271     interpolateNodesOnFaces(target, *const_cast<escript::Data*>(&in), true);
272     break;
273    
274 caltinay 3701 default:
275     throw RipleyException(msg.str());
276     }
277     break;
278     default:
279     throw RipleyException(msg.str());
280     }
281     }
282    
283 caltinay 3691 escript::Data RipleyDomain::getX() const
284 caltinay 3670 {
285 caltinay 3691 return escript::continuousFunction(*this).getX();
286     }
287    
288     escript::Data RipleyDomain::getNormal() const
289     {
290     return escript::functionOnBoundary(*this).getNormal();
291     }
292    
293     escript::Data RipleyDomain::getSize() const
294     {
295     return escript::function(*this).getSize();
296     }
297    
298     void RipleyDomain::setToX(escript::Data& arg) const
299     {
300     const RipleyDomain& argDomain=dynamic_cast<const RipleyDomain&>(
301     *(arg.getFunctionSpace().getDomain()));
302     if (argDomain != *this)
303     throw RipleyException("setToX: Illegal domain of data point locations");
304     if (!arg.isExpanded())
305     throw RipleyException("setToX: Expanded Data object expected");
306    
307     if (arg.getFunctionSpace().getTypeCode()==Nodes) {
308     assembleCoordinates(arg);
309     } else {
310     // interpolate the result
311     escript::Data contData=escript::Vector(0., escript::continuousFunction(*this), true);
312     assembleCoordinates(contData);
313     interpolateOnDomain(arg, contData);
314 caltinay 3670 }
315 caltinay 3691 }
316 caltinay 3670
317 caltinay 3691 bool RipleyDomain::isCellOriented(int fsType) const
318     {
319     switch(fsType) {
320 caltinay 3670 case Nodes:
321     case DegreesOfFreedom:
322     case ReducedDegreesOfFreedom:
323 caltinay 3691 return false;
324 caltinay 3670 case Elements:
325 caltinay 3691 case FaceElements:
326     case Points:
327 caltinay 3670 case ReducedElements:
328     case ReducedFaceElements:
329 caltinay 3691 return true;
330 caltinay 3670 default:
331 caltinay 3691 break;
332 caltinay 3670 }
333 caltinay 3691 stringstream msg;
334 caltinay 3722 msg << "isCellOriented(): Illegal function space type " << fsType << " on " << getDescription();
335 caltinay 3691 throw RipleyException(msg.str());
336 caltinay 3670 }
337    
338 caltinay 3722 bool RipleyDomain::canTag(int fsType) const
339     {
340     switch(fsType) {
341     case Nodes:
342     case Elements:
343     case ReducedElements:
344     case FaceElements:
345     case ReducedFaceElements:
346     return true;
347     case DegreesOfFreedom:
348     case ReducedDegreesOfFreedom:
349     case Points:
350     return false;
351     default:
352     break;
353     }
354     stringstream msg;
355     msg << "canTag(): Illegal function space type " << fsType << " on " << getDescription();
356     throw RipleyException(msg.str());
357     }
358    
359     void RipleyDomain::setTags(const int fsType, const int newTag, const escript::Data& cMask) const
360     {
361     IndexVector* target=NULL;
362     dim_t num=0;
363    
364     switch(fsType) {
365     case Nodes:
366     num=getNumNodes();
367     target=&m_nodeTags;
368     break;
369     case Elements:
370     case ReducedElements:
371     num=getNumElements();
372     target=&m_elementTags;
373     break;
374     case FaceElements:
375     case ReducedFaceElements:
376     num=getNumFaceElements();
377     target=&m_faceTags;
378     break;
379     default: {
380     stringstream msg;
381     msg << "setTags(): not implemented for " << functionSpaceTypeAsString(fsType);
382     throw RipleyException(msg.str());
383     }
384     }
385     if (target->size() != num) {
386     target->assign(num, -1);
387     }
388    
389     escript::Data& mask=*const_cast<escript::Data*>(&cMask);
390     #pragma omp parallel for
391     for (index_t i=0; i<num; i++) {
392     if (mask.getSampleDataRO(i)[0] > 0) {
393     (*target)[i]=newTag;
394     }
395     }
396     updateTagsInUse(fsType);
397     }
398    
399     int RipleyDomain::getTagFromSampleNo(int fsType, int sampleNo) const
400     {
401     switch(fsType) {
402     case Nodes:
403     if (m_nodeTags.size() > sampleNo)
404     return m_nodeTags[sampleNo];
405     break;
406     case Elements:
407     case ReducedElements:
408     if (m_elementTags.size() > sampleNo)
409     return m_elementTags[sampleNo];
410     break;
411     case FaceElements:
412     case ReducedFaceElements:
413     if (m_faceTags.size() > sampleNo)
414     return m_faceTags[sampleNo];
415     break;
416     default: {
417     stringstream msg;
418     msg << "getTagFromSampleNo(): not implemented for " << functionSpaceTypeAsString(fsType);
419     throw RipleyException(msg.str());
420     }
421     }
422     return -1;
423     }
424    
425     int RipleyDomain::getNumberOfTagsInUse(int fsType) const
426     {
427     switch(fsType) {
428     case Nodes:
429     return m_nodeTagsInUse.size();
430     case Elements:
431     case ReducedElements:
432     return m_elementTagsInUse.size();
433     case FaceElements:
434     case ReducedFaceElements:
435     return m_faceTagsInUse.size();
436     default: {
437     stringstream msg;
438     msg << "getNumberOfTagsInUse(): not implemented for " << functionSpaceTypeAsString(fsType);
439     throw RipleyException(msg.str());
440     }
441     }
442     }
443    
444     const int* RipleyDomain::borrowListOfTagsInUse(int fsType) const
445     {
446     switch(fsType) {
447     case Nodes:
448     return &m_nodeTagsInUse[0];
449     case Elements:
450     case ReducedElements:
451     return &m_elementTagsInUse[0];
452     case FaceElements:
453     case ReducedFaceElements:
454     return &m_faceTagsInUse[0];
455     default: {
456     stringstream msg;
457     msg << "borrowListOfTagsInUse(): not implemented for " << functionSpaceTypeAsString(fsType);
458     throw RipleyException(msg.str());
459     }
460     }
461     }
462    
463 caltinay 3691 void RipleyDomain::Print_Mesh_Info(const bool full) const
464 caltinay 3670 {
465 caltinay 3691 cout << "Print_Mesh_Info for " << getDescription() << " running on CPU "
466     << m_mpiInfo->rank << ". MPI size: " << m_mpiInfo->size << endl;
467     cout << "Number of dimensions: " << m_numDim << endl;
468 caltinay 3670
469 caltinay 3691 // write tags
470     if (m_tagMap.size() > 0) {
471     cout << "Tags:" << endl;
472     TagMap::const_iterator it;
473     for (it=m_tagMap.begin(); it!=m_tagMap.end(); it++) {
474     cout << " " << setw(5) << it->second << " "
475     << it->first << endl;
476     }
477 caltinay 3670 }
478     }
479    
480     int RipleyDomain::getSystemMatrixTypeId(const int solver,
481     const int preconditioner, const int package, const bool symmetry) const
482     {
483 caltinay 3691 return SystemMatrixAdapter::getSystemMatrixTypeId(solver, preconditioner,
484     package, symmetry, m_mpiInfo);
485 caltinay 3670 }
486    
487     int RipleyDomain::getTransportTypeId(const int solver, const int preconditioner,
488     const int package, const bool symmetry) const
489     {
490 caltinay 3691 return TransportProblemAdapter::getTransportTypeId(solver, preconditioner,
491     package, symmetry, m_mpiInfo);
492 caltinay 3670 }
493    
494 caltinay 3691 escript::ASM_ptr RipleyDomain::newSystemMatrix(const int row_blocksize,
495     const escript::FunctionSpace& row_functionspace,
496     const int column_blocksize,
497     const escript::FunctionSpace& column_functionspace,
498     const int type) const
499 caltinay 3670 {
500 caltinay 3691 bool reduceRowOrder=false;
501     bool reduceColOrder=false;
502     // is the domain right?
503     const RipleyDomain& row_domain=dynamic_cast<const RipleyDomain&>(*(row_functionspace.getDomain()));
504     if (row_domain!=*this)
505     throw RipleyException("Domain of row function space does not match the domain of matrix generator");
506     const RipleyDomain& col_domain=dynamic_cast<const RipleyDomain&>(*(column_functionspace.getDomain()));
507     if (col_domain!=*this)
508     throw RipleyException("Domain of column function space does not match the domain of matrix generator");
509     // is the function space type right?
510     if (row_functionspace.getTypeCode()==ReducedDegreesOfFreedom)
511     reduceRowOrder=true;
512     else if (row_functionspace.getTypeCode()!=DegreesOfFreedom)
513     throw RipleyException("Illegal function space type for system matrix rows");
514     if (column_functionspace.getTypeCode()==ReducedDegreesOfFreedom)
515     reduceColOrder=true;
516     else if (column_functionspace.getTypeCode()!=DegreesOfFreedom)
517     throw RipleyException("Illegal function space type for system matrix columns");
518    
519     // generate matrix
520     Paso_SystemMatrixPattern* pattern=getPattern(reduceRowOrder, reduceColOrder);
521     Paso_SystemMatrix* matrix = Paso_SystemMatrix_alloc(type, pattern,
522     row_blocksize, column_blocksize, FALSE);
523     paso::checkPasoError();
524     Paso_SystemMatrixPattern_free(pattern);
525     escript::ASM_ptr sma(new SystemMatrixAdapter(matrix, row_blocksize,
526     row_functionspace, column_blocksize, column_functionspace));
527     return sma;
528 caltinay 3670 }
529    
530 caltinay 3697 void RipleyDomain::setNewX(const escript::Data& arg)
531     {
532     throw RipleyException("setNewX(): Operation not supported");
533     }
534    
535 caltinay 3722 //protected
536     void RipleyDomain::copyNodalData(escript::Data& out, escript::Data& in) const
537     {
538     const dim_t numComp = in.getDataPointSize();
539     #pragma omp parallel for
540     for (index_t i=0; i<in.getNumSamples(); i++) {
541     const double* src = in.getSampleDataRO(i);
542     copy(src, src+numComp, out.getSampleDataRW(i));
543     }
544     }
545    
546     //protected
547     void RipleyDomain::updateTagsInUse(int fsType) const
548     {
549     IndexVector* tagsInUse=NULL;
550     const IndexVector* tags=NULL;
551     switch(fsType) {
552     case Nodes:
553     tags=&m_nodeTags;
554     tagsInUse=&m_nodeTagsInUse;
555     break;
556     case Elements:
557     case ReducedElements:
558     tags=&m_elementTags;
559     tagsInUse=&m_elementTagsInUse;
560     break;
561     case FaceElements:
562     case ReducedFaceElements:
563     tags=&m_faceTags;
564     tagsInUse=&m_faceTagsInUse;
565     break;
566     default:
567     return;
568     }
569    
570     // gather global unique tag values from tags into tagsInUse
571     tagsInUse->clear();
572     index_t lastFoundValue = INDEX_T_MIN, minFoundValue, local_minFoundValue;
573    
574     while (true) {
575     // find smallest value bigger than lastFoundValue
576     minFoundValue = INDEX_T_MAX;
577     #pragma omp parallel private(local_minFoundValue)
578     {
579     local_minFoundValue = minFoundValue;
580     #pragma omp for schedule(static) nowait
581     for (size_t i = 0; i < tags->size(); i++) {
582     const index_t v = (*tags)[i];
583     if ((v > lastFoundValue) && (v < local_minFoundValue))
584     local_minFoundValue = v;
585     }
586     #pragma omp critical
587     {
588     if (local_minFoundValue < minFoundValue)
589     minFoundValue = local_minFoundValue;
590     }
591     }
592     #ifdef ESYS_MPI
593     local_minFoundValue = minFoundValue;
594     MPI_Allreduce(&local_minFoundValue, &minFoundValue, 1, MPI_INT, MPI_MIN, m_mpiInfo->comm);
595     #endif
596     // if we found a new value add it to the tagsInUse vector
597    
598     if (minFoundValue < INDEX_T_MAX) {
599     tagsInUse->push_back(minFoundValue);
600     lastFoundValue = minFoundValue;
601     } else
602     break;
603     }
604     }
605    
606 caltinay 3691 //
607     // the methods that follow have to be implemented by the subclasses
608     //
609    
610     string RipleyDomain::getDescription() const
611 caltinay 3670 {
612 caltinay 3691 throw RipleyException("getDescription() not implemented");
613 caltinay 3670 }
614    
615 caltinay 3691 bool RipleyDomain::operator==(const AbstractDomain& other) const
616 caltinay 3670 {
617 caltinay 3691 throw RipleyException("operator==() not implemented");
618 caltinay 3670 }
619    
620 caltinay 3691 void RipleyDomain::write(const string& filename) const
621 caltinay 3670 {
622 caltinay 3691 throw RipleyException("write() not implemented");
623 caltinay 3670 }
624    
625 caltinay 3691 void RipleyDomain::dump(const string& filename) const
626 caltinay 3670 {
627 caltinay 3691 throw RipleyException("dump() not implemented");
628 caltinay 3670 }
629    
630 caltinay 3691 const int* RipleyDomain::borrowSampleReferenceIDs(int fsType) const
631     {
632     throw RipleyException("borrowSampleReferenceIDs() not implemented");
633     }
634 caltinay 3670
635 caltinay 3691 bool RipleyDomain::probeInterpolationOnDomain(int fsType_source,
636     int fsType_target) const
637 caltinay 3670 {
638 caltinay 3691 throw RipleyException("probeInterpolationOnDomain() not implemented");
639 caltinay 3670 }
640    
641 caltinay 3691 void RipleyDomain::interpolateACross(escript::Data& target, const escript::Data& source) const
642 caltinay 3670 {
643 caltinay 3691 throw RipleyException("interpolateACross() not implemented");
644 caltinay 3670 }
645    
646 caltinay 3691 bool RipleyDomain::probeInterpolationACross(int fsType_source,
647     const escript::AbstractDomain&, int fsType_target) const
648 caltinay 3670 {
649 caltinay 3691 throw RipleyException("probeInterpolationACross() not implemented");
650 caltinay 3670 }
651    
652 caltinay 3691 void RipleyDomain::setToNormal(escript::Data& normal) const
653 caltinay 3670 {
654 caltinay 3691 throw RipleyException("setToNormal() not implemented");
655 caltinay 3670 }
656    
657 caltinay 3691 void RipleyDomain::setToSize(escript::Data& size) const
658 caltinay 3670 {
659 caltinay 3691 throw RipleyException("setToSize() not implemented");
660 caltinay 3670 }
661    
662 caltinay 3691 void RipleyDomain::setToGradient(escript::Data& grad, const escript::Data& arg) const
663 caltinay 3670 {
664 caltinay 3691 throw RipleyException("setToGradient() not implemented");
665 caltinay 3670 }
666    
667 caltinay 3691 void RipleyDomain::setToIntegrals(vector<double>& integrals, const escript::Data& arg) const
668 caltinay 3670 {
669 caltinay 3691 throw RipleyException("setToIntegrals() not implemented");
670 caltinay 3670 }
671    
672 caltinay 3691 bool RipleyDomain::ownSample(int fsType, index_t id) const
673 caltinay 3670 {
674 caltinay 3691 throw RipleyException("ownSample() not implemented");
675 caltinay 3670 }
676    
677 caltinay 3691 void RipleyDomain::addPDEToSystem(
678     escript::AbstractSystemMatrix& mat, escript::Data& rhs,
679     const escript::Data& A, const escript::Data& B, const escript::Data& C,
680     const escript::Data& D, const escript::Data& X, const escript::Data& Y,
681     const escript::Data& d, const escript::Data& y,
682     const escript::Data& d_contact, const escript::Data& y_contact,
683     const escript::Data& d_dirac,const escript::Data& y_dirac) const
684     {
685     throw RipleyException("addPDEToSystem() not implemented");
686     }
687 caltinay 3670
688 caltinay 3691 void RipleyDomain::addPDEToLumpedSystem(escript::Data& mat,
689     const escript::Data& D, const escript::Data& d,
690     const escript::Data& d_dirac, const bool useHRZ) const
691     {
692     throw RipleyException("addPDEToLumpedSystem() not implemented");
693 caltinay 3670 }
694    
695 caltinay 3691 void RipleyDomain::addPDEToRHS(escript::Data& rhs, const escript::Data& X,
696     const escript::Data& Y, const escript::Data& y,
697     const escript::Data& y_contact, const escript::Data& y_dirac) const
698 caltinay 3670 {
699 caltinay 3691 throw RipleyException("addPDEToRHS() not implemented");
700 caltinay 3670 }
701    
702 caltinay 3691 void RipleyDomain::addPDEToTransportProblem(
703     escript::AbstractTransportProblem& tp,
704     escript::Data& source, const escript::Data& M,
705     const escript::Data& A, const escript::Data& B, const escript::Data& C,
706     const escript::Data& D, const escript::Data& X, const escript::Data& Y,
707     const escript::Data& d, const escript::Data& y,
708     const escript::Data& d_contact, const escript::Data& y_contact,
709     const escript::Data& d_dirac, const escript::Data& y_dirac) const
710 caltinay 3670 {
711 caltinay 3691 throw RipleyException("addPDEToTransportProblem() not implemented");
712 caltinay 3670 }
713    
714 caltinay 3691 escript::ATP_ptr RipleyDomain::newTransportProblem(const bool useBackwardEuler,
715     const int blocksize, const escript::FunctionSpace& functionspace,
716     const int type) const
717 caltinay 3670 {
718 caltinay 3691 throw RipleyException("newTransportProblem() not implemented");
719 caltinay 3670 }
720    
721 caltinay 3691 Paso_SystemMatrixPattern* RipleyDomain::getPattern(bool reducedRowOrder,
722     bool reducedColOrder) const
723 caltinay 3670 {
724 caltinay 3691 throw RipleyException("getPattern() not implemented");
725 caltinay 3670 }
726    
727 caltinay 3691 dim_t RipleyDomain::getNumDataPointsGlobal() const
728 caltinay 3670 {
729 caltinay 3691 throw RipleyException("getNumDataPointsGlobal() not implemented");
730 caltinay 3670 }
731    
732 caltinay 3697 IndexVector RipleyDomain::getNumNodesPerDim() const
733     {
734     throw RipleyException("getNumNodesPerDim() not implemented");
735     }
736    
737     IndexVector RipleyDomain::getNumElementsPerDim() const
738     {
739     throw RipleyException("getNumElementsPerDim() not implemented");
740     }
741    
742     IndexVector RipleyDomain::getNumFacesPerBoundary() const
743     {
744     throw RipleyException("getNumFacesPerBoundary() not implemented");
745     }
746    
747     IndexVector RipleyDomain::getNodeDistribution() const
748     {
749     throw RipleyException("getNodeDistribution() not implemented");
750     }
751    
752     pair<double,double> RipleyDomain::getFirstCoordAndSpacing(dim_t dim) const
753     {
754     throw RipleyException("getFirstCoordAndSpacing() not implemented");
755     }
756    
757 caltinay 3691 dim_t RipleyDomain::getNumFaceElements() const
758 caltinay 3670 {
759 caltinay 3691 throw RipleyException("getNumFaceElements() not implemented");
760 caltinay 3670 }
761    
762 caltinay 3691 dim_t RipleyDomain::getNumElements() const
763 caltinay 3670 {
764 caltinay 3691 throw RipleyException("getNumElements() not implemented");
765 caltinay 3670 }
766    
767 caltinay 3691 dim_t RipleyDomain::getNumNodes() const
768 caltinay 3670 {
769 caltinay 3691 throw RipleyException("getNumNodes() not implemented");
770 caltinay 3670 }
771    
772 caltinay 3691 void RipleyDomain::assembleCoordinates(escript::Data& arg) const
773 caltinay 3670 {
774 caltinay 3691 throw RipleyException("assembleCoordinates() not implemented");
775 caltinay 3670 }
776    
777 caltinay 3711 void RipleyDomain::interpolateNodesOnElements(escript::Data& out, escript::Data& in, bool reduced) const
778 caltinay 3701 {
779     throw RipleyException("interpolateNodesOnElements() not implemented");
780     }
781 caltinay 3691
782 caltinay 3711 void RipleyDomain::interpolateNodesOnFaces(escript::Data& out, escript::Data& in, bool reduced) const
783 caltinay 3701 {
784     throw RipleyException("interpolateNodesOnFaces() not implemented");
785     }
786    
787    
788 caltinay 3670 } // end of namespace ripley
789    

  ViewVC Help
Powered by ViewVC 1.1.26