MFEM  v3.3.2
Finite element discretization library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
mfem::TargetConstructor Class Reference

Base class representing target-matrix construction algorithms for mesh optimization via the target-matrix optimization paradigm (TMOP). More...

#include <tmop.hpp>

Collaboration diagram for mfem::TargetConstructor:
[legend]

Public Types

enum  TargetType { IDEAL_SHAPE_UNIT_SIZE, IDEAL_SHAPE_EQUAL_SIZE, IDEAL_SHAPE_GIVEN_SIZE, GIVEN_SHAPE_AND_SIZE }
 Target-matrix construction algorithms supported by this class. More...
 

Public Member Functions

 TargetConstructor (TargetType ttype)
 Constructor for use in serial. More...
 
 TargetConstructor (TargetType ttype, MPI_Comm mpicomm)
 Constructor for use in parallel. More...
 
virtual ~TargetConstructor ()
 
void SetNodes (const GridFunction &n)
 Set the nodes to be used in the target-matrix construction. More...
 
void SetVolumeScale (double vol_scale)
 Used by target type IDEAL_SHAPE_EQUAL_SIZE. The default volume scale is 1. More...
 
virtual void ComputeElementTargets (int e_id, const FiniteElement &fe, const IntegrationRule &ir, DenseTensor &Jtr) const
 Given an element and quadrature rule, computes ref->target transformation Jacobians for each quadrature point in the element. More...
 

Protected Member Functions

bool Parallel () const
 
bool Parallel () const
 
void ComputeAvgVolume () const
 

Protected Attributes

const GridFunctionnodes
 
double avg_volume
 
double volume_scale
 
const TargetType target_type
 
MPI_Comm comm
 

Detailed Description

Base class representing target-matrix construction algorithms for mesh optimization via the target-matrix optimization paradigm (TMOP).

This class is used by class TMOP_Integrator to construct the target Jacobian matrices (reference-element to target-element) at quadrature points. It supports a set of algorithms chosen by the TargetType enumeration.

New target-matrix construction algorithms can be defined by deriving new classes and overriding the method ComputeElementTargets().

Definition at line 410 of file tmop.hpp.

Member Enumeration Documentation

Target-matrix construction algorithms supported by this class.

Enumerator
IDEAL_SHAPE_UNIT_SIZE 

Ideal shape, unit size; the nodes are not used.

IDEAL_SHAPE_EQUAL_SIZE 

Ideal shape, equal size/volume; the given nodes define the total target volume; for each mesh element, the target volume is the average volume multiplied by the volume scale, set with SetVolumeScale().

IDEAL_SHAPE_GIVEN_SIZE 

Ideal shape, given size/volume; the given nodes define the target volume at all quadrature points.

GIVEN_SHAPE_AND_SIZE 

Given shape, given size/volume; the given nodes define the exact target Jacobian matrix at all quadrature points.

Definition at line 414 of file tmop.hpp.

Constructor & Destructor Documentation

mfem::TargetConstructor::TargetConstructor ( TargetType  ttype)
inline

Constructor for use in serial.

Definition at line 450 of file tmop.hpp.

mfem::TargetConstructor::TargetConstructor ( TargetType  ttype,
MPI_Comm  mpicomm 
)
inline

Constructor for use in parallel.

Definition at line 459 of file tmop.hpp.

virtual mfem::TargetConstructor::~TargetConstructor ( )
inlinevirtual

Definition at line 463 of file tmop.hpp.

Member Function Documentation

void mfem::TargetConstructor::ComputeAvgVolume ( ) const
protected

Definition at line 648 of file tmop.cpp.

void mfem::TargetConstructor::ComputeElementTargets ( int  e_id,
const FiniteElement fe,
const IntegrationRule ir,
DenseTensor Jtr 
) const
virtual

Given an element and quadrature rule, computes ref->target transformation Jacobians for each quadrature point in the element.

Definition at line 686 of file tmop.cpp.

bool mfem::TargetConstructor::Parallel ( ) const
inlineprotected

Definition at line 439 of file tmop.hpp.

bool mfem::TargetConstructor::Parallel ( ) const
inlineprotected

Definition at line 441 of file tmop.hpp.

void mfem::TargetConstructor::SetNodes ( const GridFunction n)
inline

Set the nodes to be used in the target-matrix construction.

This method should be called every time the target nodes are updated externally and recomputation of the target average volume is needed. The nodes are used by all target types except IDEAL_SHAPE_UNIT_SIZE.

Definition at line 470 of file tmop.hpp.

void mfem::TargetConstructor::SetVolumeScale ( double  vol_scale)
inline

Used by target type IDEAL_SHAPE_EQUAL_SIZE. The default volume scale is 1.

Definition at line 473 of file tmop.hpp.

Member Data Documentation

double mfem::TargetConstructor::avg_volume
mutableprotected

Definition at line 433 of file tmop.hpp.

MPI_Comm mfem::TargetConstructor::comm
protected

Definition at line 438 of file tmop.hpp.

const GridFunction* mfem::TargetConstructor::nodes
protected

Definition at line 432 of file tmop.hpp.

const TargetType mfem::TargetConstructor::target_type
protected

Definition at line 435 of file tmop.hpp.

double mfem::TargetConstructor::volume_scale
protected

Definition at line 434 of file tmop.hpp.


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