/[escript]/branches/diaplayground/finley/src/CPPAdapter/MeshAdapter.h
ViewVC logotype

Annotation of /branches/diaplayground/finley/src/CPPAdapter/MeshAdapter.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5136 - (hide annotations)
Tue Sep 9 07:13:55 2014 UTC (4 years, 8 months ago) by caltinay
File MIME type: text/plain
File size: 21956 byte(s)
ripley now supports paso solvers again and returns an appropriate matrix type
id. Changed the getSystemMatrixTypeId() method to take a full SolverBuddy
instance and made some other simplifications.

1 ksteube 1312
2 jfenwick 3981 /*****************************************************************************
3 ksteube 1811 *
4 jfenwick 4657 * Copyright (c) 2003-2014 by University of Queensland
5 jfenwick 3981 * http://www.uq.edu.au
6 ksteube 1811 *
7     * Primary Business: Queensland, Australia
8     * Licensed under the Open Software License version 3.0
9     * http://www.opensource.org/licenses/osl-3.0.php
10     *
11 jfenwick 3981 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 jfenwick 4657 * Development 2012-2013 by School of Earth Sciences
13     * Development from 2014 by Centre for Geoscience Computing (GeoComp)
14 jfenwick 3981 *
15     *****************************************************************************/
16 ksteube 1312
17 ksteube 1811
18 jgs 149 #if !defined finley_MeshAdapter_20040526_H
19 jgs 82 #define finley_MeshAdapter_20040526_H
20 caltinay 2898 #include "system_dep.h"
21 jgs 82
22 caltinay 2895 #include "finley/Mesh.h"
23     #include "finley/Finley.h"
24     #include "finley/Assemble.h"
25 jgs 472 #include "FinleyAdapterException.h"
26 jgs 149
27 jfenwick 3675 #include <pasowrap/SystemMatrixAdapter.h>
28     #include <pasowrap/TransportProblemAdapter.h>
29 robwdcock 682 #include "escript/AbstractContinuousDomain.h"
30     #include "escript/FunctionSpace.h"
31     #include "escript/FunctionSpaceFactory.h"
32 jgs 472
33 jgs 82 #include <boost/shared_ptr.hpp>
34 jgs 153 #include <boost/python/dict.hpp>
35 jgs 472 #include <boost/python/extract.hpp>
36    
37 jgs 82 #include <map>
38     #include <vector>
39     #include <string>
40 jgs 472 #include <sstream>
41 jgs 82
42     namespace finley {
43 jfenwick 3561
44     // These are friends implemented in MeshAdapterFactory.cpp
45 caltinay 4496 // They are only fwd declared here so that vis.studio will accept the friend
46     // decls
47 jfenwick 3563 FINLEY_DLL_API
48 jfenwick 4934 escript::Domain_ptr brick(esysUtils::JMPI& p,int n0, int n1, int n2, int order,
49 caltinay 4496 double l0, double l1, double l2,
50     bool periodic0, bool periodic1, bool periodic2,
51     int integrationOrder, int reducedIntegrationOrder,
52     bool useElementsOnFace, bool useFullElementOrder,
53     bool optimize, const std::vector<double>& points,
54     const std::vector<int>& tags,
55 jfenwick 4934 const std::map<std::string, int>& tagnamestonums
56     );
57 caltinay 4496
58     FINLEY_DLL_API
59 jfenwick 4934 escript::Domain_ptr rectangle(esysUtils::JMPI& p, int n0, int n1, int order,
60 caltinay 4496 double l0, double l1,
61     bool periodic0, bool periodic1,
62     int integrationOrder, int reducedIntegrationOrder,
63     bool useElementsOnFace, bool useFullElementOrder,
64     bool optimize, const std::vector<double>& points,
65     const std::vector<int>& tags,
66 jfenwick 4934 const std::map<std::string, int>& tagnamestonums
67     );
68 jfenwick 3561
69 jgs 123 struct null_deleter
70     {
71     void operator()(void const *ptr) const
72     {
73     }
74     };
75    
76    
77 jgs 82 /**
78 caltinay 3991 \brief implements the AbstractContinuousDomain interface for the Finley
79     library.
80 jgs 82 */
81    
82 jgs 480 class MeshAdapter : public escript::AbstractContinuousDomain {
83 jgs 82
84     public:
85    
86     //
87     // Codes for function space types supported
88     static const int DegreesOfFreedom;
89     static const int ReducedDegreesOfFreedom;
90     static const int Nodes;
91 gross 1062 static const int ReducedNodes;
92 jgs 82 static const int Elements;
93 gross 1059 static const int ReducedElements;
94 jgs 82 static const int FaceElements;
95 gross 1059 static const int ReducedFaceElements;
96 jgs 82 static const int Points;
97     static const int ContactElementsZero;
98 gross 1059 static const int ReducedContactElementsZero;
99 jgs 82 static const int ContactElementsOne;
100 gross 1059 static const int ReducedContactElementsOne;
101 jgs 82
102     /**
103     \brief
104     Constructor for MeshAdapter
105    
106     Description:
107     Constructor for MeshAdapter. The pointer passed to MeshAdapter
108 ksteube 1312 is deleted using a call to Finley_Mesh_free in the
109 jgs 82 MeshAdapter destructor.
110    
111     Throws:
112     May throw an exception derived from EsysException
113    
114     \param finleyMesh Input - A pointer to the externally constructed
115     finley mesh.The pointer passed to MeshAdapter
116     is deleted using a call to
117 ksteube 1312 Finley_Mesh_free in the MeshAdapter
118 jgs 82 destructor.
119     */
120 woo409 757 FINLEY_DLL_API
121 caltinay 4496 MeshAdapter(Mesh* finleyMesh=0);
122 jgs 149
123 jgs 82 /**
124     \brief
125     Copy constructor.
126     */
127 woo409 757 FINLEY_DLL_API
128 jgs 82 MeshAdapter(const MeshAdapter& in);
129 jgs 149
130 jgs 82 /**
131     \brief
132     Destructor for MeshAdapter. As specified in the constructor
133 ksteube 1312 this calls Finley_Mesh_free for the pointer given to the
134 jgs 82 constructor.
135     */
136 woo409 757 FINLEY_DLL_API
137 jgs 82 ~MeshAdapter();
138 jgs 149
139 jgs 82 /**
140     \brief
141 ksteube 1312 return the number of processors used for this domain
142     */
143     FINLEY_DLL_API
144     virtual int getMPISize() const;
145     /**
146     \brief
147     return the number MPI rank of this processor
148     */
149    
150     FINLEY_DLL_API
151     virtual int getMPIRank() const;
152    
153     /**
154     \brief
155 ksteube 1877 If compiled for MPI then execute an MPI_Barrier, else do nothing
156     */
157    
158     FINLEY_DLL_API
159     virtual void MPIBarrier() const;
160    
161     /**
162     \brief
163     Return true if on MPI processor 0, else false
164     */
165    
166     FINLEY_DLL_API
167     virtual bool onMasterProcessor() const;
168    
169 jfenwick 2640 FINLEY_DLL_API
170 caltinay 5122 MPI_Comm getMPIComm() const;
171 jfenwick 2640
172 ksteube 1877 /**
173     \brief
174 jgs 82 Write the current mesh to a file with the given name.
175     \param fileName Input - The name of the file to write to.
176     */
177 woo409 757 FINLEY_DLL_API
178 jgs 82 void write(const std::string& fileName) const;
179 jgs 149
180 jgs 82 /**
181     \brief
182 jfenwick 2519 \param full
183 ksteube 1326 */
184     FINLEY_DLL_API
185 jfenwick 2519 void Print_Mesh_Info(const bool full=false) const;
186 ksteube 1326
187     /**
188     \brief
189 ksteube 1312 dumps the mesh to a file with the given name.
190     \param fileName Input - The name of the file
191     */
192     FINLEY_DLL_API
193     void dump(const std::string& fileName) const;
194    
195     /**
196     \brief
197 jgs 149 return the pointer to the underlying finley mesh structure
198 jgs 82 */
199 woo409 757 FINLEY_DLL_API
200 caltinay 4496 Mesh* getFinley_Mesh() const;
201 jgs 149
202 jgs 110 /**
203     \brief
204     Return the tag key for the given sample number.
205     \param functionSpaceType Input - The function space type.
206     \param sampleNo Input - The sample number.
207     */
208 woo409 757 FINLEY_DLL_API
209 jgs 110 int getTagFromSampleNo(int functionSpaceType, int sampleNo) const;
210 jgs 149
211 jgs 110 /**
212     \brief
213     Return the reference number of the given sample number.
214     \param functionSpaceType Input - The function space type.
215     */
216 woo409 757 FINLEY_DLL_API
217 jfenwick 2487 const int* borrowSampleReferenceIDs(int functionSpaceType) const;
218 jgs 110
219     /**
220     \brief
221 jgs 82 Returns true if the given integer is a valid function space type
222     for this domain.
223     */
224 woo409 757 FINLEY_DLL_API
225 jgs 82 virtual bool isValidFunctionSpaceType(int functionSpaceType) const;
226 jgs 149
227 jgs 82 /**
228     \brief
229     Return a description for this domain
230     */
231 woo409 757 FINLEY_DLL_API
232 jgs 82 virtual std::string getDescription() const;
233 jgs 149
234 jgs 82 /**
235     \brief
236     Return a description for the given function space type code
237     */
238 woo409 757 FINLEY_DLL_API
239 jgs 82 virtual std::string functionSpaceTypeAsString(int functionSpaceType) const;
240 jgs 110
241 jgs 82 /**
242     \brief
243     Build the table of function space type names
244     */
245 woo409 757 FINLEY_DLL_API
246 jgs 82 void setFunctionSpaceTypeNames();
247 jgs 149
248 jgs 82 /**
249     \brief
250     Return a continuous FunctionSpace code
251     */
252 woo409 757 FINLEY_DLL_API
253 jgs 82 virtual int getContinuousFunctionCode() const;
254 jgs 149
255 jgs 82 /**
256     \brief
257 gross 1062 Return a continuous on reduced order nodes FunctionSpace code
258     */
259     FINLEY_DLL_API
260     virtual int getReducedContinuousFunctionCode() const;
261    
262     /**
263     \brief
264 gross 1059 Return a function FunctionSpace code
265 jgs 82 */
266 woo409 757 FINLEY_DLL_API
267 jgs 82 virtual int getFunctionCode() const;
268 jgs 149
269 jgs 82 /**
270     \brief
271 gross 1059 Return a function with reduced integration order FunctionSpace code
272     */
273     FINLEY_DLL_API
274     virtual int getReducedFunctionCode() const;
275    
276     /**
277     \brief
278 jgs 82 Return a function on boundary FunctionSpace code
279     */
280 woo409 757 FINLEY_DLL_API
281 jgs 82 virtual int getFunctionOnBoundaryCode() const;
282 jgs 149
283 jgs 82 /**
284     \brief
285 gross 1059 Return a function on boundary with reduced integration order FunctionSpace code
286     */
287     FINLEY_DLL_API
288     virtual int getReducedFunctionOnBoundaryCode() const;
289    
290     /**
291     \brief
292 jgs 82 Return a FunctionOnContactZero code
293     */
294 woo409 757 FINLEY_DLL_API
295 jgs 82 virtual int getFunctionOnContactZeroCode() const;
296 jgs 149
297 jgs 82 /**
298     \brief
299 gross 1059 Return a FunctionOnContactZero code with reduced integration order
300     */
301     FINLEY_DLL_API
302     virtual int getReducedFunctionOnContactZeroCode() const;
303    
304     /**
305     \brief
306 jgs 82 Return a FunctionOnContactOne code
307     */
308 woo409 757 FINLEY_DLL_API
309 jgs 82 virtual int getFunctionOnContactOneCode() const;
310 jgs 149
311 jgs 82 /**
312     \brief
313 gross 1059 Return a FunctionOnContactOne code with reduced integration order
314     */
315     FINLEY_DLL_API
316     virtual int getReducedFunctionOnContactOneCode() const;
317    
318     /**
319     \brief
320 jgs 82 Return a Solution code
321     */
322 woo409 757 FINLEY_DLL_API
323 jgs 82 virtual int getSolutionCode() const;
324 jgs 149
325 jgs 82 /**
326     \brief
327     Return a ReducedSolution code
328     */
329 woo409 757 FINLEY_DLL_API
330 jgs 82 virtual int getReducedSolutionCode() const;
331 jgs 149
332 jgs 82 /**
333     \brief
334 gross 3522 Return a DiracDeltaFunctions code
335 jgs 82 */
336 woo409 757 FINLEY_DLL_API
337 gross 3522 virtual int getDiracDeltaFunctionsCode() const;
338 jgs 149
339     /**
340     \brief
341     */
342 jgs 82 typedef std::map<int, std::string> FunctionSpaceNamesMapType;
343 jgs 149
344 jgs 82 /**
345     \brief
346     */
347 woo409 757 FINLEY_DLL_API
348 jgs 82 virtual int getDim() const;
349 jgs 149
350     /**
351 jgs 82 \brief
352 gross 2533 Returns a status indicator of the domain. The status identifier should be unique over
353     the live time if the object but may be updated if changes to the domain happen, e.g.
354     modifications to its geometry.
355    
356     This has to be implemented by the actual Domain adapter.
357     */
358     FINLEY_DLL_API
359     virtual StatusType getStatus() const;
360    
361    
362     /**
363     \brief
364 ksteube 1754 Return the number of data points summed across all MPI processes
365     */
366     FINLEY_DLL_API
367     virtual int getNumDataPointsGlobal() const;
368    
369     /**
370     \brief
371 jgs 82 Return the number of data points per sample, and the number of samples as a pair.
372 jgs 121 \param functionSpaceCode Input -
373 jgs 82 */
374 woo409 757 FINLEY_DLL_API
375 jgs 82 virtual std::pair<int,int> getDataShape(int functionSpaceCode) const;
376    
377     /**
378     \brief
379     copies the location of data points into arg. The domain of arg has to match this.
380     has to be implemented by the actual Domain adapter.
381     */
382 woo409 757 FINLEY_DLL_API
383 jgs 82 virtual void setToX(escript::Data& arg) const;
384 jgs 149
385 jgs 82 /**
386     \brief
387 gross 1044 sets a map from a clear tag name to a tag key
388     \param name Input - tag name.
389     \param tag Input - tag key.
390     */
391     FINLEY_DLL_API
392     virtual void setTagMap(const std::string& name, int tag);
393    
394     /**
395     \brief
396     Return the tag key for tag name.
397     \param name Input - tag name
398     */
399     FINLEY_DLL_API
400     virtual int getTag(const std::string& name) const;
401    
402     /**
403     \brief
404     Returns true if name is a defined tage name.
405     \param name Input - tag name to be checked.
406     */
407     FINLEY_DLL_API
408     virtual bool isValidTagName(const std::string& name) const;
409    
410     /**
411     \brief
412     Returns all tag names in a single string sperated by commas
413     */
414     FINLEY_DLL_API
415     virtual std::string showTagNames() const;
416    
417     /**
418     \brief
419 jgs 82 assigns new location to the domain
420     */
421 woo409 757 FINLEY_DLL_API
422 jgs 82 virtual void setNewX(const escript::Data& arg);
423 jgs 149
424 jgs 82 /**
425     \brief
426     interpolates data given on source onto target where source and target have to be given on the same domain.
427     */
428 woo409 757 FINLEY_DLL_API
429 jgs 82 virtual void interpolateOnDomain(escript::Data& target,const escript::Data& source) const;
430 jfenwick 2521
431    
432 woo409 757 FINLEY_DLL_API
433 jgs 82 virtual bool probeInterpolationOnDomain(int functionSpaceType_source,int functionSpaceType_target) const;
434 jfenwick 4255
435     FINLEY_DLL_API
436     virtual signed char preferredInterpolationOnDomain(int functionSpaceType_source,int functionSpaceType_target) const;
437    
438    
439 jgs 149
440 jgs 82 /**
441 jfenwick 2635 \brief given a vector of FunctionSpace typecodes, pass back a code which then can all be interpolated to.
442     \return true is result is valid, false if not
443     */
444     FINLEY_DLL_API
445     bool
446     commonFunctionSpace(const std::vector<int>& fs, int& resultcode) const;
447    
448     /**
449 jgs 82 \brief
450     interpolates data given on source onto target where source and target are given on different domains.
451     has to be implemented by the actual Domain adapter.
452     */
453 woo409 757 FINLEY_DLL_API
454 jgs 82 virtual void interpolateACross(escript::Data& target, const escript::Data& source) const;
455 jfenwick 2521
456     /**
457     \brief determines whether interpolation from source to target is possible.
458     Must be implemented by the actual Domain adapter
459     */
460 woo409 757 FINLEY_DLL_API
461 jfenwick 2521 virtual bool probeInterpolationACross(int functionSpaceType_source,const escript::AbstractDomain& targetDomain, int functionSpaceType_target) const;
462 jgs 149
463 jgs 82 /**
464     \brief
465 jgs 149 copies the surface normals at data points into out. The actual function space to be considered
466 jgs 82 is defined by out. out has to be defined on this.
467     */
468 woo409 757 FINLEY_DLL_API
469 jgs 82 virtual void setToNormal(escript::Data& out) const;
470 jgs 149
471 jgs 82 /**
472     \brief
473     copies the size of samples into out. The actual function space to be considered
474     is defined by out. out has to be defined on this.
475     */
476 woo409 757 FINLEY_DLL_API
477 jgs 82 virtual void setToSize(escript::Data& out) const;
478    
479     /**
480     \brief
481     copies the gradient of arg into grad. The actual function space to be considered
482     for the gradient is defined by grad. arg and grad have to be defined on this.
483     */
484 woo409 757 FINLEY_DLL_API
485 jgs 82 virtual void setToGradient(escript::Data& grad,const escript::Data& arg) const;
486    
487     /**
488     \brief
489     copies the integrals of the function defined by arg into integrals.
490     arg has to be defined on this.
491     */
492 woo409 757 FINLEY_DLL_API
493 jgs 82 virtual void setToIntegrals(std::vector<double>& integrals,const escript::Data& arg) const;
494    
495 jgs 149 /**
496 jgs 102 \brief
497 gross 1859 return the identifier of the matrix type to be used for the global stiffness matrix when a particular solver, package, perconditioner,
498 jgs 102 and symmetric matrix is used.
499     \param solver
500 jfenwick 2519 \param preconditioner
501     \param package
502 jgs 102 \param symmetry
503     */
504 woo409 757 FINLEY_DLL_API
505 caltinay 5136 virtual int getSystemMatrixTypeId(const boost::python::object& options) const;
506 jgs 102
507 jgs 82 /**
508     \brief
509 gross 1859 return the identifier of the transport problem type to be used when a particular solver, perconditioner, package
510     and symmetric matrix is used.
511     \param solver
512 jfenwick 2519 \param preconditioner
513     \param package
514 gross 1859 \param symmetry
515     */
516     FINLEY_DLL_API
517     virtual int getTransportTypeId(const int solver, const int preconditioner, const int package, const bool symmetry) const;
518    
519     /**
520     \brief
521 jgs 82 returns true if data on this domain and a function space of type functionSpaceCode has to
522     considered as cell centered data.
523     */
524 woo409 757 FINLEY_DLL_API
525 jgs 82 virtual bool isCellOriented(int functionSpaceCode) const;
526 jgs 149
527    
528 woo409 757 FINLEY_DLL_API
529 jfenwick 2642 virtual bool ownSample(int fs_code, index_t id) const;
530    
531 jgs 110 /**
532     \brief
533 jgs 82 returns the function space representation of the type functionSpaceCode on this domain
534     as a vtkObject.
535     */
536     // vtkObject createVtkObject(int functionSpaceCode) const;
537 jgs 149
538 jgs 82 /**
539     \brief
540     adds a PDE onto the stiffness matrix mat and a rhs
541     */
542 woo409 757 FINLEY_DLL_API
543 jgs 82 virtual void addPDEToSystem(
544 jfenwick 3269 escript::AbstractSystemMatrix& mat, escript::Data& rhs,
545 jgs 82 const escript::Data& A, const escript::Data& B, const escript::Data& C,
546 jgs 102 const escript::Data& D, const escript::Data& X, const escript::Data& Y,
547     const escript::Data& d, const escript::Data& y,
548 gross 3522 const escript::Data& d_contact, const escript::Data& y_contact,
549     const escript::Data& d_dirac, const escript::Data& y_dirac) const;
550 gross 1204 /**
551     \brief
552     adds a PDE onto the lumped stiffness matrix matrix
553     */
554     FINLEY_DLL_API
555     virtual void addPDEToLumpedSystem(
556     escript::Data& mat,
557     const escript::Data& D,
558 gross 3379 const escript::Data& d,
559 gross 3522 const escript::Data& d_dirac,
560 caltinay 4496 const bool useHRZ) const;
561 jgs 149
562 jgs 82 /**
563     \brief
564 jgs 102 adds a PDE onto the stiffness matrix mat and a rhs
565 jgs 82 */
566 woo409 757 FINLEY_DLL_API
567 jgs 102 virtual void addPDEToRHS(escript::Data& rhs,
568     const escript::Data& X, const escript::Data& Y,
569 gross 3522 const escript::Data& y, const escript::Data& y_contact, const escript::Data& y_dirac) const;
570 gross 1367 /**
571     \brief
572     adds a PDE onto a transport problem
573     */
574 jgs 149
575 gross 1367 FINLEY_DLL_API
576     virtual void addPDEToTransportProblem(
577 jfenwick 3269 escript::AbstractTransportProblem& tp, escript::Data& source,
578 gross 1367 const escript::Data& M,
579     const escript::Data& A, const escript::Data& B, const escript::Data& C,const escript::Data& D,
580     const escript::Data& X,const escript::Data& Y,
581     const escript::Data& d, const escript::Data& y,
582 gross 3522 const escript::Data& d_contact,const escript::Data& y_contact, const escript::Data& d_dirac,const escript::Data& y_dirac) const;
583 gross 1367
584    
585 jgs 82 /**
586     \brief
587 gross 1366 creates a SystemMatrixAdapter stiffness matrix and initializes it with zeros:
588 jgs 82 */
589 woo409 757 FINLEY_DLL_API
590 jfenwick 3259 escript::ASM_ptr newSystemMatrix(
591 jgs 82 const int row_blocksize,
592     const escript::FunctionSpace& row_functionspace,
593     const int column_blocksize,
594     const escript::FunctionSpace& column_functionspace,
595 jgs 102 const int type) const;
596 gross 1366 /**
597     \brief
598     creates a TransportProblemAdapter
599 jgs 82
600 gross 1366 */
601    
602     FINLEY_DLL_API
603 jfenwick 3259 escript::ATP_ptr newTransportProblem(
604 gross 1366 const int blocksize,
605     const escript::FunctionSpace& functionspace,
606     const int type) const;
607    
608 jgs 102 /**
609     \brief returns locations in the FEM nodes
610     */
611 woo409 757 FINLEY_DLL_API
612 jgs 102 virtual escript::Data getX() const;
613 jgs 149
614 jgs 102 /**
615     \brief return boundary normals at the quadrature point on the face elements
616     */
617 woo409 757 FINLEY_DLL_API
618 jgs 102 virtual escript::Data getNormal() const;
619 jgs 149
620 jgs 102 /**
621     \brief returns the element size
622     */
623 woo409 757 FINLEY_DLL_API
624 jgs 102 virtual escript::Data getSize() const;
625    
626 jgs 149 /**
627     \brief comparison operators
628     */
629 woo409 757 FINLEY_DLL_API
630 jfenwick 2521 virtual bool operator==(const escript::AbstractDomain& other) const;
631 woo409 757 FINLEY_DLL_API
632 jfenwick 2521 virtual bool operator!=(const escript::AbstractDomain& other) const;
633 jgs 102
634 gross 767 /**
635     \brief assigns new tag newTag to all samples of functionspace with a positive
636     value of mask for any its sample point.
637    
638     */
639     FINLEY_DLL_API
640     virtual void setTags(const int functionSpaceType, const int newTag, const escript::Data& mask) const;
641    
642 gross 1716 /**
643     \brief
644     return the number of tags in use and a pointer to an array with the number of tags in use
645     */
646     FINLEY_DLL_API
647     virtual int getNumberOfTagsInUse(int functionSpaceCode) const;
648    
649     FINLEY_DLL_API
650 jfenwick 2487 virtual const int* borrowListOfTagsInUse(int functionSpaceCode) const;
651 gross 1716
652 jfenwick 1802
653     /**
654     \brief Checks if this domain allows tags for the specified functionSpaceCode.
655     */
656     FINLEY_DLL_API
657     virtual
658     bool canTag(int functionSpaceCode) const;
659    
660 gross 2856 /**
661     \brief returns the approximation order used for a function space functionSpaceCode
662     */
663 jfenwick 1802
664 gross 2856 FINLEY_DLL_API
665     virtual
666     int getApproximationOrder(const int functionSpaceCode) const;
667    
668 jfenwick 3259 FINLEY_DLL_API
669     bool supportsContactElements() const;
670 gross 3515
671 jfenwick 4687
672     FINLEY_DLL_API
673     virtual escript::Data randomFill(const escript::DataTypes::ShapeType& shape,
674     const escript::FunctionSpace& what, long seed, const boost::python::tuple& filter) const;
675 jfenwick 3558
676 jfenwick 4687
677 jfenwick 3558 private:
678    
679 gross 3515 /**
680     \brief adds points to support more Dirac delta function.
681 jfenwick 3558
682     Do NOT call these at any time other than construction!
683 caltinay 4496 Using them later creates consistency problems
684 gross 3515 */
685     FINLEY_DLL_API
686 jfenwick 3558 void addDiracPoints( const std::vector<double>& points, const std::vector<int>& tags) const;
687     // FINLEY_DLL_API
688     // void addDiracPoint( const boost::python::list& points, const int tag=-1) const;
689     // FINLEY_DLL_API
690     // void addDiracPointWithTagName( const boost::python::list& points, const std::string& tag) const;
691 gross 2856
692 jgs 82 protected:
693    
694     private:
695     //
696     // pointer to the externally created finley mesh
697 caltinay 4496 boost::shared_ptr<Mesh> m_finleyMesh;
698 jfenwick 3558
699     // This is only provided so that the friends below can add tags during construction
700     // do not use for any other purpose
701 caltinay 4496 boost::shared_ptr<Mesh> getMesh()
702 jfenwick 3558 {
703     return m_finleyMesh;
704     }
705 jgs 82
706     static FunctionSpaceNamesMapType m_functionSpaceTypeNames;
707    
708 jfenwick 4934 friend escript::Domain_ptr brick(esysUtils::JMPI& p, int n0, int n1, int n2, int order,
709 caltinay 4496 double l0, double l1, double l2,
710     bool periodic0, bool periodic1, bool periodic2,
711     int integrationOrder,
712     int reducedIntegrationOrder,
713     bool useElementsOnFace,
714     bool useFullElementOrder,
715     bool optimize,
716     const std::vector<double>& points,
717     const std::vector<int>& tags,
718     const std::map<std::string, int>& tagnamestonums);
719    
720    
721 jfenwick 4934 friend escript::Domain_ptr rectangle(esysUtils::JMPI& p,int n0, int n1, int order,
722 caltinay 4496 double l0, double l1,
723     bool periodic0, bool periodic1,
724     int integrationOrder,
725 jfenwick 3558 int reducedIntegrationOrder,
726 caltinay 4496 bool useElementsOnFace,
727     bool useFullElementOrder,
728     bool optimize,
729     const std::vector<double>& points,
730     const std::vector<int>& tags,
731 caltinay 4949 const std::map<std::string, int>& tagnamestonums);
732    
733     friend escript::Domain_ptr readMesh_driver(const boost::python::list& args);
734    
735     friend escript::Domain_ptr readMesh(esysUtils::JMPI& p, const std::string& fileName,
736     int integrationOrder,
737     int reducedIntegrationOrder,
738     bool optimize,
739     const std::vector<double>& points,
740     const std::vector<int>& tags
741     );
742     friend escript::Domain_ptr readGmsh_driver(const boost::python::list& args);
743    
744     friend escript::Domain_ptr readGmsh(esysUtils::JMPI& p, const std::string& fileName,
745     int numDim,
746     int integrationOrder,
747     int reducedIntegrationOrder,
748     bool optimize,
749     bool useMacroElements,
750     const std::vector<double>& points,
751     const std::vector<int>& tags
752     );
753    
754    
755 jgs 82 };
756    
757 caltinay 2898
758 jgs 82 } // end of namespace
759 jgs 149
760 jgs 82 #endif
761 caltinay 4496

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.26