Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PatchDataParameters Class Reference

#include <PatchDataUser.hpp>

Collaboration diagram for PatchDataParameters:

Public Member Functions

 PatchDataParameters ()
 
 PatchDataParameters (const PatchDataParameters &A)
 
void set_patch_type (PatchData::PatchType patch_type, MsqError &err, int patch_param1=0, int patch_param2=0)
 Tells the MeshSet what kind of data the patches should include. More...
 
PatchData::PatchType get_patch_type ()
 Returns Patch Type (local around vertices, local around elements, global) More...
 
int get_nb_layers (MsqError &err)
 Returns numbers of layers for local patch. More...
 
void set_global_patch_type ()
 
void set_element_on_vertex_patch_type (unsigned num_layers)
 
void add_culling_method (enum PatchData::culling_method cm)
 Sets on a culling criterion. More...
 
void no_culling_method ()
 No culling performed (sets off all culling criteria). More...
 
void remove_culling_method (enum PatchData::culling_method cm)
 Sets off a certain culling criteria. More...
 
long unsigned int get_culling_method_bits ()
 returns the bitset. More...
 
void set_global_patch (PatchData *pd, MsqError &err)
 Sets the Global Patch, so that it can be use by contiguoug PatchDataUser. More...
 
PatchDataget_global_patch ()
 Returns the Global Patch. More...
 
void no_global_patch ()
 Sets the Global Patch pointer to NULL. More...
 
 PatchDataParameters ()
 
 PatchDataParameters (const PatchDataParameters &A)
 
void set_patch_type (PatchData::PatchType patch_type, MsqError &err, int patch_param1=0, int patch_param2=0)
 Tells the MeshSet what kind of data the patches should include. More...
 
PatchData::PatchType get_patch_type ()
 Returns Patch Type (local around vertices, local around elements, global) More...
 
int get_nb_layers (MsqError &err)
 Returns numbers of layers for local patch. More...
 
void set_global_patch_type ()
 
void set_element_on_vertex_patch_type (unsigned num_layers)
 
void add_culling_method (enum PatchData::culling_method cm)
 Sets on a culling criterion. More...
 
void no_culling_method ()
 No culling performed (sets off all culling criteria). More...
 
void remove_culling_method (enum PatchData::culling_method cm)
 Sets off a certain culling criteria. More...
 
long unsigned int get_culling_method_bits ()
 returns the bitset. More...
 
void set_global_patch (PatchData *pd, MsqError &err)
 Sets the Global Patch, so that it can be use by contiguoug PatchDataUser. More...
 
PatchDataget_global_patch ()
 Returns the Global Patch. More...
 
void no_global_patch ()
 Sets the Global Patch pointer to NULL. More...
 

Private Attributes

PatchData::PatchType mType
 see the enum ... More...
 
int mParam1
 
int mParam2
 For general use in conjunction with PatchType. More...
 
long unsigned int cullingMethodBits
 type of cullings are contained in this bitset. More...
 
PatchDataglobalPatch
 Allows storage of global patch through successive PatchDataUsers. More...
 

Friends

class PatchDataUser
 

Detailed Description

contains all information necessary to fill up a PatchData instance.

Definition at line 58 of file includeLinks/PatchDataUser.hpp.

Constructor & Destructor Documentation

PatchDataParameters ( )
inline

Definition at line 61 of file includeLinks/PatchDataUser.hpp.

61  :
63  mParam1(0),
64  mParam2(0),
66  globalPatch(0)
67  {}
long unsigned int cullingMethodBits
type of cullings are contained in this bitset.
PatchData * globalPatch
Allows storage of global patch through successive PatchDataUsers.
int mParam2
For general use in conjunction with PatchType.
PatchData::PatchType mType
see the enum ...

Definition at line 69 of file includeLinks/PatchDataUser.hpp.

References PatchDataParameters::cullingMethodBits, PatchDataParameters::globalPatch, PatchDataParameters::mParam1, PatchDataParameters::mParam2, and PatchDataParameters::mType.

