#include <BoundaryConditionsContainer.hpp>
Inherits AbstractBoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >.
Public Types | |
typedef std::map< const BoundaryElement< ELEMENT_DIM-1, SPACE_DIM > *, const AbstractBoundaryCondition < SPACE_DIM > * >::const_iterator | NeumannMapIterator |
typedef AbstractBoundaryConditionsContainer < ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM > | BaseClassType |
Public Member Functions | |
BoundaryConditionsContainer (bool deleteConditions=true) | |
~BoundaryConditionsContainer () | |
void | AddDirichletBoundaryCondition (const Node< SPACE_DIM > *pBoundaryNode, const AbstractBoundaryCondition< SPACE_DIM > *pBoundaryCondition, unsigned indexOfUnknown=0, bool checkIfBoundaryNode=true) |
void | AddNeumannBoundaryCondition (const BoundaryElement< ELEMENT_DIM-1, SPACE_DIM > *pBoundaryElement, const AbstractBoundaryCondition< SPACE_DIM > *pBoundaryCondition, unsigned indexOfUnknown=0) |
void | DefineZeroDirichletOnMeshBoundary (AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *pMesh, unsigned indexOfUnknown=0) |
void | DefineConstantDirichletOnMeshBoundary (AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *pMesh, double value, unsigned indexOfUnknown=0) |
void | DefineZeroNeumannOnMeshBoundary (AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *pMesh, unsigned indexOfUnknown=0) |
void | ApplyDirichletToLinearProblem (LinearSystem &rLinearSystem, bool applyToMatrix=true, bool applyToRhsVector=true) |
void | ApplyDirichletToNonlinearResidual (const Vec currentSolution, Vec residual, DistributedVectorFactory &rFactory) |
void | ApplyDirichletToNonlinearJacobian (Mat jacobian) |
bool | Validate (AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *pMesh) |
double | GetNeumannBCValue (const BoundaryElement< ELEMENT_DIM-1, SPACE_DIM > *pSurfaceElement, const ChastePoint< SPACE_DIM > &rX, unsigned indexOfUnknown=0) |
bool | HasNeumannBoundaryCondition (const BoundaryElement< ELEMENT_DIM-1, SPACE_DIM > *pSurfaceElement, unsigned indexOfUnknown=0) |
bool | AnyNonZeroNeumannConditions () |
NeumannMapIterator | BeginNeumann () |
NeumannMapIterator | EndNeumann () |
template<class Archive > | |
void | LoadFromArchive (Archive &archive, AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *pMesh) |
template<class Archive > | |
void | MergeFromArchive (Archive &archive, AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *pMesh) |
Private Member Functions | |
template<class Archive > | |
void | save (Archive &archive, const unsigned int version) const |
template<class Archive > | |
void | load (Archive &archive, const unsigned int version) |
Private Attributes | |
std::map< const BoundaryElement< ELEMENT_DIM-1, SPACE_DIM > *, const AbstractBoundaryCondition < SPACE_DIM > * > * | mpNeumannMap [PROBLEM_DIM] |
NeumannMapIterator | mLastNeumannCondition [PROBLEM_DIM] |
bool | mAnyNonZeroNeumannConditionsForUnknown [PROBLEM_DIM] |
ConstBoundaryCondition < SPACE_DIM > * | mpZeroBoundaryCondition |
bool | mLoadedFromArchive |
Friends | |
class | boost::serialization::access |
Boundary Conditions Container.
This class contains a list of nodes on the Dirichlet boundary and associated Dirichlet boundary conditions, and a list of surface elements on the Neumann boundary and associated Neumann boundary conditions.
Definition at line 60 of file BoundaryConditionsContainer.hpp.
typedef AbstractBoundaryConditionsContainer<ELEMENT_DIM,SPACE_DIM,PROBLEM_DIM> BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::BaseClassType |
Base class type.
Definition at line 69 of file BoundaryConditionsContainer.hpp.
typedef std::map< const BoundaryElement<ELEMENT_DIM-1, SPACE_DIM>*, const AbstractBoundaryCondition<SPACE_DIM>* >::const_iterator BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::NeumannMapIterator |
Type of a read-only iterator over Neumann boundary conditions.
Definition at line 66 of file BoundaryConditionsContainer.hpp.
BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::BoundaryConditionsContainer | ( | bool | deleteConditions = true |
) | [inline] |
Constructor calls base constuctor and allocates memory for the Neumann boundary conditions lists.
deleteConditions | whether to delete BCs in destructor (defaults to true) |
Definition at line 42 of file BoundaryConditionsContainerImplementation.hpp.
References BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mAnyNonZeroNeumannConditionsForUnknown, BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mLastNeumannCondition, BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mLoadedFromArchive, BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpNeumannMap, and BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpZeroBoundaryCondition.
BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::~BoundaryConditionsContainer | ( | ) | [inline] |
Note that the destructor will delete memory for each boundary condition object, as well as for the internal bookkeeping of this class.
Definition at line 60 of file BoundaryConditionsContainerImplementation.hpp.
References AbstractBoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::DeleteDirichletBoundaryConditions(), AbstractBoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mDeleteConditions, BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpNeumannMap, and BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpZeroBoundaryCondition.
void BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::AddDirichletBoundaryCondition | ( | const Node< SPACE_DIM > * | pBoundaryNode, | |
const AbstractBoundaryCondition< SPACE_DIM > * | pBoundaryCondition, | |||
unsigned | indexOfUnknown = 0 , |
|||
bool | checkIfBoundaryNode = true | |||
) | [inline] |
Add a Dirichlet boundary condition specifying two parameters, a pointer to a node, and a pointer to a boundary condition object associated with that node.
The destructor for the BoundaryConditionsContainer will destroy the boundary conditions objects.
pBoundaryNode | Pointer to a node on the boundary. | |
pBoundaryCondition | Pointer to the Dirichlet boundary condition at that node. | |
indexOfUnknown | defaults to 0 | |
checkIfBoundaryNode | defaults to true |
Definition at line 96 of file BoundaryConditionsContainerImplementation.hpp.
References Node< SPACE_DIM >::IsBoundaryNode(), and AbstractBoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpDirichletMap.
Referenced by BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::DefineConstantDirichletOnMeshBoundary(), BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::MergeFromArchive(), AbstractExtendedBidomainSolver< ELEMENT_DIM, SPACE_DIM >::SetFixedExtracellularPotentialNodes(), AbstractBidomainSolver< ELEMENT_DIM, SPACE_DIM >::SetFixedExtracellularPotentialNodes(), and CellBasedPdeHandler< DIM >::SolvePdeAndWriteResultsToFile().
void BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::AddNeumannBoundaryCondition | ( | const BoundaryElement< ELEMENT_DIM-1, SPACE_DIM > * | pBoundaryElement, | |
const AbstractBoundaryCondition< SPACE_DIM > * | pBoundaryCondition, | |||
unsigned | indexOfUnknown = 0 | |||
) | [inline] |
Add a Neumann boundary condition specifying two parameters, a pointer to a surface element, and a pointer to a boundary condition object associated with that element.
The destructor for the BoundaryConditionsContainer will destroy the boundary conditions objects.
Note that the value of a Neumann boundary condition should specify D * grad(u).n, not just grad(u).n.
Take care if using non-zero Neumann boundary conditions in 1d. If applied at the left hand end you need to multiply the value by -1 to get the right answer.
pBoundaryElement | Pointer to an element on the boundary | |
pBoundaryCondition | Pointer to the Neumann boundary condition on that element | |
indexOfUnknown | defaults to 0 |
Definition at line 111 of file BoundaryConditionsContainerImplementation.hpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNode(), ConstBoundaryCondition< SPACE_DIM >::GetValue(), BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mAnyNonZeroNeumannConditionsForUnknown, BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpNeumannMap, and BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpZeroBoundaryCondition.
Referenced by BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::DefineZeroNeumannOnMeshBoundary(), BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::MergeFromArchive(), and CellBasedPdeHandler< DIM >::SolvePdeAndWriteResultsToFile().
bool BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::AnyNonZeroNeumannConditions | ( | ) | [inline] |
Definition at line 522 of file BoundaryConditionsContainerImplementation.hpp.
References BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mAnyNonZeroNeumannConditionsForUnknown.
void BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::ApplyDirichletToLinearProblem | ( | LinearSystem & | rLinearSystem, | |
bool | applyToMatrix = true , |
|||
bool | applyToRhsVector = true | |||
) | [inline] |
Alter the given linear system to satisfy Dirichlet boundary conditions.
If the number of unknowns is greater than one, it is assumed the solution vector is of the form (in the case of two unknowns u and v, and N nodes): solnvec = (U_1, V_1, U_2, V_2, ...., U_N, V_N)
rLinearSystem | Linear system on which to apply boundary conditions | |
applyToMatrix | This optional parameter can be set as false to ensure that the matrix of the linear system is not updated. To be used when the matrix does not change between time steps. | |
applyToRhsVector | Similarly, whether to apply the changes to the RHS vector (b in Ax=b). |
Modifies a linear system to incorporate Dirichlet boundary conditions
The BCs are imposed in such a way as to ensure that a symmetric linear system remains symmetric. For each node with a boundary condition applied, both the corresponding row and column are zero'd and the RHS vector modified to take into account the zero'd column. See #577.
Suppose we have a matrix [a b c] [x] = [ b1 ] [d e f] [y] [ b2 ] [g h i] [z] [ b3 ] and we want to apply the boundary condition x=v without losing symmetry if the matrix is symmetric. We apply the boundary condition [1 0 0] [x] = [ v ] [d e f] [y] [ b2 ] [g h i] [z] [ b3 ] and then zero the column as well, adding a term to the RHS to take account for the zero-matrix components [1 0 0] [x] = [ v ] - v[ 0 ] [0 e f] [y] [ b2 ] [ d ] [0 h i] [z] [ b3 ] [ g ] Note the last term is the first column of the matrix, with one component zeroed, and multiplied by the boundary condition value. This last term is then stored in rLinearSystem.rGetDirichletBoundaryConditionsVector(), and in general form is the SUM_{d=1..D} v_d a'_d where v_d is the boundary value of boundary condition d (d an index into the matrix), and a'_d is the dth-column of the matrix but with the d-th component zeroed, and where there are D boundary conditions
Definition at line 232 of file BoundaryConditionsContainerImplementation.hpp.
References PetscVecTools::AddScaledVector(), LinearSystem::AssembleFinalLinearSystem(), GenericEventHandler< 16, HeartEventHandler >::BeginEvent(), GenericEventHandler< 16, HeartEventHandler >::EndEvent(), LinearSystem::GetMatrixRowDistributed(), LinearSystem::GetOwnershipRange(), LinearSystem::GetSize(), AbstractBoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::HasDirichletBoundaryConditions(), LinearSystem::IsMatrixSymmetric(), AbstractBoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mDirichIterator, AbstractBoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpDirichletMap, LinearSystem::rGetDirichletBoundaryConditionsVector(), LinearSystem::rGetRhsVector(), PetscVecTools::SetElement(), LinearSystem::SetRhsVectorElement(), PetscVecTools::Zero(), LinearSystem::ZeroMatrixRowsAndColumnsWithValueOnDiagonal(), and LinearSystem::ZeroMatrixRowsWithValueOnDiagonal().
Referenced by ExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >::SetupLinearSystem(), and BidomainSolver< ELEMENT_DIM, SPACE_DIM >::SetupLinearSystem().
void BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::ApplyDirichletToNonlinearJacobian | ( | Mat | jacobian | ) | [inline] |
Alter the Jacobian matrix vector for a nonlinear system to satisfy Dirichlet boundary conditions.
If the number of unknowns is greater than one, it is assumed the solution vector is of the form (in the case of two unknowns u and v, and N nodes): solnvec = (U_1, V_1, U_2, V_2, ...., U_N, V_N)
jacobian |
Definition at line 431 of file BoundaryConditionsContainerImplementation.hpp.
References PetscMatTools::Finalise(), AbstractBoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mDirichIterator, AbstractBoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpDirichletMap, and PetscMatTools::ZeroRowsWithValueOnDiagonal().
void BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::ApplyDirichletToNonlinearResidual | ( | const Vec | currentSolution, | |
Vec | residual, | |||
DistributedVectorFactory & | rFactory | |||
) | [inline] |
Alter the residual vector for a nonlinear system to satisfy Dirichlet boundary conditions.
If the number of unknowns is greater than one, it is assumed the solution vector is of the form (in the case of two unknowns u and v, and N nodes): solnvec = (U_1, V_1, U_2, V_2, ...., U_N, V_N)
currentSolution | ||
residual | ||
rFactory | the factory to use to create DistributedVector objects |
Definition at line 397 of file BoundaryConditionsContainerImplementation.hpp.
References DistributedVectorFactory::CreateDistributedVector(), DistributedVector::IsGlobalIndexLocal(), AbstractBoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mDirichIterator, AbstractBoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpDirichletMap, and DistributedVector::Restore().
BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::NeumannMapIterator BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::BeginNeumann | ( | ) | [inline] |
Definition at line 536 of file BoundaryConditionsContainerImplementation.hpp.
References BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpNeumannMap.
void BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::DefineConstantDirichletOnMeshBoundary | ( | AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > * | pMesh, | |
double | value, | |||
unsigned | indexOfUnknown = 0 | |||
) | [inline] |
This function defines constant Dirichlet boundary conditions on every boundary node of the mesh.
pMesh | Pointer to a mesh object, from which we extract the boundary | |
value | the value of the constant Dirichlet boundary condition | |
indexOfUnknown | defaults to 0 |
Definition at line 160 of file BoundaryConditionsContainerImplementation.hpp.
References BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::AddDirichletBoundaryCondition(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetBoundaryNodeIteratorBegin(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetBoundaryNodeIteratorEnd(), and AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNumBoundaryNodes().
Referenced by BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::DefineZeroDirichletOnMeshBoundary().
void BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::DefineZeroDirichletOnMeshBoundary | ( | AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > * | pMesh, | |
unsigned | indexOfUnknown = 0 | |||
) | [inline] |
This function defines zero Dirichlet boundary conditions on every boundary node of the mesh.
pMesh | Pointer to a mesh object, from which we extract the boundary | |
indexOfUnknown | defaults to 0 |
Definition at line 153 of file BoundaryConditionsContainerImplementation.hpp.
References BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::DefineConstantDirichletOnMeshBoundary().
void BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::DefineZeroNeumannOnMeshBoundary | ( | AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > * | pMesh, | |
unsigned | indexOfUnknown = 0 | |||
) | [inline] |
This function defines zero Neumann boundary conditions on every boundary element of the mesh.
pMesh | Pointer to a mesh object, from which we extract the boundary | |
indexOfUnknown | defaults to 0 |
Definition at line 181 of file BoundaryConditionsContainerImplementation.hpp.
References BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::AddNeumannBoundaryCondition(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetBoundaryElementIteratorBegin(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetBoundaryElementIteratorEnd(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNumBoundaryElements(), and BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mAnyNonZeroNeumannConditionsForUnknown.
BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::NeumannMapIterator BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::EndNeumann | ( | ) | [inline] |
Definition at line 543 of file BoundaryConditionsContainerImplementation.hpp.
References BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpNeumannMap.
double BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::GetNeumannBCValue | ( | const BoundaryElement< ELEMENT_DIM-1, SPACE_DIM > * | pSurfaceElement, | |
const ChastePoint< SPACE_DIM > & | rX, | |||
unsigned | indexOfUnknown = 0 | |||
) | [inline] |
Obtain value of Neumann boundary condition at a specified point in a given surface element
It is up to the user to ensure that the point x is contained in the surface element.
pSurfaceElement | pointer to a boundary element | |
rX | a point | |
indexOfUnknown | defaults to 0 |
Definition at line 487 of file BoundaryConditionsContainerImplementation.hpp.
References BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mLastNeumannCondition, and BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpNeumannMap.
bool BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::HasNeumannBoundaryCondition | ( | const BoundaryElement< ELEMENT_DIM-1, SPACE_DIM > * | pSurfaceElement, | |
unsigned | indexOfUnknown = 0 | |||
) | [inline] |
Test if there is a Neumann boundary condition defined on the given element.
pSurfaceElement | pointer to a boundary element | |
indexOfUnknown | defaults to 0 |
Definition at line 511 of file BoundaryConditionsContainerImplementation.hpp.
References BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mLastNeumannCondition, and BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpNeumannMap.
Referenced by BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Validate().
void BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::load | ( | Archive & | archive, | |
const unsigned int | version | |||
) | [inline, private] |
Load this container, but not its content.
Objects loading a boundary conditions container should call LoadFromArchive on the new object immediately after loading it from the archive.
Note that boundary conditions should be saved to the ProcessSpecificArchive, since if a DistributedTetrahedralMesh is used each process will only know a portion of the mesh, and hence a portion of the boundary conditions.
Extra care needs to be taken when migrating to ensure that boundary conditions are loaded appropriately. See BidomainProblem::LoadExtraArchiveForBidomain and AbstractCardiacProblem::LoadExtraArchive for examples.
archive | ||
version |
Definition at line 344 of file BoundaryConditionsContainer.hpp.
void BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::LoadFromArchive | ( | Archive & | archive, | |
AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > * | pMesh | |||
) | [inline] |
Load a collection of boundary conditions from an archive.
This method only loads data if mLoadedFromArchive is false, to allow for multiple pointers to the same container to be handled correctly. It sets mLoadedFromArchive when done.
archive | the archive to load from | |
pMesh | the mesh to use to resolve Node and BoundaryElement indices |
Definition at line 290 of file BoundaryConditionsContainer.hpp.
void BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::MergeFromArchive | ( | Archive & | archive, | |
AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > * | pMesh | |||
) | [inline] |
Load extra boundary conditions from an archive to add to this collection.
Multiple pointers to the same container need to be handled by the caller - we assume there will be conditions to load. Sets mLoadedFromArchive when done.
archive | the archive to load from | |
pMesh | the mesh to use to resolve Node and BoundaryElement indices |
Definition at line 392 of file BoundaryConditionsContainer.hpp.
References BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::AddDirichletBoundaryCondition(), BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::AddNeumannBoundaryCondition(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetBoundaryElement(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNodeFromPrePermutationIndex(), AbstractBoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mCheckedAndCommunicatedIfDirichletBcs, AbstractBoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mHasDirichletBCs, and BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mLoadedFromArchive.
Referenced by BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, 2 >::LoadFromArchive().
void BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::save | ( | Archive & | archive, | |
const unsigned int | version | |||
) | const [inline, private] |
Save this container and its contents.
archive | ||
version |
Definition at line 353 of file BoundaryConditionsContainer.hpp.
References AbstractBoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpDirichletMap, and BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpNeumannMap.
bool BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Validate | ( | AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > * | pMesh | ) | [inline] |
Check that we have boundary conditions defined everywhere on mesh boundary.
We iterate over all surface elements, and check either that they have an associated Neumann condition, or that each node in the element has an associated Dirichlet condition.
pMesh | Pointer to the mesh to check for validity. |
Definition at line 458 of file BoundaryConditionsContainerImplementation.hpp.
References AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetBoundaryElementIteratorBegin(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetBoundaryElementIteratorEnd(), AbstractBoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::HasDirichletBoundaryCondition(), and BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::HasNeumannBoundaryCondition().
friend class boost::serialization::access [friend] |
Needed for serialization.
Definition at line 315 of file BoundaryConditionsContainer.hpp.
bool BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mAnyNonZeroNeumannConditionsForUnknown[PROBLEM_DIM] [private] |
Array storing whether there are any Neumann boundary conditions for each unknown.
Definition at line 84 of file BoundaryConditionsContainer.hpp.
Referenced by BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::AddNeumannBoundaryCondition(), BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::AnyNonZeroNeumannConditions(), BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::BoundaryConditionsContainer(), and BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::DefineZeroNeumannOnMeshBoundary().
NeumannMapIterator BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mLastNeumannCondition[PROBLEM_DIM] [private] |
Neumann boundary condition iterator.
Definition at line 79 of file BoundaryConditionsContainer.hpp.
Referenced by BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::BoundaryConditionsContainer(), BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::GetNeumannBCValue(), and BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::HasNeumannBoundaryCondition().
bool BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mLoadedFromArchive [private] |
Whether the contents of this container were originally loaded from an archive.
Definition at line 90 of file BoundaryConditionsContainer.hpp.
Referenced by BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::BoundaryConditionsContainer(), BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, 2 >::LoadFromArchive(), and BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::MergeFromArchive().
std::map< const BoundaryElement<ELEMENT_DIM-1, SPACE_DIM> *, const AbstractBoundaryCondition<SPACE_DIM>* >* BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpNeumannMap[PROBLEM_DIM] [private] |
List (map) of Neumann boundary conditions.
Definition at line 74 of file BoundaryConditionsContainer.hpp.
Referenced by BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::AddNeumannBoundaryCondition(), BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::BeginNeumann(), BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::BoundaryConditionsContainer(), BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::EndNeumann(), BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::GetNeumannBCValue(), BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::HasNeumannBoundaryCondition(), BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::save(), and BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::~BoundaryConditionsContainer().
ConstBoundaryCondition<SPACE_DIM>* BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpZeroBoundaryCondition [private] |
A zero boundary condition, used for other unknowns in ApplyNeumannBoundaryCondition
Definition at line 87 of file BoundaryConditionsContainer.hpp.
Referenced by BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::AddNeumannBoundaryCondition(), BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::BoundaryConditionsContainer(), and BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::~BoundaryConditionsContainer().