escript  Revision_4925
finley/src/CPPAdapter/MeshAdapter.h
Go to the documentation of this file.
1 
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2014 by University of Queensland
5 * http://www.uq.edu.au
6 *
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 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 * Development 2012-2013 by School of Earth Sciences
13 * Development from 2014 by Centre for Geoscience Computing (GeoComp)
14 *
15 *****************************************************************************/
16 
17 
18 #if !defined finley_MeshAdapter_20040526_H
19 #define finley_MeshAdapter_20040526_H
20 #include "system_dep.h"
21 
22 #include "finley/Mesh.h"
23 #include "finley/Finley.h"
24 #include "finley/Assemble.h"
25 #include "FinleyAdapterException.h"
26 
27 #include <pasowrap/SystemMatrixAdapter.h>
28 #include <pasowrap/TransportProblemAdapter.h>
29 #include "escript/AbstractContinuousDomain.h"
30 #include "escript/FunctionSpace.h"
31 #include "escript/FunctionSpaceFactory.h"
32 
33 #include <boost/shared_ptr.hpp>
34 #include <boost/python/dict.hpp>
35 #include <boost/python/extract.hpp>
36 
37 #include <map>
38 #include <vector>
39 #include <string>
40 #include <sstream>
41 
42 namespace finley {
43 
44 // These are friends implemented in MeshAdapterFactory.cpp
45 // They are only fwd declared here so that vis.studio will accept the friend
46 // decls
48 escript::Domain_ptr brick(int n0, int n1, int n2, int order,
49  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  const std::map<std::string, int>& tagnamestonums);
56 
58 escript::Domain_ptr rectangle(int n0, int n1, int order,
59  double l0, double l1,
60  bool periodic0, bool periodic1,
61  int integrationOrder, int reducedIntegrationOrder,
62  bool useElementsOnFace, bool useFullElementOrder,
63  bool optimize, const std::vector<double>& points,
64  const std::vector<int>& tags,
65  const std::map<std::string, int>& tagnamestonums);
66 
68 {
69  void operator()(void const *ptr) const
70  {
71  }
72 };
73 
74 
81 
82  public:
83 
84  //
85  // Codes for function space types supported
86  static const int DegreesOfFreedom;
87  static const int ReducedDegreesOfFreedom;
88  static const int Nodes;
89  static const int ReducedNodes;
90  static const int Elements;
91  static const int ReducedElements;
92  static const int FaceElements;
93  static const int ReducedFaceElements;
94  static const int Points;
95  static const int ContactElementsZero;
96  static const int ReducedContactElementsZero;
97  static const int ContactElementsOne;
98  static const int ReducedContactElementsOne;
99 
119  MeshAdapter(Mesh* finleyMesh=0);
120 
126  MeshAdapter(const MeshAdapter& in);
127 
135  ~MeshAdapter();
136 
142  virtual int getMPISize() const;
149  virtual int getMPIRank() const;
150 
157  virtual void MPIBarrier() const;
158 
165  virtual bool onMasterProcessor() const;
166 
168 #ifdef ESYS_MPI
169  MPI_Comm
170 #else
171  unsigned int
172 #endif
173  getMPIComm() const;
174 
181  void write(const std::string& fileName) const;
182 
188  void Print_Mesh_Info(const bool full=false) const;
189 
196  void dump(const std::string& fileName) const;
197 
203  Mesh* getFinley_Mesh() const;
204 
212  int getTagFromSampleNo(int functionSpaceType, int sampleNo) const;
213 
220  const int* borrowSampleReferenceIDs(int functionSpaceType) const;
221 
228  virtual bool isValidFunctionSpaceType(int functionSpaceType) const;
229 
235  virtual std::string getDescription() const;
236 
242  virtual std::string functionSpaceTypeAsString(int functionSpaceType) const;
243 
250 
256  virtual int getContinuousFunctionCode() const;
257 
263  virtual int getReducedContinuousFunctionCode() const;
264 
270  virtual int getFunctionCode() const;
271 
277  virtual int getReducedFunctionCode() const;
278 
284  virtual int getFunctionOnBoundaryCode() const;
285 
291  virtual int getReducedFunctionOnBoundaryCode() const;
292 
298  virtual int getFunctionOnContactZeroCode() const;
299 
305  virtual int getReducedFunctionOnContactZeroCode() const;
306 
312  virtual int getFunctionOnContactOneCode() const;
313 
319  virtual int getReducedFunctionOnContactOneCode() const;
320 
326  virtual int getSolutionCode() const;
327 
333  virtual int getReducedSolutionCode() const;
334 
340  virtual int getDiracDeltaFunctionsCode() const;
341 
345  typedef std::map<int, std::string> FunctionSpaceNamesMapType;
346 
351  virtual int getDim() const;
352 
362  virtual StatusType getStatus() const;
363 
364 
370  virtual int getNumDataPointsGlobal() const;
371 
378  virtual std::pair<int,int> getDataShape(int functionSpaceCode) const;
379 
386  virtual void setToX(escript::Data& arg) const;
387 
395  virtual void setTagMap(const std::string& name, int tag);
396 
403  virtual int getTag(const std::string& name) const;
404 
411  virtual bool isValidTagName(const std::string& name) const;
412 
418  virtual std::string showTagNames() const;
419 
425  virtual void setNewX(const escript::Data& arg);
426 
432  virtual void interpolateOnDomain(escript::Data& target,const escript::Data& source) const;
433 
434 
436  virtual bool probeInterpolationOnDomain(int functionSpaceType_source,int functionSpaceType_target) const;
437 
439  virtual signed char preferredInterpolationOnDomain(int functionSpaceType_source,int functionSpaceType_target) const;
440 
441 
442 
448  bool
449  commonFunctionSpace(const std::vector<int>& fs, int& resultcode) const;
450 
457  virtual void interpolateACross(escript::Data& target, const escript::Data& source) const;
458 
464  virtual bool probeInterpolationACross(int functionSpaceType_source,const escript::AbstractDomain& targetDomain, int functionSpaceType_target) const;
465 
472  virtual void setToNormal(escript::Data& out) const;
473 
480  virtual void setToSize(escript::Data& out) const;
481 
488  virtual void setToGradient(escript::Data& grad,const escript::Data& arg) const;
489 
496  virtual void setToIntegrals(std::vector<double>& integrals,const escript::Data& arg) const;
497 
508  virtual int getSystemMatrixTypeId(const int solver, const int preconditioner, const int package, const bool symmetry) const;
509 
520  virtual int getTransportTypeId(const int solver, const int preconditioner, const int package, const bool symmetry) const;
521 
528  virtual bool isCellOriented(int functionSpaceCode) const;
529 
530 
532  virtual bool ownSample(int fs_code, index_t id) const;
533 
539  // vtkObject createVtkObject(int functionSpaceCode) const;
540 
546  virtual void addPDEToSystem(
548  const escript::Data& A, const escript::Data& B, const escript::Data& C,
549  const escript::Data& D, const escript::Data& X, const escript::Data& Y,
550  const escript::Data& d, const escript::Data& y,
551  const escript::Data& d_contact, const escript::Data& y_contact,
552  const escript::Data& d_dirac, const escript::Data& y_dirac) const;
558  virtual void addPDEToLumpedSystem(
559  escript::Data& mat,
560  const escript::Data& D,
561  const escript::Data& d,
562  const escript::Data& d_dirac,
563  const bool useHRZ) const;
564 
570  virtual void addPDEToRHS(escript::Data& rhs,
571  const escript::Data& X, const escript::Data& Y,
572  const escript::Data& y, const escript::Data& y_contact, const escript::Data& y_dirac) const;
579  virtual void addPDEToTransportProblem(
581  const escript::Data& M,
582  const escript::Data& A, const escript::Data& B, const escript::Data& C,const escript::Data& D,
583  const escript::Data& X,const escript::Data& Y,
584  const escript::Data& d, const escript::Data& y,
585  const escript::Data& d_contact,const escript::Data& y_contact, const escript::Data& d_dirac,const escript::Data& y_dirac) const;
586 
587 
594  const int row_blocksize,
595  const escript::FunctionSpace& row_functionspace,
596  const int column_blocksize,
597  const escript::FunctionSpace& column_functionspace,
598  const int type) const;
607  const int blocksize,
608  const escript::FunctionSpace& functionspace,
609  const int type) const;
610 
615  virtual escript::Data getX() const;
616 
621  virtual escript::Data getNormal() const;
622 
627  virtual escript::Data getSize() const;
628 
633  virtual bool operator==(const escript::AbstractDomain& other) const;
635  virtual bool operator!=(const escript::AbstractDomain& other) const;
636 
643  virtual void setTags(const int functionSpaceType, const int newTag, const escript::Data& mask) const;
644 
650  virtual int getNumberOfTagsInUse(int functionSpaceCode) const;
651 
653  virtual const int* borrowListOfTagsInUse(int functionSpaceCode) const;
654 
655 
660  virtual
661  bool canTag(int functionSpaceCode) const;
662 
668  virtual
669  int getApproximationOrder(const int functionSpaceCode) const;
670 
672  bool supportsContactElements() const;
673 
674 
677  const escript::FunctionSpace& what, long seed, const boost::python::tuple& filter) const;
678 
679 
680  private:
681 
689  void addDiracPoints( const std::vector<double>& points, const std::vector<int>& tags) const;
690 // FINLEY_DLL_API
691 // void addDiracPoint( const boost::python::list& points, const int tag=-1) const;
692 // FINLEY_DLL_API
693 // void addDiracPointWithTagName( const boost::python::list& points, const std::string& tag) const;
694 
695  protected:
696 
697  private:
698  //
699  // pointer to the externally created finley mesh
700  boost::shared_ptr<Mesh> m_finleyMesh;
701 
702  // This is only provided so that the friends below can add tags during construction
703  // do not use for any other purpose
704  boost::shared_ptr<Mesh> getMesh()
705  {
706  return m_finleyMesh;
707  }
708 
710 
711  friend escript::Domain_ptr brick(int n0, int n1, int n2, int order,
712  double l0, double l1, double l2,
713  bool periodic0, bool periodic1, bool periodic2,
714  int integrationOrder,
715  int reducedIntegrationOrder,
716  bool useElementsOnFace,
717  bool useFullElementOrder,
718  bool optimize,
719  const std::vector<double>& points,
720  const std::vector<int>& tags,
721  const std::map<std::string, int>& tagnamestonums);
722 
723 
724  friend escript::Domain_ptr rectangle(int n0, int n1, int order,
725  double l0, double l1,
726  bool periodic0, bool periodic1,
727  int integrationOrder,
728  int reducedIntegrationOrder,
729  bool useElementsOnFace,
730  bool useFullElementOrder,
731  bool optimize,
732  const std::vector<double>& points,
733  const std::vector<int>& tags,
734  const std::map<std::string, int>& tagnamestonums);
735 };
736 
737 
738 } // end of namespace
739 
740 #endif
741 
AbstractContinuousDomain, base class for continuous domains.
Definition: AbstractContinuousDomain.h:46
static const int ReducedFaceElements
Definition: finley/src/CPPAdapter/MeshAdapter.h:93
Give a short description of what FunctionSpace does.
Definition: FunctionSpace.h:46
virtual void setToNormal(escript::Data &out) const
copies the surface normals at data points into out. The actual function space to be considered is def...
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:1155
double l2(dim_t n, const double *x, Esys_MPIInfo *mpiinfo)
returns the global L2 norm of x
Definition: PasoUtil.cpp:484
virtual void setToGradient(escript::Data &grad, const escript::Data &arg) const
copies the gradient of arg into grad. The actual function space to be considered for the gradient is ...
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:1271
static const int ReducedDegreesOfFreedom
Definition: finley/src/CPPAdapter/MeshAdapter.h:87
virtual int getMPIRank() const
return the number MPI rank of this processor
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:80
MeshAdapter(Mesh *finleyMesh=0)
Constructor for MeshAdapter.
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:51
virtual int getReducedSolutionCode() const
Return a ReducedSolution code.
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:618
virtual int getSystemMatrixTypeId(const int solver, const int preconditioner, const int package, const bool symmetry) const
return the identifier of the matrix type to be used for the global stiffness matrix when a particular...
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:1845
static FunctionSpaceNamesMapType m_functionSpaceTypeNames
Definition: finley/src/CPPAdapter/MeshAdapter.h:709
friend escript::Domain_ptr brick(int n0, int n1, int n2, int order, double l0, double l1, double l2, bool periodic0, bool periodic1, bool periodic2, int integrationOrder, int reducedIntegrationOrder, bool useElementsOnFace, bool useFullElementOrder, bool optimize, const std::vector< double > &points, const std::vector< int > &tags, const std::map< std::string, int > &tagnamestonums)
Creates a rectangular mesh with n0 x n1 x n2 elements over the brick [0,l0] x [0,l1] x [0...
Definition: finley/src/CPPAdapter/MeshAdapterFactory.cpp:523
virtual int getFunctionOnContactOneCode() const
Return a FunctionOnContactOne code.
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:603
virtual int getReducedFunctionOnBoundaryCode() const
Return a function on boundary with reduced integration order FunctionSpace code.
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:588
boost::shared_ptr< AbstractDomain > Domain_ptr
Definition: AbstractDomain.h:57
void dump(const std::string &fileName) const
dumps the mesh to a file with the given name.
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:127
virtual void addPDEToSystem(escript::AbstractSystemMatrix &mat, escript::Data &rhs, const escript::Data &A, const escript::Data &B, const escript::Data &C, const escript::Data &D, const escript::Data &X, const escript::Data &Y, const escript::Data &d, const escript::Data &y, const escript::Data &d_contact, const escript::Data &y_contact, const escript::Data &d_dirac, const escript::Data &y_dirac) const
returns the function space representation of the type functionSpaceCode on this domain as a vtkObject...
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:742
virtual bool operator!=(const escript::AbstractDomain &other) const
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:1840
~MeshAdapter()
Destructor for MeshAdapter. As specified in the constructor this calls Finley_Mesh_free for the point...
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:67
virtual escript::Data getX() const
returns locations in the FEM nodes
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:1859
virtual void setToIntegrals(std::vector< double > &integrals, const escript::Data &arg) const
copies the integrals of the function defined by arg into integrals. arg has to be defined on this...
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:1213
static const int Nodes
Definition: finley/src/CPPAdapter/MeshAdapter.h:88
Definition: finley/src/CPPAdapter/MeshAdapter.h:67
virtual int getReducedFunctionOnContactOneCode() const
Return a FunctionOnContactOne code with reduced integration order.
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:608
void addDiracPoints(const std::vector< double > &points, const std::vector< int > &tags) const
adds points to support more Dirac delta function.
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:2178
bool commonFunctionSpace(const std::vector< int > &fs, int &resultcode) const
given a vector of FunctionSpace typecodes, pass back a code which then can all be interpolated to...
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:1537
void setFunctionSpaceTypeNames()
Build the table of function space type names.
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:533
int getTagFromSampleNo(int functionSpaceType, int sampleNo) const
Return the tag key for the given sample number.
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:1916
static const int ContactElementsOne
Definition: finley/src/CPPAdapter/MeshAdapter.h:97
void Print_Mesh_Info(const bool full=false) const
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:122
bool supportsContactElements() const
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:2160
virtual int getNumDataPointsGlobal() const
Return the number of data points summed across all MPI processes.
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:640
static const int Elements
Definition: finley/src/CPPAdapter/MeshAdapter.h:90
virtual void addPDEToLumpedSystem(escript::Data &mat, const escript::Data &D, const escript::Data &d, const escript::Data &d_dirac, const bool useHRZ) const
adds a PDE onto the lumped stiffness matrix matrix
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:775
virtual int getNumberOfTagsInUse(int functionSpaceCode) const
return the number of tags in use and a pointer to an array with the number of tags in use ...
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:2033
virtual void addPDEToRHS(escript::Data &rhs, const escript::Data &X, const escript::Data &Y, const escript::Data &y, const escript::Data &y_contact, const escript::Data &y_dirac) const
adds a PDE onto the stiffness matrix mat and a rhs
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:793
virtual int getContinuousFunctionCode() const
Return a continuous FunctionSpace code.
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:563
virtual std::string functionSpaceTypeAsString(int functionSpaceType) const
Return a description for the given function space type code.
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:515
std::vector< int > ShapeType
The shape of a single datapoint.
Definition: DataTypes.h:38
static dim_t M
Definition: SparseMatrix_saveHB.cpp:36
virtual bool ownSample(int fs_code, index_t id) const
True if this rank owns the sample(id) Must be implemented by the Domain adapter.
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:1394
virtual bool isCellOriented(int functionSpaceCode) const
returns true if data on this domain and a function space of type functionSpaceCode has to considered ...
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:1510
implements the AbstractContinuousDomain interface for the Finley library.
Definition: finley/src/CPPAdapter/MeshAdapter.h:80
static const int ReducedElements
Definition: finley/src/CPPAdapter/MeshAdapter.h:91
escript::Domain_ptr rectangle(int n0, int n1, int order, double l0, double l1, bool periodic0, bool periodic1, int integrationOrder, int reducedIntegrationOrder, bool useElementsOnFace, bool useFullElementOrder, bool optimize, const std::vector< double > &points, const std::vector< int > &tags, const std::map< std::string, int > &tagnamestonums)
Creates a rectangular mesh with n0 x n1 elements over the brick [0,l0] x [0,l1].
Definition: finley/src/CPPAdapter/MeshAdapterFactory.cpp:626
virtual void setTags(const int functionSpaceType, const int newTag, const escript::Data &mask) const
assigns new tag newTag to all samples of functionspace with a positive value of mask for any its samp...
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:1960
static const int ContactElementsZero
Definition: finley/src/CPPAdapter/MeshAdapter.h:95
boost::shared_ptr< AbstractTransportProblem > ATP_ptr
Definition: AbstractTransportProblem.h:162
virtual int getReducedFunctionCode() const
Return a function with reduced integration order FunctionSpace code.
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:578
int MPI_Comm
Definition: Esys_MPI.h:29
boost::shared_ptr< Mesh > getMesh()
Definition: finley/src/CPPAdapter/MeshAdapter.h:704
virtual int getDiracDeltaFunctionsCode() const
Return a DiracDeltaFunctions code.
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:623
virtual int getSolutionCode() const
Return a Solution code.
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:613
virtual void MPIBarrier() const
If compiled for MPI then execute an MPI_Barrier, else do nothing.
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:85
virtual const int * borrowListOfTagsInUse(int functionSpaceCode) const
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:2067
virtual bool probeInterpolationACross(int functionSpaceType_source, const escript::AbstractDomain &targetDomain, int functionSpaceType_target) const
determines whether interpolation from source to target is possible. Must be implemented by the actual...
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:1823
virtual int getApproximationOrder(const int functionSpaceCode) const
returns the approximation order used for a function space functionSpaceCode
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:2126
escript::ASM_ptr newSystemMatrix(const int row_blocksize, const escript::FunctionSpace &row_functionspace, const int column_blocksize, const escript::FunctionSpace &column_functionspace, const int type) const
creates a SystemMatrixAdapter stiffness matrix and initializes it with zeros:
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:1429
virtual bool isValidFunctionSpaceType(int functionSpaceType) const
Returns true if the given integer is a valid function space type for this domain. ...
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:526
virtual int getTransportTypeId(const int solver, const int preconditioner, const int package, const bool symmetry) const
return the identifier of the transport problem type to be used when a particular solver, perconditioner, package and symmetric matrix is used.
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:1852
virtual std::string getDescription() const
Return a description for this domain.
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:510
boost::shared_ptr< Mesh > m_finleyMesh
Definition: finley/src/CPPAdapter/MeshAdapter.h:700
int StatusType
Definition: AbstractDomain.h:78
escript::Domain_ptr brick(int n0, int n1, int n2, int order, double l0, double l1, double l2, bool periodic0, bool periodic1, bool periodic2, int integrationOrder, int reducedIntegrationOrder, bool useElementsOnFace, bool useFullElementOrder, bool optimize, const std::vector< double > &points, const std::vector< int > &tags, const std::map< std::string, int > &tagnamestonums)
Creates a rectangular mesh with n0 x n1 x n2 elements over the brick [0,l0] x [0,l1] x [0...
Definition: finley/src/CPPAdapter/MeshAdapterFactory.cpp:523
Data represents a collection of datapoints.
Definition: Data.h:71
friend escript::Domain_ptr rectangle(int n0, int n1, int order, double l0, double l1, bool periodic0, bool periodic1, int integrationOrder, int reducedIntegrationOrder, bool useElementsOnFace, bool useFullElementOrder, bool optimize, const std::vector< double > &points, const std::vector< int > &tags, const std::map< std::string, int > &tagnamestonums)
Creates a rectangular mesh with n0 x n1 elements over the brick [0,l0] x [0,l1].
Definition: finley/src/CPPAdapter/MeshAdapterFactory.cpp:626
virtual int getDim() const
Returns the spatial dimension of the domain.
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:631
virtual int getTag(const std::string &name) const
Return the tag key for tag name.
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:2005
virtual bool operator==(const escript::AbstractDomain &other) const
comparison operators
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:1830
const int * borrowSampleReferenceIDs(int functionSpaceType) const
Return the reference number of the given sample number.
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:1874
virtual void setToX(escript::Data &arg) const
copies the location of data points into arg. The domain of arg has to match this. has to be implement...
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:1134
escript::ATP_ptr newTransportProblem(const int blocksize, const escript::FunctionSpace &functionspace, const int type) const
creates a TransportProblemAdapter
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:1479
virtual int getFunctionOnContactZeroCode() const
Return a FunctionOnContactZero code.
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:593
static const int ReducedContactElementsOne
Definition: finley/src/CPPAdapter/MeshAdapter.h:98
virtual escript::Data randomFill(const escript::DataTypes::ShapeType &shape, const escript::FunctionSpace &what, long seed, const boost::python::tuple &filter) const
Fills the data object with filtered random values.
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:2165
virtual bool onMasterProcessor() const
Return true if on MPI processor 0, else false.
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:92
int index_t
Definition: types.h:25
virtual int getFunctionCode() const
Return a function FunctionSpace code.
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:573
void write(const std::string &fileName) const
Write the current mesh to a file with the given name.
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:116
virtual bool probeInterpolationOnDomain(int functionSpaceType_source, int functionSpaceType_target) const
True if interpolation is possible from source to target.
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:1659
static const int ReducedContactElementsZero
Definition: finley/src/CPPAdapter/MeshAdapter.h:96
static const int ReducedNodes
Definition: finley/src/CPPAdapter/MeshAdapter.h:89
virtual void interpolateACross(escript::Data &target, const escript::Data &source) const
interpolates data given on source onto target where source and target are given on different domains...
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:1205
virtual int getReducedContinuousFunctionCode() const
Return a continuous on reduced order nodes FunctionSpace code.
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:568
virtual void setNewX(const escript::Data &arg)
assigns new location to the domain
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:1380
virtual StatusType getStatus() const
Returns a status indicator of the domain. The status identifier should be unique over the live time i...
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:2120
static const int FaceElements
Definition: finley/src/CPPAdapter/MeshAdapter.h:92
Give a short description of what AbstractTransportProblem does.
Definition: AbstractTransportProblem.h:45
virtual escript::Data getNormal() const
return boundary normals at the quadrature point on the face elements
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:1864
virtual void interpolateOnDomain(escript::Data &target, const escript::Data &source) const
interpolates data given on source onto target where source and target have to be given on the same do...
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:868
#define FINLEY_DLL_API
Definition: finley/src/CPPAdapter/system_dep.h:44
virtual void setToSize(escript::Data &out) const
copies the size of samples into out. The actual function space to be considered is defined by out...
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:1335
static const int Points
Definition: finley/src/CPPAdapter/MeshAdapter.h:94
Give a short description of what AbstractSystemMatrix does.
Definition: AbstractSystemMatrix.h:44
virtual bool isValidTagName(const std::string &name) const
Returns true if name is a defined tage name.
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:2013
virtual int getMPISize() const
return the number of processors used for this domain
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:75
virtual bool canTag(int functionSpaceCode) const
Checks if this domain allows tags for the specified functionSpaceCode.
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:2101
static const int DegreesOfFreedom
Definition: finley/src/CPPAdapter/MeshAdapter.h:86
boost::shared_ptr< AbstractSystemMatrix > ASM_ptr
Definition: AbstractSystemMatrix.h:201
Definition: AbstractDomain.h:62
Mesh * getFinley_Mesh() const
return the pointer to the underlying finley mesh structure
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:111
virtual signed char preferredInterpolationOnDomain(int functionSpaceType_source, int functionSpaceType_target) const
Preferred direction of interpolation.
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:1812
virtual std::string showTagNames() const
Returns all tag names in a single string sperated by commas.
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:2019
void operator()(void const *ptr) const
Definition: finley/src/CPPAdapter/MeshAdapter.h:69
virtual std::pair< int, int > getDataShape(int functionSpaceCode) const
Return the number of data points per sample, and the number of samples as a pair. ...
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:649
virtual void setTagMap(const std::string &name, int tag)
sets a map from a clear tag name to a tag key
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:1998
virtual int getReducedFunctionOnContactZeroCode() const
Return a FunctionOnContactZero code with reduced integration order.
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:598
Definition: finley/src/Mesh.h:78
virtual void addPDEToTransportProblem(escript::AbstractTransportProblem &tp, escript::Data &source, const escript::Data &M, const escript::Data &A, const escript::Data &B, const escript::Data &C, const escript::Data &D, const escript::Data &X, const escript::Data &Y, const escript::Data &d, const escript::Data &y, const escript::Data &d_contact, const escript::Data &y_contact, const escript::Data &d_dirac, const escript::Data &y_dirac) const
adds a PDE onto a transport problem
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:822
unsigned int getMPIComm() const
get the communicator for this domain. Returns 0 on non-MPI builds Routine must be implemented by the ...
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:102
virtual int getFunctionOnBoundaryCode() const
Return a function on boundary FunctionSpace code.
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:583
std::map< int, std::string > FunctionSpaceNamesMapType
Definition: finley/src/CPPAdapter/MeshAdapter.h:345
virtual escript::Data getSize() const
returns the element size
Definition: finley/src/CPPAdapter/MeshAdapter.cpp:1869