69  {
70  mType = A.mType;
71  mParam1 = A.mParam1;
72  mParam2 = A.mParam2;
73  cullingMethodBits = A.cullingMethodBits;
74  globalPatch = A.globalPatch;
75  }
long unsigned int cullingMethodBits
type of cullings are contained in this bitset.
PatchData * globalPatch
Allows storage of global patch through successive PatchDataUsers.
rational * A
Definition: vinci_lass.c:67
int mParam2
For general use in conjunction with PatchType.
PatchData::PatchType mType
see the enum ...
PatchDataParameters ( )
inline

Definition at line 61 of file src/Mesh/PatchDataUser.hpp.

61  :
63  mParam1(0),
64  mParam2(0),
66  globalPatch(0)
67  {}
long unsigned int cullingMethodBits
type of cullings are contained in this bitset.
PatchData * globalPatch
Allows storage of global patch through successive PatchDataUsers.
int mParam2
For general use in conjunction with PatchType.
PatchData::PatchType mType
see the enum ...

Definition at line 69 of file src/Mesh/PatchDataUser.hpp.

References PatchDataParameters::cullingMethodBits, PatchDataParameters::globalPatch, PatchDataParameters::mParam1, PatchDataParameters::mParam2, and PatchDataParameters::mType.

69  {
70  mType = A.mType;
71  mParam1 = A.mParam1;
72  mParam2 = A.mParam2;
73  cullingMethodBits = A.cullingMethodBits;
74  globalPatch = A.globalPatch;
75  }
long unsigned int cullingMethodBits
type of cullings are contained in this bitset.
PatchData * globalPatch
Allows storage of global patch through successive PatchDataUsers.
rational * A
Definition: vinci_lass.c:67
int mParam2
For general use in conjunction with PatchType.
PatchData::PatchType mType
see the enum ...

Member Function Documentation

void add_culling_method ( enum PatchData::culling_method  cm)
inline

Sets on a culling criterion.

Definition at line 274 of file includeLinks/PatchDataUser.hpp.

References PatchDataParameters::cullingMethodBits.

Referenced by PatchDataUser::add_culling_method().

275  {
276  cullingMethodBits |= cm;
277  }
long unsigned int cullingMethodBits
type of cullings are contained in this bitset.

Here is the caller graph for this function:

void add_culling_method ( enum PatchData::culling_method  cm)
inline

Sets on a culling criterion.

long unsigned int get_culling_method_bits ( )
inline

returns the bitset.

Definition at line 104 of file includeLinks/PatchDataUser.hpp.

References PatchDataParameters::cullingMethodBits.

Referenced by PatchDataUser::get_culling_method_bits(), and MeshSet::get_next_elem_on_vert_patch().

104 { return cullingMethodBits; }
long unsigned int cullingMethodBits
type of cullings are contained in this bitset.

Here is the caller graph for this function:

long unsigned int get_culling_method_bits ( )
inline

returns the bitset.

Definition at line 104 of file src/Mesh/PatchDataUser.hpp.

References PatchDataParameters::cullingMethodBits.

104 { return cullingMethodBits; }
long unsigned int cullingMethodBits
type of cullings are contained in this bitset.
PatchData* get_global_patch ( )
inline

Returns the Global Patch.

Will be 0 if not available. Make sure not to use that function if a local patch algorithm has been used since the last access to the global patch, making it invalid.

Definition at line 111 of file includeLinks/PatchDataUser.hpp.

References PatchDataParameters::globalPatch.

Referenced by PatchDataUser::get_global_patch().

112  { return globalPatch; }
PatchData * globalPatch
Allows storage of global patch through successive PatchDataUsers.

Here is the caller graph for this function:

PatchData* get_global_patch ( )
inline

Returns the Global Patch.

Will be 0 if not available. Make sure not to use that function if a local patch algorithm has been used since the last access to the global patch, making it invalid.

Definition at line 111 of file src/Mesh/PatchDataUser.hpp.

References PatchDataParameters::globalPatch.

112  { return globalPatch; }
PatchData * globalPatch
Allows storage of global patch through successive PatchDataUsers.
int get_nb_layers ( MsqError err)
inline

Returns numbers of layers for local patch.

This might not always be a valid measure, depending on the partition algorythm.

Definition at line 262 of file includeLinks/PatchDataUser.hpp.

References PatchData::GLOBAL_PATCH, MsqError::INVALID_STATE, PatchDataParameters::mParam1, MSQ_SETERR, and PatchDataParameters::mType.

Referenced by PatchDataUser::get_nb_layers(), and MeshSet::get_next_elem_on_vert_patch().

263  {
265  MSQ_SETERR(err)("Patch Type is GLOBAL_PATCH.", MsqError::INVALID_STATE);
266  return 0;
267  }
268 
269  return mParam1;
270  }
#define MSQ_SETERR(err)
Macro to set error - use err.clear() to clear.
object is in an invalid state
PatchData::PatchType mType
see the enum ...

Here is the caller graph for this function:

int get_nb_layers ( MsqError err)
inline

Returns numbers of layers for local patch.

This might not always be a valid measure, depending on the partition algorythm.

PatchData::PatchType get_patch_type ( )
inline

Returns Patch Type (local around vertices, local around elements, global)

Definition at line 88 of file includeLinks/PatchDataUser.hpp.

References PatchDataParameters::mType.

Referenced by MeshSet::get_next_patch(), PatchDataUser::get_patch_type(), and PatchDataParameters::set_global_patch().

89  {return mType;}
PatchData::PatchType mType
see the enum ...

Here is the caller graph for this function:

PatchData::PatchType get_patch_type ( )
inline

Returns Patch Type (local around vertices, local around elements, global)

Definition at line 88 of file src/Mesh/PatchDataUser.hpp.

References PatchDataParameters::mType.

89  {return mType;}
PatchData::PatchType mType
see the enum ...
void no_culling_method ( )
inline

No culling performed (sets off all culling criteria).

void no_culling_method ( )
inline

No culling performed (sets off all culling criteria).

Definition at line 281 of file includeLinks/PatchDataUser.hpp.

References PatchDataParameters::cullingMethodBits.

Referenced by PatchDataUser::no_culling_method(), MeshSet::write_gnuplot(), and MeshSet::write_vtk().

282  {
283  cullingMethodBits = 0;
284  }
long unsigned int cullingMethodBits
type of cullings are contained in this bitset.

Here is the caller graph for this function:

void no_global_patch ( )
inline

Sets the Global Patch pointer to NULL.

Make sure to call that function before modifying the mesh with local patches. Memory handling (creation/deletion) should be done outside PatchDataUSer, typically in InstructionQueue

Definition at line 117 of file src/Mesh/PatchDataUser.hpp.

References PatchDataParameters::globalPatch.

118  { globalPatch=0; }
PatchData * globalPatch
Allows storage of global patch through successive PatchDataUsers.
void no_global_patch ( )
inline

Sets the Global Patch pointer to NULL.

Make sure to call that function before modifying the mesh with local patches. Memory handling (creation/deletion) should be done outside PatchDataUSer, typically in InstructionQueue

Definition at line 117 of file includeLinks/PatchDataUser.hpp.

References PatchDataParameters::globalPatch.

Referenced by PatchDataUser::no_global_patch().

118  { globalPatch=0; }
PatchData * globalPatch
Allows storage of global patch through successive PatchDataUsers.

Here is the caller graph for this function:

void remove_culling_method ( enum PatchData::culling_method  cm)
inline

Sets off a certain culling criteria.

Definition at line 288 of file includeLinks/PatchDataUser.hpp.

References PatchDataParameters::cullingMethodBits.

Referenced by PatchDataUser::remove_culling_method().

289  {
290  cullingMethodBits &= ~cm;
291  }
long unsigned int cullingMethodBits
type of cullings are contained in this bitset.

Here is the caller graph for this function:

void remove_culling_method ( enum PatchData::culling_method  cm)
inline

Sets off a certain culling criteria.

void set_element_on_vertex_patch_type ( unsigned  num_layers)
inline
void set_element_on_vertex_patch_type ( unsigned  num_layers)
inline
void set_global_patch ( PatchData pd,
MsqError err 
)
inline

Sets the Global Patch, so that it can be use by contiguoug PatchDataUser.

Definition at line 294 of file includeLinks/PatchDataUser.hpp.

References PatchDataParameters::get_patch_type(), PatchData::GLOBAL_PATCH, PatchDataParameters::globalPatch, MsqError::INVALID_STATE, and MSQ_SETERR.

Referenced by PatchDataUser::set_global_patch().

295  {
297  MSQ_SETERR(err)("Trying to set a global patch whereas the "
298  "PatchType is set to something else\n."
299  "Consider using the function no_global_patch().",
301  else {
302  globalPatch = pd;
303  }
304  }
PatchData * globalPatch
Allows storage of global patch through successive PatchDataUsers.
#define MSQ_SETERR(err)
Macro to set error - use err.clear() to clear.
PatchData::PatchType get_patch_type()
Returns Patch Type (local around vertices, local around elements, global)
object is in an invalid state

Here is the call graph for this function:

Here is the caller graph for this function:

void set_global_patch ( PatchData pd,
MsqError err 
)
inline

Sets the Global Patch, so that it can be use by contiguoug PatchDataUser.

void set_global_patch_type ( )
inline

Definition at line 250 of file includeLinks/PatchDataUser.hpp.

References PatchData::GLOBAL_PATCH, and PatchDataParameters::mType.

Referenced by TargetCalculator::TargetCalculator().

Here is the caller graph for this function:

void set_global_patch_type ( )
inline
void set_patch_type ( PatchData::PatchType  patch_type,
MsqError err,
int  patch_param1 = 0,
int  patch_param2 = 0 
)
inline

Tells the MeshSet what kind of data the patches should include.

Parameters
patch_typesee the PatchData::PatchType enumeration.
patch_param1meaning depends on patch_type.
patch_param2meaning depends on patch_type.
This function can be over-ridden by the concrete PatchDataUser, in order to cusotomize the Patches available to for the specific algorithm implemented. 

Utimately, we might want to return an error in the Parent class implementation, in order to force the concrete classes to specify the available types.

Definition at line 219 of file includeLinks/PatchDataUser.hpp.

References PatchData::ELEMENTS_ON_VERTEX_PATCH, PatchData::GLOBAL_PATCH, PatchDataParameters::mParam1, PatchDataParameters::mParam2, MSQ_SETERR, PatchDataParameters::mType, and MsqError::NOT_IMPLEMENTED.

Referenced by TerminationCriterion::accumulate_outer(), TerminationCriterion::reset_outer(), PatchDataUser::set_patch_type(), MeshSet::write_gnuplot(), and MeshSet::write_vtk().

223  {
224  // For now, no support for VERTICES_ON_ELEMENT_PATCH
225  if ( patch_type != PatchData::ELEMENTS_ON_VERTEX_PATCH
226  && patch_type != PatchData::GLOBAL_PATCH )
227  {
228  MSQ_SETERR(err)("VERTICES_ON_ELEMENT_PATCH not supported yet.",
230  return;
231  }
232 
233  if (patch_type == PatchData::ELEMENTS_ON_VERTEX_PATCH)
234  {
235  if (patch_param1 < 0)
236  {
237  MSQ_SETERR(err)("ELEMENTS_ON_VERTEX_PATCH not supported yet.",
239  return;
240  }
241  }
242 
243  mType = patch_type;
244  mParam1 = patch_param1;
245  mParam2 = patch_param2;
246 
247  return;
248  }
requested functionality is not (yet) implemented
int mParam2
For general use in conjunction with PatchType.
#define MSQ_SETERR(err)
Macro to set error - use err.clear() to clear.
PatchData::PatchType mType
see the enum ...

Here is the caller graph for this function:

void set_patch_type ( PatchData::PatchType  patch_type,
MsqError err,
int  patch_param1 = 0,
int  patch_param2 = 0 
)
inline

Tells the MeshSet what kind of data the patches should include.

Parameters
patch_typesee the PatchData::PatchType enumeration.
patch_param1meaning depends on patch_type.
patch_param2meaning depends on patch_type.

Friends And Related Function Documentation

PatchDataUser
friend

Definition at line 77 of file includeLinks/PatchDataUser.hpp.

Member Data Documentation

PatchData * globalPatch
private
int mParam2
private

For general use in conjunction with PatchType.

Definition at line 124 of file includeLinks/PatchDataUser.hpp.

Referenced by PatchDataParameters::PatchDataParameters(), and PatchDataParameters::set_patch_type().


The documentation for this class was generated from the following files: